remove debug code

This commit is contained in:
cora 2021-09-26 03:45:45 +02:00
parent f6fa977664
commit 62f950cb3c
1 changed files with 5 additions and 7 deletions

View File

@ -147,7 +147,6 @@ function mcl_weather.start_weather_player(name,def)
players.weatheractive[name] = false
return
end
players.weatheractive[name] = true
if def.start_player then def.start_player(name) end
mcl_weather.add_particlespawners_player(name,def.particlespawners)
if def.skycolor then
@ -157,18 +156,19 @@ function mcl_weather.start_weather_player(name,def)
if def.sound then
mcl_weather.add_sound(name,def.sound)
end
players.weatheractive[name] = true
end
function mcl_weather.stop_weather_player(name,def)
if def.clear_player then def.clear_player(name) end
mcl_weather.delete_particlespawners_player(name)
if def.sound then
mcl_weather.remove_sound(name,def.sound)
end
if def.skycolor then
local player=minetest.get_player_by_name(name)
player:set_clouds({color="#FFF0F0E5"})
end
if def.sound then
mcl_weather.remove_sound(name,def.sound)
end
players.weatheractive[name] = false
end
@ -201,9 +201,7 @@ function mcl_weather.change(new_weather,force)
if not force and os.time() < mcl_weather.current_endtime then return end
local def=mcl_weather.get_weatherdef(new_weather)
local old=mcl_weather.get_weatherdef(mcl_weather.current)
if not def then
minetest.chat_send_all("weather def fail.")
return end
if not def then return end
mcl_weather.stop_weather(old)
mcl_weather.start_weather(def)
mcl_weather.current = new_weather