Item Pool Detection
Classes
Section titled “Classes”ItemPoolDetection
Section titled “ItemPoolDetection”Defined in: packages/isaacscript-common/src/classes/features/other/ItemPoolDetection.ts:34
Extends
Section titled “Extends”Feature
Methods
Section titled “Methods”getCollectiblesInItemPool()
Section titled “getCollectiblesInItemPool()”getCollectiblesInItemPool(
itemPoolType): readonlyCollectibleType[]
Defined in: packages/isaacscript-common/src/classes/features/other/ItemPoolDetection.ts:55
Helper function to get the remaining collectibles in a given item pool. This function is expensive, so only use it in situations where the lag is acceptable.
In order to use this function, you must upgrade your mod with ISCFeature.ITEM_POOL_DETECTION.
Parameters
Section titled “Parameters”itemPoolType
Section titled “itemPoolType”ItemPoolType
Returns
Section titled “Returns”readonly CollectibleType[]
isCollectibleInItemPool()
Section titled “isCollectibleInItemPool()”isCollectibleInItemPool(
collectibleType,itemPoolType):boolean
Defined in: packages/isaacscript-common/src/classes/features/other/ItemPoolDetection.ts:79
Helper function to see if the given collectible is still present in the given item pool.
If the collectible is non-offensive, any Tainted Losts will be temporarily changed to Isaac and then changed back. (This is because Tainted Lost is not able to retrieve non-offensive collectibles from item pools).
Under the hood, this function works by using the ItemPool.AddRoomBlacklist method to
blacklist every collectible except for the one provided.
In order to use this function, you must upgrade your mod with ISCFeature.ITEM_POOL_DETECTION.
Parameters
Section titled “Parameters”collectibleType
Section titled “collectibleType”CollectibleType
itemPoolType
Section titled “itemPoolType”ItemPoolType
Returns
Section titled “Returns”boolean
isCollectibleUnlocked()
Section titled “isCollectibleUnlocked()”isCollectibleUnlocked(
collectibleType,itemPoolType):boolean
Defined in: packages/isaacscript-common/src/classes/features/other/ItemPoolDetection.ts:164
Helper function to see if the given collectible is unlocked on the current save file. This requires providing the corresponding item pool that the collectible is normally located in.
- If any player currently has the collectible, then it is assumed to be unlocked. (This is because in almost all cases, when a collectible is added to a player’s inventory, it is subsequently removed from all pools.)
- If the collectible is located in more than one item pool, then any item pool can be provided.
- If the collectible is not located in any item pools, then this function will always return false.
- If the collectible is non-offensive, any Tainted Losts will be temporarily changed to Isaac and then changed back. (This is because Tainted Lost is not able to retrieve non-offensive collectibles from item pools).
In order to use this function, you must upgrade your mod with ISCFeature.ITEM_POOL_DETECTION.
Parameters
Section titled “Parameters”collectibleType
Section titled “collectibleType”CollectibleType
itemPoolType
Section titled “itemPoolType”ItemPoolType
Returns
Section titled “Returns”boolean
