isaacscript-common 1.2.145 → 1.2.146

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.
@@ -42,3 +42,4 @@ export declare function addRoomClearCharge(player: EntityPlayer, ignoreBigRoomDo
42
42
  */
43
43
  export declare function addRoomClearChargeToSlot(player: EntityPlayer, activeSlot: ActiveSlot, ignoreBigRoomDoubleCharge?: boolean): void;
44
44
  export declare function playChargeSoundEffect(player: EntityPlayer, activeSlot: ActiveSlot): void;
45
+ export declare function isActiveSlotDoubleCharged(player: EntityPlayer, activeSlot: ActiveSlot): boolean;
@@ -105,4 +105,10 @@ function ____exports.addRoomClearCharges(self, ignoreBigRoomDoubleCharge)
105
105
  ____exports.addRoomClearCharge(nil, player, ignoreBigRoomDoubleCharge)
106
106
  end
107
107
  end
108
+ function ____exports.isActiveSlotDoubleCharged(self, player, activeSlot)
109
+ local collectibleType = player:GetActiveItem(activeSlot)
110
+ local batteryCharge = player:GetBatteryCharge(activeSlot)
111
+ local maxCharges = getCollectibleMaxCharges(nil, collectibleType)
112
+ return batteryCharge >= maxCharges
113
+ end
108
114
  return ____exports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.2.145",
3
+ "version": "1.2.146",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",