diff options
author | Anthony Zhang <azhang9@gmail.com> | 2013-07-28 18:15:46 -0400 |
---|---|---|
committer | Anthony Zhang <azhang9@gmail.com> | 2013-07-28 18:15:46 -0400 |
commit | c1f3cfc1e43668d07e95271febc261c82478f7aa (patch) | |
tree | c571989bc44466fd5b4bf9bebbd22ea66de2af96 /worldedit_commands | |
parent | b252df21666406e1701665847fd25d6e37cc5606 (diff) |
Fix bugs in visualization API and make it ore robust. Fix bugs in //fixedpos, //suppress, and //highlight.
Diffstat (limited to 'worldedit_commands')
-rw-r--r-- | worldedit_commands/init.lua | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/worldedit_commands/init.lua b/worldedit_commands/init.lua index 40f8ffc..0ecd093 100644 --- a/worldedit_commands/init.lua +++ b/worldedit_commands/init.lua @@ -183,7 +183,7 @@ minetest.register_chatcommand("/fixedpos", { worldedit.player_notify(name, "invalid usage: " .. param)
return
end
- local pos = {x=x, y=y, z=z}
+ local pos = {x=tonumber(x), y=tonumber(y), z=tonumber(z)}
if flag == "set1" then
worldedit.pos1[name] = pos
worldedit.mark_pos1(name)
@@ -887,11 +887,7 @@ minetest.register_chatcommand("/hide", { return
end
- local tenv = minetest.env
- if worldedit.ENABLE_QUEUE then
- tenv = worldedit.queue_aliasenv
- end
- local count = worldedit.hide(pos1, pos2, tenv)
+ local count = worldedit.hide(pos1, pos2)
worldedit.player_notify(name, count .. " nodes hidden")
end,
})
@@ -907,7 +903,7 @@ minetest.register_chatcommand("/suppress", { return
end
- local node = worldedit.node_is_valid(param)
+ local node = worldedit.normalize_nodename(param)
if param == "" or not node then
worldedit.player_notify(name, "invalid node name: " .. param)
return
@@ -933,7 +929,7 @@ minetest.register_chatcommand("/highlight", { return
end
- local node = worldedit.node_is_valid(param)
+ local node = worldedit.normalize_nodename(param)
if param == "" or not node then
worldedit.player_notify(name, "invalid node name: " .. param)
return
|