mirror of
https://github.com/Uberi/Minetest-WorldEdit.git
synced 2024-12-26 10:40:40 +01:00
Add //unmark chat command, fix position setting not being reset by //reset.
This commit is contained in:
parent
cedecac3f8
commit
d52f3d649e
@ -14,6 +14,12 @@ Show markers at the region positions.
|
|||||||
|
|
||||||
//mark
|
//mark
|
||||||
|
|
||||||
|
### //unmark
|
||||||
|
|
||||||
|
Hide markers if currently shown.
|
||||||
|
|
||||||
|
//unmark
|
||||||
|
|
||||||
### //pos1
|
### //pos1
|
||||||
|
|
||||||
Set WorldEdit region position 1 to the player's location.
|
Set WorldEdit region position 1 to the player's location.
|
||||||
|
@ -36,6 +36,7 @@ minetest.register_chatcommand("/reset", {
|
|||||||
worldedit.pos2[name] = nil
|
worldedit.pos2[name] = nil
|
||||||
worldedit.mark_pos1(name)
|
worldedit.mark_pos1(name)
|
||||||
worldedit.mark_pos2(name)
|
worldedit.mark_pos2(name)
|
||||||
|
worldedit.set_pos[name] = nil
|
||||||
minetest.chat_send_player(name, "WorldEdit region reset", false)
|
minetest.chat_send_player(name, "WorldEdit region reset", false)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
@ -51,6 +52,22 @@ minetest.register_chatcommand("/mark", {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_chatcommand("/unmark", {
|
||||||
|
params = "",
|
||||||
|
description = "Hide markers if currently shown",
|
||||||
|
privs = {worldedit=true},
|
||||||
|
func = function(name, param)
|
||||||
|
local pos1, pos2 = worldedit.pos1[name], worldedit.pos2[name]
|
||||||
|
worldedit.pos1[name] = nil
|
||||||
|
worldedit.pos2[name] = nil
|
||||||
|
worldedit.mark_pos1(name)
|
||||||
|
worldedit.mark_pos2(name)
|
||||||
|
worldedit.pos1[name] = pos1
|
||||||
|
worldedit.pos2[name] = pos2
|
||||||
|
minetest.chat_send_player(name, "WorldEdit region unmarked", false)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_chatcommand("/pos1", {
|
minetest.register_chatcommand("/pos1", {
|
||||||
params = "",
|
params = "",
|
||||||
description = "Set WorldEdit region position 1 to the player's location",
|
description = "Set WorldEdit region position 1 to the player's location",
|
||||||
|
Loading…
Reference in New Issue
Block a user