isaacscript-common 4.7.2 → 4.7.3
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.
- package/functions/boss.d.ts +2 -2
- package/functions/boss.lua +8 -4
- package/functions/entity.d.ts +2 -2
- package/functions/entity.lua +8 -6
- package/functions/entitySpecific.d.ts +20 -20
- package/functions/entitySpecific.lua +60 -60
- package/functions/pickups.d.ts +16 -16
- package/functions/pickups.lua +48 -48
- package/package.json +1 -1
package/functions/boss.d.ts
CHANGED
|
@@ -47,10 +47,10 @@ export declare function isSin(npc: EntityNPC): boolean;
|
|
|
47
47
|
* Gurglings/Turdlings with 2 copies, and other multi-segment bosses with 4 segments. You can
|
|
48
48
|
* customize this via the "numSegments" argument.
|
|
49
49
|
*/
|
|
50
|
-
export declare function spawnBoss(entityType: EntityType, variant: int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined,
|
|
50
|
+
export declare function spawnBoss(entityType: EntityType, variant: int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined, numSegments?: int): EntityNPC;
|
|
51
51
|
/**
|
|
52
52
|
* Helper function to spawn a boss with a specific seed.
|
|
53
53
|
*
|
|
54
54
|
* For more information, see the documentation for the `spawnBoss` function.
|
|
55
55
|
*/
|
|
56
|
-
export declare function spawnBossWithSeed(entityType: EntityType, variant: int, subType: int, position: Vector,
|
|
56
|
+
export declare function spawnBossWithSeed(entityType: EntityType, variant: int, subType: int, position: Vector, seedOrRNG: Seed | RNG, velocity?: Readonly<Vector>, spawner?: Entity | undefined, numSegments?: int): EntityNPC;
|
package/functions/boss.lua
CHANGED
|
@@ -20,6 +20,8 @@ local getNPCs = ____entitySpecific.getNPCs
|
|
|
20
20
|
local spawnNPC = ____entitySpecific.spawnNPC
|
|
21
21
|
local ____npc = require("functions.npc")
|
|
22
22
|
local getAliveNPCs = ____npc.getAliveNPCs
|
|
23
|
+
local ____rng = require("functions.rng")
|
|
24
|
+
local isRNG = ____rng.isRNG
|
|
23
25
|
local ____set = require("functions.set")
|
|
24
26
|
local copySet = ____set.copySet
|
|
25
27
|
local ____utils = require("functions.utils")
|
|
@@ -151,16 +153,17 @@ end
|
|
|
151
153
|
-- By default, this will spawn Chub (and his variants) with 3 segments, Lokii with 2 copies,
|
|
152
154
|
-- Gurglings/Turdlings with 2 copies, and other multi-segment bosses with 4 segments. You can
|
|
153
155
|
-- customize this via the "numSegments" argument.
|
|
154
|
-
function ____exports.spawnBoss(self, entityType, variant, subType, position, velocity, spawner,
|
|
156
|
+
function ____exports.spawnBoss(self, entityType, variant, subType, position, velocity, spawner, seedOrRNG, numSegments)
|
|
155
157
|
if velocity == nil then
|
|
156
158
|
velocity = VectorZero
|
|
157
159
|
end
|
|
158
160
|
if spawner == nil then
|
|
159
161
|
spawner = nil
|
|
160
162
|
end
|
|
161
|
-
if
|
|
162
|
-
|
|
163
|
+
if seedOrRNG == nil then
|
|
164
|
+
seedOrRNG = nil
|
|
163
165
|
end
|
|
166
|
+
local seed = isRNG(nil, seedOrRNG) and seedOrRNG:Next() or seedOrRNG
|
|
164
167
|
local npc = spawnNPC(
|
|
165
168
|
nil,
|
|
166
169
|
entityType,
|
|
@@ -196,13 +199,14 @@ end
|
|
|
196
199
|
--- Helper function to spawn a boss with a specific seed.
|
|
197
200
|
--
|
|
198
201
|
-- For more information, see the documentation for the `spawnBoss` function.
|
|
199
|
-
function ____exports.spawnBossWithSeed(self, entityType, variant, subType, position,
|
|
202
|
+
function ____exports.spawnBossWithSeed(self, entityType, variant, subType, position, seedOrRNG, velocity, spawner, numSegments)
|
|
200
203
|
if velocity == nil then
|
|
201
204
|
velocity = VectorZero
|
|
202
205
|
end
|
|
203
206
|
if spawner == nil then
|
|
204
207
|
spawner = nil
|
|
205
208
|
end
|
|
209
|
+
local seed = isRNG(nil, seedOrRNG) and seedOrRNG:Next() or seedOrRNG
|
|
206
210
|
return ____exports.spawnBoss(
|
|
207
211
|
nil,
|
|
208
212
|
entityType,
|
package/functions/entity.d.ts
CHANGED
|
@@ -142,9 +142,9 @@ export declare function setEntityRandomColor(entity: Entity): void;
|
|
|
142
142
|
*
|
|
143
143
|
* Also see the `spawnWithSeed` helper function.
|
|
144
144
|
*/
|
|
145
|
-
export declare function spawn(entityType: EntityType, variant: int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined,
|
|
145
|
+
export declare function spawn(entityType: EntityType, variant: int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): Entity;
|
|
146
146
|
/**
|
|
147
147
|
* Helper function to spawn an entity. Use this instead of the `Game.Spawn` method if you do not
|
|
148
148
|
* need to specify the velocity or spawner.
|
|
149
149
|
*/
|
|
150
|
-
export declare function spawnWithSeed(entityType: EntityType, variant: int, subType: int, position: Vector,
|
|
150
|
+
export declare function spawnWithSeed(entityType: EntityType, variant: int, subType: int, position: Vector, seedOrRNG: Seed | RNG, velocity?: Readonly<Vector>, spawner?: Entity | undefined): Entity;
|
package/functions/entity.lua
CHANGED
|
@@ -16,6 +16,7 @@ local getIsaacAPIClassName = ____isaacAPIClass.getIsaacAPIClassName
|
|
|
16
16
|
local ____random = require("functions.random")
|
|
17
17
|
local getRandom = ____random.getRandom
|
|
18
18
|
local ____rng = require("functions.rng")
|
|
19
|
+
local isRNG = ____rng.isRNG
|
|
19
20
|
local newRNG = ____rng.newRNG
|
|
20
21
|
local ____types = require("functions.types")
|
|
21
22
|
local isPrimitive = ____types.isPrimitive
|
|
@@ -338,17 +339,17 @@ end
|
|
|
338
339
|
-- need to specify the velocity or spawner.
|
|
339
340
|
--
|
|
340
341
|
-- Also see the `spawnWithSeed` helper function.
|
|
341
|
-
function ____exports.spawn(self, entityType, variant, subType, position, velocity, spawner,
|
|
342
|
+
function ____exports.spawn(self, entityType, variant, subType, position, velocity, spawner, seedOrRNG)
|
|
342
343
|
if velocity == nil then
|
|
343
344
|
velocity = VectorZero
|
|
344
345
|
end
|
|
345
346
|
if spawner == nil then
|
|
346
347
|
spawner = nil
|
|
347
348
|
end
|
|
348
|
-
if
|
|
349
|
-
|
|
349
|
+
if seedOrRNG == nil then
|
|
350
|
+
seedOrRNG = nil
|
|
350
351
|
end
|
|
351
|
-
if
|
|
352
|
+
if seedOrRNG == nil then
|
|
352
353
|
return Isaac.Spawn(
|
|
353
354
|
entityType,
|
|
354
355
|
variant,
|
|
@@ -358,6 +359,7 @@ function ____exports.spawn(self, entityType, variant, subType, position, velocit
|
|
|
358
359
|
spawner
|
|
359
360
|
)
|
|
360
361
|
end
|
|
362
|
+
local seed = isRNG(nil, seedOrRNG) and seedOrRNG:Next() or seedOrRNG
|
|
361
363
|
return game:Spawn(
|
|
362
364
|
entityType,
|
|
363
365
|
variant,
|
|
@@ -370,7 +372,7 @@ function ____exports.spawn(self, entityType, variant, subType, position, velocit
|
|
|
370
372
|
end
|
|
371
373
|
--- Helper function to spawn an entity. Use this instead of the `Game.Spawn` method if you do not
|
|
372
374
|
-- need to specify the velocity or spawner.
|
|
373
|
-
function ____exports.spawnWithSeed(self, entityType, variant, subType, position,
|
|
375
|
+
function ____exports.spawnWithSeed(self, entityType, variant, subType, position, seedOrRNG, velocity, spawner)
|
|
374
376
|
if velocity == nil then
|
|
375
377
|
velocity = VectorZero
|
|
376
378
|
end
|
|
@@ -385,7 +387,7 @@ function ____exports.spawnWithSeed(self, entityType, variant, subType, position,
|
|
|
385
387
|
position,
|
|
386
388
|
velocity,
|
|
387
389
|
spawner,
|
|
388
|
-
|
|
390
|
+
seedOrRNG
|
|
389
391
|
)
|
|
390
392
|
end
|
|
391
393
|
return ____exports
|
|
@@ -223,42 +223,42 @@ export declare function removeAllSlots(slotVariant?: SlotVariant, subType?: int,
|
|
|
223
223
|
*/
|
|
224
224
|
export declare function removeAllTears(tearVariant?: TearVariant, subType?: int, cap?: int): EntityTear[];
|
|
225
225
|
/** Helper function to spawn a `EntityType.BOMB` (4). */
|
|
226
|
-
export declare function spawnBomb(bombVariant: BombVariant, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined,
|
|
226
|
+
export declare function spawnBomb(bombVariant: BombVariant, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityBomb;
|
|
227
227
|
/** Helper function to spawn a `EntityType.BOMB` (4) with a specific seed. */
|
|
228
|
-
export declare function spawnBombWithSeed(bombVariant: BombVariant, subType: int, position: Vector,
|
|
228
|
+
export declare function spawnBombWithSeed(bombVariant: BombVariant, subType: int, position: Vector, seedOrRNG: Seed | RNG, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityBomb;
|
|
229
229
|
/** Helper function to spawn a `EntityType.EFFECT` (1000). */
|
|
230
|
-
export declare function spawnEffect(effectVariant: EffectVariant, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined,
|
|
230
|
+
export declare function spawnEffect(effectVariant: EffectVariant, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityEffect;
|
|
231
231
|
/** Helper function to spawn a `EntityType.EFFECT` (1000) with a specific seed. */
|
|
232
|
-
export declare function spawnEffectWithSeed(effectVariant: EffectVariant, subType: int, position: Vector,
|
|
232
|
+
export declare function spawnEffectWithSeed(effectVariant: EffectVariant, subType: int, position: Vector, seedOrRNG: Seed | RNG, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityEffect;
|
|
233
233
|
/** Helper function to spawn a `EntityType.FAMILIAR` (3). */
|
|
234
|
-
export declare function spawnFamiliar(familiarVariant: FamiliarVariant, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined,
|
|
234
|
+
export declare function spawnFamiliar(familiarVariant: FamiliarVariant, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityFamiliar;
|
|
235
235
|
/** Helper function to spawn a `EntityType.FAMILIAR` (3) with a specific seed. */
|
|
236
|
-
export declare function spawnFamiliarWithSeed(familiarVariant: FamiliarVariant, subType: int, position: Vector,
|
|
236
|
+
export declare function spawnFamiliarWithSeed(familiarVariant: FamiliarVariant, subType: int, position: Vector, seedOrRNG: Seed | RNG, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityFamiliar;
|
|
237
237
|
/** Helper function to spawn a `EntityType.KNIFE` (8). */
|
|
238
|
-
export declare function spawnKnife(knifeVariant: KnifeVariant, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined,
|
|
238
|
+
export declare function spawnKnife(knifeVariant: KnifeVariant, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityKnife;
|
|
239
239
|
/** Helper function to spawn a `EntityType.KNIFE` (8) with a specific seed. */
|
|
240
|
-
export declare function spawnKnifeWithSeed(knifeVariant: KnifeVariant, subType: int, position: Vector,
|
|
240
|
+
export declare function spawnKnifeWithSeed(knifeVariant: KnifeVariant, subType: int, position: Vector, seedOrRNG: Seed | RNG, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityKnife;
|
|
241
241
|
/** Helper function to spawn a `EntityType.LASER` (7). */
|
|
242
|
-
export declare function spawnLaser(laserVariant: LaserVariant, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined,
|
|
242
|
+
export declare function spawnLaser(laserVariant: LaserVariant, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityLaser;
|
|
243
243
|
/** Helper function to spawn a `EntityType.LASER` (7) with a specific seed. */
|
|
244
|
-
export declare function spawnLaserWithSeed(laserVariant: LaserVariant, subType: int, position: Vector,
|
|
244
|
+
export declare function spawnLaserWithSeed(laserVariant: LaserVariant, subType: int, position: Vector, seedOrRNG: Seed | RNG, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityLaser;
|
|
245
245
|
/** Helper function to spawn an NPC. */
|
|
246
|
-
export declare function spawnNPC(entityType: EntityType, variant: int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined,
|
|
246
|
+
export declare function spawnNPC(entityType: EntityType, variant: int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityNPC;
|
|
247
247
|
/** Helper function to spawn an NPC with a specific seed. */
|
|
248
|
-
export declare function spawnNPCWithSeed(entityType: EntityType, variant: int, subType: int, position: Vector,
|
|
248
|
+
export declare function spawnNPCWithSeed(entityType: EntityType, variant: int, subType: int, position: Vector, seedOrRNG: Seed | RNG, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityNPC;
|
|
249
249
|
/** Helper function to spawn a `EntityType.PICKUP` (5). */
|
|
250
|
-
export declare function spawnPickup(pickupVariant: PickupVariant, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined,
|
|
250
|
+
export declare function spawnPickup(pickupVariant: PickupVariant, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickup;
|
|
251
251
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with a specific seed. */
|
|
252
|
-
export declare function spawnPickupWithSeed(pickupVariant: PickupVariant, subType: int, position: Vector,
|
|
252
|
+
export declare function spawnPickupWithSeed(pickupVariant: PickupVariant, subType: int, position: Vector, seedOrRNG: Seed | RNG, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickup;
|
|
253
253
|
/** Helper function to spawn a `EntityType.PROJECTILE` (9). */
|
|
254
|
-
export declare function spawnProjectile(projectileVariant: ProjectileVariant, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined,
|
|
254
|
+
export declare function spawnProjectile(projectileVariant: ProjectileVariant, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityProjectile;
|
|
255
255
|
/** Helper function to spawn a `EntityType.PROJECTILE` (9) with a specific seed. */
|
|
256
|
-
export declare function spawnProjectileWithSeed(projectileVariant: ProjectileVariant, subType: int, position: Vector,
|
|
256
|
+
export declare function spawnProjectileWithSeed(projectileVariant: ProjectileVariant, subType: int, position: Vector, seedOrRNG: Seed | RNG, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityProjectile;
|
|
257
257
|
/** Helper function to spawn a `EntityType.SLOT` (6). */
|
|
258
|
-
export declare function spawnSlot(slotVariant: SlotVariant, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined,
|
|
258
|
+
export declare function spawnSlot(slotVariant: SlotVariant, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntitySlot;
|
|
259
259
|
/** Helper function to spawn a `EntityType.SLOT` (6) with a specific seed. */
|
|
260
|
-
export declare function spawnSlotWithSeed(slotVariant: SlotVariant, subType: int, position: Vector,
|
|
260
|
+
export declare function spawnSlotWithSeed(slotVariant: SlotVariant, subType: int, position: Vector, seedOrRNG: Seed | RNG, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntitySlot;
|
|
261
261
|
/** Helper function to spawn a `EntityType.TEAR` (2). */
|
|
262
|
-
export declare function spawnTear(tearVariant: TearVariant, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined,
|
|
262
|
+
export declare function spawnTear(tearVariant: TearVariant, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityTear;
|
|
263
263
|
/** Helper function to spawn a `EntityType.EntityType` (2) with a specific seed. */
|
|
264
|
-
export declare function spawnTearWithSeed(tearVariant: TearVariant, subType: int, position: Vector,
|
|
264
|
+
export declare function spawnTearWithSeed(tearVariant: TearVariant, subType: int, position: Vector, seedOrRNG: Seed | RNG, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityTear;
|
|
@@ -384,15 +384,15 @@ function ____exports.removeAllTears(self, tearVariant, subType, cap)
|
|
|
384
384
|
return removeEntities(nil, tears, cap)
|
|
385
385
|
end
|
|
386
386
|
--- Helper function to spawn a `EntityType.BOMB` (4).
|
|
387
|
-
function ____exports.spawnBomb(self, bombVariant, subType, position, velocity, spawner,
|
|
387
|
+
function ____exports.spawnBomb(self, bombVariant, subType, position, velocity, spawner, seedOrRNG)
|
|
388
388
|
if velocity == nil then
|
|
389
389
|
velocity = VectorZero
|
|
390
390
|
end
|
|
391
391
|
if spawner == nil then
|
|
392
392
|
spawner = nil
|
|
393
393
|
end
|
|
394
|
-
if
|
|
395
|
-
|
|
394
|
+
if seedOrRNG == nil then
|
|
395
|
+
seedOrRNG = nil
|
|
396
396
|
end
|
|
397
397
|
local entity = spawn(
|
|
398
398
|
nil,
|
|
@@ -402,7 +402,7 @@ function ____exports.spawnBomb(self, bombVariant, subType, position, velocity, s
|
|
|
402
402
|
position,
|
|
403
403
|
velocity,
|
|
404
404
|
spawner,
|
|
405
|
-
|
|
405
|
+
seedOrRNG
|
|
406
406
|
)
|
|
407
407
|
local bomb = entity:ToBomb()
|
|
408
408
|
if bomb == nil then
|
|
@@ -411,7 +411,7 @@ function ____exports.spawnBomb(self, bombVariant, subType, position, velocity, s
|
|
|
411
411
|
return bomb
|
|
412
412
|
end
|
|
413
413
|
--- Helper function to spawn a `EntityType.BOMB` (4) with a specific seed.
|
|
414
|
-
function ____exports.spawnBombWithSeed(self, bombVariant, subType, position,
|
|
414
|
+
function ____exports.spawnBombWithSeed(self, bombVariant, subType, position, seedOrRNG, velocity, spawner)
|
|
415
415
|
if velocity == nil then
|
|
416
416
|
velocity = VectorZero
|
|
417
417
|
end
|
|
@@ -425,19 +425,19 @@ function ____exports.spawnBombWithSeed(self, bombVariant, subType, position, see
|
|
|
425
425
|
position,
|
|
426
426
|
velocity,
|
|
427
427
|
spawner,
|
|
428
|
-
|
|
428
|
+
seedOrRNG
|
|
429
429
|
)
|
|
430
430
|
end
|
|
431
431
|
--- Helper function to spawn a `EntityType.EFFECT` (1000).
|
|
432
|
-
function ____exports.spawnEffect(self, effectVariant, subType, position, velocity, spawner,
|
|
432
|
+
function ____exports.spawnEffect(self, effectVariant, subType, position, velocity, spawner, seedOrRNG)
|
|
433
433
|
if velocity == nil then
|
|
434
434
|
velocity = VectorZero
|
|
435
435
|
end
|
|
436
436
|
if spawner == nil then
|
|
437
437
|
spawner = nil
|
|
438
438
|
end
|
|
439
|
-
if
|
|
440
|
-
|
|
439
|
+
if seedOrRNG == nil then
|
|
440
|
+
seedOrRNG = nil
|
|
441
441
|
end
|
|
442
442
|
local entity = spawn(
|
|
443
443
|
nil,
|
|
@@ -447,7 +447,7 @@ function ____exports.spawnEffect(self, effectVariant, subType, position, velocit
|
|
|
447
447
|
position,
|
|
448
448
|
velocity,
|
|
449
449
|
spawner,
|
|
450
|
-
|
|
450
|
+
seedOrRNG
|
|
451
451
|
)
|
|
452
452
|
local effect = entity:ToEffect()
|
|
453
453
|
if effect == nil then
|
|
@@ -456,7 +456,7 @@ function ____exports.spawnEffect(self, effectVariant, subType, position, velocit
|
|
|
456
456
|
return effect
|
|
457
457
|
end
|
|
458
458
|
--- Helper function to spawn a `EntityType.EFFECT` (1000) with a specific seed.
|
|
459
|
-
function ____exports.spawnEffectWithSeed(self, effectVariant, subType, position,
|
|
459
|
+
function ____exports.spawnEffectWithSeed(self, effectVariant, subType, position, seedOrRNG, velocity, spawner)
|
|
460
460
|
if velocity == nil then
|
|
461
461
|
velocity = VectorZero
|
|
462
462
|
end
|
|
@@ -470,19 +470,19 @@ function ____exports.spawnEffectWithSeed(self, effectVariant, subType, position,
|
|
|
470
470
|
position,
|
|
471
471
|
velocity,
|
|
472
472
|
spawner,
|
|
473
|
-
|
|
473
|
+
seedOrRNG
|
|
474
474
|
)
|
|
475
475
|
end
|
|
476
476
|
--- Helper function to spawn a `EntityType.FAMILIAR` (3).
|
|
477
|
-
function ____exports.spawnFamiliar(self, familiarVariant, subType, position, velocity, spawner,
|
|
477
|
+
function ____exports.spawnFamiliar(self, familiarVariant, subType, position, velocity, spawner, seedOrRNG)
|
|
478
478
|
if velocity == nil then
|
|
479
479
|
velocity = VectorZero
|
|
480
480
|
end
|
|
481
481
|
if spawner == nil then
|
|
482
482
|
spawner = nil
|
|
483
483
|
end
|
|
484
|
-
if
|
|
485
|
-
|
|
484
|
+
if seedOrRNG == nil then
|
|
485
|
+
seedOrRNG = nil
|
|
486
486
|
end
|
|
487
487
|
local entity = spawn(
|
|
488
488
|
nil,
|
|
@@ -492,7 +492,7 @@ function ____exports.spawnFamiliar(self, familiarVariant, subType, position, vel
|
|
|
492
492
|
position,
|
|
493
493
|
velocity,
|
|
494
494
|
spawner,
|
|
495
|
-
|
|
495
|
+
seedOrRNG
|
|
496
496
|
)
|
|
497
497
|
local familiar = entity:ToFamiliar()
|
|
498
498
|
if familiar == nil then
|
|
@@ -501,7 +501,7 @@ function ____exports.spawnFamiliar(self, familiarVariant, subType, position, vel
|
|
|
501
501
|
return familiar
|
|
502
502
|
end
|
|
503
503
|
--- Helper function to spawn a `EntityType.FAMILIAR` (3) with a specific seed.
|
|
504
|
-
function ____exports.spawnFamiliarWithSeed(self, familiarVariant, subType, position,
|
|
504
|
+
function ____exports.spawnFamiliarWithSeed(self, familiarVariant, subType, position, seedOrRNG, velocity, spawner)
|
|
505
505
|
if velocity == nil then
|
|
506
506
|
velocity = VectorZero
|
|
507
507
|
end
|
|
@@ -515,19 +515,19 @@ function ____exports.spawnFamiliarWithSeed(self, familiarVariant, subType, posit
|
|
|
515
515
|
position,
|
|
516
516
|
velocity,
|
|
517
517
|
spawner,
|
|
518
|
-
|
|
518
|
+
seedOrRNG
|
|
519
519
|
)
|
|
520
520
|
end
|
|
521
521
|
--- Helper function to spawn a `EntityType.KNIFE` (8).
|
|
522
|
-
function ____exports.spawnKnife(self, knifeVariant, subType, position, velocity, spawner,
|
|
522
|
+
function ____exports.spawnKnife(self, knifeVariant, subType, position, velocity, spawner, seedOrRNG)
|
|
523
523
|
if velocity == nil then
|
|
524
524
|
velocity = VectorZero
|
|
525
525
|
end
|
|
526
526
|
if spawner == nil then
|
|
527
527
|
spawner = nil
|
|
528
528
|
end
|
|
529
|
-
if
|
|
530
|
-
|
|
529
|
+
if seedOrRNG == nil then
|
|
530
|
+
seedOrRNG = nil
|
|
531
531
|
end
|
|
532
532
|
local entity = spawn(
|
|
533
533
|
nil,
|
|
@@ -537,7 +537,7 @@ function ____exports.spawnKnife(self, knifeVariant, subType, position, velocity,
|
|
|
537
537
|
position,
|
|
538
538
|
velocity,
|
|
539
539
|
spawner,
|
|
540
|
-
|
|
540
|
+
seedOrRNG
|
|
541
541
|
)
|
|
542
542
|
local knife = entity:ToKnife()
|
|
543
543
|
if knife == nil then
|
|
@@ -546,7 +546,7 @@ function ____exports.spawnKnife(self, knifeVariant, subType, position, velocity,
|
|
|
546
546
|
return knife
|
|
547
547
|
end
|
|
548
548
|
--- Helper function to spawn a `EntityType.KNIFE` (8) with a specific seed.
|
|
549
|
-
function ____exports.spawnKnifeWithSeed(self, knifeVariant, subType, position,
|
|
549
|
+
function ____exports.spawnKnifeWithSeed(self, knifeVariant, subType, position, seedOrRNG, velocity, spawner)
|
|
550
550
|
if velocity == nil then
|
|
551
551
|
velocity = VectorZero
|
|
552
552
|
end
|
|
@@ -560,19 +560,19 @@ function ____exports.spawnKnifeWithSeed(self, knifeVariant, subType, position, s
|
|
|
560
560
|
position,
|
|
561
561
|
velocity,
|
|
562
562
|
spawner,
|
|
563
|
-
|
|
563
|
+
seedOrRNG
|
|
564
564
|
)
|
|
565
565
|
end
|
|
566
566
|
--- Helper function to spawn a `EntityType.LASER` (7).
|
|
567
|
-
function ____exports.spawnLaser(self, laserVariant, subType, position, velocity, spawner,
|
|
567
|
+
function ____exports.spawnLaser(self, laserVariant, subType, position, velocity, spawner, seedOrRNG)
|
|
568
568
|
if velocity == nil then
|
|
569
569
|
velocity = VectorZero
|
|
570
570
|
end
|
|
571
571
|
if spawner == nil then
|
|
572
572
|
spawner = nil
|
|
573
573
|
end
|
|
574
|
-
if
|
|
575
|
-
|
|
574
|
+
if seedOrRNG == nil then
|
|
575
|
+
seedOrRNG = nil
|
|
576
576
|
end
|
|
577
577
|
local entity = spawn(
|
|
578
578
|
nil,
|
|
@@ -582,7 +582,7 @@ function ____exports.spawnLaser(self, laserVariant, subType, position, velocity,
|
|
|
582
582
|
position,
|
|
583
583
|
velocity,
|
|
584
584
|
spawner,
|
|
585
|
-
|
|
585
|
+
seedOrRNG
|
|
586
586
|
)
|
|
587
587
|
local laser = entity:ToLaser()
|
|
588
588
|
if laser == nil then
|
|
@@ -591,7 +591,7 @@ function ____exports.spawnLaser(self, laserVariant, subType, position, velocity,
|
|
|
591
591
|
return laser
|
|
592
592
|
end
|
|
593
593
|
--- Helper function to spawn a `EntityType.LASER` (7) with a specific seed.
|
|
594
|
-
function ____exports.spawnLaserWithSeed(self, laserVariant, subType, position,
|
|
594
|
+
function ____exports.spawnLaserWithSeed(self, laserVariant, subType, position, seedOrRNG, velocity, spawner)
|
|
595
595
|
if velocity == nil then
|
|
596
596
|
velocity = VectorZero
|
|
597
597
|
end
|
|
@@ -605,19 +605,19 @@ function ____exports.spawnLaserWithSeed(self, laserVariant, subType, position, s
|
|
|
605
605
|
position,
|
|
606
606
|
velocity,
|
|
607
607
|
spawner,
|
|
608
|
-
|
|
608
|
+
seedOrRNG
|
|
609
609
|
)
|
|
610
610
|
end
|
|
611
611
|
--- Helper function to spawn an NPC.
|
|
612
|
-
function ____exports.spawnNPC(self, entityType, variant, subType, position, velocity, spawner,
|
|
612
|
+
function ____exports.spawnNPC(self, entityType, variant, subType, position, velocity, spawner, seedOrRNG)
|
|
613
613
|
if velocity == nil then
|
|
614
614
|
velocity = VectorZero
|
|
615
615
|
end
|
|
616
616
|
if spawner == nil then
|
|
617
617
|
spawner = nil
|
|
618
618
|
end
|
|
619
|
-
if
|
|
620
|
-
|
|
619
|
+
if seedOrRNG == nil then
|
|
620
|
+
seedOrRNG = nil
|
|
621
621
|
end
|
|
622
622
|
local entity = spawn(
|
|
623
623
|
nil,
|
|
@@ -627,7 +627,7 @@ function ____exports.spawnNPC(self, entityType, variant, subType, position, velo
|
|
|
627
627
|
position,
|
|
628
628
|
velocity,
|
|
629
629
|
spawner,
|
|
630
|
-
|
|
630
|
+
seedOrRNG
|
|
631
631
|
)
|
|
632
632
|
local npc = entity:ToNPC()
|
|
633
633
|
if npc == nil then
|
|
@@ -636,7 +636,7 @@ function ____exports.spawnNPC(self, entityType, variant, subType, position, velo
|
|
|
636
636
|
return npc
|
|
637
637
|
end
|
|
638
638
|
--- Helper function to spawn an NPC with a specific seed.
|
|
639
|
-
function ____exports.spawnNPCWithSeed(self, entityType, variant, subType, position,
|
|
639
|
+
function ____exports.spawnNPCWithSeed(self, entityType, variant, subType, position, seedOrRNG, velocity, spawner)
|
|
640
640
|
if velocity == nil then
|
|
641
641
|
velocity = VectorZero
|
|
642
642
|
end
|
|
@@ -651,19 +651,19 @@ function ____exports.spawnNPCWithSeed(self, entityType, variant, subType, positi
|
|
|
651
651
|
position,
|
|
652
652
|
velocity,
|
|
653
653
|
spawner,
|
|
654
|
-
|
|
654
|
+
seedOrRNG
|
|
655
655
|
)
|
|
656
656
|
end
|
|
657
657
|
--- Helper function to spawn a `EntityType.PICKUP` (5).
|
|
658
|
-
function ____exports.spawnPickup(self, pickupVariant, subType, position, velocity, spawner,
|
|
658
|
+
function ____exports.spawnPickup(self, pickupVariant, subType, position, velocity, spawner, seedOrRNG)
|
|
659
659
|
if velocity == nil then
|
|
660
660
|
velocity = VectorZero
|
|
661
661
|
end
|
|
662
662
|
if spawner == nil then
|
|
663
663
|
spawner = nil
|
|
664
664
|
end
|
|
665
|
-
if
|
|
666
|
-
|
|
665
|
+
if seedOrRNG == nil then
|
|
666
|
+
seedOrRNG = nil
|
|
667
667
|
end
|
|
668
668
|
local entity = spawn(
|
|
669
669
|
nil,
|
|
@@ -673,7 +673,7 @@ function ____exports.spawnPickup(self, pickupVariant, subType, position, velocit
|
|
|
673
673
|
position,
|
|
674
674
|
velocity,
|
|
675
675
|
spawner,
|
|
676
|
-
|
|
676
|
+
seedOrRNG
|
|
677
677
|
)
|
|
678
678
|
local pickup = entity:ToPickup()
|
|
679
679
|
if pickup == nil then
|
|
@@ -682,7 +682,7 @@ function ____exports.spawnPickup(self, pickupVariant, subType, position, velocit
|
|
|
682
682
|
return pickup
|
|
683
683
|
end
|
|
684
684
|
--- Helper function to spawn a `EntityType.PICKUP` (5) with a specific seed.
|
|
685
|
-
function ____exports.spawnPickupWithSeed(self, pickupVariant, subType, position,
|
|
685
|
+
function ____exports.spawnPickupWithSeed(self, pickupVariant, subType, position, seedOrRNG, velocity, spawner)
|
|
686
686
|
if velocity == nil then
|
|
687
687
|
velocity = VectorZero
|
|
688
688
|
end
|
|
@@ -696,19 +696,19 @@ function ____exports.spawnPickupWithSeed(self, pickupVariant, subType, position,
|
|
|
696
696
|
position,
|
|
697
697
|
velocity,
|
|
698
698
|
spawner,
|
|
699
|
-
|
|
699
|
+
seedOrRNG
|
|
700
700
|
)
|
|
701
701
|
end
|
|
702
702
|
--- Helper function to spawn a `EntityType.PROJECTILE` (9).
|
|
703
|
-
function ____exports.spawnProjectile(self, projectileVariant, subType, position, velocity, spawner,
|
|
703
|
+
function ____exports.spawnProjectile(self, projectileVariant, subType, position, velocity, spawner, seedOrRNG)
|
|
704
704
|
if velocity == nil then
|
|
705
705
|
velocity = VectorZero
|
|
706
706
|
end
|
|
707
707
|
if spawner == nil then
|
|
708
708
|
spawner = nil
|
|
709
709
|
end
|
|
710
|
-
if
|
|
711
|
-
|
|
710
|
+
if seedOrRNG == nil then
|
|
711
|
+
seedOrRNG = nil
|
|
712
712
|
end
|
|
713
713
|
local entity = spawn(
|
|
714
714
|
nil,
|
|
@@ -718,7 +718,7 @@ function ____exports.spawnProjectile(self, projectileVariant, subType, position,
|
|
|
718
718
|
position,
|
|
719
719
|
velocity,
|
|
720
720
|
spawner,
|
|
721
|
-
|
|
721
|
+
seedOrRNG
|
|
722
722
|
)
|
|
723
723
|
local projectile = entity:ToProjectile()
|
|
724
724
|
if projectile == nil then
|
|
@@ -727,7 +727,7 @@ function ____exports.spawnProjectile(self, projectileVariant, subType, position,
|
|
|
727
727
|
return projectile
|
|
728
728
|
end
|
|
729
729
|
--- Helper function to spawn a `EntityType.PROJECTILE` (9) with a specific seed.
|
|
730
|
-
function ____exports.spawnProjectileWithSeed(self, projectileVariant, subType, position,
|
|
730
|
+
function ____exports.spawnProjectileWithSeed(self, projectileVariant, subType, position, seedOrRNG, velocity, spawner)
|
|
731
731
|
if velocity == nil then
|
|
732
732
|
velocity = VectorZero
|
|
733
733
|
end
|
|
@@ -741,19 +741,19 @@ function ____exports.spawnProjectileWithSeed(self, projectileVariant, subType, p
|
|
|
741
741
|
position,
|
|
742
742
|
velocity,
|
|
743
743
|
spawner,
|
|
744
|
-
|
|
744
|
+
seedOrRNG
|
|
745
745
|
)
|
|
746
746
|
end
|
|
747
747
|
--- Helper function to spawn a `EntityType.SLOT` (6).
|
|
748
|
-
function ____exports.spawnSlot(self, slotVariant, subType, position, velocity, spawner,
|
|
748
|
+
function ____exports.spawnSlot(self, slotVariant, subType, position, velocity, spawner, seedOrRNG)
|
|
749
749
|
if velocity == nil then
|
|
750
750
|
velocity = VectorZero
|
|
751
751
|
end
|
|
752
752
|
if spawner == nil then
|
|
753
753
|
spawner = nil
|
|
754
754
|
end
|
|
755
|
-
if
|
|
756
|
-
|
|
755
|
+
if seedOrRNG == nil then
|
|
756
|
+
seedOrRNG = nil
|
|
757
757
|
end
|
|
758
758
|
return spawn(
|
|
759
759
|
nil,
|
|
@@ -763,11 +763,11 @@ function ____exports.spawnSlot(self, slotVariant, subType, position, velocity, s
|
|
|
763
763
|
position,
|
|
764
764
|
velocity,
|
|
765
765
|
spawner,
|
|
766
|
-
|
|
766
|
+
seedOrRNG
|
|
767
767
|
)
|
|
768
768
|
end
|
|
769
769
|
--- Helper function to spawn a `EntityType.SLOT` (6) with a specific seed.
|
|
770
|
-
function ____exports.spawnSlotWithSeed(self, slotVariant, subType, position,
|
|
770
|
+
function ____exports.spawnSlotWithSeed(self, slotVariant, subType, position, seedOrRNG, velocity, spawner)
|
|
771
771
|
if velocity == nil then
|
|
772
772
|
velocity = VectorZero
|
|
773
773
|
end
|
|
@@ -781,19 +781,19 @@ function ____exports.spawnSlotWithSeed(self, slotVariant, subType, position, see
|
|
|
781
781
|
position,
|
|
782
782
|
velocity,
|
|
783
783
|
spawner,
|
|
784
|
-
|
|
784
|
+
seedOrRNG
|
|
785
785
|
)
|
|
786
786
|
end
|
|
787
787
|
--- Helper function to spawn a `EntityType.TEAR` (2).
|
|
788
|
-
function ____exports.spawnTear(self, tearVariant, subType, position, velocity, spawner,
|
|
788
|
+
function ____exports.spawnTear(self, tearVariant, subType, position, velocity, spawner, seedOrRNG)
|
|
789
789
|
if velocity == nil then
|
|
790
790
|
velocity = VectorZero
|
|
791
791
|
end
|
|
792
792
|
if spawner == nil then
|
|
793
793
|
spawner = nil
|
|
794
794
|
end
|
|
795
|
-
if
|
|
796
|
-
|
|
795
|
+
if seedOrRNG == nil then
|
|
796
|
+
seedOrRNG = nil
|
|
797
797
|
end
|
|
798
798
|
local entity = spawn(
|
|
799
799
|
nil,
|
|
@@ -803,7 +803,7 @@ function ____exports.spawnTear(self, tearVariant, subType, position, velocity, s
|
|
|
803
803
|
position,
|
|
804
804
|
velocity,
|
|
805
805
|
spawner,
|
|
806
|
-
|
|
806
|
+
seedOrRNG
|
|
807
807
|
)
|
|
808
808
|
local tear = entity:ToTear()
|
|
809
809
|
if tear == nil then
|
|
@@ -812,7 +812,7 @@ function ____exports.spawnTear(self, tearVariant, subType, position, velocity, s
|
|
|
812
812
|
return tear
|
|
813
813
|
end
|
|
814
814
|
--- Helper function to spawn a `EntityType.EntityType` (2) with a specific seed.
|
|
815
|
-
function ____exports.spawnTearWithSeed(self, tearVariant, subType, position,
|
|
815
|
+
function ____exports.spawnTearWithSeed(self, tearVariant, subType, position, seedOrRNG, velocity, spawner)
|
|
816
816
|
if velocity == nil then
|
|
817
817
|
velocity = VectorZero
|
|
818
818
|
end
|
|
@@ -826,7 +826,7 @@ function ____exports.spawnTearWithSeed(self, tearVariant, subType, position, see
|
|
|
826
826
|
position,
|
|
827
827
|
velocity,
|
|
828
828
|
spawner,
|
|
829
|
-
|
|
829
|
+
seedOrRNG
|
|
830
830
|
)
|
|
831
831
|
end
|
|
832
832
|
return ____exports
|
package/functions/pickups.d.ts
CHANGED
|
@@ -103,30 +103,30 @@ export declare function removeAllTrinkets(trinketType?: TrinketType, cap?: int):
|
|
|
103
103
|
/**
|
|
104
104
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.LIL_BATTERY` (90).
|
|
105
105
|
*/
|
|
106
|
-
export declare function spawnBattery(subType: BatterySubType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined,
|
|
107
|
-
export declare function spawnBatteryWithSeed(subType: BatterySubType, position: Vector,
|
|
106
|
+
export declare function spawnBattery(subType: BatterySubType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupBattery;
|
|
107
|
+
export declare function spawnBatteryWithSeed(subType: BatterySubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickupBattery;
|
|
108
108
|
/**
|
|
109
109
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TAROT_CARD` (300).
|
|
110
110
|
*/
|
|
111
|
-
export declare function spawnCard(subType: Card, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined,
|
|
112
|
-
export declare function spawnCardWithSeed(subType: Card, position: Vector,
|
|
111
|
+
export declare function spawnCard(subType: Card, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupCard;
|
|
112
|
+
export declare function spawnCardWithSeed(subType: Card, position: Vector, seedOrRNG: Seed | RNG, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickupCard;
|
|
113
113
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.COIN` (20). */
|
|
114
|
-
export declare function spawnCoin(subType: CoinSubType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined,
|
|
115
|
-
export declare function spawnCoinWithSeed(subType: CoinSubType, position: Vector,
|
|
114
|
+
export declare function spawnCoin(subType: CoinSubType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupCoin;
|
|
115
|
+
export declare function spawnCoinWithSeed(subType: CoinSubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickupCoin;
|
|
116
116
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.HEART` (10). */
|
|
117
|
-
export declare function spawnHeart(subType: HeartSubType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined,
|
|
118
|
-
export declare function spawnHeartWithSeed(subType: HeartSubType, position: Vector,
|
|
117
|
+
export declare function spawnHeart(subType: HeartSubType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupHeart;
|
|
118
|
+
export declare function spawnHeartWithSeed(subType: HeartSubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickupHeart;
|
|
119
119
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.KEY` (30). */
|
|
120
|
-
export declare function spawnKey(subType: KeySubType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined,
|
|
121
|
-
export declare function spawnKeyWithSeed(subType: KeySubType, position: Vector,
|
|
120
|
+
export declare function spawnKey(subType: KeySubType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupKey;
|
|
121
|
+
export declare function spawnKeyWithSeed(subType: KeySubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickupKey;
|
|
122
122
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.PILL` (70). */
|
|
123
|
-
export declare function spawnPill(pillColor: PillColor, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined,
|
|
124
|
-
export declare function spawnPillWithSeed(subType: PillColor, position: Vector,
|
|
123
|
+
export declare function spawnPill(pillColor: PillColor, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupPill;
|
|
124
|
+
export declare function spawnPillWithSeed(subType: PillColor, position: Vector, seedOrRNG: Seed | RNG, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickupPill;
|
|
125
125
|
/** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.SACK` (69). */
|
|
126
|
-
export declare function spawnSack(subType: SackSubType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined,
|
|
127
|
-
export declare function spawnSackWithSeed(subType: SackSubType, position: Vector,
|
|
126
|
+
export declare function spawnSack(subType: SackSubType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupSack;
|
|
127
|
+
export declare function spawnSackWithSeed(subType: SackSubType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickupSack;
|
|
128
128
|
/**
|
|
129
129
|
* Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TRINKET` (350).
|
|
130
130
|
*/
|
|
131
|
-
export declare function spawnTrinket(subType: TrinketType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined,
|
|
132
|
-
export declare function spawnTrinketWithSeed(subType: TrinketType, position: Vector,
|
|
131
|
+
export declare function spawnTrinket(subType: TrinketType, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seedOrRNG?: Seed | RNG | undefined): EntityPickupTrinket;
|
|
132
|
+
export declare function spawnTrinketWithSeed(subType: TrinketType, position: Vector, seedOrRNG: Seed | RNG, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickupTrinket;
|
package/functions/pickups.lua
CHANGED
|
@@ -176,15 +176,15 @@ function ____exports.removeAllTrinkets(self, trinketType, cap)
|
|
|
176
176
|
return removeAllPickups(nil, PickupVariant.TRINKET, trinketType, cap)
|
|
177
177
|
end
|
|
178
178
|
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.LIL_BATTERY` (90).
|
|
179
|
-
function ____exports.spawnBattery(self, subType, position, velocity, spawner,
|
|
179
|
+
function ____exports.spawnBattery(self, subType, position, velocity, spawner, seedOrRNG)
|
|
180
180
|
if velocity == nil then
|
|
181
181
|
velocity = VectorZero
|
|
182
182
|
end
|
|
183
183
|
if spawner == nil then
|
|
184
184
|
spawner = nil
|
|
185
185
|
end
|
|
186
|
-
if
|
|
187
|
-
|
|
186
|
+
if seedOrRNG == nil then
|
|
187
|
+
seedOrRNG = nil
|
|
188
188
|
end
|
|
189
189
|
return spawnPickup(
|
|
190
190
|
nil,
|
|
@@ -193,10 +193,10 @@ function ____exports.spawnBattery(self, subType, position, velocity, spawner, se
|
|
|
193
193
|
position,
|
|
194
194
|
velocity,
|
|
195
195
|
spawner,
|
|
196
|
-
|
|
196
|
+
seedOrRNG
|
|
197
197
|
)
|
|
198
198
|
end
|
|
199
|
-
function ____exports.spawnBatteryWithSeed(self, subType, position,
|
|
199
|
+
function ____exports.spawnBatteryWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
|
|
200
200
|
if velocity == nil then
|
|
201
201
|
velocity = VectorZero
|
|
202
202
|
end
|
|
@@ -209,19 +209,19 @@ function ____exports.spawnBatteryWithSeed(self, subType, position, seed, velocit
|
|
|
209
209
|
position,
|
|
210
210
|
velocity,
|
|
211
211
|
spawner,
|
|
212
|
-
|
|
212
|
+
seedOrRNG
|
|
213
213
|
)
|
|
214
214
|
end
|
|
215
215
|
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TAROT_CARD` (300).
|
|
216
|
-
function ____exports.spawnCard(self, subType, position, velocity, spawner,
|
|
216
|
+
function ____exports.spawnCard(self, subType, position, velocity, spawner, seedOrRNG)
|
|
217
217
|
if velocity == nil then
|
|
218
218
|
velocity = VectorZero
|
|
219
219
|
end
|
|
220
220
|
if spawner == nil then
|
|
221
221
|
spawner = nil
|
|
222
222
|
end
|
|
223
|
-
if
|
|
224
|
-
|
|
223
|
+
if seedOrRNG == nil then
|
|
224
|
+
seedOrRNG = nil
|
|
225
225
|
end
|
|
226
226
|
return spawnPickup(
|
|
227
227
|
nil,
|
|
@@ -230,10 +230,10 @@ function ____exports.spawnCard(self, subType, position, velocity, spawner, seed)
|
|
|
230
230
|
position,
|
|
231
231
|
velocity,
|
|
232
232
|
spawner,
|
|
233
|
-
|
|
233
|
+
seedOrRNG
|
|
234
234
|
)
|
|
235
235
|
end
|
|
236
|
-
function ____exports.spawnCardWithSeed(self, subType, position,
|
|
236
|
+
function ____exports.spawnCardWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
|
|
237
237
|
if velocity == nil then
|
|
238
238
|
velocity = VectorZero
|
|
239
239
|
end
|
|
@@ -246,19 +246,19 @@ function ____exports.spawnCardWithSeed(self, subType, position, seed, velocity,
|
|
|
246
246
|
position,
|
|
247
247
|
velocity,
|
|
248
248
|
spawner,
|
|
249
|
-
|
|
249
|
+
seedOrRNG
|
|
250
250
|
)
|
|
251
251
|
end
|
|
252
252
|
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.COIN` (20).
|
|
253
|
-
function ____exports.spawnCoin(self, subType, position, velocity, spawner,
|
|
253
|
+
function ____exports.spawnCoin(self, subType, position, velocity, spawner, seedOrRNG)
|
|
254
254
|
if velocity == nil then
|
|
255
255
|
velocity = VectorZero
|
|
256
256
|
end
|
|
257
257
|
if spawner == nil then
|
|
258
258
|
spawner = nil
|
|
259
259
|
end
|
|
260
|
-
if
|
|
261
|
-
|
|
260
|
+
if seedOrRNG == nil then
|
|
261
|
+
seedOrRNG = nil
|
|
262
262
|
end
|
|
263
263
|
return spawnPickup(
|
|
264
264
|
nil,
|
|
@@ -267,10 +267,10 @@ function ____exports.spawnCoin(self, subType, position, velocity, spawner, seed)
|
|
|
267
267
|
position,
|
|
268
268
|
velocity,
|
|
269
269
|
spawner,
|
|
270
|
-
|
|
270
|
+
seedOrRNG
|
|
271
271
|
)
|
|
272
272
|
end
|
|
273
|
-
function ____exports.spawnCoinWithSeed(self, subType, position,
|
|
273
|
+
function ____exports.spawnCoinWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
|
|
274
274
|
if velocity == nil then
|
|
275
275
|
velocity = VectorZero
|
|
276
276
|
end
|
|
@@ -283,19 +283,19 @@ function ____exports.spawnCoinWithSeed(self, subType, position, seed, velocity,
|
|
|
283
283
|
position,
|
|
284
284
|
velocity,
|
|
285
285
|
spawner,
|
|
286
|
-
|
|
286
|
+
seedOrRNG
|
|
287
287
|
)
|
|
288
288
|
end
|
|
289
289
|
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.HEART` (10).
|
|
290
|
-
function ____exports.spawnHeart(self, subType, position, velocity, spawner,
|
|
290
|
+
function ____exports.spawnHeart(self, subType, position, velocity, spawner, seedOrRNG)
|
|
291
291
|
if velocity == nil then
|
|
292
292
|
velocity = VectorZero
|
|
293
293
|
end
|
|
294
294
|
if spawner == nil then
|
|
295
295
|
spawner = nil
|
|
296
296
|
end
|
|
297
|
-
if
|
|
298
|
-
|
|
297
|
+
if seedOrRNG == nil then
|
|
298
|
+
seedOrRNG = nil
|
|
299
299
|
end
|
|
300
300
|
return spawnPickup(
|
|
301
301
|
nil,
|
|
@@ -304,10 +304,10 @@ function ____exports.spawnHeart(self, subType, position, velocity, spawner, seed
|
|
|
304
304
|
position,
|
|
305
305
|
velocity,
|
|
306
306
|
spawner,
|
|
307
|
-
|
|
307
|
+
seedOrRNG
|
|
308
308
|
)
|
|
309
309
|
end
|
|
310
|
-
function ____exports.spawnHeartWithSeed(self, subType, position,
|
|
310
|
+
function ____exports.spawnHeartWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
|
|
311
311
|
if velocity == nil then
|
|
312
312
|
velocity = VectorZero
|
|
313
313
|
end
|
|
@@ -320,19 +320,19 @@ function ____exports.spawnHeartWithSeed(self, subType, position, seed, velocity,
|
|
|
320
320
|
position,
|
|
321
321
|
velocity,
|
|
322
322
|
spawner,
|
|
323
|
-
|
|
323
|
+
seedOrRNG
|
|
324
324
|
)
|
|
325
325
|
end
|
|
326
326
|
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.KEY` (30).
|
|
327
|
-
function ____exports.spawnKey(self, subType, position, velocity, spawner,
|
|
327
|
+
function ____exports.spawnKey(self, subType, position, velocity, spawner, seedOrRNG)
|
|
328
328
|
if velocity == nil then
|
|
329
329
|
velocity = VectorZero
|
|
330
330
|
end
|
|
331
331
|
if spawner == nil then
|
|
332
332
|
spawner = nil
|
|
333
333
|
end
|
|
334
|
-
if
|
|
335
|
-
|
|
334
|
+
if seedOrRNG == nil then
|
|
335
|
+
seedOrRNG = nil
|
|
336
336
|
end
|
|
337
337
|
return spawnPickup(
|
|
338
338
|
nil,
|
|
@@ -341,10 +341,10 @@ function ____exports.spawnKey(self, subType, position, velocity, spawner, seed)
|
|
|
341
341
|
position,
|
|
342
342
|
velocity,
|
|
343
343
|
spawner,
|
|
344
|
-
|
|
344
|
+
seedOrRNG
|
|
345
345
|
)
|
|
346
346
|
end
|
|
347
|
-
function ____exports.spawnKeyWithSeed(self, subType, position,
|
|
347
|
+
function ____exports.spawnKeyWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
|
|
348
348
|
if velocity == nil then
|
|
349
349
|
velocity = VectorZero
|
|
350
350
|
end
|
|
@@ -357,19 +357,19 @@ function ____exports.spawnKeyWithSeed(self, subType, position, seed, velocity, s
|
|
|
357
357
|
position,
|
|
358
358
|
velocity,
|
|
359
359
|
spawner,
|
|
360
|
-
|
|
360
|
+
seedOrRNG
|
|
361
361
|
)
|
|
362
362
|
end
|
|
363
363
|
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.PILL` (70).
|
|
364
|
-
function ____exports.spawnPill(self, pillColor, position, velocity, spawner,
|
|
364
|
+
function ____exports.spawnPill(self, pillColor, position, velocity, spawner, seedOrRNG)
|
|
365
365
|
if velocity == nil then
|
|
366
366
|
velocity = VectorZero
|
|
367
367
|
end
|
|
368
368
|
if spawner == nil then
|
|
369
369
|
spawner = nil
|
|
370
370
|
end
|
|
371
|
-
if
|
|
372
|
-
|
|
371
|
+
if seedOrRNG == nil then
|
|
372
|
+
seedOrRNG = nil
|
|
373
373
|
end
|
|
374
374
|
return spawnPickup(
|
|
375
375
|
nil,
|
|
@@ -378,10 +378,10 @@ function ____exports.spawnPill(self, pillColor, position, velocity, spawner, see
|
|
|
378
378
|
position,
|
|
379
379
|
velocity,
|
|
380
380
|
spawner,
|
|
381
|
-
|
|
381
|
+
seedOrRNG
|
|
382
382
|
)
|
|
383
383
|
end
|
|
384
|
-
function ____exports.spawnPillWithSeed(self, subType, position,
|
|
384
|
+
function ____exports.spawnPillWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
|
|
385
385
|
if velocity == nil then
|
|
386
386
|
velocity = VectorZero
|
|
387
387
|
end
|
|
@@ -394,19 +394,19 @@ function ____exports.spawnPillWithSeed(self, subType, position, seed, velocity,
|
|
|
394
394
|
position,
|
|
395
395
|
velocity,
|
|
396
396
|
spawner,
|
|
397
|
-
|
|
397
|
+
seedOrRNG
|
|
398
398
|
)
|
|
399
399
|
end
|
|
400
400
|
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.SACK` (69).
|
|
401
|
-
function ____exports.spawnSack(self, subType, position, velocity, spawner,
|
|
401
|
+
function ____exports.spawnSack(self, subType, position, velocity, spawner, seedOrRNG)
|
|
402
402
|
if velocity == nil then
|
|
403
403
|
velocity = VectorZero
|
|
404
404
|
end
|
|
405
405
|
if spawner == nil then
|
|
406
406
|
spawner = nil
|
|
407
407
|
end
|
|
408
|
-
if
|
|
409
|
-
|
|
408
|
+
if seedOrRNG == nil then
|
|
409
|
+
seedOrRNG = nil
|
|
410
410
|
end
|
|
411
411
|
return spawnPickup(
|
|
412
412
|
nil,
|
|
@@ -415,10 +415,10 @@ function ____exports.spawnSack(self, subType, position, velocity, spawner, seed)
|
|
|
415
415
|
position,
|
|
416
416
|
velocity,
|
|
417
417
|
spawner,
|
|
418
|
-
|
|
418
|
+
seedOrRNG
|
|
419
419
|
)
|
|
420
420
|
end
|
|
421
|
-
function ____exports.spawnSackWithSeed(self, subType, position,
|
|
421
|
+
function ____exports.spawnSackWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
|
|
422
422
|
if velocity == nil then
|
|
423
423
|
velocity = VectorZero
|
|
424
424
|
end
|
|
@@ -431,19 +431,19 @@ function ____exports.spawnSackWithSeed(self, subType, position, seed, velocity,
|
|
|
431
431
|
position,
|
|
432
432
|
velocity,
|
|
433
433
|
spawner,
|
|
434
|
-
|
|
434
|
+
seedOrRNG
|
|
435
435
|
)
|
|
436
436
|
end
|
|
437
437
|
--- Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.TRINKET` (350).
|
|
438
|
-
function ____exports.spawnTrinket(self, subType, position, velocity, spawner,
|
|
438
|
+
function ____exports.spawnTrinket(self, subType, position, velocity, spawner, seedOrRNG)
|
|
439
439
|
if velocity == nil then
|
|
440
440
|
velocity = VectorZero
|
|
441
441
|
end
|
|
442
442
|
if spawner == nil then
|
|
443
443
|
spawner = nil
|
|
444
444
|
end
|
|
445
|
-
if
|
|
446
|
-
|
|
445
|
+
if seedOrRNG == nil then
|
|
446
|
+
seedOrRNG = nil
|
|
447
447
|
end
|
|
448
448
|
return spawnPickup(
|
|
449
449
|
nil,
|
|
@@ -452,10 +452,10 @@ function ____exports.spawnTrinket(self, subType, position, velocity, spawner, se
|
|
|
452
452
|
position,
|
|
453
453
|
velocity,
|
|
454
454
|
spawner,
|
|
455
|
-
|
|
455
|
+
seedOrRNG
|
|
456
456
|
)
|
|
457
457
|
end
|
|
458
|
-
function ____exports.spawnTrinketWithSeed(self, subType, position,
|
|
458
|
+
function ____exports.spawnTrinketWithSeed(self, subType, position, seedOrRNG, velocity, spawner)
|
|
459
459
|
if velocity == nil then
|
|
460
460
|
velocity = VectorZero
|
|
461
461
|
end
|
|
@@ -468,7 +468,7 @@ function ____exports.spawnTrinketWithSeed(self, subType, position, seed, velocit
|
|
|
468
468
|
position,
|
|
469
469
|
velocity,
|
|
470
470
|
spawner,
|
|
471
|
-
|
|
471
|
+
seedOrRNG
|
|
472
472
|
)
|
|
473
473
|
end
|
|
474
474
|
return ____exports
|