Moving home config from ConfServer --> UConf

This commit is contained in:
Olof Larsson
2013-04-23 18:07:17 +02:00
parent 29e05fd54d
commit 3dc2691bea
5 changed files with 33 additions and 29 deletions

View File

@ -231,7 +231,7 @@ public class Faction extends Entity<Faction> implements EconomyParticipator
public boolean isValidHome(PS ps)
{
if (ps == null) return true;
if (!ConfServer.homesMustBeInClaimedTerritory) return true;
if (!UConf.get(this).homesMustBeInClaimedTerritory) return true;
if (BoardColls.get().getFactionAt(ps) == this) return true;
return false;
}

View File

@ -60,6 +60,18 @@ public class UConf extends Entity<UConf>
public double powerPerHour = 2.0;
public double powerPerDeath = -2.0;
// -------------------------------------------- //
// HOMES
// -------------------------------------------- //
public boolean homesEnabled = true;
public boolean homesMustBeInClaimedTerritory = true;
public boolean homesTeleportCommandEnabled = true;
public boolean homesTeleportAllowedFromEnemyTerritory = true;
public boolean homesTeleportAllowedFromDifferentWorld = true;
public double homesTeleportAllowedEnemyDistance = 32.0;
public boolean homesTeleportIgnoreEnemiesIfInOwnTerritory = true;
// -------------------------------------------- //
// DENY COMMANDS
// -------------------------------------------- //