From c1f3cfc1e43668d07e95271febc261c82478f7aa Mon Sep 17 00:00:00 2001 From: Anthony Zhang Date: Sun, 28 Jul 2013 18:15:46 -0400 Subject: Fix bugs in visualization API and make it ore robust. Fix bugs in //fixedpos, //suppress, and //highlight. --- worldedit_commands/init.lua | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'worldedit_commands') 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 -- cgit v1.2.3