Round maxProduction up

This commit is contained in:
Anuken
2020-12-04 15:22:59 -05:00
parent 7938e02e78
commit 6af015cc05
@@ -1,6 +1,7 @@
package mindustry.desktop.steam; package mindustry.desktop.steam;
import arc.*; import arc.*;
import arc.math.*;
import arc.struct.*; import arc.struct.*;
import arc.util.*; import arc.util.*;
import com.codedisaster.steamworks.*; import com.codedisaster.steamworks.*;
@@ -99,13 +100,13 @@ public class SStats implements SteamUserStatsCallback{
for(Sector sec : planet.sectors){ for(Sector sec : planet.sectors){
if(sec.hasBase()){ if(sec.hasBase()){
for(var v : sec.info.production.values()){ for(var v : sec.info.production.values()){
total += (int)(v.mean * 60); if(v.mean > 0) total += v.mean * 60;
} }
} }
} }
} }
SStat.maxProduction.max((int)total); SStat.maxProduction.max(Mathf.round(total));
}); });
Events.run(Trigger.newGame, () -> Core.app.post(() -> { Events.run(Trigger.newGame, () -> Core.app.post(() -> {