isaacscript-common 1.2.236 → 1.2.239

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.
@@ -1,28 +1,129 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
+ /** Helper function to get all of the battery entities in the room. */
3
+ export declare function getBatteries(matchingSubType?: number): EntityPickup[];
4
+ /** Helper function to get all of the card entities in the room. */
5
+ export declare function getCards(matchingSubType?: number): EntityPickup[];
6
+ /** Helper function to get all of the coin pickup entities in the room. */
2
7
  export declare function getCoins(matchingSubType?: number): EntityPickup[];
8
+ /** Helper function to get all of the collectible entities in the room. */
9
+ export declare function getCollectibles(matchingSubType?: number): EntityPickup[];
10
+ /** Helper function to get all of the heart pickup entities in the room. */
3
11
  export declare function getHearts(matchingSubType?: number): EntityPickup[];
12
+ /** Helper function to get all of the key pickup entities in the room. */
4
13
  export declare function getKeys(matchingSubType?: number): EntityPickup[];
5
- /**
6
- * Helper function to get all of the pickups in the room.
7
- *
8
- * Example:
9
- * ```ts
10
- * // Make all of the pickups in the room invisible
11
- * for (const pickup of getPickups()) {
12
- * pickup.Visible = false;
13
- * }
14
- * ```
15
- */
16
- export declare function getPickups(matchingVariant?: PickupVariant | int, matchingSubType?: number): EntityPickup[];
14
+ /** Helper function to get all of the pill entities in the room. */
15
+ export declare function getPills(matchingSubType?: number): EntityPickup[];
16
+ /** Helper function to get all of the red heart pickup entities in the room. */
17
17
  export declare function getRedHearts(): EntityPickup[];
18
+ /** Helper function to get all of the trinket entities in the room. */
19
+ export declare function getTrinkets(matchingSubType?: number): EntityPickup[];
18
20
  export declare function isChest(pickup: EntityPickup): boolean;
19
21
  export declare function isRedHeart(pickup: EntityPickup): boolean;
20
22
  /**
21
- * Helper function to remove all of the pickups in the room.
23
+ * Helper function to remove all of the batteries in the room.
24
+ *
25
+ * @param batterySubType Optional. If specified, will only remove cards that match this sub-type.
26
+ * @param cap Optional. If specified, will only remove the given amount of cards.
27
+ * @returns True if one or more cards were removed, false otherwise.
28
+ */
29
+ export declare function removeAllBatteries(batterySubType?: BatterySubType | int, cap?: int): boolean;
30
+ /**
31
+ * Helper function to remove all of the cards in the room.
32
+ *
33
+ * @param card Optional. If specified, will only remove cards that match this sub-type.
34
+ * @param cap Optional. If specified, will only remove the given amount of cards.
35
+ * @returns True if one or more cards were removed, false otherwise.
36
+ */
37
+ export declare function removeAllCards(card?: Card | int, cap?: int): boolean;
38
+ /**
39
+ * Helper function to remove all of the coins in the room.
40
+ *
41
+ * @param coinSubType Optional. If specified, will only remove coins that match this sub-type.
42
+ * @param cap Optional. If specified, will only remove the given amount of coins.
43
+ * @returns True if one or more coins were removed, false otherwise.
44
+ */
45
+ export declare function removeAllCoins(coinSubType?: CoinSubType | int, cap?: int): boolean;
46
+ /**
47
+ * Helper function to remove all of the collectibles in the room.
48
+ *
49
+ * @param collectibleType Optional. If specified, will only remove collectibles that match this
50
+ * collectible type.
51
+ * @param cap Optional. If specified, will only remove the given amount of collectibles.
52
+ * @returns True if one or more collectibles were removed, false otherwise.
53
+ */
54
+ export declare function removeAllCollectibles(collectibleType?: CollectibleType | int, cap?: int): boolean;
55
+ /**
56
+ * Helper function to remove all of the hearts in the room.
57
+ *
58
+ * @param heartSubType Optional. If specified, will only remove hearts that match this sub-type.
59
+ * @param cap Optional. If specified, will only remove the given amount of hearts.
60
+ * @returns True if one or more hearts were removed, false otherwise.
61
+ */
62
+ export declare function removeAllHearts(heartSubType?: HeartSubType | int, cap?: int): boolean;
63
+ /**
64
+ * Helper function to remove all of the keys in the room.
65
+ *
66
+ * @param keySubType Optional. If specified, will only remove keys that match this sub-type.
67
+ * @param cap Optional. If specified, will only remove the given amount of keys.
68
+ * @returns True if one or more keys were removed, false otherwise.
69
+ */
70
+ export declare function removeAllKeys(keySubType?: KeySubType | int, cap?: int): boolean;
71
+ /**
72
+ * Helper function to remove all of the pills in the room.
73
+ *
74
+ * @param pillColor Optional. If specified, will only remove pills that match this color.
75
+ * @param cap Optional. If specified, will only remove the given amount of pills.
76
+ * @returns True if one or more pills were removed, false otherwise.
77
+ */
78
+ export declare function removeAllPills(pillColor?: PillColor, cap?: int): boolean;
79
+ /**
80
+ * Helper function to remove all of the trinkets in the room.
22
81
  *
23
- * @param variant Optional. If specified, will only remove pickups that match this variant.
24
- * @param subType Optional. If specified, will only remove pickups that match this sub-type.
25
- * @param cap Optional. If specified, will only remove the given amount of pickups.
26
- * @returns True if one or more pickups was removed, false otherwise.
82
+ * @param trinketType Optional. If specified, will only remove trinkets that match this trinket
83
+ * type.
84
+ * @param cap Optional. If specified, will only remove the given amount of trinkets.
85
+ * @returns True if one or more trinkets were removed, false otherwise.
86
+ */
87
+ export declare function removeAllTrinkets(trinketType?: TrinketType | int, cap?: int): boolean;
88
+ /**
89
+ * Helper function to spawn a `EntityType.ENTITY_PICKUP` (5) with variant
90
+ * `PickupVariant.PICKUP_LIL_BATTERY` (90).
91
+ */
92
+ export declare function spawnBattery(subType: BatterySubType | int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityPickup;
93
+ export declare function spawnBatteryWithSeed(subType: BatterySubType | int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickup;
94
+ /**
95
+ * Helper function to spawn a `EntityType.ENTITY_PICKUP` (5) with variant
96
+ * `PickupVariant.PICKUP_TAROTCARD` (300).
97
+ */
98
+ export declare function spawnCard(subType: Card | int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityPickup;
99
+ export declare function spawnCardWithSeed(subType: Card | int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickup;
100
+ /**
101
+ * Helper function to spawn a `EntityType.ENTITY_PICKUP` (5) with variant
102
+ * `PickupVariant.PICKUP_COIN` (20).
103
+ */
104
+ export declare function spawnCoin(subType: CoinSubType | int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityPickup;
105
+ export declare function spawnCoinWithSeed(subType: CoinSubType | int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickup;
106
+ /**
107
+ * Helper function to spawn a `EntityType.ENTITY_PICKUP` (5) with variant
108
+ * `PickupVariant.PICKUP_HEART` (10).
109
+ */
110
+ export declare function spawnHeart(subType: HeartSubType | int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityPickup;
111
+ export declare function spawnHeartWithSeed(subType: HeartSubType | int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickup;
112
+ /**
113
+ * Helper function to spawn a `EntityType.ENTITY_PICKUP` (5) with variant
114
+ * `PickupVariant.PICKUP_KEY` (30).
115
+ */
116
+ export declare function spawnKey(subType: KeySubType | int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityPickup;
117
+ export declare function spawnKeyWithSeed(subType: KeySubType | int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickup;
118
+ /**
119
+ * Helper function to spawn a `EntityType.ENTITY_PICKUP` (5) with variant
120
+ * `PickupVariant.PICKUP_PILL` (70).
121
+ */
122
+ export declare function spawnPill(subType: PillColor | int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityPickup;
123
+ export declare function spawnPillWithSeed(subType: PillColor | int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickup;
124
+ /**
125
+ * Helper function to spawn a `EntityType.ENTITY_PICKUP` (5) with variant
126
+ * `PickupVariant.PICKUP_TRINKET` (350).
27
127
  */
28
- export declare function removeAllPickups(variant?: PickupVariant | int, subType?: int, cap?: int): boolean;
128
+ export declare function spawnTrinket(subType: TrinketType | int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityPickup;
129
+ export declare function spawnTrinketWithSeed(subType: TrinketType | int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickup;
@@ -1,48 +1,57 @@
1
1
  local ____lualib = require("lualib_bundle")
2
- local __TS__ArrayPush = ____lualib.__TS__ArrayPush
3
2
  local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
4
3
  local ____exports = {}
4
+ local ____constants = require("constants")
5
+ local VectorZero = ____constants.VectorZero
5
6
  local ____chestPickupVariantsSet = require("sets.chestPickupVariantsSet")
6
7
  local CHEST_PICKUP_VARIANTS = ____chestPickupVariantsSet.CHEST_PICKUP_VARIANTS
7
8
  local ____redHeartSubTypesSet = require("sets.redHeartSubTypesSet")
8
9
  local RED_HEART_SUB_TYPES_SET = ____redHeartSubTypesSet.RED_HEART_SUB_TYPES_SET
9
- local ____entity = require("functions.entity")
10
- local getEntities = ____entity.getEntities
11
- local removeEntities = ____entity.removeEntities
12
- function ____exports.getPickups(self, matchingVariant, matchingSubType)
13
- if matchingVariant == nil then
14
- matchingVariant = -1
15
- end
10
+ local ____entitySpecific = require("functions.entitySpecific")
11
+ local getPickups = ____entitySpecific.getPickups
12
+ local removeAllPickups = ____entitySpecific.removeAllPickups
13
+ local spawnPickup = ____entitySpecific.spawnPickup
14
+ function ____exports.getBatteries(self, matchingSubType)
16
15
  if matchingSubType == nil then
17
16
  matchingSubType = -1
18
17
  end
19
- local entities = getEntities(nil, EntityType.ENTITY_PICKUP, matchingVariant, matchingSubType)
20
- local pickups = {}
21
- for ____, entity in ipairs(entities) do
22
- local pickup = entity:ToPickup()
23
- if pickup ~= nil then
24
- __TS__ArrayPush(pickups, pickup)
25
- end
18
+ return getPickups(nil, 90, matchingSubType)
19
+ end
20
+ function ____exports.getCards(self, matchingSubType)
21
+ if matchingSubType == nil then
22
+ matchingSubType = -1
26
23
  end
27
- return pickups
24
+ return getPickups(nil, 300, matchingSubType)
28
25
  end
29
26
  function ____exports.getCoins(self, matchingSubType)
30
27
  if matchingSubType == nil then
31
28
  matchingSubType = -1
32
29
  end
33
- return ____exports.getPickups(nil, 20, matchingSubType)
30
+ return getPickups(nil, 20, matchingSubType)
31
+ end
32
+ function ____exports.getCollectibles(self, matchingSubType)
33
+ if matchingSubType == nil then
34
+ matchingSubType = -1
35
+ end
36
+ return getPickups(nil, 100, matchingSubType)
34
37
  end
35
38
  function ____exports.getHearts(self, matchingSubType)
36
39
  if matchingSubType == nil then
37
40
  matchingSubType = -1
38
41
  end
39
- return ____exports.getPickups(nil, 10, matchingSubType)
42
+ return getPickups(nil, 10, matchingSubType)
40
43
  end
41
44
  function ____exports.getKeys(self, matchingSubType)
42
45
  if matchingSubType == nil then
43
46
  matchingSubType = -1
44
47
  end
45
- return ____exports.getPickups(nil, 30, matchingSubType)
48
+ return getPickups(nil, 30, matchingSubType)
49
+ end
50
+ function ____exports.getPills(self, matchingSubType)
51
+ if matchingSubType == nil then
52
+ matchingSubType = -1
53
+ end
54
+ return getPickups(nil, 70, matchingSubType)
46
55
  end
47
56
  function ____exports.getRedHearts(self)
48
57
  local hearts = ____exports.getHearts(nil)
@@ -51,14 +60,292 @@ function ____exports.getRedHearts(self)
51
60
  function(____, heart) return RED_HEART_SUB_TYPES_SET:has(heart.SubType) end
52
61
  )
53
62
  end
63
+ function ____exports.getTrinkets(self, matchingSubType)
64
+ if matchingSubType == nil then
65
+ matchingSubType = -1
66
+ end
67
+ return getPickups(nil, 350, matchingSubType)
68
+ end
54
69
  function ____exports.isChest(self, pickup)
55
70
  return CHEST_PICKUP_VARIANTS:has(pickup.Variant)
56
71
  end
57
72
  function ____exports.isRedHeart(self, pickup)
58
73
  return pickup.Variant == 10 and RED_HEART_SUB_TYPES_SET:has(pickup.SubType)
59
74
  end
60
- function ____exports.removeAllPickups(self, variant, subType, cap)
61
- local pickups = ____exports.getPickups(nil, variant, subType)
62
- return removeEntities(nil, pickups, cap)
75
+ function ____exports.removeAllBatteries(self, batterySubType, cap)
76
+ return removeAllPickups(nil, 90, batterySubType, cap)
77
+ end
78
+ function ____exports.removeAllCards(self, card, cap)
79
+ return removeAllPickups(nil, 300, card, cap)
80
+ end
81
+ function ____exports.removeAllCoins(self, coinSubType, cap)
82
+ return removeAllPickups(nil, 20, coinSubType, cap)
83
+ end
84
+ function ____exports.removeAllCollectibles(self, collectibleType, cap)
85
+ return removeAllPickups(nil, 100, collectibleType, cap)
86
+ end
87
+ function ____exports.removeAllHearts(self, heartSubType, cap)
88
+ return removeAllPickups(nil, 10, heartSubType, cap)
89
+ end
90
+ function ____exports.removeAllKeys(self, keySubType, cap)
91
+ return removeAllPickups(nil, 30, keySubType, cap)
92
+ end
93
+ function ____exports.removeAllPills(self, pillColor, cap)
94
+ return removeAllPickups(nil, 70, pillColor, cap)
95
+ end
96
+ function ____exports.removeAllTrinkets(self, trinketType, cap)
97
+ return removeAllPickups(nil, 350, trinketType, cap)
98
+ end
99
+ function ____exports.spawnBattery(self, subType, position, velocity, spawner, seed)
100
+ if velocity == nil then
101
+ velocity = VectorZero
102
+ end
103
+ if spawner == nil then
104
+ spawner = nil
105
+ end
106
+ if seed == nil then
107
+ seed = nil
108
+ end
109
+ return spawnPickup(
110
+ nil,
111
+ 90,
112
+ subType,
113
+ position,
114
+ velocity,
115
+ spawner,
116
+ seed
117
+ )
118
+ end
119
+ function ____exports.spawnBatteryWithSeed(self, subType, position, seed, velocity, spawner)
120
+ if velocity == nil then
121
+ velocity = VectorZero
122
+ end
123
+ if spawner == nil then
124
+ spawner = nil
125
+ end
126
+ return ____exports.spawnBattery(
127
+ nil,
128
+ subType,
129
+ position,
130
+ velocity,
131
+ spawner,
132
+ seed
133
+ )
134
+ end
135
+ function ____exports.spawnCard(self, subType, position, velocity, spawner, seed)
136
+ if velocity == nil then
137
+ velocity = VectorZero
138
+ end
139
+ if spawner == nil then
140
+ spawner = nil
141
+ end
142
+ if seed == nil then
143
+ seed = nil
144
+ end
145
+ return spawnPickup(
146
+ nil,
147
+ 300,
148
+ subType,
149
+ position,
150
+ velocity,
151
+ spawner,
152
+ seed
153
+ )
154
+ end
155
+ function ____exports.spawnCardWithSeed(self, subType, position, seed, velocity, spawner)
156
+ if velocity == nil then
157
+ velocity = VectorZero
158
+ end
159
+ if spawner == nil then
160
+ spawner = nil
161
+ end
162
+ return ____exports.spawnCard(
163
+ nil,
164
+ subType,
165
+ position,
166
+ velocity,
167
+ spawner,
168
+ seed
169
+ )
170
+ end
171
+ function ____exports.spawnCoin(self, subType, position, velocity, spawner, seed)
172
+ if velocity == nil then
173
+ velocity = VectorZero
174
+ end
175
+ if spawner == nil then
176
+ spawner = nil
177
+ end
178
+ if seed == nil then
179
+ seed = nil
180
+ end
181
+ return spawnPickup(
182
+ nil,
183
+ 20,
184
+ subType,
185
+ position,
186
+ velocity,
187
+ spawner,
188
+ seed
189
+ )
190
+ end
191
+ function ____exports.spawnCoinWithSeed(self, subType, position, seed, velocity, spawner)
192
+ if velocity == nil then
193
+ velocity = VectorZero
194
+ end
195
+ if spawner == nil then
196
+ spawner = nil
197
+ end
198
+ return ____exports.spawnCoin(
199
+ nil,
200
+ subType,
201
+ position,
202
+ velocity,
203
+ spawner,
204
+ seed
205
+ )
206
+ end
207
+ function ____exports.spawnHeart(self, subType, position, velocity, spawner, seed)
208
+ if velocity == nil then
209
+ velocity = VectorZero
210
+ end
211
+ if spawner == nil then
212
+ spawner = nil
213
+ end
214
+ if seed == nil then
215
+ seed = nil
216
+ end
217
+ return spawnPickup(
218
+ nil,
219
+ 10,
220
+ subType,
221
+ position,
222
+ velocity,
223
+ spawner,
224
+ seed
225
+ )
226
+ end
227
+ function ____exports.spawnHeartWithSeed(self, subType, position, seed, velocity, spawner)
228
+ if velocity == nil then
229
+ velocity = VectorZero
230
+ end
231
+ if spawner == nil then
232
+ spawner = nil
233
+ end
234
+ return ____exports.spawnHeart(
235
+ nil,
236
+ subType,
237
+ position,
238
+ velocity,
239
+ spawner,
240
+ seed
241
+ )
242
+ end
243
+ function ____exports.spawnKey(self, subType, position, velocity, spawner, seed)
244
+ if velocity == nil then
245
+ velocity = VectorZero
246
+ end
247
+ if spawner == nil then
248
+ spawner = nil
249
+ end
250
+ if seed == nil then
251
+ seed = nil
252
+ end
253
+ return spawnPickup(
254
+ nil,
255
+ 30,
256
+ subType,
257
+ position,
258
+ velocity,
259
+ spawner,
260
+ seed
261
+ )
262
+ end
263
+ function ____exports.spawnKeyWithSeed(self, subType, position, seed, velocity, spawner)
264
+ if velocity == nil then
265
+ velocity = VectorZero
266
+ end
267
+ if spawner == nil then
268
+ spawner = nil
269
+ end
270
+ return ____exports.spawnKey(
271
+ nil,
272
+ subType,
273
+ position,
274
+ velocity,
275
+ spawner,
276
+ seed
277
+ )
278
+ end
279
+ function ____exports.spawnPill(self, subType, position, velocity, spawner, seed)
280
+ if velocity == nil then
281
+ velocity = VectorZero
282
+ end
283
+ if spawner == nil then
284
+ spawner = nil
285
+ end
286
+ if seed == nil then
287
+ seed = nil
288
+ end
289
+ return spawnPickup(
290
+ nil,
291
+ 70,
292
+ subType,
293
+ position,
294
+ velocity,
295
+ spawner,
296
+ seed
297
+ )
298
+ end
299
+ function ____exports.spawnPillWithSeed(self, subType, position, seed, velocity, spawner)
300
+ if velocity == nil then
301
+ velocity = VectorZero
302
+ end
303
+ if spawner == nil then
304
+ spawner = nil
305
+ end
306
+ return ____exports.spawnPill(
307
+ nil,
308
+ subType,
309
+ position,
310
+ velocity,
311
+ spawner,
312
+ seed
313
+ )
314
+ end
315
+ function ____exports.spawnTrinket(self, subType, position, velocity, spawner, seed)
316
+ if velocity == nil then
317
+ velocity = VectorZero
318
+ end
319
+ if spawner == nil then
320
+ spawner = nil
321
+ end
322
+ if seed == nil then
323
+ seed = nil
324
+ end
325
+ return spawnPickup(
326
+ nil,
327
+ 350,
328
+ subType,
329
+ position,
330
+ velocity,
331
+ spawner,
332
+ seed
333
+ )
334
+ end
335
+ function ____exports.spawnTrinketWithSeed(self, subType, position, seed, velocity, spawner)
336
+ if velocity == nil then
337
+ velocity = VectorZero
338
+ end
339
+ if spawner == nil then
340
+ spawner = nil
341
+ end
342
+ return ____exports.spawnTrinket(
343
+ nil,
344
+ subType,
345
+ position,
346
+ velocity,
347
+ spawner,
348
+ seed
349
+ )
63
350
  end
64
351
  return ____exports
@@ -1,9 +1,5 @@
1
1
  --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
2
2
  local ____exports = {}
3
- local ____cachedClasses = require("cachedClasses")
4
- local game = ____cachedClasses.game
5
- local ____constants = require("constants")
6
- local VectorZero = ____constants.VectorZero
7
3
  local ____preventCollectibleRotate = require("features.preventCollectibleRotate")
8
4
  local preventCollectibleRotate = ____preventCollectibleRotate.preventCollectibleRotate
9
5
  local ____featuresInitialized = require("featuresInitialized")
@@ -11,6 +7,8 @@ local areFeaturesInitialized = ____featuresInitialized.areFeaturesInitialized
11
7
  local ____collectibles = require("functions.collectibles")
12
8
  local isQuestCollectible = ____collectibles.isQuestCollectible
13
9
  local setCollectibleEmpty = ____collectibles.setCollectibleEmpty
10
+ local ____entitySpecific = require("functions.entitySpecific")
11
+ local spawnPickupWithSeed = ____entitySpecific.spawnPickupWithSeed
14
12
  local ____player = require("functions.player")
15
13
  local anyPlayerIs = ____player.anyPlayerIs
16
14
  local ____rng = require("functions.rng")
@@ -27,18 +25,13 @@ function ____exports.spawnCollectible(self, collectibleType, position, seedOrRNG
27
25
  forceFreeItem = false
28
26
  end
29
27
  local seed = isRNG(nil, seedOrRNG) and seedOrRNG:Next() or seedOrRNG
30
- local collectible = game:Spawn(
31
- EntityType.ENTITY_PICKUP,
32
- 100,
33
- position,
34
- VectorZero,
28
+ local collectible = spawnPickupWithSeed(
35
29
  nil,
30
+ 100,
36
31
  collectibleType,
32
+ position,
37
33
  seed
38
- ):ToPickup()
39
- if collectible == nil then
40
- error("Failed to spawn a collectible.")
41
- end
34
+ )
42
35
  if options then
43
36
  collectible.OptionsPickupIndex = 1
44
37
  end
@@ -34,8 +34,6 @@ export declare function getTrinketDescription(trinketType: TrinketType | int): s
34
34
  * ```
35
35
  */
36
36
  export declare function getTrinketName(trinketType: TrinketType | int): string;
37
- /** Helper function to get all of the trinket entities in the room. */
38
- export declare function getTrinkets(matchingSubType?: number): EntityPickup[];
39
37
  /**
40
38
  * Returns whether or not the player can hold an additional trinket, beyond what they are currently
41
39
  * carrying. This takes into account items that modify the max number of trinkets, like Mom's Purse.
@@ -12,8 +12,6 @@ local DEFAULT_TRINKET_NAME = ____trinketNameMap.DEFAULT_TRINKET_NAME
12
12
  local TRINKET_NAME_MAP = ____trinketNameMap.TRINKET_NAME_MAP
13
13
  local ____flag = require("functions.flag")
14
14
  local hasFlag = ____flag.hasFlag
15
- local ____pickups = require("functions.pickups")
16
- local getPickups = ____pickups.getPickups
17
15
  local ____player = require("functions.player")
18
16
  local isCharacter = ____player.isCharacter
19
17
  local useActiveItemTemp = ____player.useActiveItemTemp
@@ -65,12 +63,6 @@ function ____exports.getTrinketName(self, trinketType)
65
63
  end
66
64
  return DEFAULT_TRINKET_NAME
67
65
  end
68
- function ____exports.getTrinkets(self, matchingSubType)
69
- if matchingSubType == nil then
70
- matchingSubType = -1
71
- end
72
- return getPickups(nil, 350, matchingSubType)
73
- end
74
66
  function ____exports.hasOpenTrinketSlot(self, player)
75
67
  if isCharacter(nil, player, PlayerType.PLAYER_THESOUL_B) then
76
68
  return false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.2.236",
3
+ "version": "1.2.239",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",