Browse Source

no caps on claimable mines for nations

lakebane-new
FatBoy-DOTC 6 months ago
parent
commit
e0af1f5932
  1. 17
      src/engine/objects/Mine.java

17
src/engine/objects/Mine.java

@ -288,26 +288,9 @@ public class Mine extends AbstractGameObject { @@ -288,26 +288,9 @@ public class Mine extends AbstractGameObject {
if (treeRank < 1)
return false;
if (guildUnderMineLimit(playerGuild.getNation(), treeRank) == false) {
ErrorPopupMsg.sendErrorMsg(playerCharacter, "Your nation cannot support another mine.");
return false;
}
return true;
}
private static boolean guildUnderMineLimit(Guild playerGuild, int tolRank) {
int mineCnt = 0;
mineCnt += Mine.getMinesForGuild(playerGuild.getObjectUUID()).size();
for (Guild guild : playerGuild.getSubGuildList())
mineCnt += Mine.getMinesForGuild(guild.getObjectUUID()).size();
return mineCnt <= tolRank;
}
public boolean changeProductionType(Resource resource) {
if (!this.validForMine(resource))
return false;

Loading…
Cancel
Save