Add max relation type. Adds HCF feature from #169.

If used, max relation should be set to -1 for the default relation.
This commit is contained in:
drtshock
2015-01-27 09:33:47 -06:00
parent 092d4b352c
commit 147a051fee
6 changed files with 80 additions and 20 deletions

View File

@@ -31,7 +31,7 @@ public enum Relation {
return MEMBER;
} else if (s.equalsIgnoreCase("ally")) {
return ALLY;
} else if(s.equalsIgnoreCase("truce")) {
} else if (s.equalsIgnoreCase("truce")) {
return TRUCE;
} else if (s.equalsIgnoreCase("enemy")) {
return ENEMY;
@@ -42,7 +42,16 @@ public enum Relation {
public String getTranslation() {
for (TL t : TL.values()) {
if (t.name().equals("RELATION_" + name())) {
if (t.name().equalsIgnoreCase("RELATION_" + name())) {
return t.toString();
}
}
return toString();
}
public String getPluralTranslation() {
for (TL t : TL.values()) {
if (t.name().equalsIgnoreCase("RELATION_" + name() + "_PLURAL")) {
return t.toString();
}
}