AngleWyrm / Colonies

Minecraft mod MineColony Reboot
7 stars 8 forks source link

Citizens seek employment #100

Open AngleWyrm opened 11 years ago

AngleWyrm commented 11 years ago

This is the process of a citizen converting from one type to another type, based on available jobs and their skill qualifications.

Buildings can be queried for available job positions. A citizen applies for a job, and the job is filled by that citizen if there is both a position available and the candidate citizen can perform that job.

Building job positions will probably be an array of EntityCitizen pointers that could be null if the position is unfilled, and point to a citizen if the job has someone in it.

The player's town hall maintains a list of all buildings in town.

The AI module EntityAISeekEmplyment will go through that list, looking for a match .On successful math, the old citizen is killed off, and a replacement citizen is spawned. A function (BuildingType).replaceCitizen(_oldCitizen) will do the copy, kill, and spawn operation.

z