Add district unemployment signals and workplace features#140
Open
Toon-Red wants to merge 1 commit intoihsoft:mainfrom
Open
Add district unemployment signals and workplace features#140Toon-Red wants to merge 1 commit intoihsoft:mainfrom
Toon-Red wants to merge 1 commit intoihsoft:mainfrom
Conversation
District signals: - District.UnemployedBeavers: number of unemployed beaver workers - District.UnemployedBots: number of unemployed bot workers Uses the game's PopulationDataCollector.CollectData() to read the same unemployment values displayed in the top-left UI panel. Change tracking subscribes to CitizenAssigned/Unassigned events and per-workplace WorkerAssigned/Unassigned events so the signal updates when workers are hired, fired, or reassigned. Workplace signal: - Workplace.AssignedWorkers: current number of workers at a building Tracks via WorkerAssigned/WorkerUnassigned events on the Workplace. Workplace action: - Workplace.SetPriority: sets the building's worker priority level (VeryLow/Low/Normal/High/VeryHigh) via WorkplacePriority component. Uses the game's built-in Priorities localization keys for the dropdown display names. Localization: - Added English (enUS) and Russian (ruRU) strings for all new signals and actions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements Issue #78 — district-level unemployment signals — plus two related workplace features:
PopulationDataCollectorAll four use existing game APIs and follow the established
ScriptableComponentBasepatterns (signal definitions, change trackers, localization).Changes
DistrictScriptableComponent.cs— added unemployment signals + district-wide workplace event trackingWorkplaceScriptableComponent.cs— added assigned workers signal + set priority action with dropdownenUS.txt/ruRU.txt— localization strings for all new signals/actionsTest plan