mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-25 16:43:05 +00:00
core: make options.nodes_needed optional
This commit is contained in:
parent
f984f5d7b7
commit
19c8d0e7b9
1 changed files with 1 additions and 5 deletions
|
@ -26,10 +26,6 @@ local function register_command(cmdname, options)
|
|||
log_error(cmdname, "The parse option is not a function.")
|
||||
return false
|
||||
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
|
||||
log_error(cmdname, "The func option is not a function.")
|
||||
return false
|
||||
|
@ -41,7 +37,7 @@ local function register_command(cmdname, options)
|
|||
---
|
||||
if not options.privs then options.privs = {} 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
|
||||
|
|
Loading…
Reference in a new issue