From 9d221a890d493ec54ae3e55da6633ae1d5d2fafe Mon Sep 17 00:00:00 2001 From: Lars Mueller Date: Wed, 8 Jun 2022 09:40:08 +0200 Subject: [PATCH] mod.configuration: Return schema --- minetest/mod.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/minetest/mod.lua b/minetest/mod.lua index c448cf0..a72a3f1 100644 --- a/minetest/mod.lua +++ b/minetest/mod.lua @@ -66,6 +66,7 @@ function extend_string(modname, string) include_env(string, rawget(_G, modname), true) end +--> conf, schema function configuration(modname) modname = modname or minetest.get_current_modname() local schema = modlib.schema.new(assert(include(modname, "schema.lua"))) @@ -141,9 +142,9 @@ function configuration(modname) end end if conf == nil then - return schema:load({}, {error_message = true}) + return schema:load({}, {error_message = true}), schema end - return conf + return conf, schema end -- Export environment