From d5e004be67447b5b20185c3428e8930cea025fc6 Mon Sep 17 00:00:00 2001 From: Daniel Sosa Date: Mon, 16 Feb 2015 02:47:21 +0000 Subject: [PATCH] Fix /outset and /inset to conform to WE standards --- worldedit_commands/cuboid.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/worldedit_commands/cuboid.lua b/worldedit_commands/cuboid.lua index 4712659..9efe919 100644 --- a/worldedit_commands/cuboid.lua +++ b/worldedit_commands/cuboid.lua @@ -2,11 +2,11 @@ dofile(minetest.get_modpath("worldedit_commands") .. "/cuboidapi.lua") minetest.register_chatcommand("/outset", { - params = " [h|v]", + params = "[h|v] ", description = "outset the selection", privs = {worldedit=true}, func = function(name, param) - local find, _, amount, dir = param:find("^(%d+)[%s+]?([hv]?)$") + local find, _, dir, amount = param:find("([hv]?)%s*([+-]?%d+)") if find == nil then return false, "invalid usage: " .. param @@ -42,11 +42,11 @@ minetest.register_chatcommand("/outset", { minetest.register_chatcommand("/inset", { - params = " [h|v]", + params = "[h|v] ", description = "inset the selection", privs = {worldedit=true}, func = function(name, param) - local find, _, amount, dir = param:find("^(%d+)[%s+]?([hv]?)$") + local find, _, dir, amount = param:find("([hv]?)%s*([+-]?%d+)") if find == nil then return false, "invalid usage: " .. param