summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 82e4a79..0c2018c 100644
--- a/init.lua
+++ b/init.lua
@@ -11,21 +11,31 @@ end
local radius_large = minetest.settings:get("areasprotector_radius_large")
or minetest.settings:get("areasprotector_radius")
or 16
+
+radius_large = tonumber(radius_large) or 16
local height_large = minetest.settings:get("areasprotector_height_large")
or minetest.settings:get("areasprotector_radius_large")
or minetest.settings:get("areasprotector_radius")
or 16
+
+height_large = tonumber(height_large) or 16
local radius_small = minetest.settings:get("areasprotector_radius_small")
or 7
+
+radius_small = tonumber(radius_small) or 7
local height_small = minetest.settings:get("areasprotector_height_small")
or minetest.settings:get("areasprotector_radius_small")
or 7
+height_small = tonumber(height_small) or 7
+
local max_protectors = minetest.settings:get("areasprotector_max_protectors") or 16
+max_protectors = tonumber(max_protectors) or 16
+
local function remove_display(pos)
local objs = minetest.get_objects_inside_radius(pos, 0.5)
for _,o in pairs(objs) do