Source note:This page rendered plugin-owned docs or generated metadata inside unified Astro docs shell.
Used to register the IDs and Resource references for AgeStates in a per-clock scope, with support for serialization and potential multiplayer. There is no process-wide singleton. Each GameClock constructs and owns its own AgeStateRegistry (see GameClock.age_registry); every AgeService and AgeComponent bound to that clock reads/writes here. Two clocks running side-by-side never see each other's age states. Per-clock ownership means:
- Clock lifetime owns registry lifetime (no orphan registries).
- Tests get hermetic isolation between clocks (no shared state, no need to
registry.clear()between unrelated tests). - Two game instances in one process each carry their own registry.
AgeServiceresolution:clock.age_registry.get_state_or_new(service_id, ...).AgeComponentresolution:clock.age_registryvia the component's@export var clock.
Source: addons/calendar_time/ageing/state/age_state_registry.gd
Syntax
class AgeStateRegistryMembers
| Name | Kind | Summary |
|---|---|---|
debug | Property | Get console prints for registry operation results |
signal_bus | Property | |
coordinator | Property | |
main_age_id | Property | Unique main ID. Should be set before other age states to serve as the default parent Objects occupy the world therefore AgeStates are children of the world's AgeState |
register | Method | |
use_id | Property | |
get_state_or_new | Method | |
parent_id | Property | |
new_id | Property | |
new_state | Property | |
get_state | Method | |
get_size | Method | |
get_all | Method | |
has_state | Method | |
remove | Method | |
state | Property | |
removed | Property | |
clear | Method | |
generate_uuid | Method | |
new_id | Property | |
to_dict | Method | |
save_states_dict | Property | |
from_dict | Method | |
state_states_dict | Property | |
new_state | Property | |
size | Property |
Source
addons/calendar_time/ageing/state/age_state_registry.gd
Plugin docs root:gdscript/plugins/calendar_time_dev/docs