Skip to content
ct

Class

AgeStateRegistry

Generated GDScript class reference for CalendarTime.AgeStateRegistry.

Status
Current
Version
v2.0
Updated
Generated from GDScript addon source

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.
  • AgeService resolution: clock.age_registry.get_state_or_new(service_id, ...).
  • AgeComponent resolution: clock.age_registry via the component's @export var clock.

Source: addons/calendar_time/ageing/state/age_state_registry.gd

Syntax

class AgeStateRegistry

Members

NameKindSummary
debugPropertyGet console prints for registry operation results
signal_busProperty
coordinatorProperty
main_age_idPropertyUnique 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
registerMethod
old_registryProperty
use_idProperty
detachMethod
get_state_or_newMethod
parent_idProperty
new_idProperty
new_stateProperty
get_stateMethod
get_sizeMethod
get_allMethod
has_stateMethod
removeMethod
stateProperty
removedProperty
clearMethod
generate_uuidMethod
new_idProperty
to_dictMethod
save_states_dictProperty
from_dictMethod
state_states_dictProperty
new_stateProperty
sizeProperty