Skip to content

Commit

Permalink
Infra wrong case
Browse files Browse the repository at this point in the history
  • Loading branch information
xdnw committed Aug 6, 2024
1 parent 86dd319 commit 67a5584
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ else if (getMoney_looted() != 0) {
buffer[ResourceType.MONEY.ordinal()] += attacker ? -getMoney_looted() : getMoney_looted();
}
}
if (attacker) {
if (!attacker) {
if (infra && getInfra_destroyed_value() != 0) {
buffer[ResourceType.MONEY.ordinal()] += getInfra_destroyed_value();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ public String purgeFeatured(ConflictManager manager, @Me IMessageIO io, @Me JSON
continue;
}
String key = object.getKey();
boolean matches = key.matches("conflict/graphs/[0-9]+\\.gzip") || key.matches("conflict/[0-9]+\\.gzip");
boolean matches = key.matches("conflicts/graphs/[0-9]+\\.gzip") || key.matches("conflicts/[0-9]+\\.gzip");
if (!matches) continue;
int id = Integer.parseInt(key.replaceAll("[^0-9]", ""));
Conflict conflict = manager.getConflictById(id);
Expand Down Expand Up @@ -882,8 +882,9 @@ public String purgeTemporaryConflicts(ConflictManager manager, @Me IMessageIO io
List<String> kept = new ArrayList<>();
for (S3ObjectSummary object : manager.getAws().getObjects()) {
String key = object.getKey();
boolean matches = key.matches("conflicts/n/[0-9]+/[a-z0-9]+\\.gzip") || key.matches("conflicts/graphs/n/[0-9]+/[a-z0-9]+\\.gzip");
boolean matches = key.matches("conflicts/n/[0-9]+/[a-z0-9-]+\\.gzip") || key.matches("conflicts/graphs/n/[0-9]+/[a-z0-9-]+\\.gzip");
if (!matches) continue;

int nationId = Integer.parseInt(key.replaceAll("[^0-9]", ""));
String uuidStr = key.substring(key.lastIndexOf("/") + 1, key.lastIndexOf("."));
String nameStr = PW.getMarkdownUrl(nationId, false) + "/" + uuidStr;
Expand Down

0 comments on commit 67a5584

Please sign in to comment.