From 8135ebfc666fc903ad20e736264891104d834315 Mon Sep 17 00:00:00 2001 From: Hendrik Langer Date: Sun, 24 May 2020 12:08:00 +0200 Subject: [PATCH] remove old callbacks --- init.lua | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/init.lua b/init.lua index fca47be..151d08b 100644 --- a/init.lua +++ b/init.lua @@ -6,8 +6,6 @@ local mod_storage = minetest.get_mod_storage() toggle_areas.astore = AreaStore() toggle_areas.area_privs = {} -toggle_areas.registered_on_enter = {} -toggle_areas.registered_on_leave = {} areas_owner_privs = minetest.settings:get("toggle_areas.owner_privs") or "+creative, +fast, +fly" areas_guest_privs = minetest.settings:get("toggle_areas.guest_privs") or "-fly, -fast" @@ -21,15 +19,6 @@ function toggle_areas:load_areas() local astore_id = self.astore:insert_area(edge1, edge2, tostring(data)) toggle_areas:set_area_privs(astore_id, "+creative, +fast, +fly") - - self.register_on_enter(astore_id, function(player) - local name = player:get_player_name() - local privs = minetest.get_player_privs(name) - minetest.log("warning", "[toggle_areas] callback worked") - privs.fly = true - privs.fast = false - minetest.set_player_privs(name, privs) - end) end function toggle_areas:save_areas() @@ -41,10 +30,6 @@ function toggle_areas:save_areas() mod_storage:set_string("astore", datastr) end -function toggle_areas:register_on_enter(id, func) - toggle_areas.registered_on_enter[id] = func -end - function toggle_areas:set_area_privs(id, privs_string) toggle_areas.area_privs[id] = privs_string end