Skip to content

Commit c1af9e1

Browse files
committed
Separate exported item mods to more files
1 parent c06aadc commit c1af9e1

6 files changed

Lines changed: 6718 additions & 6721 deletions

File tree

src/Data/ModEldritch.lua

Lines changed: 4073 additions & 0 deletions
Large diffs are not rendered by default.

src/Data/ModItem.lua

Lines changed: 0 additions & 6714 deletions
Large diffs are not rendered by default.

src/Data/ModScourge.lua

Lines changed: 1256 additions & 0 deletions
Large diffs are not rendered by default.

src/Data/ModSynthesis.lua

Lines changed: 1349 additions & 0 deletions
Large diffs are not rendered by default.

src/Export/Scripts/mods.lua

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,32 @@ local function writeMods(outName, condFunc)
173173
end
174174

175175
writeMods("../Data/ModItem.lua", function(mod)
176+
-- item or delve fossil
176177
return (mod.Domain == 1 or mod.Domain == 16)
177-
and (mod.GenerationType == 1 or mod.GenerationType == 2
178-
or (mod.GenerationType == 3 and mod.Domain == 1 and mod.Id:match("^Synthesis"))
178+
-- prefix or suffix
179+
and (mod.GenerationType == 1 or mod.GenerationType == 2
180+
-- delve unique
179181
or (mod.GenerationType == 3 and mod.Domain == 16)
180-
or mod.GenerationType == 5 or mod.GenerationType == 25 or mod.GenerationType == 24 or mod.GenerationType == 28 or mod.GenerationType == 29)
181-
and not mod.Id:match("^Hellscape[UpDown]+sideMap") -- Exclude Scourge map mods
182-
and not mod.Id:match("Royale")
183-
and #mod.AuraFlags == 0
182+
-- -- generic implicit
183+
-- or (mod.GenerationType == 3 and mod.Domain == 1)
184+
-- corrupted
185+
or mod.GenerationType == 5)
186+
-- excl. separately exported
187+
and not mod.Id:match("Royale")
188+
and not mod.Id:match("Necropolis")
189+
and not mod.Id:match("^Synthesis")
190+
and not (mod.GenerationType == 28 or mod.GenerationType == 29)
191+
and #mod.AuraFlags == 0
192+
end)
193+
writeMods("../Data/ModSynthesis.lua", function(mod)
194+
return mod.GenerationType == 3 and mod.Domain == 1 and mod.Id:match("^Synthesis")
195+
end)
196+
writeMods("../Data/ModScourge.lua", function(mod)
197+
return mod.Domain == 1 and (mod.GenerationType == 24 or mod.GenerationType == 25) and
198+
not mod.Id:match("^Hellscape[UpDown]+sideMap") -- Exclude Scourge map mods
199+
end)
200+
writeMods("../Data/ModEldritch.lua", function(mod)
201+
return mod.Domain == 1 and (mod.GenerationType == 28 or mod.GenerationType == 29)
184202
end)
185203
writeMods("../Data/ModFlask.lua", function(mod)
186204
return mod.Domain == 2 and (mod.GenerationType == 1 or mod.GenerationType == 2)

src/Modules/Data.lua

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,11 @@ data.describeStats = LoadModule("Modules/StatDescriber")
573573

574574
-- Load item modifiers
575575
data.itemMods = {
576-
Item = LoadModule("Data/ModItem"),
576+
UncategorisedItem = LoadModule("Data/ModItem"),
577+
Synthesis = LoadModule("Data/ModSynthesis"),
578+
Necropolis = LoadModule("Data/ModNecropolis"),
579+
Scourge = LoadModule("Data/ModScourge"),
580+
Eldritch = LoadModule("Data/ModEldritch"),
577581
Flask = LoadModule("Data/ModFlask"),
578582
Tincture = LoadModule("Data/ModTincture"),
579583
Graft = LoadModule("Data/ModGraft"),
@@ -592,6 +596,17 @@ data.enchantments = {
592596
["Weapon"] = LoadModule("Data/EnchantmentWeapon"),
593597
["UtilityFlask"] = LoadModule("Data/EnchantmentFlask"),
594598
}
599+
600+
-- combined field of many mod categories
601+
data.Item = {}
602+
for _, key in ipairs({"UncategorisedItem", "Synthesis", "Necropolis", "Scourge", "Eldritch"}) do
603+
local itemData = data.itemMods[key]
604+
for k, v in pairs(itemData) do
605+
data.Item[k] = v
606+
end
607+
end
608+
609+
595610
do
596611
data.enchantments["Flask"] = data.enchantments["UtilityFlask"]--["HARVEST"]
597612
for baseType, _ in pairs(data.weaponTypeInfo) do

0 commit comments

Comments
 (0)