Skip to main content

Module professions

Module professions 

Source
Expand description

Professions (Game), workplaces (WorkPlaceComponent, the town manager’s workplace registry Game →) and who takes a job when the player changes a profession’s count. See docs/JOBS.md.

The ProfessionUI spinners and the WorkPlaceUI buttons call the town manager directly in the original, between simulation iterations; the port queues them as Commands that the simulation applies before its next iteration, which is the same point in the game’s Random stream.

Original: FUN_14007b890, FUN_14008ccb0.

Modules§

icon
The building status icons (StatusIcons\BuildingIconSpriteSheet): the bit of each.

Structs§

Profession
Profession fields the simulation reads.
Professions
The profession manager (Profession.rsc:resource): the list of professions (Profession.rsc:professionList), the laborer and builder entries, and the child and student entries.
WorkPlace
WorkPlaceComponent plus the entity’s WorkComponent most-workers value.
Worker
The citizen fields assignment reads and writes (Citizen).
Workforce
The town manager’s workplace and residence registries and every WorkPlaceComponent.

Enums§

Command
A player action on professions, applied by the simulation.

Traits§

Search
What the workplace searches read.

Functions§

shuffle
For each position i, swap with Rand(n) (no draws below two entries).