add production rates to plot

master
agp8x 2023-04-10 17:40:33 +02:00
parent 6d778d16aa
commit a2db6b7765
1 changed files with 2 additions and 2 deletions

View File

@ -106,8 +106,8 @@ public class Utils {
if (item.isRaw()) {
m.put("peripheries", DefaultAttribute.createAttribute(2));
}
String label = item.getName();
Double required = sum.outgoingEdgesOf(item).stream().map(ProductionEdge::getTotalRequired).reduce(Double::sum).orElseGet(() -> 0.0);
String label = "%s \n(%.1f)" .formatted(item.getName(), required );
m.put("label", DefaultAttribute.createAttribute(label));
return m;
});