mirror of
https://github.com/Reuh/ubiquitousse.git
synced 2025-10-27 09:09:30 +00:00
Probably works better this way
This commit is contained in:
parent
b2d22c75d1
commit
e063f55514
4 changed files with 44 additions and 23 deletions
18
init.lua
18
init.lua
|
|
@ -76,6 +76,17 @@ ubiquitousse = {
|
|||
-- @impl ubiquitousse
|
||||
version = "0.0.1",
|
||||
|
||||
--- Table of enabled modules.
|
||||
-- @impl ubiquitousse
|
||||
module = {
|
||||
time = false,
|
||||
draw = false,
|
||||
audio = false,
|
||||
input = false,
|
||||
scene = false,
|
||||
event = false
|
||||
},
|
||||
|
||||
--- Backend name.
|
||||
-- For consistency, only use lowercase letters [a-z] (no special char)
|
||||
-- @impl backend
|
||||
|
|
@ -86,9 +97,12 @@ ubiquitousse = {
|
|||
package.loaded[p] = ubiquitousse
|
||||
|
||||
-- Require external submodules
|
||||
for _, m in ipairs({"time", "draw", "audio", "input", "scene", "event"}) do
|
||||
for m in pairs(ubiquitousse.module) do
|
||||
local s, t = pcall(require, p.."."..m)
|
||||
if s then ubiquitousse[m] = t end
|
||||
if s then
|
||||
ubiquitousse[m] = t
|
||||
ubiquitousse.module[m] = true
|
||||
end
|
||||
end
|
||||
|
||||
-- Backend engine autodetect and load
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue