Implement dynamic cloud sizes, adjust cycle lengths

This commit is contained in:
Till Affeldt 2020-04-13 16:53:32 +02:00
parent 47530bb07e
commit fdc457bd09
9 changed files with 86 additions and 24 deletions

View file

@ -1,16 +1,14 @@
local default_state = {
heat = 1,
humidity = 1,
wind_x = 0.5,
wind_z = 0.5,
time_last_check = 0,
time_current_day = 1
}
local state = minetest.get_mod_storage()
if not state:contains("time_last_check") then
state:from_table({ fields = default_state })
if not state:contains("noise_timer") then
state:from_table({
heat_random = 1,
humidity_random = 1,
humidity_base = 50,
wind_x = 0.5,
wind_z = 0.5,
noise_timer = math.random(0, 300000)
})
end
return state