mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-09-12 08:08:30 +02:00
core: make options.nodes_needed optional
This commit is contained in:
parent
f984f5d7b7
commit
19c8d0e7b9
@ -26,10 +26,6 @@ local function register_command(cmdname, options)
|
|||||||
log_error(cmdname, "The parse option is not a function.")
|
log_error(cmdname, "The parse option is not a function.")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if type(options.nodes_needed) ~= "string" then
|
|
||||||
log_error(cmdname, "The nodes_needed option is not a function.")
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
if type(options.func) ~= "string" then
|
if type(options.func) ~= "string" then
|
||||||
log_error(cmdname, "The func option is not a function.")
|
log_error(cmdname, "The func option is not a function.")
|
||||||
return false
|
return false
|
||||||
@ -41,7 +37,7 @@ local function register_command(cmdname, options)
|
|||||||
---
|
---
|
||||||
if not options.privs then options.privs = {} end
|
if not options.privs then options.privs = {} end
|
||||||
if not options.require_pos then options.require_pos = 0 end
|
if not options.require_pos then options.require_pos = 0 end
|
||||||
|
if not options.nodes_needed then options.nodes_needed = function() return 0 end
|
||||||
|
|
||||||
---
|
---
|
||||||
-- 3: Registration
|
-- 3: Registration
|
||||||
|
Loading…
Reference in New Issue
Block a user