Fixed error caused by TMTrainer Items inside Crane games
This commit is contained in:
1 parent
ff618432ac
commit
04292753ff
2 files changed
+2
-2
No files matched your search
@@ -2262,7 +2262,7 @@ end
|
|||||||
---@return boolean
|
---@return boolean
|
||||||
---@diagnostic disable-next-line: duplicate-set-field
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
function EID:requiredForCollectionPage(itemID)
|
function EID:requiredForCollectionPage(itemID)
|
||||||
if not EID.SaveGame or EID.Config["SaveGameNumber"] == 0 or itemID >= CollectibleType.NUM_COLLECTIBLES or game:GetVictoryLap() > 0 or game:GetSeeds():IsCustomRun() then return false end
|
if not EID.SaveGame or EID.Config["SaveGameNumber"] == 0 or itemID >= CollectibleType.NUM_COLLECTIBLES or itemID <= 0 or game:GetVictoryLap() > 0 or game:GetSeeds():IsCustomRun() then return false end
|
||||||
return EID.SaveGame[EID.Config["SaveGameNumber"]].ItemNeedsPickup[itemID]
|
return EID.SaveGame[EID.Config["SaveGameNumber"]].ItemNeedsPickup[itemID]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ local maxVanillaItemID = CollectibleType.NUM_COLLECTIBLES -- sanity backup
|
|||||||
-- REPENTOGON: Use PersistentGameData to determine item collection status
|
-- REPENTOGON: Use PersistentGameData to determine item collection status
|
||||||
-- Returns true if an item needs to be collected for the collection page
|
-- Returns true if an item needs to be collected for the collection page
|
||||||
function EID:requiredForCollectionPage(itemID)
|
function EID:requiredForCollectionPage(itemID)
|
||||||
if itemID >= maxVanillaItemID or game:GetVictoryLap() > 0 or game:GetSeeds():IsCustomRun() then return false end
|
if itemID >= maxVanillaItemID or itemID <= 0 or game:GetVictoryLap() > 0 or game:GetSeeds():IsCustomRun() then return false end
|
||||||
return not Isaac.GetPersistentGameData():IsItemInCollection(itemID)
|
return not Isaac.GetPersistentGameData():IsItemInCollection(itemID)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user