Rounding of research amounts

This commit is contained in:
Anuken
2020-07-26 10:35:47 -04:00
parent 42d7eb4e05
commit 95f7fc1b3b
15 changed files with 60 additions and 22 deletions

View File

@@ -12,6 +12,7 @@ import arc.scene.ui.layout.*;
import arc.struct.*;
import arc.util.ArcAnnotate.*;
import arc.util.*;
import mindustry.core.*;
import mindustry.entities.*;
import mindustry.entities.units.*;
import mindustry.game.EventType.*;
@@ -325,7 +326,7 @@ public class PlacementFragment extends Fragment{
int stackamount = Math.round(stack.amount * state.rules.buildCostMultiplier);
String color = (amount < stackamount / 2f ? "[red]" : amount < stackamount ? "[accent]" : "[white]");
return color + ui.formatAmount(amount) + "[white]/" + stackamount;
return color + UI.formatAmount(amount) + "[white]/" + stackamount;
}).padLeft(5);
}).left();
req.row();