From 19c8d0e7b9693580bebf6f7aa7a2d419b5af8829 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Mon, 16 May 2022 23:33:22 +0100 Subject: [PATCH] core: make options.nodes_needed optional --- worldeditadditions_core/core/register_command.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/worldeditadditions_core/core/register_command.lua b/worldeditadditions_core/core/register_command.lua index 509ea86..c06094d 100644 --- a/worldeditadditions_core/core/register_command.lua +++ b/worldeditadditions_core/core/register_command.lua @@ -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