This commit is contained in:
Olof Larsson
2011-10-23 22:08:57 +02:00
parent ac6870b770
commit 21783ef9d4
24 changed files with 149 additions and 712 deletions

View File

@ -56,7 +56,9 @@ public enum FactionFlag
*/
public boolean getDefault()
{
return Conf.factionFlagDefaults.get(this);
Boolean ret = Conf.factionFlagDefaults.get(this);
if (ret == null) return this.defaultDefaultValue;
return ret;
}
/**
@ -66,7 +68,9 @@ public enum FactionFlag
*/
public boolean isChangeable()
{
return Conf.factionFlagIsChangeable.get(this);
Boolean ret = Conf.factionFlagIsChangeable.get(this);
if (ret == null) return this.defaultDefaultChangeable;
return ret;
}
public static FactionFlag parse(String str)

View File

@ -6,8 +6,6 @@ import com.massivecraft.factions.P;
public enum Permission
{
MANAGE_SAFE_ZONE("managesafezone"),
MANAGE_WAR_ZONE("managewarzone"),
OWNERSHIP_BYPASS("ownershipbypass"),
LEADER("leader"),
AUTOCLAIM("autoclaim"),

View File

@ -6,13 +6,13 @@ import com.massivecraft.factions.Conf;
public enum Rel
{
LEADER (70, "leader"),
OFFICER(60, "officer"),
MEMBER (50, "member"),
ALLY (40, "ally"),
TRUCE (30, "truce"),
NEUTRAL(20, "neutral"),
ENEMY (10, "enemy"),
LEADER (70, "leader"),
OFFICER (60, "officer"),
MEMBER (50, "member"),
ALLY (40, "ally"),
TRUCE (30, "truce"),
NEUTRAL (20, "neutral"),
ENEMY (10, "enemy"),
;
public final int value;
@ -87,6 +87,8 @@ public enum Rel
return Conf.colorAlly;
else if (this == NEUTRAL)
return Conf.colorNeutral;
else if (this == TRUCE)
return Conf.colorTruce;
else
return Conf.colorEnemy;
}
@ -107,6 +109,7 @@ public enum Rel
}
// TODO: ADD TRUCE!!!!
// TODO.... or remove it...
public double getRelationCost()
{
if (this == ENEMY)
@ -129,6 +132,8 @@ public enum Rel
return Conf.territoryEnemyDenyBuild;
else if (this == ALLY)
return Conf.territoryAllyDenyBuild;
else if (this == TRUCE)
return Conf.territoryTruceDenyBuild;
else
return Conf.territoryDenyBuild;
}
@ -138,6 +143,8 @@ public enum Rel
return Conf.territoryEnemyDenyBuildWhenOffline;
else if (this == ALLY)
return Conf.territoryAllyDenyBuildWhenOffline;
else if (this == TRUCE)
return Conf.territoryTruceDenyBuildWhenOffline;
else
return Conf.territoryDenyBuildWhenOffline;
}
@ -155,6 +162,8 @@ public enum Rel
return Conf.territoryEnemyPainBuild;
else if (this == ALLY)
return Conf.territoryAllyPainBuild;
else if (this == TRUCE)
return Conf.territoryTrucePainBuild;
else
return Conf.territoryPainBuild;
}
@ -164,6 +173,8 @@ public enum Rel
return Conf.territoryEnemyPainBuildWhenOffline;
else if (this == ALLY)
return Conf.territoryAllyPainBuildWhenOffline;
else if (this == TRUCE)
return Conf.territoryTrucePainBuildWhenOffline;
else
return Conf.territoryPainBuildWhenOffline;
}
@ -178,6 +189,8 @@ public enum Rel
return Conf.territoryEnemyDenyUseage;
else if (this == ALLY)
return Conf.territoryAllyDenyUseage;
else if (this == TRUCE)
return Conf.territoryTruceDenyUseage;
else
return Conf.territoryDenyUseage;
}