Skip to content

Commit

Permalink
Add worth column
Browse files Browse the repository at this point in the history
  • Loading branch information
xdnw committed May 15, 2024
1 parent b4d57d4 commit 1213ac8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ public String listConflicts(@Me IMessageIO io, @Me JSONObject command, ConflictM
response.append(TimeUtil.DD_MM_YYYY.format(TimeUtil.getTimeFromTurn(conflict.getEndTurn())));
}
response.append("\n");
response.append("- " + conflict.getTotalWars() + " wars\n");
response.append("- Coalition 1: ").append(conflict.getCoalition1().stream().map(f -> PW.getName(f, true)).collect(Collectors.joining(","))).append("\n");
response.append("- Coalition 2: ").append(conflict.getCoalition2().stream().map(f -> PW.getName(f, true)).collect(Collectors.joining(","))).append("\n");
response.append("---\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public Set<String> read() {
}

public TransferSheet write() {
List<String> header = new ArrayList<>(Arrays.asList("nation", "alliance", "cities"));
List<String> header = new ArrayList<>(Arrays.asList("nation", "alliance", "cities", "worth"));
for (ResourceType value : ResourceType.values) {
if (value != ResourceType.CREDITS) header.add(value.name());
}
Expand All @@ -188,6 +188,7 @@ public TransferSheet write() {
row.add(nation.getCities());
}
Map<ResourceType, Double> transfer = entry.getValue();
row.add(ResourceType.convertedTotal(transfer));
for (ResourceType type : ResourceType.values) {
if (type != ResourceType.CREDITS) {
double amt = transfer.getOrDefault(type, 0d);
Expand Down

0 comments on commit 1213ac8

Please sign in to comment.