StaticPlanet
classCelestial body with its own day cycle in world ticks
Fields
| Name | Type | Description |
|---|---|---|
| day_length_ticks | integer | Simulation ticks per full local day |
| phase_offset_ticks | integer | Added to the phase after day wrap |
| dawn_phase_ticks | integer | Day phase of the dawn anchor |
| solar_noon_phase_ticks | integer | Day phase of the solar noon anchor |
| sunset_phase_ticks | integer | Day phase of the sunset anchor |
| latitude_deg | number | Observer latitude used by the solar model |
| day_of_year | integer | Day of the tropical year fixing solar declination |
Functions
StaticPlanet:cosmetic_hours_from_day_phase_ticks(day_phase_tick)
Cosmetic hours [0, 24) for a tick in local day-phase space
| day_phase_tick | integer | Tick within the local day |
returns number
StaticPlanet:time_of_day_hours_from_ticks(total_game_ticks)
Solar hour [0, 24) for a world tick
| total_game_ticks | integer | Absolute world tick |
returns number
StaticPlanet:resolve_time_of_day_hours(world_time_auto_advance, locked_world_time_of_day_phase_ticks, total_game_ticks)
Solar hour honouring a locked time of day
| world_time_auto_advance | boolean | False freezes the sky at the locked phase |
| locked_world_time_of_day_phase_ticks | integer | Phase used while frozen |
| total_game_ticks | integer | Absolute world tick |
returns number
Standard members (5)
Generated for every class of this kind by the game's codegen, not written for StaticPlanet.
| StaticPlanet.cast(object) | Trying to cast Object into StaticPlanet |
| StaticPlanet.get_class() | Return StaticPlanet class object |
| StaticPlanet.find(name) | Looks StaticPlanet up in db, nil when there is none |
| StaticPlanet.get(name) | Takes StaticPlanet from db, reports a miss to the log |
| StaticPlanet.reg(name) | Register a new StaticPlanet static object |
Inherited from Prototype (2)
- name Object name
- Prototype:is_valid() Returns false once the underlying engine object has been destroyed
Inherited from Object (1)
- Object:get_class() Class of this object