Fix fated unique flavour text (#9085)
This commit is contained in:
15147
src/Data/FlavourText.lua
15147
src/Data/FlavourText.lua
File diff suppressed because it is too large
Load Diff
@@ -11,13 +11,36 @@ local function cleanAndSplit(str)
|
||||
-- Normalize newlines
|
||||
str = str:gsub("\r\n", "\n")
|
||||
|
||||
-- Replace <default> with a newline and ^8
|
||||
str = str:gsub("<default>", "\n^8")
|
||||
|
||||
local lines = {}
|
||||
for line in str:gmatch("[^\n]+") do
|
||||
line = line:match("^%s*(.-)%s*$") -- trim each line
|
||||
-- trim
|
||||
line = line:match("^%s*(.-)%s*$")
|
||||
|
||||
if line ~= "" then
|
||||
-- Remove braces but keep contents
|
||||
line = line:gsub("%{(.-)%}", "%1")
|
||||
|
||||
-- Remove any <<...>> sequences (non-greedy)
|
||||
line = line:gsub("<<(.-)>>", "")
|
||||
|
||||
-- trim again in case removal left surrounding spaces
|
||||
line = line:match("^%s*(.-)%s*$")
|
||||
|
||||
-- Escape quotes
|
||||
line = line:gsub('"', '\\"')
|
||||
table.insert(lines, line)
|
||||
|
||||
-- Insert a blank line before any ^8 line
|
||||
if line:match("^%^8") and (#lines == 0 or lines[#lines] ~= "") then
|
||||
table.insert(lines, "")
|
||||
end
|
||||
|
||||
-- Only add non-empty lines
|
||||
if line ~= "" then
|
||||
table.insert(lines, line)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -29,7 +52,7 @@ local unmatchedIds = {}
|
||||
local exportedNames = {}
|
||||
|
||||
-- List of forced names (multiple entries for same ID allowed)
|
||||
local forcedNameList = {
|
||||
local forcedNameList = { -- fated show twice at the moment, but this list is caught first
|
||||
{ id = "UniqueOneHandAxe5", name = "Jack, the Axe" },
|
||||
{ id = "UniqueBootsDIY", name = "Doryani's Delusion" },
|
||||
{ id = "UniqueGlovesStrDex9", name = "Tombfist" },
|
||||
@@ -62,6 +85,55 @@ local forcedNameList = {
|
||||
{ id = "UniqueBodyDemigods", name = "Demigod's Dominance" },
|
||||
{ id = "UniqueHelmetDemigods1", name = "Demigod's Immortality" },
|
||||
{ id = "GraspingMailFlavourText", name = "Grasping Mail" },
|
||||
{ id = "UniqueQuiver1", name = "Blackgleam" },
|
||||
{ id = "FatedUnique8", name = "The Signal Fire" },
|
||||
{ id = "UniqueBootsStr1", name = "Windscream" },
|
||||
{ id = "FatedUnique35", name = "Windshriek" },
|
||||
{ id = "UniqueBodyDex7", name = "Briskwrap" },
|
||||
{ id = "FatedUnique31", name = "Wildwrap" },
|
||||
{ id = "UniqueShieldInt2", name = "Matua Tupuna" },
|
||||
{ id = "FatedUnique61", name = "Whakatutuki o Matua" },
|
||||
{ id = "UniqueBow8", name = "Storm Cloud" },
|
||||
{ id = "FatedUnique21", name = "The Tempest" },
|
||||
{ id = "UniqueBelt2", name = "The Magnate" },
|
||||
{ id = "FatedUnique46", name = "The Tactitian" },
|
||||
{ id = "FatedUnique47", name = "The Nomad" },
|
||||
{ id = "UniqueStaff14", name = "The Stormheart" },
|
||||
{ id = "FatedUnique29", name = "The Stormwall" },
|
||||
{ id = "UniqueTwoHandAxe3", name = "Limbsplit" },
|
||||
{ id = "FatedUnique18", name = "The Cauteriser" },
|
||||
{ id = "UniqueTwoHandSword4", name = "Queen's Decree" },
|
||||
{ id = "FatedUnique25", name = "Queen's Escape" },
|
||||
{ id = "UniqueHelmetDexInt1", name = "Malachai's Simula" },
|
||||
{ id = "FatedUnique43", name = "Malachai's Awakening" },
|
||||
{ id = "UniqueRing2", name = "Kaom's Sign" },
|
||||
{ id = "FatedUnique1", name = "Kaom's Way" },
|
||||
{ id = "UniqueQuiver6", name = "Hyrri's Bite" },
|
||||
{ id = "FatedUnique49", name = "Hyrri's Demise" },
|
||||
{ id = "UniqueGlovesDex1", name = "Hrimsorrow" },
|
||||
{ id = "FatedUnique10", name = "Hrimburn" },
|
||||
{ id = "UniqueTwoHandMace2", name = "Geofri's Baptism" },
|
||||
{ id = "FatedUnique52", name = "Geofri's Devotion" },
|
||||
{ id = "UniqueDexHelmet2", name = "Heatshiver" },
|
||||
{ id = "FatedUnique36", name = "Frostferno" },
|
||||
{ id = "UniqueBootsStrDex3", name = "Dusktoe" },
|
||||
{ id = "FatedUnique26", name = "Duskblight" },
|
||||
{ id = "UniqueOneHandSword1", name = "Redbeak" },
|
||||
{ id = "FatedUnique54", name = "Dreadbeak" },
|
||||
{ id = "UniqueBow11", name = "Doomfletch" },
|
||||
{ id = "FatedUnique19", name = "Doomfletch's Prism" },
|
||||
{ id = "UniqueGlovesInt2", name = "Doedre's Tenure" },
|
||||
{ id = "FatedUnique28", name = "Doedre's Malevolence" },
|
||||
{ id = "UniqueBow3", name = "Death's Harp" },
|
||||
{ id = "FatedUnique5", name = "Death's Opus" },
|
||||
{ id = "UniqueTwoHandMace5", name = "Chober Chaber" },
|
||||
{ id = "FatedUnique58", name = "Chaber Cairn" },
|
||||
{ id = "UniqueOneHandMace4", name = "Cameria's Maul" },
|
||||
{ id = "FatedUnique53", name = "Cameria's Avarice" },
|
||||
{ id = "UniqueIntHelmet2", name = "Asenath's Mark" },
|
||||
{ id = "FatedUnique41", name = "Asenath's Chant" },
|
||||
{ id = "UniqueWand8", name = "Reverberation Rod" },
|
||||
{ id = "FatedUnique23", name = "Amplification Rod" },
|
||||
-- add more as needed
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user