Merge pull request #2906 from Quezler/patch-53

Visualize maximum amount of power node wires
This commit is contained in:
Anuken 2020-10-11 10:19:58 -04:00 committed by GitHub
commit d9aa1f765d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -628,6 +628,7 @@ bar.powerbalance = Power: {0}/s
bar.powerstored = Stored: {0}/{1}
bar.poweramount = Power: {0}
bar.poweroutput = Power Output: {0}
bar.powerlines = Connections: {0}/{1}
bar.items = Items: {0}
bar.capacity = Capacity: {0}
bar.unitcap = {0} {1}/{2}

View File

@ -112,6 +112,12 @@ public class PowerNode extends PowerBlock{
(UI.formatAmount((int)entity.power.graph.getLastPowerStored())), UI.formatAmount((int)entity.power.graph.getLastCapacity())),
() -> Pal.powerBar,
() -> Mathf.clamp(entity.power.graph.getLastPowerStored() / entity.power.graph.getLastCapacity())));
bars.add("connections", entity -> new Bar(() ->
Core.bundle.format("bar.powerlines", entity.power.links.size, maxNodes),
() -> Pal.items,
() -> (float)entity.power.links.size / (float)maxNodes
));
}
@Override