areas cleanup

master
BuckarooBanzay 2020-05-25 11:54:18 +02:00
parent 43398e371b
commit 308e50cae8
2 changed files with 1 additions and 18 deletions

View File

@ -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,

View File

@ -1,4 +1,4 @@
name = epic_weather
description = weather for the epic mod
depends = epic
optional_depends = lightning, areas
optional_depends = lightning