Skip to content

Commit

Permalink
Fix SiegeWar not respecting one of Towny's bankruptcy settings.
Browse files Browse the repository at this point in the history
does_nation_tax_delete_conquered_towns_that_cannot_pay was not being
respected and bankrupt towns that couldn't pay the per-plot nation
occupation tax were being removed.
  • Loading branch information
LlmDl committed Nov 30, 2024
1 parent 1c9e89f commit ad52142
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,10 @@ private static double collectNationOccupationTax(Nation nation, double taxPerPlo
if (town.getAccount().getHoldingBalance() - tax < debtCap * -1) {
// The Town cannot afford to pay the nation occupation tax.
Messaging.sendGlobalMessage(Translatable.of("msg_occupation_tax_cannot_be_paid", town.getName()));
removeTownOccupation(town);
TownyUniverse.getInstance().getDataSource().removeTown(town, Cause.BANKRUPTCY);
if (TownySettings.doesNationTaxDeleteConqueredTownsWhichCannotPay()) {
removeTownOccupation(town);
TownyUniverse.getInstance().getDataSource().removeTown(town, Cause.BANKRUPTCY);
}
return 0;
}

Expand Down

0 comments on commit ad52142

Please sign in to comment.