AgeService: a Resource that advances an AgeState as game time progresses. Bound to a GameClock; the scene-tree AgeComponent reads its progress. Owned by the clock (clock.age_service); one service per clock. Drive modes (see AgeSettings.UpdateTime):
GAME_TIME_ELAPSED: advance pergame_seconds_advanced, the sum of game seconds the clock moved.DATE_CHANGED: advance once per crossed day boundary by the full day's game seconds, so day-aligned ageing doesn't drift on sub-day frames.REAL_TIME_ELAPSED: not supported on a Resource service (no per-frame driver); configuring it fails validation and the service stays idle.
Source: addons/calendar_time/ageing/age_service.gd
Syntax
class AgeService extends ResourceMembers
| Name | Kind | Summary |
|---|---|---|
service_id | Property | Unique service identifier, serialized via `Keys.SERVICE_ID` and used to route debug output. The setter migrates the registered AgeState to the new key. Set before handing the service to consumers so two services don't collide on one clock's registry. |
starting_age | Property | Starting age preset for newly created states. |
age_settings | Property | Timing and unit settings for how the service ages. |
clock | Property | The clock whose elapsed time and date changes drive ageing. |
old_clock | Property | |
old_state | Property | |
new_registry | Property | |
age_state_id | Property | Key under which this service's age state is serialized. |
progress_age | Method | |
seconds_to_game_units | Method | |
validate | Method | |
to_dict | Method | |
from_dict | Method | |
SCHEMA_VERSION | Field | On-disk key schema version. v2 used "id"; v3 uses "service_id". |
SERVICE_ID | Field | Schema v3 key. Written by to_dict(). |
AGE_STATE_ID | Field | Age state identifier serialized under this key. |
LEGACY_ID | Field | Legacy v1/v2 key, auto-migrated to SERVICE_ID (MIGRATION.md §5). |
get_keys | Method |