mirror of
https://github.com/t-affeldt/climate_api.git
synced 2025-07-21 06:35:11 -04:00
Add influence registry, make sounds fade, add skybox feature detection
This commit is contained in:
parent
f41d5f259c
commit
18045b1943
10 changed files with 83 additions and 52 deletions
|
@ -1,5 +1,5 @@
|
|||
local GSCYCLE = 0.03
|
||||
local WORLD_CYCLE = 2
|
||||
local GSCYCLE = 0.03 * climate_mod.settings.tick_speed
|
||||
local WORLD_CYCLE = 2 * climate_mod.settings.tick_speed
|
||||
|
||||
local gs_timer = 0
|
||||
local world_timer = 0
|
||||
|
@ -20,7 +20,8 @@ minetest.register_globalstep(function(dtime)
|
|||
local current_effects = climate_mod.trigger.get_active_effects()
|
||||
|
||||
for name, effect in pairs(climate_mod.effects) do
|
||||
if climate_mod.cycles[name].timespan < climate_mod.cycles[name].timer + dtime then
|
||||
local cycle = climate_mod.cycles[name].timespan * climate_mod.settings.tick_speed
|
||||
if cycle < climate_mod.cycles[name].timer + dtime then
|
||||
climate_mod.cycles[name].timer = 0
|
||||
climate_mod.current_effects[name] = current_effects[name]
|
||||
climate_mod.trigger.call_handlers(name, current_effects[name], previous_effects[name])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue