Skip to content

Commit ebf0799

Browse files
committed
Colorize and import mutated mods
1 parent 52bf066 commit ebf0799

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

src/Classes/ImportTab.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,14 @@ function ImportTabClass:ImportItem(itemData, slotName)
10321032
end
10331033
end
10341034
end
1035+
if itemData.mutatedMods then
1036+
for _, line in ipairs(itemData.mutatedMods) do
1037+
for line in line:gmatch("[^\n]+") do
1038+
local modList, extra = modLib.parseMod(line)
1039+
t_insert(item.explicitModLines, { line = line, extra = extra, mods = modList or { }, mutated = true })
1040+
end
1041+
end
1042+
end
10351043
-- Sometimes flavour text has actual mods that PoB cares about
10361044
-- Right now, the only known one is "This item can be anointed by Cassia"
10371045
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
@@ -1115,6 +1116,9 @@ function ItemClass:BuildRaw()
11151116
if modLine.crucible then
11161117
line = "{crucible}" .. line
11171118
end
1119+
if modLine.mutated then
1120+
line = "{mutated}" .. line
1121+
end
11181122
if modLine.fractured then
11191123
line = "{fractured}" .. line
11201124
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/Modules/ItemTools.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ function itemLib.formatModLine(modLine, dbMode)
132132
line = line .. " ^1'" .. modLine.extra .. "'"
133133
end
134134
else
135-
colorCode = (modLine.crafted and colorCodes.CRAFTED) or (modLine.scourge and colorCodes.SCOURGE) or (modLine.custom and colorCodes.CUSTOM) or (modLine.fractured and colorCodes.FRACTURED) or (modLine.crucible and colorCodes.CRUCIBLE) or colorCodes.MAGIC
135+
colorCode = (modLine.crafted and colorCodes.CRAFTED) or (modLine.mutated and colorCodes.MUTATED) or (modLine.scourge and colorCodes.SCOURGE) or (modLine.custom and colorCodes.CUSTOM) or (modLine.fractured and colorCodes.FRACTURED) or (modLine.crucible and colorCodes.CRUCIBLE) or colorCodes.MAGIC
136136
end
137137
return colorCode..line
138138
end

0 commit comments

Comments
 (0)