Contract moved to AbstractCharacter.

Arty tower restricted to a single tower captain.
This commit is contained in:
MagicBot committed 2023-05-02 15:09:09 -04:00
1 parent f526bda748
commit 7dcefdf5d7
6 files changed
+16 -7

No files matched your search

+8 -2
View File
@@ -254,10 +254,16 @@ public class Contract extends AbstractGameObject {
if (this.allowedBuildings.size() == 0)
return false;
// Restrict arty towers to a single captain
if (this.getContractID() == 842) // Tower Arty Captain
for (AbstractCharacter hireling : building.getHirelings().keySet())
if (hireling.contract.getContractID() == 842)
return false;
// Binary match
return (building.getBlueprint().getBuildingGroup().elementOf(this.allowedBuildings));
}
}
public int getEquipmentSet() {
return equipmentSet;