Fixed errors when using collection page display with modded items
This commit is contained in:
1 parent
20538d0434
commit
4e12773d62
1 file changed
+3
-3
+3
-3
@@ -66,12 +66,12 @@ function EID:OnMenuRender()
|
|||||||
local selectedPage = CollectionMenu.GetSelectedPage()
|
local selectedPage = CollectionMenu.GetSelectedPage()
|
||||||
local CollectibleId = selectedPage * (20 * 6) + CollectionMenu.GetSelectedElement() + 1
|
local CollectibleId = selectedPage * (20 * 6) + CollectionMenu.GetSelectedElement() + 1
|
||||||
for _, id in ipairs(skipItemIDs) do -- some items dont exist, so we need to "skip" those when counting
|
for _, id in ipairs(skipItemIDs) do -- some items dont exist, so we need to "skip" those when counting
|
||||||
if id < CollectibleId then
|
if id <= CollectibleId then
|
||||||
CollectibleId = CollectibleId + 1
|
CollectibleId = CollectibleId + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local demoDescObj = EID:getDescriptionObj(5, 100, CollectibleId)
|
local demoDescObj = EID:getDescriptionObj(5, 100, CollectibleId, nil, false)
|
||||||
if not Isaac.GetPersistentGameData():IsItemInCollection(CollectibleId) then
|
if CollectibleId < CollectibleType.NUM_COLLECTIBLES and not Isaac.GetPersistentGameData():IsItemInCollection(CollectibleId) then
|
||||||
EID:renderQuestionMark(nil)
|
EID:renderQuestionMark(nil)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in new issue
Block a user