Book of Virtues descriptions

This commit is contained in:
Buurazu authored and GitHub committed 2021-11-13 00:52:38 -05:00
1 parent 4f4504cd24
commit 9d82675048
1 file changed
+26 -1
+26 -1
View File
@@ -53,6 +53,32 @@ local game = Game()
-- Handle Book of Virtues description addition
local function BookOfVirtuesCondition(descObj)
if descObj.ObjType ~= 5 or descObj.ObjVariant ~= PickupVariant.PICKUP_COLLECTIBLE then
return false
end
for i = 0,game:GetNumPlayers() - 1 do
local player = Isaac.GetPlayer(i)
if player:HasCollectible(CollectibleType.COLLECTIBLE_BOOK_OF_VIRTUES) then
return true
end
end
return false
end
local function BookOfVirtuesCallback(descObj)
local wispType = EID:getDescriptionEntry("bookOfVirtuesWisps", descObj.ObjSubType)
if wispType ~= nil then
local iconStr = "#{{Collectible584}} "
EID:appendToDescription(descObj, iconStr..wispType[1]:gsub("#",iconStr))
end
return descObj
end
EID:addDescriptionModifier("Book of Virtues", BookOfVirtuesCondition, BookOfVirtuesCallback)
-- Handle Spindown Dice description addition
local function SpindownDiceCondition(descObj)
if descObj.ObjType ~= 5 or descObj.ObjVariant ~= PickupVariant.PICKUP_COLLECTIBLE then
@@ -124,7 +150,6 @@ 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