improve building list format
parent
9f5ecdee8a
commit
c4cf7c9ec9
|
|
@ -247,8 +247,14 @@ public class Recipe {
|
|||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public String formatName(){
|
||||
if (name == null) {
|
||||
return formatOutputs();
|
||||
}
|
||||
return name + " (" + formatOutputs() + ")";
|
||||
}
|
||||
|
||||
public String getOutputs() {
|
||||
public String formatOutputs() {
|
||||
return outputs.keySet().stream().map(Item::getName).collect(Collectors.joining(" + "));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,9 +102,9 @@ public class SumResult {
|
|||
StringBuilder internal = new StringBuilder();
|
||||
for (Map.Entry<Recipe, Double> recipes : entry.getValue().entrySet()) {
|
||||
sum += Math.ceil(recipes.getValue());
|
||||
internal.append("\t").append(recipes.getKey().getName()).append(" (").append(recipes.getKey().getOutputs()).append(")\t").append(recipes.getValue()).append("\n");
|
||||
internal.append("\t").append(recipes.getKey().formatName()).append("\t").append(recipes.getValue()).append("\n");
|
||||
}
|
||||
sb.append(entry.getKey().getName().replace("satisfactory.buildings.production.","")). append("\t"). append(sum).append("\n").append(internal);
|
||||
sb.append(entry.getKey().getName()). append("\t"). append(sum).append("\n").append(internal);
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue