This commit is contained in:
Lorraxs 2023-12-11 15:06:29 +07:00
parent 5827aa788f
commit a5c7c0341f
3 changed files with 10 additions and 6 deletions

View File

@ -6,4 +6,5 @@ Config.EnableModules = {
} }
Config.Debug = true Config.Debug = true
Config.Nui = false Config.Nui = false
Config.Dev = false
Config.Framework = "esx" -- "qb" | "ProjectStarboy" Config.Framework = "esx" -- "qb" | "ProjectStarboy"

View File

@ -40,7 +40,7 @@ function Main:Init()
local path = "client/impl/" .. k .. ".impl.lua" local path = "client/impl/" .. k .. ".impl.lua"
local source = LoadResourceFile(ResourceName, path) local source = LoadResourceFile(ResourceName, path)
if source == nil then if source == nil then
self:LogError("Failed to load %s", path) self:LogWarning("Failed to load %s", path)
else else
--[[ self:LogInfo("Loading %s", path) --[[ self:LogInfo("Loading %s", path)
self:LogInfo("Loaded %s", source) ]] self:LogInfo("Loaded %s", source) ]]
@ -110,7 +110,7 @@ function Main:RegisterCommands()
end end
local source = LoadResourceFile(ResourceName, "server/impl/" .. implName .. ".impl.lua") local source = LoadResourceFile(ResourceName, "server/impl/" .. implName .. ".impl.lua")
if source == nil then if source == nil then
self:LogError("Failed to load %s", path) self:LogWarning("Failed to load %s", path)
else else
self:LogInfo("Loading %s", implName) self:LogInfo("Loading %s", implName)
load(source)() load(source)()
@ -119,7 +119,7 @@ function Main:RegisterCommands()
if mode == "0" or mode == "1" then if mode == "0" or mode == "1" then
local clSource = LoadResourceFile(ResourceName, "client/impl/" .. implName .. ".impl.lua") local clSource = LoadResourceFile(ResourceName, "client/impl/" .. implName .. ".impl.lua")
if clSource == nil then if clSource == nil then
self:LogError("Failed to load %s", path) self:LogWarning("Failed to load %s", path)
else else
self:LogInfo("Loading %s", "client/impl/" .. implName .. ".impl.lua") self:LogInfo("Loading %s", "client/impl/" .. implName .. ".impl.lua")
TriggerClientEvent(ResourceName..":restartClientImpl", -1, implName, clSource) TriggerClientEvent(ResourceName..":restartClientImpl", -1, implName, clSource)
@ -210,11 +210,13 @@ function Main:InitImpl()
if v then if v then
self:LogInfo("Loading %s", k) self:LogInfo("Loading %s", k)
local source = lib.callback.await(ResourceName..":getClientImpl", false, k) local source = lib.callback.await(ResourceName..":getClientImpl", false, k)
if source ~= nil then
self:LogInfo("Loaded %s", k) self:LogInfo("Loaded %s", k)
load(source)() load(source)()
end end
end end
end end
end
for name, impl in pairs(self.impls) do for name, impl in pairs(self.impls) do
self.initializedImpls[name] = impl(self) self.initializedImpls[name] = impl(self)
end end
@ -296,6 +298,7 @@ Citizen.CreateThread(function()
Citizen.Wait(0) Citizen.Wait(0)
end end
while Framework == nil do while Framework == nil do
main:LogInfo("Waiting for Framework")
Wait(100) Wait(100)
end end
if not IsDuplicityVersion() then if not IsDuplicityVersion() then

File diff suppressed because one or more lines are too long