More stat tracking
This commit is contained in:
@@ -192,12 +192,12 @@ public class Logic implements ApplicationListener{
|
||||
});
|
||||
|
||||
Events.on(UnitDestroyEvent.class, e -> {
|
||||
if(e.unit.team() != state.rules.defaultTeam){
|
||||
if(e.unit.team != state.rules.defaultTeam){
|
||||
state.stats.enemyUnitsDestroyed ++;
|
||||
}
|
||||
|
||||
if(checkCampaignStats()){
|
||||
state.getPlanet().stats().enemyUnitsDestroyed.increment(e.unit.type);
|
||||
}
|
||||
if(checkCampaignStats()){
|
||||
(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<>();
|
||||
/** Player team units produced by type. */
|
||||
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. */
|
||||
public ObjectIntMap<Block> buildingsBuilt = new ObjectIntMap<>();
|
||||
/** Record of blocks that have been placed by count. */
|
||||
|
||||
Reference in New Issue
Block a user