Fix non-red heart characters not replacing empty heart container descriptions (#898)

This commit is contained in:
kittenchilly authored and GitHub committed 2025-08-17 17:05:21 +02:00
1 parent fc99b7ddfa
commit fb5e4d2779
1 file changed
+2 -1
+2 -1
View File
@@ -324,8 +324,9 @@ local function HealthUpCallback(descObj)
local pos = 1
while pos <= #text do
-- replace {1} with the number of hearts and {2} with the plural character
-- replace {1} with the number of hearts and {pluralize} with the plural character
local toFind = EID:ReplaceVariableStr(text[pos], numHearts)
toFind = EID:TryPluralizeString(toFind, numHearts)
if text[pos + 1] then
local replaceWith = EID:ReplaceVariableStr(text[pos + 1], numHearts)
descObj.Description = EID:SimpleReplace(descObj.Description, tostring(toFind), replaceWith, 1)