mirror of
https://github.com/t-affeldt/climate_api.git
synced 2025-07-21 06:35:11 -04:00
Add datastorage, fix player_monoids support, tweak wind
This commit is contained in:
parent
dd73a0df17
commit
dd8b07056a
10 changed files with 115 additions and 24 deletions
|
@ -9,15 +9,17 @@ function weather_mod.get_heat(pos)
|
|||
local base = weather_mod.settings.heat;
|
||||
local biome = minetest.get_heat(pos)
|
||||
local height = math.min(math.max(-pos.y / 15, -10), 10)
|
||||
local time = weather_mod.get_time_heat()
|
||||
local date = weather_mod.get_calendar_heat()
|
||||
local random = weather_mod.state.heat;
|
||||
return (base + biome + height) * random
|
||||
return (base + biome + height) * time * date + random
|
||||
end
|
||||
|
||||
function weather_mod.get_humidity(pos)
|
||||
local base = weather_mod.settings.humidity
|
||||
local biome = minetest.get_humidity(pos)
|
||||
local random = weather_mod.state.humidity;
|
||||
return (base + biome) * random
|
||||
return (base + biome) + random
|
||||
end
|
||||
|
||||
function weather_mod.get_climate(pos)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue