Some servers might want to disable territorial warfare alltogether.

This commit is contained in:
Olof Larsson 2012-07-30 23:28:23 +02:00
parent a380b86a71
commit 7f228b648a
2 changed files with 5 additions and 0 deletions

View File

@ -129,6 +129,7 @@ public class Conf
public static boolean permanentFactionsDisableLeaderPromotion = false; public static boolean permanentFactionsDisableLeaderPromotion = false;
public static boolean claimsMustBeConnected = false; public static boolean claimsMustBeConnected = false;
public static boolean claimingFromOthersAllowed = true;
public static boolean claimsCanBeUnconnectedIfOwnedByOtherFaction = true; public static boolean claimsCanBeUnconnectedIfOwnedByOtherFaction = true;
public static int claimsRequireMinFactionMembers = 1; public static int claimsRequireMinFactionMembers = 1;
public static int claimedLandsMax = 0; public static int claimedLandsMax = 0;

View File

@ -575,6 +575,10 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator
{ {
error = P.p.txt.parse("<b>Limit reached. You can't claim more land!"); error = P.p.txt.parse("<b>Limit reached. You can't claim more land!");
} }
else if ( ! Conf.claimingFromOthersAllowed && currentFaction.isNormal())
{
error = P.p.txt.parse("<b>You may not claim land from others.");
}
else if (currentFaction.getRelationTo(forFaction).isAtLeast(Rel.TRUCE) && ! currentFaction.isNone()) else if (currentFaction.getRelationTo(forFaction).isAtLeast(Rel.TRUCE) && ! currentFaction.isNone())
{ {
error = P.p.txt.parse("<b>You can't claim this land due to your relation with the current owner."); error = P.p.txt.parse("<b>You can't claim this land due to your relation with the current owner.");