mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-05 07:43:02 +00:00
32 lines
No EOL
945 B
Lua
32 lines
No EOL
945 B
Lua
local weac = worldeditadditions_core
|
|
|
|
|
|
local worldedit_unmark
|
|
if minetest.registered_chatcommands["/unmark"] then
|
|
worldedit_unmark = minetest.registered_chatcommands["/unmark"].func
|
|
end
|
|
|
|
local function do_unmark(name, params_text)
|
|
-- Hide the WorldEdit marker, if appropriate
|
|
if type(worldedit_unmark) == "function" then
|
|
worldedit_unmark(name, params_text)
|
|
end
|
|
|
|
-- Hide the WorldEditAdditions marker
|
|
weac.pos.unmark(name)
|
|
end
|
|
|
|
if minetest.registered_chatcommands["/unmark"] then
|
|
minetest.override_chatcommand("/unmark", {
|
|
params = "",
|
|
description = "Hide the markers for the defined region (and any other positions), but do not remove the points themselves.",
|
|
func = do_unmark
|
|
})
|
|
else
|
|
minetest.register_chatcommand("/unmark", {
|
|
params = "",
|
|
description = "Hide the markers for the defined region (and any other positions), but do not remove the points themselves.",
|
|
privs = { worldedit = true },
|
|
func = do_unmark
|
|
})
|
|
end |