forked from Mineclonia/Mineclonia
remove debug code
This commit is contained in:
parent
f6fa977664
commit
62f950cb3c
|
@ -147,7 +147,6 @@ function mcl_weather.start_weather_player(name,def)
|
||||||
players.weatheractive[name] = false
|
players.weatheractive[name] = false
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
players.weatheractive[name] = true
|
|
||||||
if def.start_player then def.start_player(name) end
|
if def.start_player then def.start_player(name) end
|
||||||
mcl_weather.add_particlespawners_player(name,def.particlespawners)
|
mcl_weather.add_particlespawners_player(name,def.particlespawners)
|
||||||
if def.skycolor then
|
if def.skycolor then
|
||||||
|
@ -157,18 +156,19 @@ function mcl_weather.start_weather_player(name,def)
|
||||||
if def.sound then
|
if def.sound then
|
||||||
mcl_weather.add_sound(name,def.sound)
|
mcl_weather.add_sound(name,def.sound)
|
||||||
end
|
end
|
||||||
|
players.weatheractive[name] = true
|
||||||
end
|
end
|
||||||
|
|
||||||
function mcl_weather.stop_weather_player(name,def)
|
function mcl_weather.stop_weather_player(name,def)
|
||||||
if def.clear_player then def.clear_player(name) end
|
if def.clear_player then def.clear_player(name) end
|
||||||
mcl_weather.delete_particlespawners_player(name)
|
mcl_weather.delete_particlespawners_player(name)
|
||||||
if def.sound then
|
|
||||||
mcl_weather.remove_sound(name,def.sound)
|
|
||||||
end
|
|
||||||
if def.skycolor then
|
if def.skycolor then
|
||||||
local player=minetest.get_player_by_name(name)
|
local player=minetest.get_player_by_name(name)
|
||||||
player:set_clouds({color="#FFF0F0E5"})
|
player:set_clouds({color="#FFF0F0E5"})
|
||||||
end
|
end
|
||||||
|
if def.sound then
|
||||||
|
mcl_weather.remove_sound(name,def.sound)
|
||||||
|
end
|
||||||
players.weatheractive[name] = false
|
players.weatheractive[name] = false
|
||||||
end
|
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
|
if not force and os.time() < mcl_weather.current_endtime then return end
|
||||||
local def=mcl_weather.get_weatherdef(new_weather)
|
local def=mcl_weather.get_weatherdef(new_weather)
|
||||||
local old=mcl_weather.get_weatherdef(mcl_weather.current)
|
local old=mcl_weather.get_weatherdef(mcl_weather.current)
|
||||||
if not def then
|
if not def then return end
|
||||||
minetest.chat_send_all("weather def fail.")
|
|
||||||
return end
|
|
||||||
mcl_weather.stop_weather(old)
|
mcl_weather.stop_weather(old)
|
||||||
mcl_weather.start_weather(def)
|
mcl_weather.start_weather(def)
|
||||||
mcl_weather.current = new_weather
|
mcl_weather.current = new_weather
|
||||||
|
|
Loading…
Reference in New Issue