From 930434f35ba5f25138d458908861803080023e9d Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 24 Feb 2024 20:19:53 -0600 Subject: [PATCH] realm override --- src/engine/objects/Realm.java | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/engine/objects/Realm.java b/src/engine/objects/Realm.java index e97a4533..fed8f76e 100644 --- a/src/engine/objects/Realm.java +++ b/src/engine/objects/Realm.java @@ -76,9 +76,15 @@ public class Realm { this.mapG = (float) (mapColor.getGreen() * 0.00392156863); this.mapB = (float) (mapColor.getBlue() * 0.00392156863); this.mapA = 1; - this.canBeClaimed = rs.getBoolean("canBeClaimed"); - this.canPlaceCities = rs.getBoolean("canPlaceCities"); - this.numCities = rs.getInt("numCities"); + if(overridePlacement(rs.getString("realmName"))){ + this.canBeClaimed = false; + this.canPlaceCities = false; + this.numCities = 0; + }else { + this.canBeClaimed = rs.getBoolean("canBeClaimed"); + this.canPlaceCities = rs.getBoolean("canPlaceCities"); + this.numCities = rs.getInt("numCities"); + } this.realmName = rs.getString("realmName"); this.rulingCityUUID = rs.getInt("rulingCityUID"); this.charterType = rs.getInt("charterType"); @@ -100,6 +106,20 @@ public class Realm { this.hash = rs.getString("hash"); } + public static boolean overridePlacement(String realm){ + switch(realm.toLowerCase()) { + case "neshraa": + case "adduram": + case "letharuun": + case "kralgaard": + case "ecklund": + case "nordenthol": + case "thollmar": + case "haldorn isles": + return true; + } + return false; + } public static void configureAllRealms() { for (Realm realm : Realm._realms.values()) {