Round maxProduction up
This commit is contained in:
@@ -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(() -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user