DayNightCycleService — derives time-of-day transitions from a clock and emits time_of_day_changed / day_night_transition_progress_changed on the clock's bus. RefCounted (not Node, not Resource) — instantiated at runtime by TimeHost per clock. No .tres authoring, no scene presence, no Inspector integration. Reads times_of_day from clock.calendar.times_of_day — does NOT own its own list. The calendar is the schema; TODs are part of the schema; clocks inherit the schema from the calendar they bind.
Source: addons/calendar_time/day_night_cycle/service/day_night_cycle_service.gd
Syntax
class DayNightCycleService extends RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
clock | Property | The clock this service derives time-of-day from. Subscribes to the bus for `date_time_changed` / `clock_state_loaded` and emits `time_of_day_changed` / `day_night_transition_progress_changed` back on the same bus. Set on construction by the host; the service doesn't pick its clock — the consumer does. |
time_of_day | Property | The current time-of-day for the clock's current instant. `null` when the clock is unbound or has no calendar TODs. |
last_time_of_day | Property | |
transition_progress | Property | |
get_previous_time_of_day | Method | |
calculate_time_of_day | Method | |
calculate_time_of_day_with_hours_time | Method | |
get_last_enter_time | Method | |
validate | Method | |
issues | Property | |
new_tod | Property | |
new_tod | Property | |
cal | Property |
Source
addons/calendar_time/day_night_cycle/service/day_night_cycle_service.gd
Plugin docs root:gdscript/plugins/calendar_time_dev/docs