Handles conversions between units of game time
Source: addons/calendar_time/game_time/game_calendar/game_calendar.gd
Syntax
class GameCalendar extends ResourceMembers
| Name | Kind | Summary |
|---|---|---|
CalendarLogic | Field | `CalendarLogic` is preloaded here for calendar arithmetic. |
CalendarStructure | Field | `CalendarStructure` is preloaded here to describe the calendar layout. |
CalendarValidator | Field | `CalendarValidator` is preloaded here to validate calendar definitions. |
display_name | Property | UI-friendly display name for the calender resource |
years | Property | The year objects that the calendar represents. After reaching the end of the years array, years will be recycled in sequence. Must have a minumum of one game year defined for the calendar to function. |
days_per_week | Property | Number of days in one week for this calendar. |
start_day_of_week_index | Property | The array index that the first day of the week starts at |
time_scale | Property | Defines the conversions between time units. |
times_of_day | Property | The named phases of a calendar day (dawn, day, dusk, night, ...). Each `TimeOfDay` defines an `HoursTime` enter-time; `DayNightCycleService` reads this list to derive `time_of_day_changed` transitions. Calendars own these — not clocks, not the host — so any clock bound to this calendar automatically shares the same day-phase schedule. |
start_date | Property | Date that the calendar treats as its epoch or first day. |
structure | Property | Resolved calendar structure produced from the configured definition. |
safe | Property | Validation-safe calendar structure resolved from the configured definition. |
safe_days_per_week | Property | Clamped days-per-week so the week manager is never broken. |
advance_date_time | Method | |
get_game_year | Method | |
get_event_day | Method | |
get_game_month | Method | |
get_day_of_week_index | Method | |
get_days_per_week | Method | |
get_days_between | Method | |
get_months_between | Method | |
get_days_into_year | Method | |
get_next_day | Method | |
get_next_date_time | Method | |
get_previous_date | Method | |
get_seconds_from_date | Method | |
get_last_hours_time_as_secs | Method | |
get_last_hours_time_as_date_time | Method | |
validate_runtime | Method | |
get_scale | Method | |
get_seconds_from_date_time | Method | |
get_config_identity | Method |