From 4f6c0126ecd946d216d44428f618b8e0d382f5a4 Mon Sep 17 00:00:00 2001 From: Luke aka SwissalpS Date: Tue, 16 Apr 2024 23:17:09 +0200 Subject: [PATCH] add public xp_redo.get_area_xp_limits(id) Mods like [glider] and [hangglider] can't be satisfied with minetest.is_protected() as they don't want to build but area might be FLAK protected against any who don't have certain amount of XP. --- areas.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/areas.lua b/areas.lua index 9d2e07a..3fed559 100644 --- a/areas.lua +++ b/areas.lua @@ -2,6 +2,10 @@ -- id -> { max=1000, min=100 } local xp_areas = {} +function xp_redo.get_area_xp_limits(id) + return xp_areas[id] or {} +end + -- protection check local old_is_protected = minetest.is_protected function minetest.is_protected(pos, name)