Moved 'ItemPoolType' data to 'descriptionObj' (#834)
* remove last item pool function (for now) * moved item pool data to DescriptionObj + restored last item pool function
This commit is contained in:
2 files changed
+22
-4
No files matched your search
@@ -654,6 +654,7 @@ function EID:getDescriptionObj(Type, Variant, SubType, entity, checkModifiers)
|
|||||||
description.ModName = tableEntry and tableEntry[4]
|
description.ModName = tableEntry and tableEntry[4]
|
||||||
description.Quality = EID:getObjectQuality(description)
|
description.Quality = EID:getObjectQuality(description)
|
||||||
description.Icon = EID:getObjectIcon(description)
|
description.Icon = EID:getObjectIcon(description)
|
||||||
|
description.ItemPoolType = EID:getObjectItemPool(description)
|
||||||
EID:getObjectItemTypeAndCharge(description)
|
EID:getObjectItemTypeAndCharge(description)
|
||||||
|
|
||||||
EID.DifferentEffectPlayers = {}
|
EID.DifferentEffectPlayers = {}
|
||||||
@@ -2618,6 +2619,23 @@ function EID:getObjectQuality(descObj)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---Returns the item pool of the described entity
|
||||||
|
---@param descObj EID_DescObj
|
||||||
|
---@return integer?
|
||||||
|
function EID:getObjectItemPool(descObj)
|
||||||
|
local subType = tonumber(descObj.ObjSubType) ---@cast subType number
|
||||||
|
if EID.isRepentance and descObj.ObjType == 5 and descObj.ObjVariant == 100 then
|
||||||
|
if EID.isRepentancePlus then
|
||||||
|
-- TODO (maybe will require REPENTOGON?)
|
||||||
|
-- Since D4 exploit is completely fixed in 1.9.7.11, this is no longer viable for full-reroll effect
|
||||||
|
-- (still useful for initial item pool from rooms though)
|
||||||
|
return game:GetItemPool():GetLastPool() -- remove this if item pool function should not appear on 1.9.7.11 patch
|
||||||
|
else
|
||||||
|
return game:GetItemPool():GetLastPool()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
EID.ObjectIcon = {}
|
EID.ObjectIcon = {}
|
||||||
---Returns the Inline Icon definition object for a given object.
|
---Returns the Inline Icon definition object for a given object.
|
||||||
---@param descObj EID_DescObj
|
---@param descObj EID_DescObj
|
||||||
|
|||||||
@@ -651,13 +651,13 @@ function EID:printDescription(desc, cachedID)
|
|||||||
curName = curName.." - {{Quality"..desc.Quality.."}}"
|
curName = curName.." - {{Quality"..desc.Quality.."}}"
|
||||||
end
|
end
|
||||||
-- Display Last Pool for Collectible for full reroll effects (icon)
|
-- Display Last Pool for Collectible for full reroll effects (icon)
|
||||||
if EID.isRepentance and EID.Config["ShowItemPoolIcon"] and (desc.ObjType == 5 and desc.ObjVariant == 100) then
|
if desc.ItemPoolType and EID.Config["ShowItemPoolIcon"] then
|
||||||
local itemConfig = EID.itemConfig:GetCollectible(desc.ObjSubType)
|
local itemConfig = EID.itemConfig:GetCollectible(desc.ObjSubType)
|
||||||
if itemConfig:IsCollectible() and not itemConfig:HasTags(ItemConfig.TAG_QUEST) then
|
if itemConfig:IsCollectible() and not itemConfig:HasTags(ItemConfig.TAG_QUEST) then
|
||||||
if not EID.Config["ShowQuality"] then
|
if not EID.Config["ShowQuality"] then
|
||||||
curName = curName.." - "
|
curName = curName.." - "
|
||||||
end
|
end
|
||||||
curName = curName..""..(EID.ItemPoolTypeToMarkup[game:GetItemPool():GetLastPool()] or "{{ItemPoolTreasure}}")
|
curName = curName..""..(EID.ItemPoolTypeToMarkup[desc.ItemPoolType] or "{{ItemPoolTreasure}}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- Display the mod this item is from
|
-- Display the mod this item is from
|
||||||
@@ -720,10 +720,10 @@ function EID:printDescription(desc, cachedID)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- Display Last Pool for Collectible for full reroll effects (name)
|
-- Display Last Pool for Collectible for full reroll effects (name)
|
||||||
if EID.isRepentance and not EID.InsideItemReminder and EID.Config["ShowItemPoolText"] and (desc.ObjType and desc.ObjType == 5 and desc.ObjVariant and desc.ObjVariant == 100) then
|
if desc.ItemPoolType and not EID.InsideItemReminder and EID.Config["ShowItemPoolText"] then
|
||||||
local itemConfig = EID.itemConfig:GetCollectible(desc.ObjSubType)
|
local itemConfig = EID.itemConfig:GetCollectible(desc.ObjSubType)
|
||||||
if itemConfig:IsCollectible() and not itemConfig:HasTags(ItemConfig.TAG_QUEST) then
|
if itemConfig:IsCollectible() and not itemConfig:HasTags(ItemConfig.TAG_QUEST) then
|
||||||
local lastPool = game:GetItemPool():GetLastPool()
|
local lastPool = desc.ItemPoolType
|
||||||
|
|
||||||
local poolName = ""
|
local poolName = ""
|
||||||
local poolDescPrepend = EID:getDescriptionEntry("itemPoolFor")
|
local poolDescPrepend = EID:getDescriptionEntry("itemPoolFor")
|
||||||
|
|||||||
Reference in new issue
Block a user