mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-26 12:54:45 +00:00
refactor(init): move global declarations
This commit is contained in:
1 parent
24b2d62235
commit
4596e4319c
1 file changed
+2
-5
@@ -96,11 +96,6 @@ local lib = setmetatable({
|
|||||||
__call = call,
|
__call = call,
|
||||||
})
|
})
|
||||||
|
|
||||||
_ENV.lib = lib
|
|
||||||
|
|
||||||
-- Override standard Lua require with our own.
|
|
||||||
require = lib.require
|
|
||||||
|
|
||||||
local intervals = {}
|
local intervals = {}
|
||||||
--- Dream of a world where this PR gets accepted.
|
--- Dream of a world where this PR gets accepted.
|
||||||
---@param callback function | number
|
---@param callback function | number
|
||||||
@@ -215,7 +210,9 @@ function lib.onCache(key, cb)
|
|||||||
table.insert(cacheEvents[key], cb)
|
table.insert(cacheEvents[key], cb)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
_ENV.lib = lib
|
||||||
_ENV.cache = cache
|
_ENV.cache = cache
|
||||||
|
_ENV.require = lib.require
|
||||||
|
|
||||||
local notifyEvent = ('__ox_notify_%s'):format(cache.resource)
|
local notifyEvent = ('__ox_notify_%s'):format(cache.resource)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user