More stat tracking
This commit is contained in:
@@ -192,12 +192,12 @@ public class Logic implements ApplicationListener{
|
|||||||
});
|
});
|
||||||
|
|
||||||
Events.on(UnitDestroyEvent.class, e -> {
|
Events.on(UnitDestroyEvent.class, e -> {
|
||||||
if(e.unit.team() != state.rules.defaultTeam){
|
if(e.unit.team != state.rules.defaultTeam){
|
||||||
state.stats.enemyUnitsDestroyed ++;
|
state.stats.enemyUnitsDestroyed ++;
|
||||||
|
}
|
||||||
|
|
||||||
if(checkCampaignStats()){
|
if(checkCampaignStats()){
|
||||||
state.getPlanet().stats().enemyUnitsDestroyed.increment(e.unit.type);
|
(e.unit.team != state.rules.defaultTeam ? state.getPlanet().stats().enemyUnitsDestroyed : state.getPlanet().stats().unitsDestroyed).increment(e.unit.type);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ public class CampaignStats{
|
|||||||
public ObjectIntMap<Block> enemyBuildingsDestroyed = new ObjectIntMap<>();
|
public ObjectIntMap<Block> enemyBuildingsDestroyed = new ObjectIntMap<>();
|
||||||
/** Player team units produced by type. */
|
/** Player team units produced by type. */
|
||||||
public ObjectIntMap<UnitType> unitsProduced = new ObjectIntMap<>();
|
public ObjectIntMap<UnitType> unitsProduced = new ObjectIntMap<>();
|
||||||
|
/** Player team units destroyed by type. */
|
||||||
|
public ObjectIntMap<UnitType> unitsDestroyed = new ObjectIntMap<>();
|
||||||
/** Record of blocks that have been placed by count. */
|
/** Record of blocks that have been placed by count. */
|
||||||
public ObjectIntMap<Block> buildingsBuilt = new ObjectIntMap<>();
|
public ObjectIntMap<Block> buildingsBuilt = new ObjectIntMap<>();
|
||||||
/** Record of blocks that have been placed by count. */
|
/** Record of blocks that have been placed by count. */
|
||||||
|
|||||||
@@ -26,4 +26,4 @@ org.gradle.caching=true
|
|||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
android.enableR8.fullMode=false
|
android.enableR8.fullMode=false
|
||||||
archash=8716bc86c1
|
archash=dcd145f37e
|
||||||
|
|||||||
Reference in New Issue
Block a user