EID.displayPermanentText fix (#985)

make commit 78bc8fc apply only when permname is provided
This commit is contained in:
리셰 authored and GitHub committed 2026-08-02 14:04:32 +01:00
1 parent a1f8ffa816
commit 65339a7bae
1 file changed
+7 -2
+7 -2
View File
@@ -522,10 +522,15 @@ end
---Overrides all potentially displayed texts and permanently displays the given texts ---Overrides all potentially displayed texts and permanently displays the given texts
---@see EID.hidePermanentText @Hides permanently displayed text object. ---@see EID.hidePermanentText @Hides permanently displayed text object.
---@param descriptionObject EID_DescObj @Description object to display ---@param descriptionObject EID_DescObj @Description object to display
---@param permName1 string ---@param permName1 string? @Can be nil outside of EID
---@param permName2 string? ---@param permName2 string?
function EID:displayPermanentText(descriptionObject, permName1, permName2) function EID:displayPermanentText(descriptionObject, permName1, permName2)
descriptionObject.Name = EID:getDescriptionEntryEnglish(permName1, permName2) if permName1 then
-- permName1 can be nil if the function is called outside of EID
-- To make config option "TranslateItemName" work in all usecases, override Name with this
-- Only override Name field when permName1 is present, to prevent name being completely not showing outside of Item Reminder, Dice rooms or other features
descriptionObject.Name = EID:getDescriptionEntryEnglish(permName1, permName2)
end
EID.permanentDisplayTextObj = descriptionObject EID.permanentDisplayTextObj = descriptionObject
EID.isDisplayingPermanent = true EID.isDisplayingPermanent = true
end end