isaacscript-common 16.1.7 → 17.0.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 (36) hide show
  1. package/dist/index.d.ts +191 -49
  2. package/dist/isaacscript-common.lua +517 -508
  3. package/dist/src/classes/ModUpgradedBase.d.ts +3 -1
  4. package/dist/src/classes/ModUpgradedBase.d.ts.map +1 -1
  5. package/dist/src/classes/ModUpgradedBase.lua +16 -8
  6. package/dist/src/classes/features/other/ModdedElementSets.d.ts +172 -5
  7. package/dist/src/classes/features/other/ModdedElementSets.d.ts.map +1 -1
  8. package/dist/src/classes/features/other/ModdedElementSets.lua +161 -5
  9. package/dist/src/classes/features/other/Pause.d.ts +1 -0
  10. package/dist/src/classes/features/other/Pause.d.ts.map +1 -1
  11. package/dist/src/classes/features/other/Pause.lua +5 -1
  12. package/dist/src/core/constants.d.ts +3 -1
  13. package/dist/src/core/constants.d.ts.map +1 -1
  14. package/dist/src/core/constants.lua +6 -0
  15. package/dist/src/core/upgradeMod.d.ts.map +1 -1
  16. package/dist/src/core/upgradeMod.lua +7 -0
  17. package/dist/src/functions/cards.d.ts +7 -34
  18. package/dist/src/functions/cards.d.ts.map +1 -1
  19. package/dist/src/functions/cards.lua +20 -119
  20. package/dist/src/functions/globals.d.ts.map +1 -1
  21. package/dist/src/functions/globals.lua +0 -1
  22. package/dist/src/functions/positionVelocity.d.ts.map +1 -1
  23. package/dist/src/functions/positionVelocity.lua +5 -5
  24. package/package.json +2 -2
  25. package/src/classes/ModUpgradedBase.ts +24 -9
  26. package/src/classes/features/other/ModdedElementSets.ts +346 -5
  27. package/src/classes/features/other/Pause.ts +5 -0
  28. package/src/core/constants.ts +9 -0
  29. package/src/core/upgradeMod.ts +10 -0
  30. package/src/functions/cards.ts +20 -139
  31. package/src/functions/globals.ts +0 -1
  32. package/src/functions/positionVelocity.ts +1 -7
  33. package/dist/src/objects/cardTypeToItemConfigCardType.d.ts +0 -6
  34. package/dist/src/objects/cardTypeToItemConfigCardType.d.ts.map +0 -1
  35. package/dist/src/objects/cardTypeToItemConfigCardType.lua +0 -106
  36. package/src/objects/cardTypeToItemConfigCardType.ts +0 -106
package/dist/index.d.ts CHANGED
@@ -10,6 +10,7 @@ import { BombVariant } from 'isaac-typescript-definitions';
10
10
  import { BossID } from 'isaac-typescript-definitions';
11
11
  import { ButtonAction } from 'isaac-typescript-definitions';
12
12
  import { CacheFlag } from 'isaac-typescript-definitions';
13
+ import { CallbackPriority } from 'isaac-typescript-definitions/dist/src/enums/CallbackPriority';
13
14
  import { CardType } from 'isaac-typescript-definitions';
14
15
  import { Challenge } from 'isaac-typescript-definitions';
15
16
  import { CoinSubType } from 'isaac-typescript-definitions';
@@ -4168,14 +4169,6 @@ export declare function getCardName(cardType: CardType): string;
4168
4169
  */
4169
4170
  export declare function getCards(cardType?: CardType): EntityPickupCard[];
4170
4171
 
4171
- /**
4172
- * Helper function to get a set of card types matching the `ItemConfigCardType`.
4173
- *
4174
- * This function is variadic, meaning that you can you can specify N card types to get a set
4175
- * containing cards that match any of the specified types.
4176
- */
4177
- export declare function getCardTypesOfType(...itemConfigCardTypes: ItemConfigCardType[]): Set<CardType>;
4178
-
4179
4172
  /** Get the proper name for a `Challenge` enum. This will only work for vanilla challenges. */
4180
4173
  export declare function getChallengeName(challenge: Challenge): string;
4181
4174
 
@@ -4906,7 +4899,13 @@ export declare function getHUDOffsetVector(): Vector;
4906
4899
  */
4907
4900
  export declare function getIsaacAPIClassName(object: unknown): string | undefined;
4908
4901
 
4909
- export declare function getItemConfigCardType(cardType: CardType): ItemConfigCardType;
4902
+ /**
4903
+ * Helper function to get the item config card type of a particular card, rune, or object. For
4904
+ * example, the item config card type of `CardType.FOOL` is equal to `ItemConfigCardType.TAROT`.
4905
+ *
4906
+ * Returns undefined if the provided card type was not valid.
4907
+ */
4908
+ export declare function getItemConfigCardType(cardType: CardType): ItemConfigCardType | undefined;
4910
4909
 
4911
4910
  /**
4912
4911
  * Helper function to calculate what the resulting `BitFlags<DoorSlotFlag>` value would be for a
@@ -5604,30 +5603,6 @@ export declare function getRandomArrayElementAndRemove<T>(array: T[], seedOrRNG?
5604
5603
  */
5605
5604
  export declare function getRandomArrayIndex<T>(array: T[] | readonly T[], seedOrRNG?: Seed | RNG, exceptions?: int[] | readonly int[]): int;
5606
5605
 
5607
- /**
5608
- * Has an equal chance of returning any card (e.g. Fool, Reverse Fool, Wild Card, etc.).
5609
- *
5610
- * This will not return:
5611
- * - any runes
5612
- * - any objects like Dice Shard
5613
- * - any modded cards (since there is not a way to distinguish between modded cards and modded
5614
- * runes/objects)
5615
- *
5616
- * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
5617
- * `RNG.Next` method will be called. Default is `getRandomSeed()`.
5618
- * @param exceptions Optional. An array of cards to not select.
5619
- */
5620
- export declare function getRandomCard(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
5621
-
5622
- /**
5623
- * @param itemConfigCardType The item config card type that represents the pool of cards to select
5624
- * from.
5625
- * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
5626
- * `RNG.Next` method will be called. Default is `getRandomSeed()`.
5627
- * @param exceptions Optional. An array of cards to not select.
5628
- */
5629
- export declare function getRandomCardTypeOfType(itemConfigCardType: ItemConfigCardType, seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
5630
-
5631
5606
  /**
5632
5607
  * Helper function to get a random color.
5633
5608
  *
@@ -5744,16 +5719,6 @@ export declare function getRandomJSONRoom(jsonRooms: JSONRoom[], seedOrRNG?: See
5744
5719
  */
5745
5720
  export declare function getRandomKColor(seedOrRNG?: Seed | RNG, alpha?: number): KColor;
5746
5721
 
5747
- /**
5748
- * Has an equal chance of returning any rune (e.g. Rune of Hagalaz, Blank Rune, Black Rune, Soul of
5749
- * Isaac, etc.). This will never return a Rune Shard.
5750
- *
5751
- * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
5752
- * `RNG.Next` method will be called. Default is `getRandomSeed()`.
5753
- * @param exceptions Optional. An array of runes to not select.
5754
- */
5755
- export declare function getRandomRune(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
5756
-
5757
5722
  /**
5758
5723
  * Helper function to get a random `Seed` value to be used in spawning entities and so on. Use this
5759
5724
  * instead of calling the `Random` function directly since that can return a value of 0 and crash
@@ -6486,7 +6451,12 @@ export declare function getTSTLClassName(object: unknown): string | undefined;
6486
6451
  */
6487
6452
  export declare function getUnusedDoorSlots(): DoorSlot[];
6488
6453
 
6489
- /** Helper function to get an array with every valid vanilla card sub-type. */
6454
+ /**
6455
+ * Helper function to get an array with every valid vanilla card sub-type.
6456
+ *
6457
+ * Note that unlike collectibles and trinkets, there are no gaps in the card types, so this is a
6458
+ * simple range from the first card type to the last vanilla card type.
6459
+ */
6490
6460
  export declare function getVanillaCardTypes(): CardType[];
6491
6461
 
6492
6462
  /**
@@ -7917,6 +7887,9 @@ export declare function isVanillaWallGridIndex(gridIndex: int): boolean;
7917
7887
  /** Helper function to check if something is an instantiated `Vector` object. */
7918
7888
  export declare function isVector(object: unknown): object is Vector;
7919
7889
 
7890
+ /** The set of all `ItemConfigCardType` values that are not a rune or special object. */
7891
+ export declare const ITEM_CONFIG_CARD_TYPES_FOR_CARDS: Set<ItemConfigCardType>;
7892
+
7920
7893
  /**
7921
7894
  * A cached version of the class returned from the `Isaac.GetItemConfig()` constructor.
7922
7895
  *
@@ -10519,6 +10492,12 @@ declare class ModdedElementSets extends Feature {
10519
10492
  private vanillaTrinketTypesSet;
10520
10493
  private moddedTrinketTypesArray;
10521
10494
  private moddedTrinketTypesSet;
10495
+ private allCardTypesArray;
10496
+ private allCardTypesSet;
10497
+ private vanillaCardTypesArray;
10498
+ private vanillaCardTypesSet;
10499
+ private moddedCardTypesArray;
10500
+ private moddedCardTypesSet;
10522
10501
  private tagToCollectibleTypesMap;
10523
10502
  private cacheFlagToCollectibleTypesMap;
10524
10503
  private cacheFlagToTrinketTypesMap;
@@ -10527,17 +10506,64 @@ declare class ModdedElementSets extends Feature {
10527
10506
  private flyingTrinketTypesSet;
10528
10507
  private edenActiveCollectibleTypesSet;
10529
10508
  private edenPassiveCollectibleTypesSet;
10509
+ private itemConfigCardTypeToCardTypeMap;
10510
+ /**
10511
+ * The set of cards that are not:
10512
+ *
10513
+ * - ItemConfigCardType.RUNE
10514
+ * - ItemConfigCardType.SPECIAL_OBJECT
10515
+ */
10516
+ private cardSet;
10530
10517
  private moddedElementDetection;
10531
10518
  private lazyInitVanillaCollectibleTypes;
10532
10519
  private lazyInitModdedCollectibleTypes;
10533
10520
  private lazyInitVanillaTrinketTypes;
10534
10521
  private lazyInitModdedTrinketTypes;
10522
+ private lazyInitVanillaCardTypes;
10523
+ private lazyInitModdedCardTypes;
10535
10524
  private lazyInitTagToCollectibleTypesMap;
10536
10525
  private lazyInitCacheFlagToCollectibleTypesMap;
10537
10526
  private lazyInitCacheFlagToTrinketTypesMap;
10538
10527
  private lazyInitFlyingCollectibleTypesSet;
10539
10528
  private lazyInitFlyingTrinketTypesSet;
10540
10529
  private lazyInitEdenCollectibleTypesSet;
10530
+ private lazyInitCardTypes;
10531
+ /**
10532
+ * Returns an array containing every valid card type in the game, including modded cards.
10533
+ *
10534
+ * Use this if you need to iterate over the cards in order. If you need to do O(1) lookups, then
10535
+ * use the `getCardSet` helper function instead.
10536
+ *
10537
+ * This function can only be called if at least one callback has been executed. This is because
10538
+ * not all cards will necessarily be present when a mod first loads (due to mod load order).
10539
+ *
10540
+ * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
10541
+ */
10542
+ getCardArray(): readonly CardType[];
10543
+ /**
10544
+ * Returns a set containing every valid card type in the game, including modded cards.
10545
+ *
10546
+ * Use this if you need to do O(1) lookups. If you need to iterate over the cards in order, then
10547
+ * use the `getCardArray` helper function instead.
10548
+ *
10549
+ * This function can only be called if at least one callback has been executed. This is because
10550
+ * not all cards will necessarily be present when a mod first loads (due to mod load order).
10551
+ *
10552
+ * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
10553
+ */
10554
+ getCardSet(): ReadonlySet<CardType>;
10555
+ /**
10556
+ * Helper function to get a set of card types matching the `ItemConfigCardType`.
10557
+ *
10558
+ * This function is variadic, meaning that you can you can specify N card types to get a set
10559
+ * containing cards that match any of the specified types.
10560
+ *
10561
+ * This function can only be called if at least one callback has been executed. This is because
10562
+ * not all cards will necessarily be present when a mod first loads (due to mod load order).
10563
+ *
10564
+ * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
10565
+ */
10566
+ getCardTypesOfType(...itemConfigCardTypes: ItemConfigCardType[]): Set<CardType>;
10541
10567
  /**
10542
10568
  * Returns an array containing every valid collectible type in the game, including modded
10543
10569
  * collectibles.
@@ -10576,6 +10602,10 @@ declare class ModdedElementSets extends Feature {
10576
10602
  * const guppyCollectibleTypes = getCollectiblesForTransformation(PlayerForm.GUPPY);
10577
10603
  * ```
10578
10604
  *
10605
+ * This function can only be called if at least one callback has been executed. This is because
10606
+ * not all collectibles will necessarily be present when a mod first loads (due to mod load
10607
+ * order).
10608
+ *
10579
10609
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
10580
10610
  */
10581
10611
  getCollectiblesForTransformation(playerForm: PlayerForm): ReadonlySet<CollectibleType>;
@@ -10587,6 +10617,10 @@ declare class ModdedElementSets extends Feature {
10587
10617
  * not all collectibles will necessarily be present when a mod first loads (due to mod load
10588
10618
  * order).
10589
10619
  *
10620
+ * This function can only be called if at least one callback has been executed. This is because
10621
+ * not all collectibles will necessarily be present when a mod first loads (due to mod load
10622
+ * order).
10623
+ *
10590
10624
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
10591
10625
  */
10592
10626
  getCollectiblesWithCacheFlag(cacheFlag: CacheFlag): ReadonlySet<CollectibleType>;
@@ -10600,6 +10634,10 @@ declare class ModdedElementSets extends Feature {
10600
10634
  * const offensiveCollectibleTypes = getCollectibleTypesWithTag(ItemConfigTag.OFFENSIVE);
10601
10635
  * ```
10602
10636
  *
10637
+ * This function can only be called if at least one callback has been executed. This is because
10638
+ * not all collectibles will necessarily be present when a mod first loads (due to mod load
10639
+ * order).
10640
+ *
10603
10641
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
10604
10642
  */
10605
10643
  getCollectiblesWithTag(itemConfigTag: ItemConfigTag): ReadonlySet<CollectibleType>;
@@ -10607,6 +10645,10 @@ declare class ModdedElementSets extends Feature {
10607
10645
  * Returns a set containing every valid passive item that can be randomly granted to Eden as a
10608
10646
  * starting item.
10609
10647
  *
10648
+ * This function can only be called if at least one callback has been executed. This is because
10649
+ * not all collectibles will necessarily be present when a mod first loads (due to mod load
10650
+ * order).
10651
+ *
10610
10652
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
10611
10653
  */
10612
10654
  getEdenActiveCollectibles(): ReadonlySet<CollectibleType>;
@@ -10614,6 +10656,10 @@ declare class ModdedElementSets extends Feature {
10614
10656
  * Returns a set containing every valid passive item that can be randomly granted to Eden as a
10615
10657
  * starting item.
10616
10658
  *
10659
+ * This function can only be called if at least one callback has been executed. This is because
10660
+ * not all collectibles will necessarily be present when a mod first loads (due to mod load
10661
+ * order).
10662
+ *
10617
10663
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
10618
10664
  */
10619
10665
  getEdenPassiveCollectibles(): ReadonlySet<CollectibleType>;
@@ -10624,6 +10670,10 @@ declare class ModdedElementSets extends Feature {
10624
10670
  * Collectibles that only grant flight conditionally are manually pruned. Collectibles such as
10625
10671
  * Empty Vessel should be checked for via the `hasFlyingTemporaryEffect` function.
10626
10672
  *
10673
+ * This function can only be called if at least one callback has been executed. This is because
10674
+ * not all collectibles will necessarily be present when a mod first loads (due to mod load
10675
+ * order).
10676
+ *
10627
10677
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
10628
10678
  *
10629
10679
  * @param pruneConditionalItems Whether or not collectibles that only grant flight conditionally
@@ -10634,9 +10684,36 @@ declare class ModdedElementSets extends Feature {
10634
10684
  * Returns a set of all of the trinkets that grant flight. (All trinkets that grant flight do so
10635
10685
  * conditionally, like Bat Wing and Azazel's Stump.)
10636
10686
  *
10687
+ * This function can only be called if at least one callback has been executed. This is because
10688
+ * not all trinkets will necessarily be present when a mod first loads (due to mod load order).
10689
+ *
10637
10690
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
10638
10691
  */
10639
10692
  getFlyingTrinkets(): ReadonlySet<TrinketType>;
10693
+ /**
10694
+ * Returns an array containing every modded card type in the game.
10695
+ *
10696
+ * Use this if you need to iterate over the cards in order. If you need to do O(1) lookups, then
10697
+ * use the `getModdedCardSet` helper function instead.
10698
+ *
10699
+ * This function can only be called if at least one callback has been executed. This is because
10700
+ * not all cards will necessarily be present when a mod first loads (due to mod load order).
10701
+ *
10702
+ * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
10703
+ */
10704
+ getModdedCardArray(): readonly CardType[];
10705
+ /**
10706
+ * Returns a set containing every modded card type in the game.
10707
+ *
10708
+ * Use this if you need to do O(1) lookups. If you need to iterate over the cards in order, then
10709
+ * use the `getModdedCardArray` helper function instead.
10710
+ *
10711
+ * This function can only be called if at least one callback has been executed. This is because
10712
+ * not all cards will necessarily be present when a mod first loads (due to mod load order).
10713
+ *
10714
+ * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
10715
+ */
10716
+ getModdedCardSet(): ReadonlySet<CardType>;
10640
10717
  /**
10641
10718
  * Returns an array containing every modded collectible type in the game.
10642
10719
  *
@@ -10664,10 +10741,10 @@ declare class ModdedElementSets extends Feature {
10664
10741
  */
10665
10742
  getModdedCollectibleSet(): ReadonlySet<CollectibleType>;
10666
10743
  /**
10667
- * Returns an array containing every valid trinket type in the game, including modded trinkets.
10744
+ * Returns an array containing every modded trinket type in the game.
10668
10745
  *
10669
10746
  * Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups,
10670
- * then use the `getTrinketSet` helper function instead.
10747
+ * then use the `getModdedTrinketSet` helper function instead.
10671
10748
  *
10672
10749
  * This function can only be called if at least one callback has been executed. This is because
10673
10750
  * not all trinkets will necessarily be present when a mod first loads (due to mod load order).
@@ -10676,10 +10753,10 @@ declare class ModdedElementSets extends Feature {
10676
10753
  */
10677
10754
  getModdedTrinketArray(): readonly TrinketType[];
10678
10755
  /**
10679
- * Returns a set containing every valid trinket type in the game, including modded trinkets.
10756
+ * Returns a set containing every modded trinket type in the game.
10680
10757
  *
10681
10758
  * Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order,
10682
- * then use the `getTrinketArray` helper function instead.
10759
+ * then use the `getModdedTrinketArray` helper function instead.
10683
10760
  *
10684
10761
  * This function can only be called if at least one callback has been executed. This is because
10685
10762
  * not all trinkets will necessarily be present when a mod first loads (due to mod load order).
@@ -10743,16 +10820,61 @@ declare class ModdedElementSets extends Feature {
10743
10820
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
10744
10821
  */
10745
10822
  getPlayerTrinketsWithCacheFlag(player: EntityPlayer, cacheFlag: CacheFlag): Map<TrinketType, int>;
10823
+ /**
10824
+ * Has an equal chance of returning any card (e.g. Fool, Reverse Fool, Wild Card, etc.).
10825
+ *
10826
+ * This will not return:
10827
+ * - any runes
10828
+ * - any objects like Dice Shard
10829
+ *
10830
+ * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
10831
+ * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
10832
+ * @param exceptions Optional. An array of cards to not select.
10833
+ */
10834
+ getRandomCard(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
10835
+ /**
10836
+ * @param itemConfigCardType The item config card type that represents the pool of cards to select
10837
+ * from.
10838
+ * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
10839
+ * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
10840
+ * @param exceptions Optional. An array of cards to not select.
10841
+ */
10842
+ getRandomCardTypeOfType(itemConfigCardType: ItemConfigCardType, seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
10843
+ /**
10844
+ * Has an equal chance of returning any rune (e.g. Rune of Hagalaz, Blank Rune, Black Rune, Soul
10845
+ * of Isaac, etc.). This will never return a Rune Shard.
10846
+ *
10847
+ * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
10848
+ * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
10849
+ * @param exceptions Optional. An array of runes to not select.
10850
+ */
10851
+ getRandomRune(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
10746
10852
  /**
10747
10853
  * Returns a random active collectible type that that is a valid starting item for Eden.
10748
10854
  *
10855
+ * This function can only be called if at least one callback has been executed. This is because
10856
+ * not all collectibles will necessarily be present when a mod first loads (due to mod load
10857
+ * order).
10858
+ *
10749
10859
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
10860
+ *
10861
+ * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
10862
+ * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
10863
+ * @param exceptions Optional. An array of runes to not select.
10750
10864
  */
10751
10865
  getRandomEdenActiveCollectible(seedOrRNG?: Seed | RNG, exceptions?: CollectibleType[] | readonly CollectibleType[]): CollectibleType;
10752
10866
  /**
10753
10867
  * Returns a random passive collectible type that that is a valid starting item for Eden.
10754
10868
  *
10869
+ * This function can only be called if at least one callback has been executed. This is because
10870
+ * not all collectibles will necessarily be present when a mod first loads (due to mod load
10871
+ * order).
10872
+ *
10755
10873
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
10874
+ *
10875
+ * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
10876
+ * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
10877
+ * @param exceptions Optional. An array of runes to not select.
10756
10878
  */
10757
10879
  getRandomEdenPassiveCollectible(seedOrRNG?: Seed | RNG, exceptions?: CollectibleType[] | readonly CollectibleType[]): CollectibleType;
10758
10880
  /**
@@ -10789,6 +10911,24 @@ declare class ModdedElementSets extends Feature {
10789
10911
  * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
10790
10912
  */
10791
10913
  getTrinketsWithCacheFlag(cacheFlag: CacheFlag): ReadonlySet<TrinketType>;
10914
+ /**
10915
+ * Returns an array containing every valid vanilla card type in the game.
10916
+ *
10917
+ * Use this if you need to iterate over the cards in order. If you need to do O(1) lookups, then
10918
+ * use the `getVanillaCardSet` helper function instead.
10919
+ *
10920
+ * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
10921
+ */
10922
+ getVanillaCardArray(): readonly CardType[];
10923
+ /**
10924
+ * Returns a set containing every valid vanilla card type in the game.
10925
+ *
10926
+ * Use this if you need to do O(1) lookups. If you need to iterate over the cards in order, then
10927
+ * use the `getVanillaCardArray` helper function instead.
10928
+ *
10929
+ * In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
10930
+ */
10931
+ getVanillaCardSet(): ReadonlySet<CardType>;
10792
10932
  /**
10793
10933
  * Returns an array containing every valid vanilla collectible type in the game.
10794
10934
  *
@@ -10924,7 +11064,8 @@ export declare class ModUpgradedBase implements Mod {
10924
11064
  * `ModCallback.POST_UPDATE` event corresponds to being executed once at the end of every game
10925
11065
  * logic frame.
10926
11066
  */
10927
- AddCallback<T extends ModCallback>(modCallback: T, ...args: AddCallbackParameters[T]): void;
11067
+ AddCallback<T extends ModCallback | string>(modCallback: T, ...args: T extends ModCallback ? AddCallbackParameters[T] : unknown[]): void;
11068
+ AddPriorityCallback<T extends ModCallback | string>(modCallback: T, priority: CallbackPriority | int, ...args: T extends ModCallback ? AddCallbackParameters[T] : unknown[]): void;
10928
11069
  /** Returns whether or not a corresponding "save#.dat" file exists for the current mod. */
10929
11070
  HasData(): boolean;
10930
11071
  /**
@@ -11222,6 +11363,7 @@ declare class Pause extends Feature {
11222
11363
  private postUpdate;
11223
11364
  private stopTearsAndProjectilesFromMoving;
11224
11365
  private inputActionGetActionValue;
11366
+ isPaused(): boolean;
11225
11367
  /**
11226
11368
  * Helper function to emulate what happens when the player pauses the game. Use the `unpause`
11227
11369
  * function to return things back to normal.