mirror of
https://github.com/appgurueu/modlib.git
synced 2024-12-22 21:32:27 +01:00
mod.configuration: Return schema
This commit is contained in:
parent
aef7ad5e6e
commit
9d221a890d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user