Minetest-WorldEditAdditions/worldeditadditions_commands/commands/selectors/mark.lua
Starbeamrainbowlabs 5c632df658
Override basic selection commands
//mark
//unmark
//pos1 //1
//pos2 //2
//reset
Also add //pos <index>
2023-07-10 20:17:28 +01:00

23 lines
No EOL
669 B
Lua

local weac = worldeditadditions_core
local function do_mark(name, params_text)
-- TODO: Decide whether we need to hided the worldeditadditions marker here or not.
-- Show the WorldEditAdditions marker
weac.pos.mark(name)
end
if minetest.registered_chatcommands["/mark"] then
minetest.override_chatcommand("/mark", {
params = "",
description = "Show the markers for the defined region (and any other positions) once more.",
func = do_mark
})
else
minetest.register_chatcommand("/mark", {
params = "",
description = "Show the markers for the defined region (and any other positions) once more.",
privs = { worldedit = true },
func = do_mark
})
end