mirror of
https://github.com/t-affeldt/climate_api.git
synced 2025-07-05 06:00:33 -04:00
Implement dynamic cloud sizes, adjust cycle lengths
This commit is contained in:
parent
47530bb07e
commit
fdc457bd09
9 changed files with 86 additions and 24 deletions
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue