isaacscript-common 1.2.193 → 1.2.194

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.
@@ -21,3 +21,8 @@ export declare function getPocketItems(player: EntityPlayer): PocketItemDescript
21
21
  * items. (Only Tainted Forgotten can pick up items.)
22
22
  */
23
23
  export declare function hasOpenPocketItemSlot(player: EntityPlayer): boolean;
24
+ /**
25
+ * Helper function to determine whether or not the player's "active" pocket item slot is set to
26
+ * their pocket active item.
27
+ */
28
+ export declare function isFirstSlotPocketActiveItem(player: EntityPlayer): boolean;
@@ -60,4 +60,9 @@ function ____exports.hasOpenPocketItemSlot(self, player)
60
60
  function(____, pocketItem) return pocketItem.type == PocketItemType.EMPTY end
61
61
  )
62
62
  end
63
+ function ____exports.isFirstSlotPocketActiveItem(self, player)
64
+ local pocketItems = ____exports.getPocketItems(nil, player)
65
+ local firstPocketItem = pocketItems[1]
66
+ return firstPocketItem.type == PocketItemType.ACTIVE_ITEM
67
+ end
63
68
  return ____exports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.2.193",
3
+ "version": "1.2.194",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",