mirror of
https://github.com/yawaflua/Informatis.git
synced 2025-12-10 12:09:27 +02:00
clean up
This commit is contained in:
@@ -50,7 +50,6 @@ public class BarInfo {
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(target instanceof Healthc) {
|
||||
strings.set(0, Core.bundle.format("shar-stat.health", Strings.fixed(((Healthc)target).health(), 1)));
|
||||
colors.set(0, Pal.health);
|
||||
@@ -58,7 +57,6 @@ public class BarInfo {
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(target instanceof Turret.TurretBuild){
|
||||
float value = Mathf.clamp(((Turret.TurretBuild)target).reload / ((Turret)((Turret.TurretBuild)target).block).reloadTime) * 100f;
|
||||
strings.set(1, Core.bundle.format("shar-stat.reload", Strings.fixed(value, (Math.abs((int)value - value) <= 0.001f ? 0 : Math.abs((int)(value * 10) - value * 10) <= 0.001f ? 1 : 2))));
|
||||
@@ -129,8 +127,7 @@ public class BarInfo {
|
||||
numbers.set(2, ((Unit)target).stack().amount / (((Unit)target).type().itemCapacity * 1f));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if(target instanceof Turret.TurretBuild){
|
||||
Turret turret = (Turret)((Turret.TurretBuild)target).block;
|
||||
if(turret.chargeTime > 0f) {
|
||||
@@ -147,7 +144,6 @@ public class BarInfo {
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(target instanceof Unit && target instanceof Payloadc && ((Unit) target).type != null){
|
||||
strings.set(4, Core.bundle.format("shar-stat.payloadCapacity", Mathf.round(Mathf.sqrt(((Payloadc)target).payloadUsed())), Mathf.round(Mathf.sqrt(((Unit)target).type().payloadCapacity))));
|
||||
colors.set(4, Pal.items);
|
||||
@@ -161,7 +157,6 @@ public class BarInfo {
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(target instanceof Unit && state.rules.unitAmmo && ((Unit) target).type != null){
|
||||
strings.set(5, Core.bundle.format("shar-stat.ammos", ((Unit)target).ammo(), ((Unit)target).type().ammoCapacity));
|
||||
colors.set(5, ((Unit)target).type().ammoType.color);
|
||||
|
||||
Reference in New Issue
Block a user