master
root 2021-02-20 17:55:34 +01:00
parent ad9b2aed93
commit 094fabec4c
2 changed files with 5 additions and 5 deletions

View File

@ -2,15 +2,15 @@
climate_min_height = -10
#Chance of the a new volume climate to be created
##in seconds
climate_change_ratio = 600
climate_change_ratio = 5
#Volume of the regional climates (sphere)
climate_radius = 80
#Average time of the climate
climate_duration = 80
climate_duration = 5
#Random deviation for the duration
climate_duration_random_ratio = 0.45
#Await this min time between climates
climate_period = 600
climate_period = 5
#Sounds
climate_rain_sound = true
#Storm Chance

View File

@ -343,7 +343,7 @@ local function create_climate(player)
local climate_duration_random_ratio = climatez.settings.duration_random_ratio
local random_end_time = (math.random(climate_duration - (climate_duration*climate_duration_random_ratio),
climate_duration + (climate_duration*climate_duration_random_ratio)))
minetest.after(random_end_time, function(climate_id)
minetest.after(random_end_time, function()
--remove the player
for _player_name, _climate in pairs(climatez.players) do
local _climate_id = _climate.climate_id
@ -361,7 +361,7 @@ local function create_climate(player)
--disable the climate, but do not remove it
climatez.climates[climate_id].disabled = true
--remove the climate after the period time:
minetest.after(climatez.settings.climate_period, function(climate_id)
minetest.after(climatez.settings.climate_period, function()
--minetest.chat_send_all("end of the climate")
climatez.climates = array_remove(climatez.climates, climate_id)
end, climate_id)