isaacscript-common 80.2.0 → 80.2.1
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/dist/classes/callbacks/PostItemDischarge.d.ts.map +1 -1
- package/dist/classes/callbacks/PostItemDischarge.lua +1 -3
- package/dist/classes/features/other/CustomPickups.d.ts.map +1 -1
- package/dist/classes/features/other/CustomPickups.lua +1 -3
- package/dist/classes/features/other/CustomStages.d.ts.map +1 -1
- package/dist/classes/features/other/CustomStages.lua +1 -3
- package/dist/classes/features/other/DeployJSONRoom.d.ts.map +1 -1
- package/dist/classes/features/other/DeployJSONRoom.lua +4 -4
- package/dist/classes/features/other/ModdedElementDetection.d.ts +31 -20
- package/dist/classes/features/other/ModdedElementDetection.d.ts.map +1 -1
- package/dist/classes/features/other/ModdedElementDetection.lua +23 -49
- package/dist/classes/features/other/StageHistory.d.ts.map +1 -1
- package/dist/classes/features/other/StageHistory.lua +1 -3
- package/dist/classes/features/other/extraConsoleCommands/commands.d.ts.map +1 -1
- package/dist/classes/features/other/extraConsoleCommands/commands.lua +1 -6
- package/dist/core/constantsFirstLast.d.ts +29 -6
- package/dist/core/constantsFirstLast.d.ts.map +1 -1
- package/dist/core/constantsFirstLast.lua +18 -3
- package/dist/functions/bosses.d.ts.map +1 -1
- package/dist/functions/bosses.lua +1 -3
- package/dist/functions/doors.d.ts.map +1 -1
- package/dist/functions/doors.lua +5 -7
- package/dist/functions/gridEntities.lua +1 -2
- package/dist/functions/gridEntitiesSpecific.d.ts.map +1 -1
- package/dist/functions/gridEntitiesSpecific.lua +5 -7
- package/dist/functions/nextStage.d.ts.map +1 -1
- package/dist/functions/nextStage.lua +4 -6
- package/dist/functions/npcs.d.ts.map +1 -1
- package/dist/functions/npcs.lua +3 -5
- package/dist/functions/pills.d.ts.map +1 -1
- package/dist/functions/pills.lua +8 -16
- package/dist/functions/pocketItems.d.ts.map +1 -1
- package/dist/functions/pocketItems.lua +1 -3
- package/dist/functions/rooms.d.ts.map +1 -1
- package/dist/functions/rooms.lua +13 -15
- package/dist/functions/stage.lua +2 -6
- package/dist/functions/trinkets.lua +2 -2
- package/dist/functions/types.d.ts +29 -0
- package/dist/functions/types.d.ts.map +1 -1
- package/dist/index.rollup.d.ts +56 -26
- package/dist/isaacscript-common.lua +96 -147
- package/package.json +2 -2
- package/src/classes/callbacks/PostItemDischarge.ts +1 -2
- package/src/classes/features/other/CustomPickups.ts +1 -2
- package/src/classes/features/other/CustomStages.ts +1 -4
- package/src/classes/features/other/DeployJSONRoom.ts +5 -9
- package/src/classes/features/other/ModdedElementDetection.ts +61 -77
- package/src/classes/features/other/StageHistory.ts +1 -2
- package/src/classes/features/other/extraConsoleCommands/commands.ts +2 -6
- package/src/core/constantsFirstLast.ts +29 -6
- package/src/functions/bosses.ts +1 -2
- package/src/functions/doors.ts +5 -6
- package/src/functions/gridEntities.ts +2 -2
- package/src/functions/gridEntitiesSpecific.ts +5 -6
- package/src/functions/nextStage.ts +4 -5
- package/src/functions/npcs.ts +3 -4
- package/src/functions/pills.ts +4 -6
- package/src/functions/pocketItems.ts +1 -2
- package/src/functions/rooms.ts +15 -17
- package/src/functions/stage.ts +3 -3
- package/src/functions/trinkets.ts +2 -2
- package/src/functions/types.ts +30 -0
package/dist/index.rollup.d.ts
CHANGED
|
@@ -10583,24 +10583,47 @@ export declare const LAST_ROOM_TYPE: RoomType;
|
|
|
10583
10583
|
|
|
10584
10584
|
export declare const LAST_STAGE: LevelStage;
|
|
10585
10585
|
|
|
10586
|
-
/**
|
|
10586
|
+
/**
|
|
10587
|
+
* Calculated from the `CardType` enum.
|
|
10588
|
+
*
|
|
10589
|
+
* Note that this could be calculated from the length of the enum, because card types are
|
|
10590
|
+
* contiguous. However, we instead get the highest enum value to be safer and to make the code more
|
|
10591
|
+
* consistent with collectibles and trinkets.
|
|
10592
|
+
*/
|
|
10587
10593
|
export declare const LAST_VANILLA_CARD_TYPE: CardType;
|
|
10588
10594
|
|
|
10589
|
-
/**
|
|
10595
|
+
/**
|
|
10596
|
+
* Calculated from the `PlayerType` enum.
|
|
10597
|
+
*
|
|
10598
|
+
* Note that this could be calculated from the length of the enum, because characters are
|
|
10599
|
+
* contiguous. However, we instead get the highest enum value to be safer and to make the code more
|
|
10600
|
+
* consistent with collectibles and trinkets.
|
|
10601
|
+
*/
|
|
10590
10602
|
export declare const LAST_VANILLA_CHARACTER: PlayerType;
|
|
10591
10603
|
|
|
10592
10604
|
/**
|
|
10593
10605
|
* Calculated from the `CollectibleType` enum.
|
|
10594
10606
|
*
|
|
10595
|
-
* Note that this cannot be calculated from the length of the enum, because
|
|
10596
|
-
*
|
|
10607
|
+
* Note that this cannot be calculated from the length of the enum, because collectible types are
|
|
10608
|
+
* not contiguous.
|
|
10597
10609
|
*/
|
|
10598
10610
|
export declare const LAST_VANILLA_COLLECTIBLE_TYPE: CollectibleType;
|
|
10599
10611
|
|
|
10600
|
-
/**
|
|
10612
|
+
/**
|
|
10613
|
+
* Calculated from the `PillEffect` enum.
|
|
10614
|
+
*
|
|
10615
|
+
* Note that this could be calculated from the length of the enum, because pill effects are
|
|
10616
|
+
* contiguous. However, we instead get the highest enum value to be safer and to make the code more
|
|
10617
|
+
* consistent with collectibles and trinkets.
|
|
10618
|
+
*/
|
|
10601
10619
|
export declare const LAST_VANILLA_PILL_EFFECT: PillEffect;
|
|
10602
10620
|
|
|
10603
|
-
/**
|
|
10621
|
+
/**
|
|
10622
|
+
* Calculated from the `TrinketType` enum.
|
|
10623
|
+
*
|
|
10624
|
+
* Note that this cannot be calculated from the length of the enum, because trinket types are not
|
|
10625
|
+
* contiguous.
|
|
10626
|
+
*/
|
|
10604
10627
|
export declare const LAST_VANILLA_TRINKET_TYPE: TrinketType;
|
|
10605
10628
|
|
|
10606
10629
|
declare type Length<T extends unknown[]> = T extends {
|
|
@@ -13623,7 +13646,7 @@ declare class ModdedElementDetection extends Feature {
|
|
|
13623
13646
|
* Equal to `itemConfig.GetCollectibles().Size - 1`. (`Size` includes invalid collectibles, like
|
|
13624
13647
|
* 666. We subtract one to account for `CollectibleType.NULL`.)
|
|
13625
13648
|
*
|
|
13626
|
-
* If there are no mods present that add any custom
|
|
13649
|
+
* If there are no mods present that add any custom collectibles, this function will return
|
|
13627
13650
|
* `CollectibleType.MOMS_RING` (732).
|
|
13628
13651
|
*
|
|
13629
13652
|
* This function can only be called if at least one callback has been executed. This is because
|
|
@@ -13638,7 +13661,7 @@ declare class ModdedElementDetection extends Feature {
|
|
|
13638
13661
|
getLastCollectibleType(): CollectibleType;
|
|
13639
13662
|
/**
|
|
13640
13663
|
* Returns the total number of collectibles in the item config, including both vanilla and modded
|
|
13641
|
-
*
|
|
13664
|
+
* collectibles. If you just need the number of vanilla collectible types, use the
|
|
13642
13665
|
* `NUM_VANILLA_COLLECTIBLE_TYPES` constant.
|
|
13643
13666
|
*
|
|
13644
13667
|
* This function can only be called if at least one callback has been executed. This is because
|
|
@@ -13696,7 +13719,7 @@ declare class ModdedElementDetection extends Feature {
|
|
|
13696
13719
|
getLastTrinketType(): TrinketType;
|
|
13697
13720
|
/**
|
|
13698
13721
|
* Returns the total number of trinkets in the item config, including both vanilla and modded
|
|
13699
|
-
*
|
|
13722
|
+
* trinkets. If you just need the number of vanilla trinket types, use the
|
|
13700
13723
|
* `NUM_VANILLA_TRINKET_TYPES` constant.
|
|
13701
13724
|
*
|
|
13702
13725
|
* This function can only be called if at least one callback has been executed. This is because
|
|
@@ -13735,11 +13758,14 @@ declare class ModdedElementDetection extends Feature {
|
|
|
13735
13758
|
/**
|
|
13736
13759
|
* Will change depending on how many modded cards there are.
|
|
13737
13760
|
*
|
|
13738
|
-
*
|
|
13739
|
-
*
|
|
13761
|
+
* Equal to `itemConfig.GetCards().Size - 1`. (`Size` includes invalid cards, but since cards are
|
|
13762
|
+
* contiguous, there are no invalid cards. We subtract one to account for `CardType.NULL`.)
|
|
13763
|
+
*
|
|
13764
|
+
* If there are no mods present that add any custom cards, this function will return
|
|
13765
|
+
* `CardType.SOUL_OF_JACOB_AND_ESAU` (97).
|
|
13740
13766
|
*
|
|
13741
13767
|
* This function can only be called if at least one callback has been executed. This is because
|
|
13742
|
-
* not all
|
|
13768
|
+
* not all trinkets will necessarily be present when a mod first loads (due to mod load order).
|
|
13743
13769
|
*
|
|
13744
13770
|
* In order to use this function, you must upgrade your mod with
|
|
13745
13771
|
* `ISCFeature.MODDED_ELEMENT_DETECTION`.
|
|
@@ -13748,9 +13774,8 @@ declare class ModdedElementDetection extends Feature {
|
|
|
13748
13774
|
*/
|
|
13749
13775
|
getLastCardType(): CardType;
|
|
13750
13776
|
/**
|
|
13751
|
-
*
|
|
13752
|
-
*
|
|
13753
|
-
* Equal to `itemConfig.GetCards().Size - 1`. (We subtract one to account for `Card.NULL`.)
|
|
13777
|
+
* Returns the total number of cards in the item config, including both vanilla and modded cards.
|
|
13778
|
+
* If you just need the number of vanilla card types, use the `NUM_VANILLA_CARD_TYPES` constant.
|
|
13754
13779
|
*
|
|
13755
13780
|
* This function can only be called if at least one callback has been executed. This is because
|
|
13756
13781
|
* not all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
@@ -13762,8 +13787,10 @@ declare class ModdedElementDetection extends Feature {
|
|
|
13762
13787
|
*/
|
|
13763
13788
|
getNumCardTypes(): int;
|
|
13764
13789
|
/**
|
|
13790
|
+
* Like vanilla card types, modded card types are always contiguous.
|
|
13791
|
+
*
|
|
13765
13792
|
* This function can only be called if at least one callback has been executed. This is because
|
|
13766
|
-
* not all
|
|
13793
|
+
* not all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
13767
13794
|
*
|
|
13768
13795
|
* In order to use this function, you must upgrade your mod with
|
|
13769
13796
|
* `ISCFeature.MODDED_ELEMENT_DETECTION`.
|
|
@@ -13787,8 +13814,12 @@ declare class ModdedElementDetection extends Feature {
|
|
|
13787
13814
|
/**
|
|
13788
13815
|
* Will change depending on how many modded pill effects there are.
|
|
13789
13816
|
*
|
|
13790
|
-
*
|
|
13791
|
-
*
|
|
13817
|
+
* Equal to `itemConfig.GetPillEffects().Size - 1`. (`Size` includes invalid pill effects, but
|
|
13818
|
+
* since pill effects are contiguous, there are no invalid pill effects. We subtract one to
|
|
13819
|
+
* account for the enum starting at 0 instead of 1.)
|
|
13820
|
+
*
|
|
13821
|
+
* If there are no mods present that add any custom pill effects, this function will return
|
|
13822
|
+
* `PillEffect.EXPERIMENTAL` (49).
|
|
13792
13823
|
*
|
|
13793
13824
|
* This function can only be called if at least one callback has been executed. This is because
|
|
13794
13825
|
* not all pill effects will necessarily be present when a mod first loads (due to mod load
|
|
@@ -13801,14 +13832,12 @@ declare class ModdedElementDetection extends Feature {
|
|
|
13801
13832
|
*/
|
|
13802
13833
|
getLastPillEffect(): PillEffect;
|
|
13803
13834
|
/**
|
|
13804
|
-
*
|
|
13805
|
-
*
|
|
13806
|
-
*
|
|
13807
|
-
* pill effect has an ID of 0 and there is no `PillEffect.NULL`.)
|
|
13835
|
+
* Returns the total number of pill effects in the item config, including both vanilla and modded
|
|
13836
|
+
* pill effects. If you just need the number of vanilla pill effects, use the
|
|
13837
|
+
* `NUM_VANILLA_PILL_EFFECTS` constant.
|
|
13808
13838
|
*
|
|
13809
13839
|
* This function can only be called if at least one callback has been executed. This is because
|
|
13810
|
-
* not all
|
|
13811
|
-
* order).
|
|
13840
|
+
* not all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
13812
13841
|
*
|
|
13813
13842
|
* In order to use this function, you must upgrade your mod with
|
|
13814
13843
|
* `ISCFeature.MODDED_ELEMENT_DETECTION`.
|
|
@@ -13817,9 +13846,10 @@ declare class ModdedElementDetection extends Feature {
|
|
|
13817
13846
|
*/
|
|
13818
13847
|
getNumPillEffects(): int;
|
|
13819
13848
|
/**
|
|
13849
|
+
* Like vanilla pill effects, modded pill effects are always contiguous.
|
|
13850
|
+
*
|
|
13820
13851
|
* This function can only be called if at least one callback has been executed. This is because
|
|
13821
|
-
* not all
|
|
13822
|
-
* order).
|
|
13852
|
+
* not all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
13823
13853
|
*
|
|
13824
13854
|
* In order to use this function, you must upgrade your mod with
|
|
13825
13855
|
* `ISCFeature.MODDED_ELEMENT_DETECTION`.
|