Skip to content
ct

Class

ClockGroupSerializer

Generated GDScript class reference for CalendarTime.ClockGroupSerializer.

Status
Current
Version
v2.0.4
Updated
2026-08-09

ClockGroupSerializer — save/load facade for a ClockGroup. Produces one namespaced dict per clock combining time and age state. Per-clock shape: clock_id, persistent_id, time_state, age_states, age_service_state. Top-level shape: { group.save_key: { clock_id: per-clock dict } }. Identity is clock_id (which honors persistent_id when set), not array index. Saves restore by id regardless of host.clocks order. See addons/calendar_time/guides/multi-clock-save-identity.md for identity resolution.

Source: addons/calendar_time/game_time/state/clock_group_serializer.gd

Syntax

class ClockGroupSerializer extends RefCounted

Members

NameKindSummary
AgeStateSerializerField`AgeStateSerializer` is preloaded here for use during group serialization.
TIME_STATEFieldTime state payload is serialized under this key.
AGE_STATESFieldAge states payload is serialized under this key.
AGE_SERVICE_STATEFieldAge service state payload is serialized under this key.
WORLD_AGE_SYSTEM_STATEFieldWorld age system state payload is serialized under this key.
CLOCK_IDFieldClock identifier is serialized under this key.
PERSISTENT_IDFieldAuthored persistent UUID is serialized under this key Present only when the clock's `persistent_id` is non-empty.
clock_groupPropertyThe group this serializer aggregates. Must be set before calling to_dict() / from_dict() — fail fast otherwise.
to_dictMethod
from_dictMethod