Add support for collectible's item pool (#561)

* getlastpool test

* update icons and config

* Don't show pool for quest items

* Fix modded recipes breaking game's last pool

* fix icon misalign

* Added text for Last Item Pool indicator
This commit is contained in:
wakaba (aka. 미카) authored and GitHub committed 2023-05-07 16:58:43 +02:00
1 parent 51d0ef2e1b
commit da9338ef54
10 files changed
+161 -3

No files matched your search

+10
View File
@@ -622,6 +622,16 @@ function EID:printDescription(desc, cachedID)
if EID.Config["ShowQuality"] and desc.Quality then
curName = curName.." - {{Quality"..desc.Quality.."}}"
end
-- Display Last Pool for Collectible for full reroll effects
if EID.isRepentance and EID.Config["ShowItemPoolIcon"] and (desc.ObjType == 5 and desc.ObjVariant == 100) then
local itemConfig = EID.itemConfig:GetCollectible(desc.ObjSubType)
if itemConfig:IsCollectible() and not itemConfig:HasTags(ItemConfig.TAG_QUEST) then
if not EID.Config["ShowQuality"] then
curName = curName.." - "
end
curName = curName..""..(EID.ItemPoolTypeToMarkup[game:GetItemPool():GetLastPool()] or "{{ItemPoolTreasure}}")
end
end
-- Display the mod this item is from
if desc.ModName then
curName = curName .. EID:getModNameString(desc)