mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
refactor(init): type-fixes and minor adjustments
This commit is contained in:
@@ -31,10 +31,10 @@ function lib.getCore()
|
||||
local resource
|
||||
|
||||
if framework == Core.Ox then
|
||||
import = ('imports/%s.lua'):format(lib.service)
|
||||
import = ('imports/%s.lua'):format(lib.context)
|
||||
resource = Core.Ox
|
||||
else
|
||||
import = ('imports/getCore/%s/%s.lua'):format(framework, lib.service)
|
||||
import = ('imports/getCore/%s/%s.lua'):format(framework, lib.context)
|
||||
resource = lib.name
|
||||
end
|
||||
|
||||
@@ -75,4 +75,5 @@ function lib.getCore()
|
||||
return result
|
||||
end
|
||||
|
||||
---@diagnostic disable-next-line: deprecated
|
||||
return lib.getCore
|
||||
|
||||
@@ -16,7 +16,7 @@ end
|
||||
|
||||
function lib.loadLocale(locale)
|
||||
if not locale then
|
||||
locale = lib.service == 'server' and lib.getServerLocale() or GetExternalKvpString('ox_lib', 'locale') or 'en'
|
||||
locale = lib.context == 'server' and lib.getServerLocale() or GetExternalKvpString('ox_lib', 'locale') or 'en'
|
||||
end
|
||||
|
||||
local resourceName = GetCurrentResourceName()
|
||||
|
||||
Reference in New Issue
Block a user