Skip to content
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
6 changes: 4 additions & 2 deletions src/Classes/ModList.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function ModListClass:ReplaceModInternal(mod)
return false
end

function ModListClass:MergeMod(mod)
function ModListClass:MergeMod(mod, skipNonAdditive)
if mod.type == "BASE" or mod.type == "INC" or mod.type == "MORE" then
for i = 1, #self do
if modLib.compareModParams(self[i], mod) then
Expand All @@ -55,7 +55,9 @@ function ModListClass:MergeMod(mod)
end
end
end
self:AddMod(mod)
if not skipNonAdditive then
self:AddMod(mod)
end
end

function ModListClass:AddList(modList)
Expand Down
4 changes: 2 additions & 2 deletions src/Modules/CalcSetup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ function calcs.initEnv(build, mode, override, specEnv)
local scaledList = new("ModList")
scaledList:ScaleAddList(combinedList, scale)
for _, mod in ipairs(scaledList) do
combinedList:MergeMod(mod)
combinedList:MergeMod(mod, true)
end
env.itemModDB:AddList(combinedList)
elseif item.type == "Boots" and calcLib.mod(env.initialNodeModDB, nil, "EffectOfBonusesFromBoots") ~= 1 then
Expand All @@ -1079,7 +1079,7 @@ function calcs.initEnv(build, mode, override, specEnv)
local scaledList = new("ModList")
scaledList:ScaleAddList(combinedList, scale)
for _, mod in ipairs(scaledList) do
combinedList:MergeMod(mod)
combinedList:MergeMod(mod, true)
end
env.itemModDB:AddList(combinedList)
else
Expand Down