areas cleanup
parent
43398e371b
commit
308e50cae8
17
init.lua
17
init.lua
|
@ -12,23 +12,6 @@ dofile(MP.."/rain.lua")
|
|||
dofile(MP.."/thunderstorm.lua")
|
||||
dofile(MP.."/snow.lua")
|
||||
|
||||
local has_areas = minetest.get_modpath("areas")
|
||||
if has_areas then
|
||||
dofile(MP.."/areas.lua")
|
||||
end
|
||||
|
||||
local function cleanup(playername)
|
||||
local player = minetest.get_player_by_name(playername)
|
||||
if player and has_areas then
|
||||
-- check if the player was in a weather area
|
||||
if epic_weather.get_area_weather(player:get_pos()) then
|
||||
-- skip weather disabling
|
||||
return
|
||||
end
|
||||
end
|
||||
epic_weather.current_weather[playername] = nil
|
||||
end
|
||||
|
||||
-- epic exit hook, cleanups
|
||||
epic.register_hook({
|
||||
on_epic_exit = cleanup,
|
||||
|
|
Loading…
Reference in New Issue