WorldMgr: Difference between revisions
→TimeMgr
imported>Leoetlino |
imported>Leoetlino |
||
Line 36: | Line 36: | ||
=== TimeMgr === | === TimeMgr === | ||
TimeMgr handles everything to do with time, including Blood Moons and the Lord of the Mountain's apparition. | TimeMgr handles everything to do with time, including Blood Moons and the Lord of the Mountain's apparition. | ||
Internally, time of day is stored as a float in the [0.0, 360.0] range. | |||
==== TimeMgr::init ==== | |||
* Time is set to 78.75 (05:15). | |||
* Time for TotS environment is set to 78.75 (05:15) as well. | |||
* "Bloody Moon end reserve timer" is set to 0. | |||
==== TimeMgr::reset ==== | |||
This is called whenever a stage is unloaded (essentially every time the loading screen is shown). | |||
* Blood Moon checks are delayed. | |||
* The AnimalMaster_Appearance flag is cleared, meaning the Lord of the Mountain will not appear. | |||
==== TimeMgr::calc ==== | |||
* Reload some internal state from GameDataMgr. | |||
* If both [[Demo]]103_0 and Demo997_0 have not been played, time of day is reset to 78.75 (05:15). | |||
* If [[AIDef:Action/AdvanceTime]] or anything else that changes time of day was called, the actual time is updated at this moment. | |||
* Blood Moon checks. | |||
* Update time of day. | |||
* If FindDungeon_Activated is false (if the player hasn't received the ''The Isolated Plateau'' quest) and if the current time is >= 165.0 (11:00), the time is forcefully set to 11:00. | |||
* Update Blood Moon timer. | |||
* Update Daytime, Night time, is morning, is noon, is evening flags. | |||
* Update time division. | |||
* Update "Bloody moon end reverse timer". | |||
* Update GameDataMgr state (time, number of days, Blood Moon timers). | |||
* Update Lord of the Mountain flags (in particular, determine if it should appear). | |||
[[Category:Internals]] | [[Category:Internals]] | ||
[[Category:Subsystems (BotW)]] | [[Category:Subsystems (BotW)]] |