isaacscript-common 1.2.239 → 1.2.240
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.
|
@@ -15,6 +15,8 @@ export declare function getKeys(matchingSubType?: number): EntityPickup[];
|
|
|
15
15
|
export declare function getPills(matchingSubType?: number): EntityPickup[];
|
|
16
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 sack (i.e. grab bag) entities in the room. */
|
|
19
|
+
export declare function getSacks(matchingSubType?: number): EntityPickup[];
|
|
18
20
|
/** Helper function to get all of the trinket entities in the room. */
|
|
19
21
|
export declare function getTrinkets(matchingSubType?: number): EntityPickup[];
|
|
20
22
|
export declare function isChest(pickup: EntityPickup): boolean;
|
|
@@ -76,6 +78,14 @@ export declare function removeAllKeys(keySubType?: KeySubType | int, cap?: int):
|
|
|
76
78
|
* @returns True if one or more pills were removed, false otherwise.
|
|
77
79
|
*/
|
|
78
80
|
export declare function removeAllPills(pillColor?: PillColor, cap?: int): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Helper function to remove all of the sacks (i.e. grab bags) in the room.
|
|
83
|
+
*
|
|
84
|
+
* @param sackSubType Optional. If specified, will only remove sacks that match this sub-type.
|
|
85
|
+
* @param cap Optional. If specified, will only remove the given amount of trinkets.
|
|
86
|
+
* @returns True if one or more trinkets were removed, false otherwise.
|
|
87
|
+
*/
|
|
88
|
+
export declare function removeAllSacks(sackSubType?: SackSubType | int, cap?: int): boolean;
|
|
79
89
|
/**
|
|
80
90
|
* Helper function to remove all of the trinkets in the room.
|
|
81
91
|
*
|
|
@@ -121,6 +131,12 @@ export declare function spawnKeyWithSeed(subType: KeySubType | int, position: Ve
|
|
|
121
131
|
*/
|
|
122
132
|
export declare function spawnPill(subType: PillColor | int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityPickup;
|
|
123
133
|
export declare function spawnPillWithSeed(subType: PillColor | int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickup;
|
|
134
|
+
/**
|
|
135
|
+
* Helper function to spawn a `EntityType.ENTITY_PICKUP` (5) with variant
|
|
136
|
+
* `PickupVariant.PICKUP_GRAB_BAG` (69).
|
|
137
|
+
*/
|
|
138
|
+
export declare function spawnSack(subType: SackSubType | int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityPickup;
|
|
139
|
+
export declare function spawnSackWithSeed(subType: SackSubType | int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickup;
|
|
124
140
|
/**
|
|
125
141
|
* Helper function to spawn a `EntityType.ENTITY_PICKUP` (5) with variant
|
|
126
142
|
* `PickupVariant.PICKUP_TRINKET` (350).
|
|
@@ -60,6 +60,12 @@ function ____exports.getRedHearts(self)
|
|
|
60
60
|
function(____, heart) return RED_HEART_SUB_TYPES_SET:has(heart.SubType) end
|
|
61
61
|
)
|
|
62
62
|
end
|
|
63
|
+
function ____exports.getSacks(self, matchingSubType)
|
|
64
|
+
if matchingSubType == nil then
|
|
65
|
+
matchingSubType = -1
|
|
66
|
+
end
|
|
67
|
+
return getPickups(nil, 69, matchingSubType)
|
|
68
|
+
end
|
|
63
69
|
function ____exports.getTrinkets(self, matchingSubType)
|
|
64
70
|
if matchingSubType == nil then
|
|
65
71
|
matchingSubType = -1
|
|
@@ -93,6 +99,9 @@ end
|
|
|
93
99
|
function ____exports.removeAllPills(self, pillColor, cap)
|
|
94
100
|
return removeAllPickups(nil, 70, pillColor, cap)
|
|
95
101
|
end
|
|
102
|
+
function ____exports.removeAllSacks(self, sackSubType, cap)
|
|
103
|
+
return removeAllPickups(nil, 350, sackSubType, cap)
|
|
104
|
+
end
|
|
96
105
|
function ____exports.removeAllTrinkets(self, trinketType, cap)
|
|
97
106
|
return removeAllPickups(nil, 350, trinketType, cap)
|
|
98
107
|
end
|
|
@@ -312,6 +321,42 @@ function ____exports.spawnPillWithSeed(self, subType, position, seed, velocity,
|
|
|
312
321
|
seed
|
|
313
322
|
)
|
|
314
323
|
end
|
|
324
|
+
function ____exports.spawnSack(self, subType, position, velocity, spawner, seed)
|
|
325
|
+
if velocity == nil then
|
|
326
|
+
velocity = VectorZero
|
|
327
|
+
end
|
|
328
|
+
if spawner == nil then
|
|
329
|
+
spawner = nil
|
|
330
|
+
end
|
|
331
|
+
if seed == nil then
|
|
332
|
+
seed = nil
|
|
333
|
+
end
|
|
334
|
+
return spawnPickup(
|
|
335
|
+
nil,
|
|
336
|
+
69,
|
|
337
|
+
subType,
|
|
338
|
+
position,
|
|
339
|
+
velocity,
|
|
340
|
+
spawner,
|
|
341
|
+
seed
|
|
342
|
+
)
|
|
343
|
+
end
|
|
344
|
+
function ____exports.spawnSackWithSeed(self, subType, position, seed, velocity, spawner)
|
|
345
|
+
if velocity == nil then
|
|
346
|
+
velocity = VectorZero
|
|
347
|
+
end
|
|
348
|
+
if spawner == nil then
|
|
349
|
+
spawner = nil
|
|
350
|
+
end
|
|
351
|
+
return ____exports.spawnSack(
|
|
352
|
+
nil,
|
|
353
|
+
subType,
|
|
354
|
+
position,
|
|
355
|
+
velocity,
|
|
356
|
+
spawner,
|
|
357
|
+
seed
|
|
358
|
+
)
|
|
359
|
+
end
|
|
315
360
|
function ____exports.spawnTrinket(self, subType, position, velocity, spawner, seed)
|
|
316
361
|
if velocity == nil then
|
|
317
362
|
velocity = VectorZero
|