Heat icon
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package mindustry.world.meta;
|
||||
|
||||
import arc.*;
|
||||
import arc.util.*;
|
||||
import mindustry.gen.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@@ -18,7 +20,7 @@ public class StatUnit{
|
||||
itemsSecond = new StatUnit("itemsSecond"),
|
||||
liquidUnits = new StatUnit("liquidUnits"),
|
||||
powerUnits = new StatUnit("powerUnits"),
|
||||
heatUnits = new StatUnit("heatUnits"),
|
||||
heatUnits = new StatUnit("heatUnits", "[red]" + Iconc.waves + "[]"),
|
||||
degrees = new StatUnit("degrees"),
|
||||
seconds = new StatUnit("seconds"),
|
||||
minutes = new StatUnit("minutes"),
|
||||
@@ -33,6 +35,7 @@ public class StatUnit{
|
||||
|
||||
public final boolean space;
|
||||
public final String name;
|
||||
public @Nullable String icon;
|
||||
|
||||
public StatUnit(String name, boolean space){
|
||||
this.name = name;
|
||||
@@ -43,6 +46,11 @@ public class StatUnit{
|
||||
this(name, true);
|
||||
}
|
||||
|
||||
public StatUnit(String name, String icon){
|
||||
this(name, true);
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
public String localized(){
|
||||
if(this == none) return "";
|
||||
return Core.bundle.get("unit." + name.toLowerCase(Locale.ROOT));
|
||||
|
||||
@@ -49,7 +49,7 @@ public class StatValues{
|
||||
|
||||
public static StatValue number(float value, StatUnit unit, boolean merge){
|
||||
return table -> {
|
||||
String l1 = fixValue(value), l2 = (unit.space ? " " : "") + unit.localized();
|
||||
String l1 = (unit.icon == null ? "" : unit.icon + " ") + fixValue(value), l2 = (unit.space ? " " : "") + unit.localized();
|
||||
|
||||
if(merge){
|
||||
table.add(l1 + l2);
|
||||
|
||||
Reference in New Issue
Block a user