Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings hotfix #52

Merged
merged 3 commits into from
Jun 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/Client/Core/DragonEngine.client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,10 @@ if Developer_SettingsFolder ~= nil then -- Load developer-specified settings
EngineConfigs.Settings.Debug = Developer_EngineConfigs.Debug

for ModuleLocationType,ModuleNames in pairs(Developer_EngineConfigs.IgnoredModules) do
if EngineConfigs.Settings.IgnoredModules[ModuleLocationType] == nil then
EngineConfigs.Settings.IgnoredModules[ModuleLocationType] = {}
end

for _,ModuleName in pairs(ModuleNames) do
table.insert(EngineConfigs.Settings.IgnoredModules[ModuleLocationType],ModuleName)
end
Expand All @@ -441,17 +445,21 @@ if Developer_SettingsFolder ~= nil then -- Load developer-specified settings
local Developer_ClientPaths = require(Developer_SettingsFolder.ClientPaths)

for ModuleLocationType,ModulePaths in pairs(Developer_ClientPaths.ModulePaths) do
if EngineConfigs.ClientPaths.ModulePaths[ModuleLocationType] == nil then
EngineConfigs.ClientPaths.ModulePaths[ModuleLocationType] = {}
end

for _,ModulePath in pairs(ModulePaths) do
table.insert(EngineConfigs.ClientPaths.ModulePaths[ModuleLocationType],ModulePath)
end
end

for _,ControllerPath in pairs(Developer_ClientPaths.ControllerPaths) do
table.insert(EngineConfigs.ServerPaths.ServicePaths,ControllerPath)
table.insert(EngineConfigs.ClientPaths.ControllerPaths,ControllerPath)
end
end
end)
assert(Success == true,"[Dragon Engine Server] An error occured while loading developer-specified settings : "..Error)
assert(Success == true,"[Dragon Engine Server] An error occured while loading developer-specified settings : "..(Error or ""))
end
DragonEngine.Config = EngineConfigs

Expand Down
10 changes: 9 additions & 1 deletion src/Server/Core/DragonEngine.server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,10 @@ if Developer_SettingsFolder ~= nil then -- Load developer-specified settings
EngineConfigs.Settings.Debug = Developer_EngineConfigs.Debug

for ModuleLocationType,ModuleNames in pairs(Developer_EngineConfigs.IgnoredModules) do
if EngineConfigs.Settings.IgnoredModules[ModuleLocationType] == nil then
EngineConfigs.Settings.IgnoredModules[ModuleLocationType] = {}
end

for _,ModuleName in pairs(ModuleNames) do
table.insert(EngineConfigs.Settings.IgnoredModules[ModuleLocationType],ModuleName)
end
Expand All @@ -475,6 +479,10 @@ if Developer_SettingsFolder ~= nil then -- Load developer-specified settings
local Developer_ServerPaths = require(Developer_SettingsFolder.ServerPaths)

for ModuleLocationType,ModulePaths in pairs(Developer_ServerPaths.ModulePaths) do
if EngineConfigs.ServerPaths.ModulePaths[ModuleLocationType] == nil then
EngineConfigs.ServerPaths.ModulePaths[ModuleLocationType] = {}
end

for _,ModulePath in pairs(ModulePaths) do
table.insert(EngineConfigs.ServerPaths.ModulePaths[ModuleLocationType],ModulePath)
end
Expand All @@ -485,7 +493,7 @@ if Developer_SettingsFolder ~= nil then -- Load developer-specified settings
end
end
end)
assert(Success == true,"[Dragon Engine Server] An error occured while loading developer-specified settings : "..Error)
assert(Success == true,"[Dragon Engine Server] An error occured while loading developer-specified settings : "..(Error or ""))
end
DragonEngine.Config = EngineConfigs

Expand Down