Skip to content

Commit

Permalink
Cancel out takeoverWouldCutATownIntoTwoSections boolean
Browse files Browse the repository at this point in the history
Issues with towns not being able to takeoverclaim in instances where the overclaimed town would not be split into two.
  • Loading branch information
CorruptedGreed authored and Warriorrrr committed Sep 2, 2024
1 parent 88c72cd commit 48dadee
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3661,11 +3661,11 @@ private void parseTownTakeoverClaimCommand(Player player) throws TownyException

// Prevent straight line claims if configured, and the town has enough townblocks claimed, and this is not an outpost.
ProximityUtil.testAdjacentClaimsRulesOrThrow(wc, town, false);

/*
// Prevent claiming that would cut off a section of a town from the main body.
if (takeoverWouldCutATownIntoTwoSections(wc, town))
throw new TownyException(Translatable.of("msg_err_you_cannot_over_claim_would_cut_into_two"));

*/
// Filter out stealing land that is too close to another Town's homeblock.
if (TownySettings.isOverClaimingPreventedByHomeBlockRadius() && AreaSelectionUtil.isTooCloseToHomeBlock(wc, town))
throw new TownyException(Translatable.of("msg_too_close2", Translatable.of("homeblock")));
Expand All @@ -3681,7 +3681,7 @@ private void parseTownTakeoverClaimCommand(Player player) throws TownyException
.setCost(new ConfirmationTransaction(() -> cost, town, "Takeover Claim (" + wc.toString() + ") from " + townName + "."))
.sendTo(player);
}

/*
private boolean takeoverWouldCutATownIntoTwoSections(WorldCoord worldCoord, Town townOverClaiming) {
// If the surrounding townblocks has at least 2 townblocks owned by the
// overclaimed town and 1 plot that belongs to the wilderness or a third-town,
Expand All @@ -3697,7 +3697,7 @@ private boolean takeoverWouldCutATownIntoTwoSections(WorldCoord worldCoord, Town
.count();
return wildOr3rdPartyOwned > 0;
}

*/
private void parseTownBankHistoryCommand(final Player player, String[] split)
throws NoPermissionException, TownyException {
checkPermOrThrow(player, PermissionNodes.TOWNY_COMMAND_TOWN_BANKHISTORY.getNode());
Expand Down

0 comments on commit 48dadee

Please sign in to comment.