mirror of
https://github.com/Reuh/ubiquitousse.git
synced 2025-10-27 17:19:31 +00:00
Define uqt.ecs callback order
This commit is contained in:
parent
a1801679b6
commit
6dc939bd16
2 changed files with 60 additions and 25 deletions
|
|
@ -157,6 +157,19 @@ util = {
|
|||
return setmetatable(r, getmetatable(t))
|
||||
end,
|
||||
|
||||
--- Returns a table which, when indexed, will require() the module with the index as a name (and a optional prefix).
|
||||
-- @tparam string[opt=""] string that will prefix modules names when calling require()
|
||||
-- @treturn table the requirer table
|
||||
requirer = function(prefix)
|
||||
prefix = prefix and tostring(prefix) or ""
|
||||
return setmetatable({}, {
|
||||
__index = function(self, key)
|
||||
self[key] = require(prefix..tostring(key))
|
||||
return self[key]
|
||||
end
|
||||
})
|
||||
end,
|
||||
|
||||
-----------------------
|
||||
--- Random and UUID ---
|
||||
-----------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue