Skip to content

Commit 37ab345

Browse files
authored
Add support for Foulborn unique mods (#9116)
* Export Foulborn unique mods and mapping * Sort mods * Remove Foulborn mods * Export mod description, not id * Colorize and import mutated mods * Indent with tabs
1 parent 2b76d34 commit 37ab345

File tree

8 files changed

+831
-3
lines changed

8 files changed

+831
-3
lines changed

src/Classes/ImportTab.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,6 +1033,14 @@ function ImportTabClass:ImportItem(itemData, slotName)
10331033
end
10341034
end
10351035
end
1036+
if itemData.mutatedMods then
1037+
for _, line in ipairs(itemData.mutatedMods) do
1038+
for line in line:gmatch("[^\n]+") do
1039+
local modList, extra = modLib.parseMod(line)
1040+
t_insert(item.explicitModLines, { line = line, extra = extra, mods = modList or { }, mutated = true })
1041+
end
1042+
end
1043+
end
10361044
-- Sometimes flavour text has actual mods that PoB cares about
10371045
-- Right now, the only known one is "This item can be anointed by Cassia"
10381046
if itemData.flavourText then

src/Classes/Item.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ end
7171
local lineFlags = {
7272
["crafted"] = true, ["crucible"] = true, ["custom"] = true, ["eater"] = true, ["enchant"] = true,
7373
["exarch"] = true, ["fractured"] = true, ["implicit"] = true, ["scourge"] = true, ["synthesis"] = true,
74+
["mutated"] = true
7475
}
7576

7677
-- Special function to store unique instances of modifier on specific item slots
@@ -1118,6 +1119,9 @@ function ItemClass:BuildRaw()
11181119
if modLine.crucible then
11191120
line = "{crucible}" .. line
11201121
end
1122+
if modLine.mutated then
1123+
line = "{mutated}" .. line
1124+
end
11211125
if modLine.fractured then
11221126
line = "{fractured}" .. line
11231127
end

src/Data/Global.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ colorCodes = {
4242
SHAPER = "^x55BBFF",
4343
ELDER = "^xAA77CC",
4444
FRACTURED = "^xA29160",
45+
MUTATED = "^xCD2285",
4546
ADJUDICATOR = "^xE9F831",
4647
BASILISK = "^x00CB3A",
4748
CRUSADER = "^x2946FC",

src/Data/ModFoulborn.lua

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

0 commit comments

Comments
 (0)