Limiting building classes (build 1 of 4 per city)

Ahriman

Tyrant
Joined
Jun 8, 2008
Messages
13,266
Location
Washington, DC
Working on the Warhammer FB mod, we'd like to set up a mechanic where a civ can build any of four different temple buildings, but only one per city.

So the civ can build a Temple of Khorne, Temple of Nurgle, Temple of Tzeentch or Temple of Slaanesh, but as soon as they build one such building in a city, they can't build any of the others in that city.

Does anyone know of a way to implement this?
 
You can use cannotConstruct() in CvGameUtils.py. Just do a check to see if one of those building already exists in the city. If one does then return True else return False.
 
Back
Top Bottom