mirror of
git://repo.or.cz/minetest_schemedit.git
synced 2025-01-09 09:30:32 +01:00
Tweak parsing of /placeschem
This commit is contained in:
parent
9715b7818c
commit
2b6a759eac
4
init.lua
4
init.lua
@ -1301,9 +1301,9 @@ minetest.register_chatcommand("placeschem", {
|
|||||||
privs = {server = true},
|
privs = {server = true},
|
||||||
params = S("<schematic name>[.mts] [-c] [<x> <y> <z>]"),
|
params = S("<schematic name>[.mts] [-c] [<x> <y> <z>]"),
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
local schem, clear, p = string.match(param, "^([^ ]+) (%-c) *(.*)$")
|
local schem, clear, p = string.match(param, "^([^ ]+) +(%-c) +(.*)$")
|
||||||
if not schem then
|
if not schem then
|
||||||
schem, p = string.match(param, "^([^ ]+) *(.*)$")
|
schem, p = string.match(param, "^([^ ]+) +(.*)$")
|
||||||
end
|
end
|
||||||
clear = clear == "-c"
|
clear = clear == "-c"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user