isaacscript-common 17.2.1 → 17.3.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.
Files changed (34) hide show
  1. package/dist/index.d.ts +59 -55
  2. package/dist/isaacscript-common.lua +102 -97
  3. package/dist/src/classes/features/other/CustomHotkeys.d.ts +4 -0
  4. package/dist/src/classes/features/other/CustomHotkeys.d.ts.map +1 -1
  5. package/dist/src/classes/features/other/SpawnCollectible.d.ts +4 -4
  6. package/dist/src/classes/features/other/SpawnCollectible.d.ts.map +1 -1
  7. package/dist/src/classes/features/other/SpawnCollectible.lua +4 -4
  8. package/dist/src/classes/features/other/SpawnRockAltRewards.d.ts +3 -2
  9. package/dist/src/classes/features/other/SpawnRockAltRewards.d.ts.map +1 -1
  10. package/dist/src/classes/features/other/SpawnRockAltRewards.lua +4 -1
  11. package/dist/src/functions/bosses.d.ts +2 -2
  12. package/dist/src/functions/bosses.d.ts.map +1 -1
  13. package/dist/src/functions/bosses.lua +5 -5
  14. package/dist/src/functions/entities.d.ts +5 -5
  15. package/dist/src/functions/entities.d.ts.map +1 -1
  16. package/dist/src/functions/entities.lua +10 -8
  17. package/dist/src/functions/entitiesSpecific.d.ts +20 -20
  18. package/dist/src/functions/entitiesSpecific.d.ts.map +1 -1
  19. package/dist/src/functions/entitiesSpecific.lua +40 -40
  20. package/dist/src/functions/pickupsSpecific.d.ts +18 -18
  21. package/dist/src/functions/pickupsSpecific.d.ts.map +1 -1
  22. package/dist/src/functions/pickupsSpecific.lua +36 -36
  23. package/dist/src/functions/spawnCollectible.d.ts +4 -4
  24. package/dist/src/functions/spawnCollectible.d.ts.map +1 -1
  25. package/dist/src/functions/spawnCollectible.lua +6 -6
  26. package/package.json +1 -1
  27. package/src/classes/features/other/CustomHotkeys.ts +4 -0
  28. package/src/classes/features/other/SpawnCollectible.ts +6 -6
  29. package/src/classes/features/other/SpawnRockAltRewards.ts +7 -3
  30. package/src/functions/bosses.ts +13 -5
  31. package/src/functions/entities.ts +14 -8
  32. package/src/functions/entitiesSpecific.ts +40 -40
  33. package/src/functions/pickupsSpecific.ts +84 -36
  34. package/src/functions/spawnCollectible.ts +6 -6
@@ -546,7 +546,7 @@ export function removeAllTears(
546
546
  export function spawnBomb(
547
547
  bombVariant: BombVariant,
548
548
  subType: int,
549
- position: Vector,
549
+ positionOrGridIndex: Vector | int,
550
550
  velocity: Vector = VectorZero,
551
551
  spawner: Entity | undefined = undefined,
552
552
  seedOrRNG: Seed | RNG | undefined = undefined,
@@ -555,7 +555,7 @@ export function spawnBomb(
555
555
  EntityType.BOMB,
556
556
  bombVariant,
557
557
  subType,
558
- position,
558
+ positionOrGridIndex,
559
559
  velocity,
560
560
  spawner,
561
561
  seedOrRNG,
@@ -573,7 +573,7 @@ export function spawnBomb(
573
573
  export function spawnBombWithSeed(
574
574
  bombVariant: BombVariant,
575
575
  subType: int,
576
- position: Vector,
576
+ positionOrGridIndex: Vector | int,
577
577
  seedOrRNG: Seed | RNG,
578
578
  velocity: Vector = VectorZero,
579
579
  spawner: Entity | undefined = undefined,
@@ -581,7 +581,7 @@ export function spawnBombWithSeed(
581
581
  return spawnBomb(
582
582
  bombVariant,
583
583
  subType,
584
- position,
584
+ positionOrGridIndex,
585
585
  velocity,
586
586
  spawner,
587
587
  seedOrRNG,
@@ -592,7 +592,7 @@ export function spawnBombWithSeed(
592
592
  export function spawnEffect(
593
593
  effectVariant: EffectVariant,
594
594
  subType: int,
595
- position: Vector,
595
+ positionOrGridIndex: Vector | int,
596
596
  velocity: Vector = VectorZero,
597
597
  spawner: Entity | undefined = undefined,
598
598
  seedOrRNG: Seed | RNG | undefined = undefined,
@@ -601,7 +601,7 @@ export function spawnEffect(
601
601
  EntityType.EFFECT,
602
602
  effectVariant,
603
603
  subType,
604
- position,
604
+ positionOrGridIndex,
605
605
  velocity,
606
606
  spawner,
607
607
  seedOrRNG,
@@ -619,7 +619,7 @@ export function spawnEffect(
619
619
  export function spawnEffectWithSeed(
620
620
  effectVariant: EffectVariant,
621
621
  subType: int,
622
- position: Vector,
622
+ positionOrGridIndex: Vector | int,
623
623
  seedOrRNG: Seed | RNG,
624
624
  velocity: Vector = VectorZero,
625
625
  spawner: Entity | undefined = undefined,
@@ -627,7 +627,7 @@ export function spawnEffectWithSeed(
627
627
  return spawnEffect(
628
628
  effectVariant,
629
629
  subType,
630
- position,
630
+ positionOrGridIndex,
631
631
  velocity,
632
632
  spawner,
633
633
  seedOrRNG,
@@ -643,7 +643,7 @@ export function spawnEffectWithSeed(
643
643
  export function spawnFamiliar(
644
644
  familiarVariant: FamiliarVariant,
645
645
  subType: int,
646
- position: Vector,
646
+ positionOrGridIndex: Vector | int,
647
647
  velocity: Vector = VectorZero,
648
648
  spawner: Entity | undefined = undefined,
649
649
  seedOrRNG: Seed | RNG | undefined = undefined,
@@ -652,7 +652,7 @@ export function spawnFamiliar(
652
652
  EntityType.FAMILIAR,
653
653
  familiarVariant,
654
654
  subType,
655
- position,
655
+ positionOrGridIndex,
656
656
  velocity,
657
657
  spawner,
658
658
  seedOrRNG,
@@ -670,7 +670,7 @@ export function spawnFamiliar(
670
670
  export function spawnFamiliarWithSeed(
671
671
  familiarVariant: FamiliarVariant,
672
672
  subType: int,
673
- position: Vector,
673
+ positionOrGridIndex: Vector | int,
674
674
  seedOrRNG: Seed | RNG,
675
675
  velocity: Vector = VectorZero,
676
676
  spawner: Entity | undefined = undefined,
@@ -678,7 +678,7 @@ export function spawnFamiliarWithSeed(
678
678
  return spawnFamiliar(
679
679
  familiarVariant,
680
680
  subType,
681
- position,
681
+ positionOrGridIndex,
682
682
  velocity,
683
683
  spawner,
684
684
  seedOrRNG,
@@ -689,7 +689,7 @@ export function spawnFamiliarWithSeed(
689
689
  export function spawnKnife(
690
690
  knifeVariant: KnifeVariant,
691
691
  subType: int,
692
- position: Vector,
692
+ positionOrGridIndex: Vector | int,
693
693
  velocity: Vector = VectorZero,
694
694
  spawner: Entity | undefined = undefined,
695
695
  seedOrRNG: Seed | RNG | undefined = undefined,
@@ -698,7 +698,7 @@ export function spawnKnife(
698
698
  EntityType.KNIFE,
699
699
  knifeVariant,
700
700
  subType,
701
- position,
701
+ positionOrGridIndex,
702
702
  velocity,
703
703
  spawner,
704
704
  seedOrRNG,
@@ -716,7 +716,7 @@ export function spawnKnife(
716
716
  export function spawnKnifeWithSeed(
717
717
  knifeVariant: KnifeVariant,
718
718
  subType: int,
719
- position: Vector,
719
+ positionOrGridIndex: Vector | int,
720
720
  seedOrRNG: Seed | RNG,
721
721
  velocity: Vector = VectorZero,
722
722
  spawner: Entity | undefined = undefined,
@@ -724,7 +724,7 @@ export function spawnKnifeWithSeed(
724
724
  return spawnKnife(
725
725
  knifeVariant,
726
726
  subType,
727
- position,
727
+ positionOrGridIndex,
728
728
  velocity,
729
729
  spawner,
730
730
  seedOrRNG,
@@ -735,7 +735,7 @@ export function spawnKnifeWithSeed(
735
735
  export function spawnLaser(
736
736
  laserVariant: LaserVariant,
737
737
  subType: int,
738
- position: Vector,
738
+ positionOrGridIndex: Vector | int,
739
739
  velocity: Vector = VectorZero,
740
740
  spawner: Entity | undefined = undefined,
741
741
  seedOrRNG: Seed | RNG | undefined = undefined,
@@ -744,7 +744,7 @@ export function spawnLaser(
744
744
  EntityType.LASER,
745
745
  laserVariant,
746
746
  subType,
747
- position,
747
+ positionOrGridIndex,
748
748
  velocity,
749
749
  spawner,
750
750
  seedOrRNG,
@@ -762,7 +762,7 @@ export function spawnLaser(
762
762
  export function spawnLaserWithSeed(
763
763
  laserVariant: LaserVariant,
764
764
  subType: int,
765
- position: Vector,
765
+ positionOrGridIndex: Vector | int,
766
766
  seedOrRNG: Seed | RNG,
767
767
  velocity: Vector = VectorZero,
768
768
  spawner: Entity | undefined = undefined,
@@ -770,7 +770,7 @@ export function spawnLaserWithSeed(
770
770
  return spawnLaser(
771
771
  laserVariant,
772
772
  subType,
773
- position,
773
+ positionOrGridIndex,
774
774
  velocity,
775
775
  spawner,
776
776
  seedOrRNG,
@@ -787,7 +787,7 @@ export function spawnNPC(
787
787
  entityType: EntityType,
788
788
  variant: int,
789
789
  subType: int,
790
- position: Vector,
790
+ positionOrGridIndex: Vector | int,
791
791
  velocity: Vector = VectorZero,
792
792
  spawner: Entity | undefined = undefined,
793
793
  seedOrRNG: Seed | RNG | undefined = undefined,
@@ -796,7 +796,7 @@ export function spawnNPC(
796
796
  entityType,
797
797
  variant,
798
798
  subType,
799
- position,
799
+ positionOrGridIndex,
800
800
  velocity,
801
801
  spawner,
802
802
  seedOrRNG,
@@ -820,7 +820,7 @@ export function spawnNPCWithSeed(
820
820
  entityType: EntityType,
821
821
  variant: int,
822
822
  subType: int,
823
- position: Vector,
823
+ positionOrGridIndex: Vector | int,
824
824
  seedOrRNG: Seed | RNG,
825
825
  velocity: Vector = VectorZero,
826
826
  spawner: Entity | undefined = undefined,
@@ -829,7 +829,7 @@ export function spawnNPCWithSeed(
829
829
  entityType,
830
830
  variant,
831
831
  subType,
832
- position,
832
+ positionOrGridIndex,
833
833
  velocity,
834
834
  spawner,
835
835
  seedOrRNG,
@@ -840,7 +840,7 @@ export function spawnNPCWithSeed(
840
840
  export function spawnPickup(
841
841
  pickupVariant: PickupVariant,
842
842
  subType: int,
843
- position: Vector,
843
+ positionOrGridIndex: Vector | int,
844
844
  velocity: Vector = VectorZero,
845
845
  spawner: Entity | undefined = undefined,
846
846
  seedOrRNG: Seed | RNG | undefined = undefined,
@@ -849,7 +849,7 @@ export function spawnPickup(
849
849
  EntityType.PICKUP,
850
850
  pickupVariant,
851
851
  subType,
852
- position,
852
+ positionOrGridIndex,
853
853
  velocity,
854
854
  spawner,
855
855
  seedOrRNG,
@@ -867,7 +867,7 @@ export function spawnPickup(
867
867
  export function spawnPickupWithSeed(
868
868
  pickupVariant: PickupVariant,
869
869
  subType: int,
870
- position: Vector,
870
+ positionOrGridIndex: Vector | int,
871
871
  seedOrRNG: Seed | RNG,
872
872
  velocity: Vector = VectorZero,
873
873
  spawner: Entity | undefined = undefined,
@@ -875,7 +875,7 @@ export function spawnPickupWithSeed(
875
875
  return spawnPickup(
876
876
  pickupVariant,
877
877
  subType,
878
- position,
878
+ positionOrGridIndex,
879
879
  velocity,
880
880
  spawner,
881
881
  seedOrRNG,
@@ -886,7 +886,7 @@ export function spawnPickupWithSeed(
886
886
  export function spawnProjectile(
887
887
  projectileVariant: ProjectileVariant,
888
888
  subType: int,
889
- position: Vector,
889
+ positionOrGridIndex: Vector | int,
890
890
  velocity: Vector = VectorZero,
891
891
  spawner: Entity | undefined = undefined,
892
892
  seedOrRNG: Seed | RNG | undefined = undefined,
@@ -895,7 +895,7 @@ export function spawnProjectile(
895
895
  EntityType.PROJECTILE,
896
896
  projectileVariant,
897
897
  subType,
898
- position,
898
+ positionOrGridIndex,
899
899
  velocity,
900
900
  spawner,
901
901
  seedOrRNG,
@@ -913,7 +913,7 @@ export function spawnProjectile(
913
913
  export function spawnProjectileWithSeed(
914
914
  projectileVariant: ProjectileVariant,
915
915
  subType: int,
916
- position: Vector,
916
+ positionOrGridIndex: Vector | int,
917
917
  seedOrRNG: Seed | RNG,
918
918
  velocity: Vector = VectorZero,
919
919
  spawner: Entity | undefined = undefined,
@@ -921,7 +921,7 @@ export function spawnProjectileWithSeed(
921
921
  return spawnProjectile(
922
922
  projectileVariant,
923
923
  subType,
924
- position,
924
+ positionOrGridIndex,
925
925
  velocity,
926
926
  spawner,
927
927
  seedOrRNG,
@@ -932,7 +932,7 @@ export function spawnProjectileWithSeed(
932
932
  export function spawnSlot(
933
933
  slotVariant: SlotVariant,
934
934
  subType: int,
935
- position: Vector,
935
+ positionOrGridIndex: Vector | int,
936
936
  velocity: Vector = VectorZero,
937
937
  spawner: Entity | undefined = undefined,
938
938
  seedOrRNG: Seed | RNG | undefined = undefined,
@@ -941,7 +941,7 @@ export function spawnSlot(
941
941
  EntityType.SLOT,
942
942
  slotVariant,
943
943
  subType,
944
- position,
944
+ positionOrGridIndex,
945
945
  velocity,
946
946
  spawner,
947
947
  seedOrRNG,
@@ -952,7 +952,7 @@ export function spawnSlot(
952
952
  export function spawnSlotWithSeed(
953
953
  slotVariant: SlotVariant,
954
954
  subType: int,
955
- position: Vector,
955
+ positionOrGridIndex: Vector | int,
956
956
  seedOrRNG: Seed | RNG,
957
957
  velocity: Vector = VectorZero,
958
958
  spawner: Entity | undefined = undefined,
@@ -960,7 +960,7 @@ export function spawnSlotWithSeed(
960
960
  return spawnSlot(
961
961
  slotVariant,
962
962
  subType,
963
- position,
963
+ positionOrGridIndex,
964
964
  velocity,
965
965
  spawner,
966
966
  seedOrRNG,
@@ -971,7 +971,7 @@ export function spawnSlotWithSeed(
971
971
  export function spawnTear(
972
972
  tearVariant: TearVariant,
973
973
  subType: int,
974
- position: Vector,
974
+ positionOrGridIndex: Vector | int,
975
975
  velocity: Vector = VectorZero,
976
976
  spawner: Entity | undefined = undefined,
977
977
  seedOrRNG: Seed | RNG | undefined = undefined,
@@ -980,7 +980,7 @@ export function spawnTear(
980
980
  EntityType.TEAR,
981
981
  tearVariant,
982
982
  subType,
983
- position,
983
+ positionOrGridIndex,
984
984
  velocity,
985
985
  spawner,
986
986
  seedOrRNG,
@@ -998,7 +998,7 @@ export function spawnTear(
998
998
  export function spawnTearWithSeed(
999
999
  tearVariant: TearVariant,
1000
1000
  subType: int,
1001
- position: Vector,
1001
+ positionOrGridIndex: Vector | int,
1002
1002
  seedOrRNG: Seed | RNG,
1003
1003
  velocity: Vector = VectorZero,
1004
1004
  spawner: Entity | undefined = undefined,
@@ -1006,7 +1006,7 @@ export function spawnTearWithSeed(
1006
1006
  return spawnTear(
1007
1007
  tearVariant,
1008
1008
  subType,
1009
- position,
1009
+ positionOrGridIndex,
1010
1010
  velocity,
1011
1011
  spawner,
1012
1012
  seedOrRNG,
@@ -330,7 +330,7 @@ export function removeAllTrinkets(
330
330
  */
331
331
  export function spawnBattery(
332
332
  batterySubType: BatterySubType,
333
- position: Vector,
333
+ positionOrGridIndex: Vector | int,
334
334
  velocity: Vector = VectorZero,
335
335
  spawner: Entity | undefined = undefined,
336
336
  seedOrRNG: Seed | RNG | undefined = undefined,
@@ -338,7 +338,7 @@ export function spawnBattery(
338
338
  return spawnPickup(
339
339
  PickupVariant.LIL_BATTERY,
340
340
  batterySubType,
341
- position,
341
+ positionOrGridIndex,
342
342
  velocity,
343
343
  spawner,
344
344
  seedOrRNG,
@@ -351,18 +351,24 @@ export function spawnBattery(
351
351
  */
352
352
  export function spawnBatteryWithSeed(
353
353
  batterySubType: BatterySubType,
354
- position: Vector,
354
+ positionOrGridIndex: Vector | int,
355
355
  seedOrRNG: Seed | RNG,
356
356
  velocity: Vector = VectorZero,
357
357
  spawner: Entity | undefined = undefined,
358
358
  ): EntityPickupBattery {
359
- return spawnBattery(batterySubType, position, velocity, spawner, seedOrRNG);
359
+ return spawnBattery(
360
+ batterySubType,
361
+ positionOrGridIndex,
362
+ velocity,
363
+ spawner,
364
+ seedOrRNG,
365
+ );
360
366
  }
361
367
 
362
368
  /** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.BOMB` (40). */
363
369
  export function spawnBombPickup(
364
370
  bombSubType: BombSubType,
365
- position: Vector,
371
+ positionOrGridIndex: Vector | int,
366
372
  velocity: Vector = VectorZero,
367
373
  spawner: Entity | undefined = undefined,
368
374
  seedOrRNG: Seed | RNG | undefined = undefined,
@@ -370,7 +376,7 @@ export function spawnBombPickup(
370
376
  return spawnPickup(
371
377
  PickupVariant.BOMB,
372
378
  bombSubType,
373
- position,
379
+ positionOrGridIndex,
374
380
  velocity,
375
381
  spawner,
376
382
  seedOrRNG,
@@ -383,12 +389,18 @@ export function spawnBombPickup(
383
389
  */
384
390
  export function spawnBombPickupWithSeed(
385
391
  bombSubType: BombSubType,
386
- position: Vector,
392
+ positionOrGridIndex: Vector | int,
387
393
  seedOrRNG: Seed | RNG,
388
394
  velocity: Vector = VectorZero,
389
395
  spawner: Entity | undefined = undefined,
390
396
  ): EntityPickupBomb {
391
- return spawnBombPickup(bombSubType, position, velocity, spawner, seedOrRNG);
397
+ return spawnBombPickup(
398
+ bombSubType,
399
+ positionOrGridIndex,
400
+ velocity,
401
+ spawner,
402
+ seedOrRNG,
403
+ );
392
404
  }
393
405
 
394
406
  /**
@@ -396,7 +408,7 @@ export function spawnBombPickupWithSeed(
396
408
  */
397
409
  export function spawnCard(
398
410
  cardType: CardType,
399
- position: Vector,
411
+ positionOrGridIndex: Vector | int,
400
412
  velocity: Vector = VectorZero,
401
413
  spawner: Entity | undefined = undefined,
402
414
  seedOrRNG: Seed | RNG | undefined = undefined,
@@ -404,7 +416,7 @@ export function spawnCard(
404
416
  return spawnPickup(
405
417
  PickupVariant.TAROT_CARD,
406
418
  cardType,
407
- position,
419
+ positionOrGridIndex,
408
420
  velocity,
409
421
  spawner,
410
422
  seedOrRNG,
@@ -417,18 +429,18 @@ export function spawnCard(
417
429
  */
418
430
  export function spawnCardWithSeed(
419
431
  cardType: CardType,
420
- position: Vector,
432
+ positionOrGridIndex: Vector | int,
421
433
  seedOrRNG: Seed | RNG,
422
434
  velocity: Vector = VectorZero,
423
435
  spawner: Entity | undefined = undefined,
424
436
  ): EntityPickupCard {
425
- return spawnCard(cardType, position, velocity, spawner, seedOrRNG);
437
+ return spawnCard(cardType, positionOrGridIndex, velocity, spawner, seedOrRNG);
426
438
  }
427
439
 
428
440
  /** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.COIN` (20). */
429
441
  export function spawnCoin(
430
442
  coinSubType: CoinSubType,
431
- position: Vector,
443
+ positionOrGridIndex: Vector | int,
432
444
  velocity: Vector = VectorZero,
433
445
  spawner: Entity | undefined = undefined,
434
446
  seedOrRNG: Seed | RNG | undefined = undefined,
@@ -436,7 +448,7 @@ export function spawnCoin(
436
448
  return spawnPickup(
437
449
  PickupVariant.COIN,
438
450
  coinSubType,
439
- position,
451
+ positionOrGridIndex,
440
452
  velocity,
441
453
  spawner,
442
454
  seedOrRNG,
@@ -449,18 +461,24 @@ export function spawnCoin(
449
461
  */
450
462
  export function spawnCoinWithSeed(
451
463
  coinSubType: CoinSubType,
452
- position: Vector,
464
+ positionOrGridIndex: Vector | int,
453
465
  seedOrRNG: Seed | RNG,
454
466
  velocity: Vector = VectorZero,
455
467
  spawner: Entity | undefined = undefined,
456
468
  ): EntityPickupCoin {
457
- return spawnCoin(coinSubType, position, velocity, spawner, seedOrRNG);
469
+ return spawnCoin(
470
+ coinSubType,
471
+ positionOrGridIndex,
472
+ velocity,
473
+ spawner,
474
+ seedOrRNG,
475
+ );
458
476
  }
459
477
 
460
478
  /** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.HEART` (10). */
461
479
  export function spawnHeart(
462
480
  heartSubType: HeartSubType,
463
- position: Vector,
481
+ positionOrGridIndex: Vector | int,
464
482
  velocity: Vector = VectorZero,
465
483
  spawner: Entity | undefined = undefined,
466
484
  seedOrRNG: Seed | RNG | undefined = undefined,
@@ -468,7 +486,7 @@ export function spawnHeart(
468
486
  return spawnPickup(
469
487
  PickupVariant.HEART,
470
488
  heartSubType,
471
- position,
489
+ positionOrGridIndex,
472
490
  velocity,
473
491
  spawner,
474
492
  seedOrRNG,
@@ -477,18 +495,24 @@ export function spawnHeart(
477
495
 
478
496
  export function spawnHeartWithSeed(
479
497
  heartSubType: HeartSubType,
480
- position: Vector,
498
+ positionOrGridIndex: Vector | int,
481
499
  seedOrRNG: Seed | RNG,
482
500
  velocity: Vector = VectorZero,
483
501
  spawner: Entity | undefined = undefined,
484
502
  ): EntityPickupHeart {
485
- return spawnHeart(heartSubType, position, velocity, spawner, seedOrRNG);
503
+ return spawnHeart(
504
+ heartSubType,
505
+ positionOrGridIndex,
506
+ velocity,
507
+ spawner,
508
+ seedOrRNG,
509
+ );
486
510
  }
487
511
 
488
512
  /** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.KEY` (30). */
489
513
  export function spawnKey(
490
514
  keySubType: KeySubType,
491
- position: Vector,
515
+ positionOrGridIndex: Vector | int,
492
516
  velocity: Vector = VectorZero,
493
517
  spawner: Entity | undefined = undefined,
494
518
  seedOrRNG: Seed | RNG | undefined = undefined,
@@ -496,7 +520,7 @@ export function spawnKey(
496
520
  return spawnPickup(
497
521
  PickupVariant.KEY,
498
522
  keySubType,
499
- position,
523
+ positionOrGridIndex,
500
524
  velocity,
501
525
  spawner,
502
526
  seedOrRNG,
@@ -509,18 +533,24 @@ export function spawnKey(
509
533
  */
510
534
  export function spawnKeyWithSeed(
511
535
  keySubType: KeySubType,
512
- position: Vector,
536
+ positionOrGridIndex: Vector | int,
513
537
  seedOrRNG: Seed | RNG,
514
538
  velocity: Vector = VectorZero,
515
539
  spawner: Entity | undefined = undefined,
516
540
  ): EntityPickupKey {
517
- return spawnKey(keySubType, position, velocity, spawner, seedOrRNG);
541
+ return spawnKey(
542
+ keySubType,
543
+ positionOrGridIndex,
544
+ velocity,
545
+ spawner,
546
+ seedOrRNG,
547
+ );
518
548
  }
519
549
 
520
550
  /** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.PILL` (70). */
521
551
  export function spawnPill(
522
552
  pillColor: PillColor,
523
- position: Vector,
553
+ positionOrGridIndex: Vector | int,
524
554
  velocity: Vector = VectorZero,
525
555
  spawner: Entity | undefined = undefined,
526
556
  seedOrRNG: Seed | RNG | undefined = undefined,
@@ -528,7 +558,7 @@ export function spawnPill(
528
558
  return spawnPickup(
529
559
  PickupVariant.PILL,
530
560
  pillColor,
531
- position,
561
+ positionOrGridIndex,
532
562
  velocity,
533
563
  spawner,
534
564
  seedOrRNG,
@@ -541,18 +571,24 @@ export function spawnPill(
541
571
  */
542
572
  export function spawnPillWithSeed(
543
573
  pillColor: PillColor,
544
- position: Vector,
574
+ positionOrGridIndex: Vector | int,
545
575
  seedOrRNG: Seed | RNG,
546
576
  velocity: Vector = VectorZero,
547
577
  spawner: Entity | undefined = undefined,
548
578
  ): EntityPickupPill {
549
- return spawnPill(pillColor, position, velocity, spawner, seedOrRNG);
579
+ return spawnPill(
580
+ pillColor,
581
+ positionOrGridIndex,
582
+ velocity,
583
+ spawner,
584
+ seedOrRNG,
585
+ );
550
586
  }
551
587
 
552
588
  /** Helper function to spawn a `EntityType.PICKUP` (5) with variant `PickupVariant.SACK` (69). */
553
589
  export function spawnSack(
554
590
  sackSubType: SackSubType,
555
- position: Vector,
591
+ positionOrGridIndex: Vector | int,
556
592
  velocity: Vector = VectorZero,
557
593
  spawner: Entity | undefined = undefined,
558
594
  seedOrRNG: Seed | RNG | undefined = undefined,
@@ -560,7 +596,7 @@ export function spawnSack(
560
596
  return spawnPickup(
561
597
  PickupVariant.SACK,
562
598
  sackSubType,
563
- position,
599
+ positionOrGridIndex,
564
600
  velocity,
565
601
  spawner,
566
602
  seedOrRNG,
@@ -573,12 +609,18 @@ export function spawnSack(
573
609
  */
574
610
  export function spawnSackWithSeed(
575
611
  sackSubType: SackSubType,
576
- position: Vector,
612
+ positionOrGridIndex: Vector | int,
577
613
  seedOrRNG: Seed | RNG,
578
614
  velocity: Vector = VectorZero,
579
615
  spawner: Entity | undefined = undefined,
580
616
  ): EntityPickupSack {
581
- return spawnSack(sackSubType, position, velocity, spawner, seedOrRNG);
617
+ return spawnSack(
618
+ sackSubType,
619
+ positionOrGridIndex,
620
+ velocity,
621
+ spawner,
622
+ seedOrRNG,
623
+ );
582
624
  }
583
625
 
584
626
  /**
@@ -586,7 +628,7 @@ export function spawnSackWithSeed(
586
628
  */
587
629
  export function spawnTrinket(
588
630
  trinketType: TrinketType,
589
- position: Vector,
631
+ positionOrGridIndex: Vector | int,
590
632
  velocity: Vector = VectorZero,
591
633
  spawner: Entity | undefined = undefined,
592
634
  seedOrRNG: Seed | RNG | undefined = undefined,
@@ -594,7 +636,7 @@ export function spawnTrinket(
594
636
  return spawnPickup(
595
637
  PickupVariant.TRINKET,
596
638
  trinketType,
597
- position,
639
+ positionOrGridIndex,
598
640
  velocity,
599
641
  spawner,
600
642
  seedOrRNG,
@@ -607,10 +649,16 @@ export function spawnTrinket(
607
649
  */
608
650
  export function spawnTrinketWithSeed(
609
651
  trinketType: TrinketType,
610
- position: Vector,
652
+ positionOrGridIndex: Vector | int,
611
653
  seedOrRNG: Seed | RNG,
612
654
  velocity: Vector = VectorZero,
613
655
  spawner: Entity | undefined = undefined,
614
656
  ): EntityPickupTrinket {
615
- return spawnTrinket(trinketType, position, velocity, spawner, seedOrRNG);
657
+ return spawnTrinket(
658
+ trinketType,
659
+ positionOrGridIndex,
660
+ velocity,
661
+ spawner,
662
+ seedOrRNG,
663
+ );
616
664
  }