Skip to content

Commit

Permalink
Update ModuleLoader.lua
Browse files Browse the repository at this point in the history
* Improve priority table creation
  • Loading branch information
Hampo committed Aug 28, 2022
1 parent 64e927d commit 1e6ba05
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Randomiser/Resources/lib/ModuleLoader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ for i=1,#ModuleFiles do

if result.Setting == nil or Settings[result.Setting] then
local priority = result.Priority or 5
local modules = Modules[priority] or {}
local modules = Modules[priority]
if modules == nil then
modules = {}
Modules[priority] = modules
end
modules[#modules + 1] = result
Modules[priority] = modules
ModulesN = ModulesN + 1
end
end
Expand Down

0 comments on commit 1e6ba05

Please sign in to comment.