Chris' Tutorials
Docs/Calendar Time

Class

DayNightCycleService

Generated GDScript class reference for CalendarTime.DayNightCycleService.

StatusCurrent
Versionv2.0
UpdatedGenerated from GDScript addon source
Source note:This page rendered plugin-owned docs or generated metadata inside unified Astro docs shell.

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 RefCounted

Members

NameKindSummary
clockPropertyThe 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_dayPropertyThe current time-of-day for the clock's current instant. `null` when the clock is unbound or has no calendar TODs.
last_time_of_dayProperty
transition_progressProperty
get_previous_time_of_dayMethod
calculate_time_of_dayMethod
calculate_time_of_day_with_hours_timeMethod
get_last_enter_timeMethod
validateMethod
issuesProperty
new_todProperty
new_todProperty
calProperty

Source

addons/calendar_time/day_night_cycle/service/day_night_cycle_service.gd

Plugin docs root:gdscript/plugins/calendar_time_dev/docs