isaacscript-common 1.2.106 → 1.2.107

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.
@@ -41,13 +41,7 @@ function checkPickupsPurchased(self, pickups, players)
41
41
  v.room.pickupMap:delete(index)
42
42
  local player = getPlayerThatIsNoLongerHoldingAnItem(nil, players)
43
43
  if player ~= nil then
44
- postPurchaseFire(
45
- nil,
46
- player,
47
- pickupDescription.variant,
48
- pickupDescription.subType,
49
- pickupDescription.price
50
- )
44
+ postPurchaseFire(nil, player, pickupDescription)
51
45
  end
52
46
  end
53
47
  ::__continue7::
@@ -70,7 +64,7 @@ function storePickupsInMap(self, pickups)
70
64
  function(____, pickup) return pickup.Price ~= 0 end
71
65
  )
72
66
  for ____, pickup in ipairs(pickupsWithPrice) do
73
- v.room.pickupMap:set(pickup.Index, {variant = pickup.Variant, subType = pickup.SubType, price = pickup.Price})
67
+ v.room.pickupMap:set(pickup.Index, {variant = pickup.Variant, subType = pickup.SubType, price = pickup.Price, initSeed = pickup.InitSeed})
74
68
  end
75
69
  end
76
70
  function storePlayersInMap(self, players)
@@ -1,2 +1,3 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
- export declare type PostPurchaseCallbackType = (player: EntityPlayer, pickupVariant: PickupVariant | int, pickupSubType: int, pickupPrice: int) => void;
2
+ import { PickupDescription } from "../../types/PickupDescription";
3
+ export declare type PostPurchaseCallbackType = (player: EntityPlayer, pickupDescription: PickupDescription) => void;
@@ -9,16 +9,10 @@ end
9
9
  function ____exports.postPurchaseRegister(self, callback, pickupVariant, pickupSubType)
10
10
  __TS__ArrayPush(subscriptions, {callback, pickupVariant, pickupSubType})
11
11
  end
12
- function ____exports.postPurchaseFire(self, player, pickupVariant, pickupSubType, pickupPrice)
12
+ function ____exports.postPurchaseFire(self, player, pickupDescription)
13
13
  for ____, ____value in ipairs(subscriptions) do
14
14
  local callback = ____value[1]
15
- callback(
16
- nil,
17
- player,
18
- pickupVariant,
19
- pickupSubType,
20
- pickupPrice
21
- )
15
+ callback(nil, player, pickupDescription)
22
16
  end
23
17
  end
24
18
  return ____exports
package/dist/index.d.ts CHANGED
@@ -90,6 +90,7 @@ export * from "./types/JSONSpawn";
90
90
  export * from "./types/ModCallbacksCustom";
91
91
  export * from "./types/ModUpgraded";
92
92
  export * from "./types/PickingUpItem";
93
+ export * from "./types/PickupDescription";
93
94
  export * from "./types/PillEffectClass";
94
95
  export * from "./types/PillEffectType";
95
96
  export * from "./types/PlayerHealth";
@@ -0,0 +1,7 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ export interface PickupDescription {
3
+ variant: PickupVariant | int;
4
+ subType: int;
5
+ price: int;
6
+ initSeed: int;
7
+ }
@@ -0,0 +1,3 @@
1
+ --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
+ local ____exports = {}
3
+ return ____exports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.2.106",
3
+ "version": "1.2.107",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",