Made golden trinkets compatible with description modifiers
This commit is contained in:
1 parent
009da2d876
commit
c6215f624f
3 files changed
+20
-11
No files matched your search
@@ -115,4 +115,18 @@ local game = Game()
|
||||
EID:addDescriptionModifier("Tarot Cloth", TarotClothCondition, TarotClothCallback)
|
||||
|
||||
|
||||
|
||||
-- Handle Golden Trinket description addition
|
||||
local function GoldenTrinketCondition(descObj)
|
||||
return descObj.ObjType == 5 and descObj.ObjVariant == PickupVariant.PICKUP_TRINKET and descObj.ObjSubType > TrinketType.TRINKET_GOLDEN_FLAG
|
||||
end
|
||||
|
||||
local function GoldenTrinketCallback(descObj)
|
||||
local goldenDesc = EID:getDescriptionEntry("goldenTrinket") or ""
|
||||
descObj.Description = "{{ColorGold}}"..goldenDesc.."#"..descObj.Description
|
||||
return descObj
|
||||
end
|
||||
EID:addDescriptionModifier("Tarot Cloth", GoldenTrinketCondition, GoldenTrinketCallback)
|
||||
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user