mirror of
https://github.com/t-affeldt/climate_api.git
synced 2024-12-22 17:00:36 +01:00
make humidity timescale configurable via variable
This commit is contained in:
parent
7d299edb5b
commit
d1c70e904b
@ -242,6 +242,5 @@ minetest.register_chatcommand("explain_humidity", {
|
|||||||
minetest.chat_send_player(playername, dump2(base, "base"))
|
minetest.chat_send_player(playername, dump2(base, "base"))
|
||||||
minetest.chat_send_player(playername, dump2(biome, "biome"))
|
minetest.chat_send_player(playername, dump2(biome, "biome"))
|
||||||
minetest.chat_send_player(playername, dump2(random, "random"))
|
minetest.chat_send_player(playername, dump2(random, "random"))
|
||||||
minetest.chat_send_player(playername, dump2(random_base, "random_base"))
|
|
||||||
end
|
end
|
||||||
})
|
})
|
@ -7,8 +7,7 @@ local HEAT_SPREAD = 400
|
|||||||
local HEAT_SCALE = 0.3
|
local HEAT_SCALE = 0.3
|
||||||
local HUMIDITY_SPREAD = 150
|
local HUMIDITY_SPREAD = 150
|
||||||
local HUMIDITY_SCALE = 1
|
local HUMIDITY_SCALE = 1
|
||||||
local HUMIDITY_BASE_SPREAD = 800
|
local HUMIDITY_TIMESCALE = 1
|
||||||
local HUMIDITY_BASE_SCALE = 20
|
|
||||||
|
|
||||||
local nobj_wind_x
|
local nobj_wind_x
|
||||||
local nobj_wind_z
|
local nobj_wind_z
|
||||||
@ -74,7 +73,7 @@ end
|
|||||||
|
|
||||||
local function update_humidity(timer)
|
local function update_humidity(timer)
|
||||||
nobj_humidity = nobj_humidity or minetest.get_perlin(pn_humidity)
|
nobj_humidity = nobj_humidity or minetest.get_perlin(pn_humidity)
|
||||||
local n_humidity = nobj_humidity:get_2d({x = timer * 3, y = 0})
|
local n_humidity = nobj_humidity:get_2d({x = timer * HUMIDITY_TIMESCALE, y = 0})
|
||||||
climate_mod.state:set_float("humidity_random", n_humidity)
|
climate_mod.state:set_float("humidity_random", n_humidity)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user