Skip to content
ct

Class

ClockGroupSerializer

Generated GDScript class reference for CalendarTime.ClockGroupSerializer.

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

ClockGroupSerializer — save/load facade for every clock in a ClockGroup. Produces one namespaced dict per clock combining time + age state. Per-clock dict shape (the legacy on-disk key is preserved at the top level for 1.x save migration — see TimeSnapshot): { "clock_id": , "time_state": {serialization_id, ...}, "age_states": {...}, "age_service_state": {...} } Top-level shape (id-keyed): { group.save_key: { : , ... } } Identity is clock_id, not array index. Saves written under the index-keyed form (rare, only from very early unreleased 2.0-pre dev builds) are tolerated via a fallback that materialises positional keys ("0", "1", …) for any dict lacking clock_id. Reordering clocks between save and load is safe — saves restore each clock's state into the clock matching the id, regardless of position in host.clocks. New saves always include clock_id. See docs/notes/multi-clock-save-identity.md for the rationale.

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

Syntax

class ClockGroupSerializer extends RefCounted

Members

NameKindSummary
TIME_STATEField
AGE_STATESField
AGE_SERVICE_STATEField
WORLD_AGE_SYSTEM_STATEField
CLOCK_IDField
clock_groupPropertyThe group this serializer aggregates. Must be set before calling to_dict() / from_dict() — fail fast otherwise.
to_dictMethod
nestedProperty
duplicatesProperty
first_index_by_idProperty
clockProperty
idProperty
id_strProperty
anonymous_clocksProperty
resultProperty
from_dictMethod
nestedProperty
nested_dictProperty
clocks_by_idProperty
first_index_by_idProperty
cProperty
c_id_strProperty
positional_indexProperty
entryProperty
resolved_clockProperty
saved_idProperty
candidateProperty
dictProperty
age_serializerProperty
age_serializerProperty
entryProperty