isaacscript-common 3.5.1 → 3.6.0

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.
@@ -16,7 +16,8 @@ local postCollectibleInitFirstHasSubscriptions = ____postCollectibleInitFirst.po
16
16
  function hasSubscriptions(self)
17
17
  return postCollectibleInitFirstHasSubscriptions(nil)
18
18
  end
19
- function postPickupInitCollectible(self, collectible)
19
+ function postPickupInitCollectible(self, pickup)
20
+ local collectible = pickup
20
21
  local collectibleIndex = getCollectibleIndex(nil, collectible)
21
22
  if v.run.seenCollectibles:has(collectibleIndex) then
22
23
  return
@@ -34,8 +34,8 @@ function postPEffectUpdateReordered(self, player)
34
34
  local currentHealthValue = getPlayerHealthType(nil, player, healthType)
35
35
  playerHealthMap:set(healthType, currentHealthValue)
36
36
  if storedHealthValue ~= nil and storedHealthValue ~= currentHealthValue then
37
- local amount = currentHealthValue - storedHealthValue
38
- postPlayerChangeHealthFire(nil, player, healthType, amount)
37
+ local difference = currentHealthValue - storedHealthValue
38
+ postPlayerChangeHealthFire(nil, player, healthType, difference)
39
39
  end
40
40
  end
41
41
  end
@@ -1,5 +1,5 @@
1
- /// <reference types="isaac-typescript-definitions" />
2
- /// <reference types="isaac-typescript-definitions" />
3
- export declare type PostPickupCollectRegisterParameters = PickupRegisterParameters<[
4
- player: EntityPlayer
5
- ], void>;
1
+ import { PickupVariant } from "isaac-typescript-definitions";
2
+ export declare type PostPickupCollectRegisterParameters = [
3
+ callback: (pickup: EntityPickup, player: EntityPlayer) => void,
4
+ pickupVariant?: PickupVariant
5
+ ];
@@ -1,3 +1,5 @@
1
- /// <reference types="isaac-typescript-definitions" />
2
- export declare type PostPickupInitFirstRegisterParameters = PickupRegisterParameters<[
3
- ], void>;
1
+ import { PickupVariant } from "isaac-typescript-definitions";
2
+ export declare type PostPickupInitFirstRegisterParameters = [
3
+ callback: (pickup: EntityPickup) => void,
4
+ pickupVariant?: PickupVariant
5
+ ];
@@ -1,3 +1,5 @@
1
- /// <reference types="isaac-typescript-definitions" />
2
- export declare type PostPickupInitLateRegisterParameters = PickupRegisterParameters<[
3
- ], void>;
1
+ import { PickupVariant } from "isaac-typescript-definitions";
2
+ export declare type PostPickupInitLateRegisterParameters = [
3
+ callback: (pickup: EntityPickup) => void,
4
+ pickupVariant?: PickupVariant
5
+ ];
@@ -1,6 +1,5 @@
1
- /// <reference types="isaac-typescript-definitions" />
2
- /// <reference types="isaac-typescript-definitions" />
3
- export declare type PostPickupStateChangedRegisterParameters = PickupRegisterParameters<[
4
- previousState: int,
5
- currentState: int
6
- ], void>;
1
+ import { PickupVariant } from "isaac-typescript-definitions";
2
+ export declare type PostPickupStateChangedRegisterParameters = [
3
+ callback: (pickup: EntityPickup, previousState: int, currentState: int) => void,
4
+ pickupVariant?: PickupVariant
5
+ ];
@@ -1,7 +1,7 @@
1
1
  import { PlayerType, PlayerVariant } from "isaac-typescript-definitions";
2
2
  import { HealthType } from "../../enums/HealthType";
3
3
  export declare type PostPlayerChangeHealthRegisterParameters = [
4
- callback: (player: EntityPlayer, healthType: HealthType, amount: int) => void,
4
+ callback: (player: EntityPlayer, healthType: HealthType, difference: int) => void,
5
5
  playerVariant?: PlayerVariant,
6
6
  character?: PlayerType
7
7
  ];
@@ -13,7 +13,7 @@ function ____exports.postPlayerChangeHealthRegister(self, ...)
13
13
  end
14
14
  ---
15
15
  -- @internal
16
- function ____exports.postPlayerChangeHealthFire(self, player, healthType, amount)
16
+ function ____exports.postPlayerChangeHealthFire(self, player, healthType, difference)
17
17
  local character = player:GetPlayerType()
18
18
  for ____, ____value in ipairs(subscriptions) do
19
19
  local callback = ____value[1]
@@ -26,7 +26,7 @@ function ____exports.postPlayerChangeHealthFire(self, player, healthType, amount
26
26
  if callbackCharacter ~= nil and callbackCharacter ~= character then
27
27
  goto __continue5
28
28
  end
29
- callback(nil, player, healthType, amount)
29
+ callback(nil, player, healthType, difference)
30
30
  end
31
31
  ::__continue5::
32
32
  end
@@ -628,7 +628,7 @@ export declare enum ModCallbackCustom {
628
628
  * function postPlayerChangeHealth(
629
629
  * player: EntityPlayer,
630
630
  * healthType: HealthType,
631
- * amount: int,
631
+ * difference: int,
632
632
  * ) {}
633
633
  * ```
634
634
  */
@@ -23,7 +23,8 @@ local saveDataManager = ____exports.saveDataManager
23
23
  function useCardSoulOfIsaac(self)
24
24
  v.room.trackedCollectibles:clear()
25
25
  end
26
- function postPickupUpdateCollectible(self, collectible)
26
+ function postPickupUpdateCollectible(self, pickup)
27
+ local collectible = pickup
27
28
  if collectible.SubType == CollectibleType.NULL then
28
29
  return
29
30
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "3.5.1",
3
+ "version": "3.6.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -22,6 +22,6 @@
22
22
  "main": "index",
23
23
  "types": "index.d.ts",
24
24
  "dependencies": {
25
- "isaac-typescript-definitions": "^2.0.60"
25
+ "isaac-typescript-definitions": "^2.1.1"
26
26
  }
27
27
  }