summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Sosa <sosa.daniel23@gmail.com>2015-02-16 02:47:21 +0000
committerDaniel Sosa <sosa.daniel23@gmail.com>2016-07-03 21:44:02 -0500
commitd5e004be67447b5b20185c3428e8930cea025fc6 (patch)
tree004288eda15d25f461686f0ded22690c3520b10a
parentfad021d0ba40f3336e0770587b40811894cfb4a7 (diff)
Fix /outset and /inset to conform to WE standards
-rw-r--r--worldedit_commands/cuboid.lua8
1 files 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 = "<amount> [h|v]",
+ params = "[h|v] <amount>",
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 = "<amount> [h|v]",
+ params = "[h|v] <amount>",
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