Make certain negative stats red (#7842)
This commit is contained in:
@@ -986,7 +986,7 @@ bullet.infinitepierce = [stat]pierce
|
|||||||
bullet.healpercent = [stat]{0}[lightgray]% repair
|
bullet.healpercent = [stat]{0}[lightgray]% repair
|
||||||
bullet.healamount = [stat]{0}[lightgray] direct repair
|
bullet.healamount = [stat]{0}[lightgray] direct repair
|
||||||
bullet.multiplier = [stat]{0}[lightgray]x ammo multiplier
|
bullet.multiplier = [stat]{0}[lightgray]x ammo multiplier
|
||||||
bullet.reload = [stat]{0}[lightgray]x fire rate
|
bullet.reload = [stat]{0}%[lightgray] fire rate
|
||||||
bullet.range = [stat]{0}[lightgray] tiles range
|
bullet.range = [stat]{0}[lightgray] tiles range
|
||||||
|
|
||||||
unit.blocks = blocks
|
unit.blocks = blocks
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
Colors.put("unlaunched", Color.valueOf("8982ed"));
|
Colors.put("unlaunched", Color.valueOf("8982ed"));
|
||||||
Colors.put("highlight", Pal.accent.cpy().lerp(Color.white, 0.3f));
|
Colors.put("highlight", Pal.accent.cpy().lerp(Color.white, 0.3f));
|
||||||
Colors.put("stat", Pal.stat);
|
Colors.put("stat", Pal.stat);
|
||||||
|
Colors.put("negstat", Pal.negativeStat);
|
||||||
|
|
||||||
drillCursor = Core.graphics.newCursor("drill", Fonts.cursorScale());
|
drillCursor = Core.graphics.newCursor("drill", Fonts.cursorScale());
|
||||||
unloadCursor = Core.graphics.newCursor("unload", Fonts.cursorScale());
|
unloadCursor = Core.graphics.newCursor("unload", Fonts.cursorScale());
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ public class Pal{
|
|||||||
bar = Color.slate,
|
bar = Color.slate,
|
||||||
accent = Color.valueOf("ffd37f"),
|
accent = Color.valueOf("ffd37f"),
|
||||||
stat = Color.valueOf("ffd37f"),
|
stat = Color.valueOf("ffd37f"),
|
||||||
|
negativeStat = Color.valueOf("e55454"),
|
||||||
gray = Color.valueOf("454545"),
|
gray = Color.valueOf("454545"),
|
||||||
metalGrayDark = Color.valueOf("6e7080"),
|
metalGrayDark = Color.valueOf("6e7080"),
|
||||||
accentBack = Color.valueOf("d4816b"),
|
accentBack = Color.valueOf("d4816b"),
|
||||||
|
|||||||
@@ -351,11 +351,11 @@ public class StatValues{
|
|||||||
|
|
||||||
if(type.buildingDamageMultiplier != 1){
|
if(type.buildingDamageMultiplier != 1){
|
||||||
int val = (int)(type.buildingDamageMultiplier * 100 - 100);
|
int val = (int)(type.buildingDamageMultiplier * 100 - 100);
|
||||||
sep(bt, Core.bundle.format("bullet.buildingdamage", (val > 0 ? "+" : "") + val));
|
sep(bt, Core.bundle.format("bullet.buildingdamage", ammoStat(val)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(type.rangeChange != 0 && !compact){
|
if(type.rangeChange != 0 && !compact){
|
||||||
sep(bt, Core.bundle.format("bullet.range", (type.rangeChange > 0 ? "+" : "-") + Strings.autoFixed(type.rangeChange / tilesize, 1)));
|
sep(bt, Core.bundle.format("bullet.range", ammoStat(type.rangeChange / tilesize)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(type.splashDamage > 0){
|
if(type.splashDamage > 0){
|
||||||
@@ -367,7 +367,8 @@ public class StatValues{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!compact && !Mathf.equal(type.reloadMultiplier, 1f)){
|
if(!compact && !Mathf.equal(type.reloadMultiplier, 1f)){
|
||||||
sep(bt, Core.bundle.format("bullet.reload", Strings.autoFixed(type.reloadMultiplier, 2)));
|
int val = (int)(type.reloadMultiplier * 100 - 100);
|
||||||
|
sep(bt, Core.bundle.format("bullet.reload", ammoStat(val)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(type.knockback > 0){
|
if(type.knockback > 0){
|
||||||
@@ -425,6 +426,11 @@ public class StatValues{
|
|||||||
table.add(text);
|
table.add(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//for AmmoListValue
|
||||||
|
private static String ammoStat(float val){
|
||||||
|
return (val > 0 ? "[stat]+" : "[negstat]") + Strings.autoFixed(val, 1);
|
||||||
|
}
|
||||||
|
|
||||||
private static TextureRegion icon(UnlockableContent t){
|
private static TextureRegion icon(UnlockableContent t){
|
||||||
return t.uiIcon;
|
return t.uiIcon;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user