summaryrefslogtreecommitdiff
path: root/worldedit_commands/init.lua
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2017-01-31 19:52:54 +0100
committersfan5 <sfan5@live.de>2017-01-31 19:52:54 +0100
commitbcac45a476577341b6385b671edcf639acc63393 (patch)
tree51b2649f2512d1e70c66d4926914f14d534664f9 /worldedit_commands/init.lua
parent426f3b949fc48862f3b9b8368aa33147c805142b (diff)
Fix "safe region" functionality errornously rejecting pos1-only commands (e.g. //sphere)
Diffstat (limited to 'worldedit_commands/init.lua')
-rw-r--r--worldedit_commands/init.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/worldedit_commands/init.lua b/worldedit_commands/init.lua
index 3532343..12c296c 100644
--- a/worldedit_commands/init.lua
+++ b/worldedit_commands/init.lua
@@ -13,7 +13,7 @@ end
dofile(minetest.get_modpath("worldedit_commands") .. "/cuboid.lua")
dofile(minetest.get_modpath("worldedit_commands") .. "/mark.lua")
dofile(minetest.get_modpath("worldedit_commands") .. "/wand.lua")
-local safe_region, check_region = dofile(minetest.get_modpath("worldedit_commands") .. "/safe.lua")
+local safe_region, check_region, reset_pending = dofile(minetest.get_modpath("worldedit_commands") .. "/safe.lua")
local function get_position(name) --position 1 retrieval function for when not using `safe_region`
local pos1 = worldedit.pos1[name]
@@ -198,6 +198,8 @@ minetest.register_chatcommand("/reset", {
worldedit.mark_pos1(name)
worldedit.mark_pos2(name)
worldedit.set_pos[name] = nil
+ --make sure the user does not try to confirm an operation after resetting pos:
+ reset_pending(name)
worldedit.player_notify(name, "region reset")
end,
})