from retail

This commit is contained in:
NoM0Re
2025-01-28 10:02:47 +01:00
parent a99f7bd323
commit d3a9fb094c
2 changed files with 73 additions and 5 deletions
+47
View File
@@ -1196,6 +1196,53 @@ function Private.Modernize(data, oldSnapshot)
end
end
if data.internalVersion < 53 then
local function ReplaceIn(text, table, prefix)
local seenSymbols = {}
Private.ParseTextStr(text, function(symbol)
if not seenSymbols[symbol] then
if table[prefix .. symbol .. "_format"] == "timed"
and table[prefix .. symbol .. "_time_format"] == 0
then
table[prefix .. symbol .. "_time_legacy_floor"] = true
end
end
seenSymbols[symbol] = symbol
end)
end
if data.regionType == "text" then
ReplaceIn(data.displayText, data, "displayText_format_")
end
if data.subRegions then
for index, subRegionData in ipairs(data.subRegions) do
if subRegionData.type == "subtext" then
ReplaceIn(subRegionData.text_text, subRegionData, "text_text_format_")
end
end
end
if data.actions then
if data.actions.start then
ReplaceIn(data.actions.start.message, data.actions.start, "message_format_")
end
if data.actions.finish then
ReplaceIn(data.actions.finish.message, data.actions.finish, "message_format_")
end
end
if data.conditions then
for conditionIndex, condition in ipairs(data.conditions) do
for changeIndex, change in ipairs(condition.changes) do
if change.property == "chat" and change.value then
ReplaceIn(change.value.message, change.value, "message_format_")
end
end
end
end
end
if data.internalVersion < 54 then
for _, triggerData in ipairs(data.triggers) do
if triggerData.trigger.type == "aura" then