Creating a cache for Auto-Buildings

ls612

Deity
Moderator
Joined
Mar 10, 2008
Messages
8,288
Location
America
I'm currently working on a mechanic for my mod which will automatically build certain buildings when a city grows to a specified size. I have been looking at implementations for this, and I'm thinking that the best way would be to create a cache of auto build data on each team. This cache would be updated on tech discoveries (ie, when new buildings are unlocked), and would contain a list of buildingtypes which are auto-built linked to the size at which they are built. This would be created for each team on load, meaning that it only needs to loop through all buildings once (as opposed to on every city growth, which is how it would be if I didn't make the cache).

My question is, which of the Fireworks engine collections would be best for doing this? Is this even the best way to do an auto-build buildings mechanic at all?
 
Back
Top Bottom