isaacscript-common 1.0.451 → 1.0.452

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,6 +32,11 @@ export declare function getMaxCollectibleID(): int;
32
32
  * in secret rooms and I AM ERROR rooms if the "Corrupted Data" achievement is unlocked.
33
33
  */
34
34
  export declare function isGlitchedCollectible(entity: Entity): boolean;
35
+ /**
36
+ * Returns true if the item type in the item config is equal to `ItemType.ITEM_PASSIVE` or
37
+ * `ItemType.ITEM_FAMILIAR`.
38
+ */
39
+ export declare function isPassiveCollectible(collectibleType: CollectibleType | int): true | ItemType.ITEM_FAMILIAR;
35
40
  export declare function isQuestCollectible(collectibleType: CollectibleType | int): boolean;
36
41
  export declare function removeAllCollectibles(): void;
37
42
  /**
@@ -116,6 +116,10 @@ end
116
116
  function ____exports.isGlitchedCollectible(self, entity)
117
117
  return ((entity.Type == EntityType.ENTITY_PICKUP) and (entity.Variant == PickupVariant.PICKUP_COLLECTIBLE)) and (entity.SubType > GLITCHED_ITEM_THRESHOLD)
118
118
  end
119
+ function ____exports.isPassiveCollectible(self, collectibleType)
120
+ local itemType = ____exports.getCollectibleItemType(nil, collectibleType)
121
+ return (itemType == ItemType.ITEM_PASSIVE) or ItemType.ITEM_FAMILIAR
122
+ end
119
123
  function ____exports.isQuestCollectible(self, collectibleType)
120
124
  return ____exports.collectibleHasTag(nil, collectibleType, 32768)
121
125
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.0.451",
3
+ "version": "1.0.452",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",