maze3d: fix command parsing

This commit is contained in:
Starbeamrainbowlabs 2020-05-03 17:10:41 +01:00
parent 29223a3455
commit 35bd8f19b2
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -46,7 +46,7 @@ minetest.register_chatcommand("/maze", {
description = "Generates a maze covering the currently selected area (must be at least 3x3 on the x,z axes) with replace_node as the walls. Optionally takes a (integer) seed and the path length and width (see the documentation in the worldeditadditions README for more information).",
privs = { worldedit = true },
func = we_c.safe_region(function(name, params_text)
local replace_node, seed, path_length, path_width = parse_params_maze(params_text)
local replace_node, seed, path_length, path_width = parse_params_maze(params_text, false)
if not replace_node then
worldedit.player_notify(name, "Error: Invalid node name.")
@ -92,7 +92,7 @@ minetest.register_chatcommand("/maze3d", {
description = "Generates a 3d maze covering the currently selected area (must be at least 3x3x3) with replace_node as the walls. Optionally takes a (integer) seed and the path length, width, and depth (see the documentation in the worldeditadditions README for more information).",
privs = { worldedit = true },
func = we_c.safe_region(function(name, params_text)
local replace_node, seed, path_length, path_width, path_depth = parse_params_maze(params_text)
local replace_node, seed, path_length, path_width, path_depth = parse_params_maze(params_text, true)
if not replace_node then
worldedit.player_notify(name, "Error: Invalid node name.")