isaacscript-common 15.0.0 → 15.0.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.
Files changed (46) hide show
  1. package/dist/index.d.ts +122 -2
  2. package/dist/isaacscript-common.lua +1 -1
  3. package/dist/src/classes/features/callbackLogic/CustomGridEntities.d.ts +15 -0
  4. package/dist/src/classes/features/callbackLogic/CustomGridEntities.d.ts.map +1 -1
  5. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.d.ts +43 -0
  6. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.d.ts.map +1 -1
  7. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.lua +7 -0
  8. package/dist/src/classes/features/other/CharacterHealthConversion.d.ts +3 -0
  9. package/dist/src/classes/features/other/CharacterHealthConversion.d.ts.map +1 -1
  10. package/dist/src/classes/features/other/CharacterStats.d.ts +2 -0
  11. package/dist/src/classes/features/other/CharacterStats.d.ts.map +1 -1
  12. package/dist/src/classes/features/other/CollectibleItemPoolType.d.ts +3 -0
  13. package/dist/src/classes/features/other/CollectibleItemPoolType.d.ts.map +1 -1
  14. package/dist/src/classes/features/other/CustomHotkeys.d.ts +8 -0
  15. package/dist/src/classes/features/other/CustomHotkeys.d.ts.map +1 -1
  16. package/dist/src/classes/features/other/CustomItemPools.d.ts +4 -0
  17. package/dist/src/classes/features/other/CustomItemPools.d.ts.map +1 -1
  18. package/dist/src/classes/features/other/CustomPickups.d.ts +2 -0
  19. package/dist/src/classes/features/other/CustomPickups.d.ts.map +1 -1
  20. package/dist/src/classes/features/other/SpawnCollectible.d.ts +4 -0
  21. package/dist/src/classes/features/other/SpawnCollectible.d.ts.map +1 -1
  22. package/dist/src/classes/features/other/SpawnRockAltRewards.d.ts +21 -0
  23. package/dist/src/classes/features/other/SpawnRockAltRewards.d.ts.map +1 -1
  24. package/dist/src/classes/features/other/StageHistory.d.ts +11 -1
  25. package/dist/src/classes/features/other/StageHistory.d.ts.map +1 -1
  26. package/dist/src/classes/features/other/StartAmbush.d.ts +2 -0
  27. package/dist/src/classes/features/other/StartAmbush.d.ts.map +1 -1
  28. package/dist/src/classes/features/other/TaintedLazarusPlayers.d.ts +3 -0
  29. package/dist/src/classes/features/other/TaintedLazarusPlayers.d.ts.map +1 -1
  30. package/dist/src/types/ModUpgraded.d.ts +1 -1
  31. package/dist/src/types/ModUpgraded.d.ts.map +1 -1
  32. package/package.json +1 -1
  33. package/src/classes/features/callbackLogic/CustomGridEntities.ts +15 -0
  34. package/src/classes/features/callbackLogic/GameReorderedCallbacks.ts +43 -8
  35. package/src/classes/features/other/CharacterHealthConversion.ts +3 -0
  36. package/src/classes/features/other/CharacterStats.ts +2 -0
  37. package/src/classes/features/other/CollectibleItemPoolType.ts +3 -0
  38. package/src/classes/features/other/CustomHotkeys.ts +8 -0
  39. package/src/classes/features/other/CustomItemPools.ts +4 -0
  40. package/src/classes/features/other/CustomPickups.ts +2 -0
  41. package/src/classes/features/other/SpawnCollectible.ts +4 -0
  42. package/src/classes/features/other/SpawnRockAltRewards.ts +21 -0
  43. package/src/classes/features/other/StageHistory.ts +11 -1
  44. package/src/classes/features/other/StartAmbush.ts +2 -0
  45. package/src/classes/features/other/TaintedLazarusPlayers.ts +3 -0
  46. package/src/types/ModUpgraded.ts +2 -2
package/dist/index.d.ts CHANGED
@@ -1036,6 +1036,9 @@ declare class CharacterHealthConversion extends Feature {
1036
1036
  * containers --> soul hearts) or Dark Judas (red heart containers --> black hearts).
1037
1037
  *
1038
1038
  * Call this function once at the beginning of your mod to declare the health conversion type.
1039
+ *
1040
+ * In order to use this function, you must upgrade your mod with
1041
+ * `ISCFeature.CHARACTER_HEALTH_CONVERSION`.
1039
1042
  */
1040
1043
  registerCharacterHealthConversion(playerType: PlayerType, conversionHeartSubType: ConversionHeartSubType): void;
1041
1044
  }
@@ -1068,6 +1071,8 @@ declare class CharacterStats extends Feature {
1068
1071
  *
1069
1072
  * Note that the format for the `CacheFlag.FIRE_DELAY` value should be in the tears stat format,
1070
1073
  * not the `MaxFireDelay` format.
1074
+ *
1075
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CHARACTER_STATS`.
1071
1076
  */
1072
1077
  registerCharacterStats(playerType: PlayerType, statMap: Map<CacheFlag, number> | ReadonlyMap<CacheFlag, number>): void;
1073
1078
  }
@@ -1228,6 +1233,9 @@ declare class CollectibleItemPoolType extends Feature {
1228
1233
  * Helper function to get the item pool type that a given collectible came from. Since there is no
1229
1234
  * native method in the API to get this, we listen in the `PRE_GET_COLLECTIBLE` callback for item
1230
1235
  * pool types, and then assume that the next spawned collectible will match.
1236
+ *
1237
+ * In order to use this function, you must upgrade your mod with
1238
+ * `ISCFeature.COLLECTIBLE_ITEM_POOL_TYPE`.
1231
1239
  */
1232
1240
  getCollectibleItemPoolType(collectible: EntityPickup): ItemPoolType;
1233
1241
  }
@@ -1434,6 +1442,9 @@ declare class CustomGridEntities extends Feature {
1434
1442
  * will reappear if the player leaves and re-enters the room. (It will be manually respawned in
1435
1443
  * the `POST_NEW_ROOM` callback.)
1436
1444
  *
1445
+ * In order to use this function, you must upgrade your mod with
1446
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
1447
+ *
1437
1448
  * Custom grid entities are built on top of real grid entities. You can use any existing grid
1438
1449
  * entity type as a base. For example, if you want to create a custom rock that would be breakable
1439
1450
  * like a normal rock, then you should specify `GridEntityType.ROCK` as the base grid entity type.
@@ -1510,6 +1521,9 @@ declare class CustomGridEntities extends Feature {
1510
1521
  /**
1511
1522
  * Helper function to remove a custom grid entity created by the `spawnCustomGrid` function.
1512
1523
  *
1524
+ * In order to use this function, you must upgrade your mod with
1525
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
1526
+ *
1513
1527
  * @param gridIndexOrPositionOrGridEntity You can specify the custom grid entity to remove by
1514
1528
  * providing the grid index, the room position, or the grid entity
1515
1529
  * itself.
@@ -1526,6 +1540,9 @@ declare class CustomGridEntities extends Feature {
1526
1540
  /**
1527
1541
  * Helper function to get the custom grid entities in the current room. Returns an array of tuples
1528
1542
  * containing the raw decoration grid entity and the associated entity data.
1543
+ *
1544
+ * In order to use this function, you must upgrade your mod with
1545
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
1529
1546
  */
1530
1547
  getCustomGridEntities(): Array<[
1531
1548
  gridEntity: GridEntity,
@@ -1535,11 +1552,17 @@ declare class CustomGridEntities extends Feature {
1535
1552
  * Helper function to get the custom `GridEntityType` from a `GridEntity` or grid index. Returns
1536
1553
  * undefined if the provided `GridEntity` is not a custom grid entity, or if there was not a grid
1537
1554
  * entity on the provided grid index.
1555
+ *
1556
+ * In order to use this function, you must upgrade your mod with
1557
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
1538
1558
  */
1539
1559
  getCustomGridEntityType(gridEntityOrGridIndex: GridEntity | int): GridEntityType | undefined;
1540
1560
  /**
1541
1561
  * Helper function to check if a `GridEntity` is a custom grid entity or if a grid index has a
1542
1562
  * custom grid entity.
1563
+ *
1564
+ * In order to use this function, you must upgrade your mod with
1565
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
1543
1566
  */
1544
1567
  isCustomGridEntity(gridEntityOrGridIndex: GridEntity | int): boolean;
1545
1568
  }
@@ -1568,6 +1591,8 @@ declare class CustomHotkeys extends Feature {
1568
1591
  * hardcoded and is instead the return value of a provided function. This is useful for situations
1569
1592
  * where the key can change (like if end-users can specify a custom hotkey using Mod Config Menu).
1570
1593
  *
1594
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_HOTKEYS`.
1595
+ *
1571
1596
  * @param getKeyFunc The function that returns the key that will trigger the hotkey.
1572
1597
  * @param triggerFunc A function containing the arbitrary code that you want to execute when the
1573
1598
  * hotkey is triggered.
@@ -1579,6 +1604,8 @@ declare class CustomHotkeys extends Feature {
1579
1604
  * This can be used to easily set up custom hotkeys to facilitate custom game features or to
1580
1605
  * assist in debugging.
1581
1606
  *
1607
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_HOTKEYS`.
1608
+ *
1582
1609
  * @param keyboard The key that you want to trigger the hotkey.
1583
1610
  * @param triggerFunc A function containing the arbitrary code that you want to execute when the
1584
1611
  * hotkey is triggered.
@@ -1587,6 +1614,8 @@ declare class CustomHotkeys extends Feature {
1587
1614
  /**
1588
1615
  * Helper function to remove a hotkey created with the `setConditionalHotkey` function.
1589
1616
  *
1617
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_HOTKEYS`.
1618
+ *
1590
1619
  * @param getKeyFunc Equal to the `getKeyFunc` that you passed when initially registering the
1591
1620
  * hotkey.
1592
1621
  */
@@ -1594,6 +1623,8 @@ declare class CustomHotkeys extends Feature {
1594
1623
  /**
1595
1624
  * Helper function to remove a hotkey created with the `setHotkey` function.
1596
1625
  *
1626
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_HOTKEYS`.
1627
+ *
1597
1628
  * @param keyboard Equal to the keyboard value that you passed when initially registering the
1598
1629
  * hotkey.
1599
1630
  */
@@ -1625,6 +1656,8 @@ declare class CustomItemPools extends Feature {
1625
1656
  *
1626
1657
  * Note that custom item pools do not currently support partial weight decrementation on sight.
1627
1658
  *
1659
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_ITEM_POOLS`.
1660
+ *
1628
1661
  * @param itemPoolTypeCustom An integer that identifies what kind of item pool you are creating.
1629
1662
  * It should correspond to a local `ItemPoolTypeCustom` enum in your
1630
1663
  * mod. The integer can be any unique value and can safely overlap with
@@ -1643,6 +1676,8 @@ declare class CustomItemPools extends Feature {
1643
1676
  * By default, a collectible will not be removed from the pool once it is selected, unless the
1644
1677
  * `decrease` argument is set to true (similar to how a vanilla item pool works).
1645
1678
  *
1679
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_ITEM_POOLS`.
1680
+ *
1646
1681
  * @param itemPoolTypeCustom An integer representing the custom item pool to use.
1647
1682
  * @param decrease Optional. Whether or not to remove the selected collectible from the item pool.
1648
1683
  * Default is true.
@@ -1674,6 +1709,8 @@ declare class CustomPickups extends Feature {
1674
1709
  * Note that when you specify your custom pickup in the "entities2.xml" file, it should have a
1675
1710
  * type of "5" and be associated with an anm2 file that has a "Collect" animation.
1676
1711
  *
1712
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_PICKUPS`.
1713
+ *
1677
1714
  * @param pickupVariantCustom The variant for the corresponding custom pickup.
1678
1715
  * @param subType The sub-type for the corresponding custom pickup.
1679
1716
  * @param collectFunc The function to run when the player collects this pickup.
@@ -3569,6 +3606,15 @@ export declare const game: Game;
3569
3606
  /** Game frames are what is returned by the `Game.GetFrameCount` method. */
3570
3607
  export declare const GAME_FRAMES_PER_SECOND = 30;
3571
3608
 
3609
+ /**
3610
+ * By default, callbacks fire in the following order:
3611
+ * - `POST_NEW_ROOM` --> `POST_NEW_LEVEL` --> `POST_GAME_STARTED`
3612
+ *
3613
+ * It is easier to write mod code if the callbacks run in a more logical order:
3614
+ * - `POST_GAME_STARTED` --> `POST_NEW_LEVEL` --> `POST_NEW_ROOM`
3615
+ *
3616
+ * Manually reorganize the callback execution so that this is the case.
3617
+ */
3572
3618
  declare class GameReorderedCallbacks extends Feature {
3573
3619
  private currentStage;
3574
3620
  private currentStageType;
@@ -3584,8 +3630,42 @@ declare class GameReorderedCallbacks extends Feature {
3584
3630
  private postNewLevel;
3585
3631
  private postNewRoom;
3586
3632
  private recordCurrentStage;
3633
+ /**
3634
+ * Helper function to tell the `POST_NEW_LEVEL_REORDERED` callback that it should always fire on
3635
+ * the next `POST_NEW_LEVEL`.
3636
+ *
3637
+ * If some specific cases, mods can change the current level during run initialization on the 0th
3638
+ * frame. However, due to how the callback reordering works, the custom `POST_NEW_LEVEL` callback
3639
+ * will never fire on the 0th frame. To get around this, call this function before changing levels
3640
+ * to temporarily force the callback to fire.
3641
+ *
3642
+ * In order to use this function, you must upgrade your mod with
3643
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
3644
+ */
3587
3645
  forceNewLevelCallback(): void;
3646
+ /**
3647
+ * Helper function to tell the `POST_NEW_ROOM_REORDERED` callback that it should always fire on
3648
+ * the next `POST_NEW_ROOM`.
3649
+ *
3650
+ * If some specific cases, mods can change the current room during run initialization on the 0th
3651
+ * frame. However, due to how the callback reordering works, the custom `POST_NEW_ROOM` callback
3652
+ * will never fire on the 0th frame. To get around this, call this function before changing rooms
3653
+ * to temporarily force the callback to fire.
3654
+ *
3655
+ * In order to use this function, you must upgrade your mod with
3656
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
3657
+ */
3588
3658
  forceNewRoomCallback(): void;
3659
+ /**
3660
+ * Helper function to manually set the variable that the reordered callback logic uses to track
3661
+ * the current stage and stage type.
3662
+ *
3663
+ * This is useful because if the stage is changed with the `Game.SetStage` method, the reordered
3664
+ * callbacks will stop working.
3665
+ *
3666
+ * In order to use this function, you must upgrade your mod with
3667
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
3668
+ */
3589
3669
  reorderedCallbacksSetStage(stage: LevelStage, stageType: StageType): void;
3590
3670
  }
3591
3671
 
@@ -10276,7 +10356,7 @@ export declare class ModFeature {
10276
10356
  * By specifying one or more optional features, end-users will get a version of `ModUpgraded` that
10277
10357
  * has extra methods corresponding to the features that were specified.
10278
10358
  */
10279
- export declare type ModUpgraded<T extends readonly ISCFeature[]> = ModUpgradedBase & ISCFeaturesToKeys<T>;
10359
+ export declare type ModUpgraded<T extends readonly ISCFeature[] = []> = ModUpgradedBase & ISCFeaturesToKeys<T>;
10280
10360
 
10281
10361
  /**
10282
10362
  * `isaacscript-common` has many custom callbacks that you can use in your mods. Instead of
@@ -12958,6 +13038,8 @@ declare class SpawnCollectible extends Feature {
12958
13038
  * to be a quest item), then you can use the `spawnCollectibleUnsafe` helper function instead
12959
13039
  * (which does not require an upgraded mod).
12960
13040
  *
13041
+ * In order to use this function, you must upgrade your mod with `ISCFeature.SPAWN_COLLECTIBLE`.
13042
+ *
12961
13043
  * @param collectibleType The collectible type to spawn.
12962
13044
  * @param position The position to spawn the collectible at.
12963
13045
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
@@ -12976,6 +13058,8 @@ declare class SpawnCollectible extends Feature {
12976
13058
  * collectibles costing coins and preventing quest items from being rotated by Tainted Isaac's
12977
13059
  * rotation mechanic.
12978
13060
  *
13061
+ * In order to use this function, you must upgrade your mod with `ISCFeature.SPAWN_COLLECTIBLE`.
13062
+ *
12979
13063
  * @param itemPoolType The item pool to draw the collectible type from.
12980
13064
  * @param position The position to spawn the collectible at.
12981
13065
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
@@ -13185,6 +13269,9 @@ declare class SpawnRockAltRewards extends Feature {
13185
13269
  * The logic in this function is based on the rewards listed on the wiki:
13186
13270
  * https://bindingofisaacrebirth.fandom.com/wiki/Rocks
13187
13271
  *
13272
+ * In order to use this function, you must upgrade your mod with
13273
+ * `ISCFeature.SPAWN_ALT_ROCK_REWARDS`.
13274
+ *
13188
13275
  * @param position The place to spawn the reward.
13189
13276
  * @param rockAltType The type of reward to spawn. For example, `RockAltType.URN` will have a
13190
13277
  * chance at spawning coins and spiders.
@@ -13199,6 +13286,9 @@ declare class SpawnRockAltRewards extends Feature {
13199
13286
  * breaks of `RockAltType.URN`.
13200
13287
  *
13201
13288
  * For more information, see the documentation for the `spawnRockAltReward` function.
13289
+ *
13290
+ * In order to use this function, you must upgrade your mod with
13291
+ * `ISCFeature.SPAWN_ALT_ROCK_REWARDS`.
13202
13292
  */
13203
13293
  spawnRockAltRewardUrn(position: Vector, rng: RNG): boolean;
13204
13294
  /**
@@ -13206,6 +13296,9 @@ declare class SpawnRockAltRewards extends Feature {
13206
13296
  * breaks of `RockAltType.MUSHROOM`.
13207
13297
  *
13208
13298
  * For more information, see the documentation for the `spawnRockAltReward` function.
13299
+ *
13300
+ * In order to use this function, you must upgrade your mod with
13301
+ * `ISCFeature.SPAWN_ALT_ROCK_REWARDS`.
13209
13302
  */
13210
13303
  spawnRockAltRewardMushroom(position: Vector, rng: RNG): boolean;
13211
13304
  /**
@@ -13213,6 +13306,9 @@ declare class SpawnRockAltRewards extends Feature {
13213
13306
  * breaks of `RockAltType.SKULL`.
13214
13307
  *
13215
13308
  * For more information, see the documentation for the `spawnRockAltReward` function.
13309
+ *
13310
+ * In order to use this function, you must upgrade your mod with
13311
+ * `ISCFeature.SPAWN_ALT_ROCK_REWARDS`.
13216
13312
  */
13217
13313
  spawnRockAltRewardSkull(position: Vector, rng: RNG): boolean;
13218
13314
  /**
@@ -13220,6 +13316,9 @@ declare class SpawnRockAltRewards extends Feature {
13220
13316
  * breaks of `RockAltType.POLYP`.
13221
13317
  *
13222
13318
  * For more information, see the documentation for the `spawnRockAltReward` function.
13319
+ *
13320
+ * In order to use this function, you must upgrade your mod with
13321
+ * `ISCFeature.SPAWN_ALT_ROCK_REWARDS`.
13223
13322
  */
13224
13323
  spawnRockAltRewardPolyp(position: Vector, rng: RNG): boolean;
13225
13324
  /**
@@ -13227,6 +13326,9 @@ declare class SpawnRockAltRewards extends Feature {
13227
13326
  * breaks of `RockAltType.BUCKET_DOWNPOUR`.
13228
13327
  *
13229
13328
  * For more information, see the documentation for the `spawnRockAltReward` function.
13329
+ *
13330
+ * In order to use this function, you must upgrade your mod with
13331
+ * `ISCFeature.SPAWN_ALT_ROCK_REWARDS`.
13230
13332
  */
13231
13333
  spawnRockAltRewardBucketDownpour(position: Vector, rng: RNG): boolean;
13232
13334
  /**
@@ -13234,6 +13336,9 @@ declare class SpawnRockAltRewards extends Feature {
13234
13336
  * breaks of `RockAltType.BUCKET_DROSS`.
13235
13337
  *
13236
13338
  * For more information, see the documentation for the `spawnRockAltReward` function.
13339
+ *
13340
+ * In order to use this function, you must upgrade your mod with
13341
+ * `ISCFeature.SPAWN_ALT_ROCK_REWARDS`.
13237
13342
  */
13238
13343
  spawnRockAltRewardBucketDross(position: Vector, rng: RNG): boolean;
13239
13344
  }
@@ -13328,6 +13433,8 @@ declare class StageHistory extends Feature {
13328
13433
  * that the next stage type can be properly calculated on The Ascent (which makes it unlike the
13329
13434
  * `getNextStageType` function).
13330
13435
  *
13436
+ * In order to use this function, you must upgrade your mod with `ISCFeature.STAGE_HISTORY`.
13437
+ *
13331
13438
  * @param upwards Whether or not the player should go up to Cathedral in the case of being on Womb
13332
13439
  * 2. Default is false.
13333
13440
  */
@@ -13339,9 +13446,15 @@ declare class StageHistory extends Feature {
13339
13446
  * This function accounts for the previous floors that a player has visited thus far on the run so
13340
13447
  * that the next stage can be properly calculated on The Ascent (which makes it unlike the
13341
13448
  * `getNextStage` function).
13449
+ *
13450
+ * In order to use this function, you must upgrade your mod with `ISCFeature.STAGE_HISTORY`.
13342
13451
  */
13343
13452
  getNextStageWithHistory(): LevelStage;
13344
- /** Helper function to get all of the stages that a player has visited thus far on this run. */
13453
+ /**
13454
+ * Helper function to get all of the stages that a player has visited thus far on this run.
13455
+ *
13456
+ * In order to use this function, you must upgrade your mod with `ISCFeature.STAGE_HISTORY`.
13457
+ */
13345
13458
  getStageHistory(): ReadonlyArray<[
13346
13459
  stage: LevelStage,
13347
13460
  stageType: StageType
@@ -13350,6 +13463,8 @@ declare class StageHistory extends Feature {
13350
13463
  * Helper function to check if a player has previous visited a particular stage (or stage + stage
13351
13464
  * type combination) on this run.
13352
13465
  *
13466
+ * In order to use this function, you must upgrade your mod with `ISCFeature.STAGE_HISTORY`.
13467
+ *
13353
13468
  * @param stage The stage to check for.
13354
13469
  * @param stageType Optional. If provided, will check for a specific stage and stage type
13355
13470
  * combination.
@@ -13372,6 +13487,8 @@ declare class StartAmbush extends Feature {
13372
13487
  *
13373
13488
  * Specifically, this is performed by spawning a sack on top of the player, waiting a game frame,
13374
13489
  * and then removing the sack and the pickups that the sack dropped.
13490
+ *
13491
+ * In order to use this function, you must upgrade your mod with `ISCFeature.START_AMBUSH`.
13375
13492
  */
13376
13493
  startAmbush(): void;
13377
13494
  }
@@ -13496,6 +13613,9 @@ declare class TaintedLazarusPlayers extends Feature {
13496
13613
  * If you call the `EntityPlayer.Exists` method on the returned object, it will return false.
13497
13614
  * However, you can still call the other methods like you normally would (e.g.
13498
13615
  * `EntityPlayer.AddCollectible`).
13616
+ *
13617
+ * In order to use this function, you must upgrade your mod with
13618
+ * `ISCFeature.CHARACTER_HEALTH_CONVERSION`.
13499
13619
  */
13500
13620
  getTaintedLazarusSubPlayer(player: EntityPlayer): EntityPlayer | undefined;
13501
13621
  }
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 15.0.0
3
+ isaacscript-common 15.0.1
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -10,6 +10,9 @@ export declare class CustomGridEntities extends Feature {
10
10
  * will reappear if the player leaves and re-enters the room. (It will be manually respawned in
11
11
  * the `POST_NEW_ROOM` callback.)
12
12
  *
13
+ * In order to use this function, you must upgrade your mod with
14
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
15
+ *
13
16
  * Custom grid entities are built on top of real grid entities. You can use any existing grid
14
17
  * entity type as a base. For example, if you want to create a custom rock that would be breakable
15
18
  * like a normal rock, then you should specify `GridEntityType.ROCK` as the base grid entity type.
@@ -86,6 +89,9 @@ export declare class CustomGridEntities extends Feature {
86
89
  /**
87
90
  * Helper function to remove a custom grid entity created by the `spawnCustomGrid` function.
88
91
  *
92
+ * In order to use this function, you must upgrade your mod with
93
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
94
+ *
89
95
  * @param gridIndexOrPositionOrGridEntity You can specify the custom grid entity to remove by
90
96
  * providing the grid index, the room position, or the grid entity
91
97
  * itself.
@@ -102,6 +108,9 @@ export declare class CustomGridEntities extends Feature {
102
108
  /**
103
109
  * Helper function to get the custom grid entities in the current room. Returns an array of tuples
104
110
  * containing the raw decoration grid entity and the associated entity data.
111
+ *
112
+ * In order to use this function, you must upgrade your mod with
113
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
105
114
  */
106
115
  getCustomGridEntities(): Array<[
107
116
  gridEntity: GridEntity,
@@ -111,11 +120,17 @@ export declare class CustomGridEntities extends Feature {
111
120
  * Helper function to get the custom `GridEntityType` from a `GridEntity` or grid index. Returns
112
121
  * undefined if the provided `GridEntity` is not a custom grid entity, or if there was not a grid
113
122
  * entity on the provided grid index.
123
+ *
124
+ * In order to use this function, you must upgrade your mod with
125
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
114
126
  */
115
127
  getCustomGridEntityType(gridEntityOrGridIndex: GridEntity | int): GridEntityType | undefined;
116
128
  /**
117
129
  * Helper function to check if a `GridEntity` is a custom grid entity or if a grid index has a
118
130
  * custom grid entity.
131
+ *
132
+ * In order to use this function, you must upgrade your mod with
133
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
119
134
  */
120
135
  isCustomGridEntity(gridEntityOrGridIndex: GridEntity | int): boolean;
121
136
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CustomGridEntities.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/CustomGridEntities.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,kBAAkB,EAClB,cAAc,EAGf,MAAM,8BAA8B,CAAC;AAYtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGhD,qBAAa,kBAAmB,SAAQ,OAAO;IAgB7C,OAAO,CAAC,YAAY,CAAe;IAoBnC,OAAO,CAAC,WAAW,CA4BjB;IAIF,OAAO,CAAC,0BAA0B,CA+ChC;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4EG;IAEI,qBAAqB,CAC1B,oBAAoB,EAAE,cAAc,EACpC,mBAAmB,EAAE,GAAG,GAAG,MAAM,EACjC,kBAAkB,CAAC,EAAE,kBAAkB,EACvC,QAAQ,CAAC,EAAE,MAAM,EACjB,gBAAgB,CAAC,EAAE,MAAM,EACzB,kBAAkB,iBAA4B,EAC9C,qBAAqB,SAAI,GACxB,UAAU;IA8Cb;;;;;;;;;;;;;;OAcG;IAEI,sBAAsB,CAC3B,+BAA+B,EAAE,GAAG,GAAG,MAAM,GAAG,UAAU,EAC1D,UAAU,UAAO,GAChB,UAAU,GAAG,SAAS;IAuCzB;;;OAGG;IAEI,qBAAqB,IAAI,KAAK,CACnC;QAAC,UAAU,EAAE,UAAU;QAAE,IAAI,EAAE,oBAAoB;KAAC,CACrD;IAoBD;;;;OAIG;IAEI,uBAAuB,CAC5B,qBAAqB,EAAE,UAAU,GAAG,GAAG,GACtC,cAAc,GAAG,SAAS;IAyB7B;;;OAGG;IAEI,kBAAkB,CAAC,qBAAqB,EAAE,UAAU,GAAG,GAAG,GAAG,OAAO;CAM5E"}
1
+ {"version":3,"file":"CustomGridEntities.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/CustomGridEntities.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,kBAAkB,EAClB,cAAc,EAGf,MAAM,8BAA8B,CAAC;AAYtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGhD,qBAAa,kBAAmB,SAAQ,OAAO;IAgB7C,OAAO,CAAC,YAAY,CAAe;IAoBnC,OAAO,CAAC,WAAW,CA4BjB;IAIF,OAAO,CAAC,0BAA0B,CA+ChC;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+EG;IAEI,qBAAqB,CAC1B,oBAAoB,EAAE,cAAc,EACpC,mBAAmB,EAAE,GAAG,GAAG,MAAM,EACjC,kBAAkB,CAAC,EAAE,kBAAkB,EACvC,QAAQ,CAAC,EAAE,MAAM,EACjB,gBAAgB,CAAC,EAAE,MAAM,EACzB,kBAAkB,iBAA4B,EAC9C,qBAAqB,SAAI,GACxB,UAAU;IA8Cb;;;;;;;;;;;;;;;;;OAiBG;IAEI,sBAAsB,CAC3B,+BAA+B,EAAE,GAAG,GAAG,MAAM,GAAG,UAAU,EAC1D,UAAU,UAAO,GAChB,UAAU,GAAG,SAAS;IAuCzB;;;;;;OAMG;IAEI,qBAAqB,IAAI,KAAK,CACnC;QAAC,UAAU,EAAE,UAAU;QAAE,IAAI,EAAE,oBAAoB;KAAC,CACrD;IAoBD;;;;;;;OAOG;IAEI,uBAAuB,CAC5B,qBAAqB,EAAE,UAAU,GAAG,GAAG,GACtC,cAAc,GAAG,SAAS;IAyB7B;;;;;;OAMG;IAEI,kBAAkB,CAAC,qBAAqB,EAAE,UAAU,GAAG,GAAG,GAAG,OAAO;CAM5E"}
@@ -1,5 +1,14 @@
1
1
  import { LevelStage, StageType } from "isaac-typescript-definitions";
2
2
  import { Feature } from "../../private/Feature";
3
+ /**
4
+ * By default, callbacks fire in the following order:
5
+ * - `POST_NEW_ROOM` --> `POST_NEW_LEVEL` --> `POST_GAME_STARTED`
6
+ *
7
+ * It is easier to write mod code if the callbacks run in a more logical order:
8
+ * - `POST_GAME_STARTED` --> `POST_NEW_LEVEL` --> `POST_NEW_ROOM`
9
+ *
10
+ * Manually reorganize the callback execution so that this is the case.
11
+ */
3
12
  export declare class GameReorderedCallbacks extends Feature {
4
13
  private currentStage;
5
14
  private currentStageType;
@@ -15,8 +24,42 @@ export declare class GameReorderedCallbacks extends Feature {
15
24
  private postNewLevel;
16
25
  private postNewRoom;
17
26
  private recordCurrentStage;
27
+ /**
28
+ * Helper function to tell the `POST_NEW_LEVEL_REORDERED` callback that it should always fire on
29
+ * the next `POST_NEW_LEVEL`.
30
+ *
31
+ * If some specific cases, mods can change the current level during run initialization on the 0th
32
+ * frame. However, due to how the callback reordering works, the custom `POST_NEW_LEVEL` callback
33
+ * will never fire on the 0th frame. To get around this, call this function before changing levels
34
+ * to temporarily force the callback to fire.
35
+ *
36
+ * In order to use this function, you must upgrade your mod with
37
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
38
+ */
18
39
  forceNewLevelCallback(): void;
40
+ /**
41
+ * Helper function to tell the `POST_NEW_ROOM_REORDERED` callback that it should always fire on
42
+ * the next `POST_NEW_ROOM`.
43
+ *
44
+ * If some specific cases, mods can change the current room during run initialization on the 0th
45
+ * frame. However, due to how the callback reordering works, the custom `POST_NEW_ROOM` callback
46
+ * will never fire on the 0th frame. To get around this, call this function before changing rooms
47
+ * to temporarily force the callback to fire.
48
+ *
49
+ * In order to use this function, you must upgrade your mod with
50
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
51
+ */
19
52
  forceNewRoomCallback(): void;
53
+ /**
54
+ * Helper function to manually set the variable that the reordered callback logic uses to track
55
+ * the current stage and stage type.
56
+ *
57
+ * This is useful because if the stage is changed with the `Game.SetStage` method, the reordered
58
+ * callbacks will stop working.
59
+ *
60
+ * In order to use this function, you must upgrade your mod with
61
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
62
+ */
20
63
  reorderedCallbacksSetStage(stage: LevelStage, stageType: StageType): void;
21
64
  }
22
65
  //# sourceMappingURL=GameReorderedCallbacks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GameReorderedCallbacks.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/GameReorderedCallbacks.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,UAAU,EAEV,SAAS,EACV,MAAM,8BAA8B,CAAC;AAOtC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,qBAAa,sBAAuB,SAAQ,OAAO;IACjD,OAAO,CAAC,YAAY,CAAoB;IACxC,OAAO,CAAC,gBAAgB,CAAoB;IAC5C,OAAO,CAAC,oBAAoB,CAAS;IACrC,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,YAAY,CAAS;IAE7B,OAAO,CAAC,wBAAwB,CAA2B;IAC3D,OAAO,CAAC,qBAAqB,CAAwB;IACrD,OAAO,CAAC,oBAAoB,CAAuB;IACnD,OAAO,CAAC,4BAA4B,CAA+B;IA6BnE,OAAO,CAAC,uBAAuB,CAM7B;IAGF,OAAO,CAAC,eAAe,CAMrB;IAGF,OAAO,CAAC,YAAY,CAYlB;IAGF,OAAO,CAAC,WAAW,CA+BjB;IAEF,OAAO,CAAC,kBAAkB;IAUnB,qBAAqB,IAAI,IAAI;IAK7B,oBAAoB,IAAI,IAAI;IAK5B,0BAA0B,CAC/B,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,SAAS,GACnB,IAAI;CAIR"}
1
+ {"version":3,"file":"GameReorderedCallbacks.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/GameReorderedCallbacks.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAEV,SAAS,EACV,MAAM,8BAA8B,CAAC;AAOtC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD;;;;;;;;GAQG;AACH,qBAAa,sBAAuB,SAAQ,OAAO;IACjD,OAAO,CAAC,YAAY,CAAoB;IACxC,OAAO,CAAC,gBAAgB,CAAoB;IAC5C,OAAO,CAAC,oBAAoB,CAAS;IACrC,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,YAAY,CAAS;IAE7B,OAAO,CAAC,wBAAwB,CAA2B;IAC3D,OAAO,CAAC,qBAAqB,CAAwB;IACrD,OAAO,CAAC,oBAAoB,CAAuB;IACnD,OAAO,CAAC,4BAA4B,CAA+B;IA6BnE,OAAO,CAAC,uBAAuB,CAM7B;IAGF,OAAO,CAAC,eAAe,CAMrB;IAGF,OAAO,CAAC,YAAY,CAYlB;IAGF,OAAO,CAAC,WAAW,CA+BjB;IAEF,OAAO,CAAC,kBAAkB;IAS1B;;;;;;;;;;;OAWG;IAEI,qBAAqB,IAAI,IAAI;IAIpC;;;;;;;;;;;OAWG;IAEI,oBAAoB,IAAI,IAAI;IAInC;;;;;;;;;OASG;IAEI,0BAA0B,CAC/B,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,SAAS,GACnB,IAAI;CAIR"}
@@ -12,6 +12,13 @@ local ____decorators = require("src.decorators")
12
12
  local Exported = ____decorators.Exported
13
13
  local ____Feature = require("src.classes.private.Feature")
14
14
  local Feature = ____Feature.Feature
15
+ --- By default, callbacks fire in the following order:
16
+ -- - `POST_NEW_ROOM` --> `POST_NEW_LEVEL` --> `POST_GAME_STARTED`
17
+ --
18
+ -- It is easier to write mod code if the callbacks run in a more logical order:
19
+ -- - `POST_GAME_STARTED` --> `POST_NEW_LEVEL` --> `POST_NEW_ROOM`
20
+ --
21
+ -- Manually reorganize the callback execution so that this is the case.
15
22
  ____exports.GameReorderedCallbacks = __TS__Class()
16
23
  local GameReorderedCallbacks = ____exports.GameReorderedCallbacks
17
24
  GameReorderedCallbacks.name = "GameReorderedCallbacks"
@@ -10,6 +10,9 @@ export declare class CharacterHealthConversion extends Feature {
10
10
  * containers --> soul hearts) or Dark Judas (red heart containers --> black hearts).
11
11
  *
12
12
  * Call this function once at the beginning of your mod to declare the health conversion type.
13
+ *
14
+ * In order to use this function, you must upgrade your mod with
15
+ * `ISCFeature.CHARACTER_HEALTH_CONVERSION`.
13
16
  */
14
17
  registerCharacterHealthConversion(playerType: PlayerType, conversionHeartSubType: ConversionHeartSubType): void;
15
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CharacterHealthConversion.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/CharacterHealthConversion.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,UAAU,EACX,MAAM,8BAA8B,CAAC;AAItC,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,qBAAa,yBAA0B,SAAQ,OAAO;IACpD,OAAO,CAAC,6BAA6B,CAGjC;IAuBJ,OAAO,CAAC,uBAAuB,CAuB7B;IAGF,OAAO,CAAC,0BAA0B,CAUhC;IAEF;;;;;OAKG;IAEI,iCAAiC,CACtC,UAAU,EAAE,UAAU,EACtB,sBAAsB,EAAE,sBAAsB,GAC7C,IAAI;CASR"}
1
+ {"version":3,"file":"CharacterHealthConversion.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/CharacterHealthConversion.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,UAAU,EACX,MAAM,8BAA8B,CAAC;AAItC,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,qBAAa,yBAA0B,SAAQ,OAAO;IACpD,OAAO,CAAC,6BAA6B,CAGjC;IAuBJ,OAAO,CAAC,uBAAuB,CAuB7B;IAGF,OAAO,CAAC,0BAA0B,CAUhC;IAEF;;;;;;;;OAQG;IAEI,iCAAiC,CACtC,UAAU,EAAE,UAAU,EACtB,sBAAsB,EAAE,sBAAsB,GAC7C,IAAI;CASR"}
@@ -20,6 +20,8 @@ export declare class CharacterStats extends Feature {
20
20
  *
21
21
  * Note that the format for the `CacheFlag.FIRE_DELAY` value should be in the tears stat format,
22
22
  * not the `MaxFireDelay` format.
23
+ *
24
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CHARACTER_STATS`.
23
25
  */
24
26
  registerCharacterStats(playerType: PlayerType, statMap: Map<CacheFlag, number> | ReadonlyMap<CacheFlag, number>): void;
25
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CharacterStats.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/CharacterStats.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,UAAU,EACX,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAIhD,yFAAyF;AACzF,qBAAa,cAAe,SAAQ,OAAO;IACzC,OAAO,CAAC,iBAAiB,CAAkC;IAY3D,OAAO,CAAC,aAAa,CAenB;IAEF;;;;;;;;;;;;;;;;OAgBG;IAEI,sBAAsB,CAC3B,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,GAC/D,IAAI;CAGR"}
1
+ {"version":3,"file":"CharacterStats.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/CharacterStats.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,UAAU,EACX,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAIhD,yFAAyF;AACzF,qBAAa,cAAe,SAAQ,OAAO;IACzC,OAAO,CAAC,iBAAiB,CAAkC;IAY3D,OAAO,CAAC,aAAa,CAenB;IAEF;;;;;;;;;;;;;;;;;;OAkBG;IAEI,sBAAsB,CAC3B,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,GAC/D,IAAI;CAGR"}
@@ -11,6 +11,9 @@ export declare class CollectibleItemPoolType extends Feature {
11
11
  * Helper function to get the item pool type that a given collectible came from. Since there is no
12
12
  * native method in the API to get this, we listen in the `PRE_GET_COLLECTIBLE` callback for item
13
13
  * pool types, and then assume that the next spawned collectible will match.
14
+ *
15
+ * In order to use this function, you must upgrade your mod with
16
+ * `ISCFeature.COLLECTIBLE_ITEM_POOL_TYPE`.
14
17
  */
15
18
  getCollectibleItemPoolType(collectible: EntityPickup): ItemPoolType;
16
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CollectibleItemPoolType.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/CollectibleItemPoolType.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGb,MAAM,8BAA8B,CAAC;AAMtC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD;;;;GAIG;AACH,qBAAa,uBAAwB,SAAQ,OAAO;IAsBlD,OAAO,CAAC,yBAAyB,CAM/B;IAEF;;;;OAIG;IAEI,0BAA0B,CAAC,WAAW,EAAE,YAAY,GAAG,YAAY;CAY3E"}
1
+ {"version":3,"file":"CollectibleItemPoolType.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/CollectibleItemPoolType.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGb,MAAM,8BAA8B,CAAC;AAMtC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD;;;;GAIG;AACH,qBAAa,uBAAwB,SAAQ,OAAO;IAsBlD,OAAO,CAAC,yBAAyB,CAM/B;IAEF;;;;;;;OAOG;IAEI,0BAA0B,CAAC,WAAW,EAAE,YAAY,GAAG,YAAY;CAY3E"}
@@ -24,6 +24,8 @@ export declare class CustomHotkeys extends Feature {
24
24
  * hardcoded and is instead the return value of a provided function. This is useful for situations
25
25
  * where the key can change (like if end-users can specify a custom hotkey using Mod Config Menu).
26
26
  *
27
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_HOTKEYS`.
28
+ *
27
29
  * @param getKeyFunc The function that returns the key that will trigger the hotkey.
28
30
  * @param triggerFunc A function containing the arbitrary code that you want to execute when the
29
31
  * hotkey is triggered.
@@ -35,6 +37,8 @@ export declare class CustomHotkeys extends Feature {
35
37
  * This can be used to easily set up custom hotkeys to facilitate custom game features or to
36
38
  * assist in debugging.
37
39
  *
40
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_HOTKEYS`.
41
+ *
38
42
  * @param keyboard The key that you want to trigger the hotkey.
39
43
  * @param triggerFunc A function containing the arbitrary code that you want to execute when the
40
44
  * hotkey is triggered.
@@ -43,6 +47,8 @@ export declare class CustomHotkeys extends Feature {
43
47
  /**
44
48
  * Helper function to remove a hotkey created with the `setConditionalHotkey` function.
45
49
  *
50
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_HOTKEYS`.
51
+ *
46
52
  * @param getKeyFunc Equal to the `getKeyFunc` that you passed when initially registering the
47
53
  * hotkey.
48
54
  */
@@ -50,6 +56,8 @@ export declare class CustomHotkeys extends Feature {
50
56
  /**
51
57
  * Helper function to remove a hotkey created with the `setHotkey` function.
52
58
  *
59
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_HOTKEYS`.
60
+ *
53
61
  * @param keyboard Equal to the keyboard value that you passed when initially registering the
54
62
  * hotkey.
55
63
  */
@@ -1 +1 @@
1
- {"version":3,"file":"CustomHotkeys.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/CustomHotkeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,MAAM,8BAA8B,CAAC;AAIrE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,qBAAa,aAAc,SAAQ,OAAO;IACxC;;;OAGG;IACH,OAAO,CAAC,uBAAuB,CAAmC;IAElE;;;OAGG;IACH,OAAO,CAAC,wBAAwB,CAG5B;IAEJ,OAAO,CAAC,aAAa,CAA4C;IAYjE,OAAO,CAAC,UAAU,CAiBhB;IAEF,OAAO,CAAC,gBAAgB;IAUxB;;;;;;;;;;;;;OAaG;IAEI,oBAAoB,CACzB,UAAU,EAAE,MAAM,QAAQ,GAAG,SAAS,EACtC,WAAW,EAAE,MAAM,IAAI,GACtB,IAAI;IAUP;;;;;;;;;OASG;IAEI,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,IAAI,GAAG,IAAI;IAUnE;;;;;OAKG;IAEI,sBAAsB,CAAC,UAAU,EAAE,MAAM,QAAQ,GAAG,SAAS,GAAG,IAAI;IAU3E;;;;;OAKG;IAEI,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAS7C"}
1
+ {"version":3,"file":"CustomHotkeys.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/CustomHotkeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,MAAM,8BAA8B,CAAC;AAIrE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,qBAAa,aAAc,SAAQ,OAAO;IACxC;;;OAGG;IACH,OAAO,CAAC,uBAAuB,CAAmC;IAElE;;;OAGG;IACH,OAAO,CAAC,wBAAwB,CAG5B;IAEJ,OAAO,CAAC,aAAa,CAA4C;IAYjE,OAAO,CAAC,UAAU,CAiBhB;IAEF,OAAO,CAAC,gBAAgB;IAUxB;;;;;;;;;;;;;;;OAeG;IAEI,oBAAoB,CACzB,UAAU,EAAE,MAAM,QAAQ,GAAG,SAAS,EACtC,WAAW,EAAE,MAAM,IAAI,GACtB,IAAI;IAUP;;;;;;;;;;;OAWG;IAEI,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,IAAI,GAAG,IAAI;IAUnE;;;;;;;OAOG;IAEI,sBAAsB,CAAC,UAAU,EAAE,MAAM,QAAQ,GAAG,SAAS,GAAG,IAAI;IAU3E;;;;;;;OAOG;IAEI,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAS7C"}
@@ -26,6 +26,8 @@ export declare class CustomItemPools extends Feature {
26
26
  *
27
27
  * Note that custom item pools do not currently support partial weight decrementation on sight.
28
28
  *
29
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_ITEM_POOLS`.
30
+ *
29
31
  * @param itemPoolTypeCustom An integer that identifies what kind of item pool you are creating.
30
32
  * It should correspond to a local `ItemPoolTypeCustom` enum in your
31
33
  * mod. The integer can be any unique value and can safely overlap with
@@ -44,6 +46,8 @@ export declare class CustomItemPools extends Feature {
44
46
  * By default, a collectible will not be removed from the pool once it is selected, unless the
45
47
  * `decrease` argument is set to true (similar to how a vanilla item pool works).
46
48
  *
49
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_ITEM_POOLS`.
50
+ *
47
51
  * @param itemPoolTypeCustom An integer representing the custom item pool to use.
48
52
  * @param decrease Optional. Whether or not to remove the selected collectible from the item pool.
49
53
  * Default is true.
@@ -1 +1 @@
1
- {"version":3,"file":"CustomItemPools.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/CustomItemPools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAO7E,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,qBAAa,eAAgB,SAAQ,OAAO;IAQ1C,OAAO,CAAC,iBAAiB,CAGrB;IAeJ,OAAO,CAAC,wBAAwB,CAM9B;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IAEI,sBAAsB,CAC3B,kBAAkB,EAAE,YAAY,EAChC,YAAY,EAAE,aAAa,CAAC,eAAe,CAAC,GAC3C,IAAI;IAUP;;;;;;;;;;;;;;;OAeG;IAEI,4BAA4B,CACjC,kBAAkB,EAAE,YAAY,EAChC,QAAQ,UAAQ,EAChB,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,WAAW,kBAAuB,GACjC,eAAe;CAuBnB"}
1
+ {"version":3,"file":"CustomItemPools.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/CustomItemPools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAO7E,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,qBAAa,eAAgB,SAAQ,OAAO;IAQ1C,OAAO,CAAC,iBAAiB,CAGrB;IAeJ,OAAO,CAAC,wBAAwB,CAM9B;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IAEI,sBAAsB,CAC3B,kBAAkB,EAAE,YAAY,EAChC,YAAY,EAAE,aAAa,CAAC,eAAe,CAAC,GAC3C,IAAI;IAUP;;;;;;;;;;;;;;;;;OAiBG;IAEI,4BAA4B,CACjC,kBAAkB,EAAE,YAAY,EAChC,QAAQ,UAAQ,EAChB,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,WAAW,kBAAuB,GACjC,eAAe;CAuBnB"}
@@ -20,6 +20,8 @@ export declare class CustomPickups extends Feature {
20
20
  * Note that when you specify your custom pickup in the "entities2.xml" file, it should have a
21
21
  * type of "5" and be associated with an anm2 file that has a "Collect" animation.
22
22
  *
23
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_PICKUPS`.
24
+ *
23
25
  * @param pickupVariantCustom The variant for the corresponding custom pickup.
24
26
  * @param subType The sub-type for the corresponding custom pickup.
25
27
  * @param collectFunc The function to run when the player collects this pickup.
@@ -1 +1 @@
1
- {"version":3,"file":"CustomPickups.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/CustomPickups.ts"],"names":[],"mappings":"AAIA,OAAO,EAIL,aAAa,EACd,MAAM,8BAA8B,CAAC;AAStC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAkBhD,qBAAa,aAAc,SAAQ,OAAO;IACxC,4BAA4B;IAC5B,OAAO,CAAC,wBAAwB,CAA4C;IAgB5E,OAAO,CAAC,kBAAkB,CAqCxB;IAKF,OAAO,CAAC,4BAA4B,CASlC;IAEF;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IAEI,oBAAoB,CACzB,mBAAmB,EAAE,aAAa,EAClC,OAAO,EAAE,GAAG,EACZ,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,KAAK,IAAI,EACvD,aAAa,GAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,KAAK,OAAoB,GACxE,IAAI;CAYR"}
1
+ {"version":3,"file":"CustomPickups.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/CustomPickups.ts"],"names":[],"mappings":"AAIA,OAAO,EAIL,aAAa,EACd,MAAM,8BAA8B,CAAC;AAStC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAkBhD,qBAAa,aAAc,SAAQ,OAAO;IACxC,4BAA4B;IAC5B,OAAO,CAAC,wBAAwB,CAA4C;IAgB5E,OAAO,CAAC,kBAAkB,CAqCxB;IAKF,OAAO,CAAC,4BAA4B,CASlC;IAEF;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IAEI,oBAAoB,CACzB,mBAAmB,EAAE,aAAa,EAClC,OAAO,EAAE,GAAG,EACZ,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,KAAK,IAAI,EACvD,aAAa,GAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,KAAK,OAAoB,GACxE,IAAI;CAYR"}
@@ -13,6 +13,8 @@ export declare class SpawnCollectible extends Feature {
13
13
  * to be a quest item), then you can use the `spawnCollectibleUnsafe` helper function instead
14
14
  * (which does not require an upgraded mod).
15
15
  *
16
+ * In order to use this function, you must upgrade your mod with `ISCFeature.SPAWN_COLLECTIBLE`.
17
+ *
16
18
  * @param collectibleType The collectible type to spawn.
17
19
  * @param position The position to spawn the collectible at.
18
20
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
@@ -31,6 +33,8 @@ export declare class SpawnCollectible extends Feature {
31
33
  * collectibles costing coins and preventing quest items from being rotated by Tainted Isaac's
32
34
  * rotation mechanic.
33
35
  *
36
+ * In order to use this function, you must upgrade your mod with `ISCFeature.SPAWN_COLLECTIBLE`.
37
+ *
34
38
  * @param itemPoolType The item pool to draw the collectible type from.
35
39
  * @param position The position to spawn the collectible at.
36
40
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
@@ -1 +1 @@
1
- {"version":3,"file":"SpawnCollectible.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/SpawnCollectible.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAO7E,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGhD,qBAAa,gBAAiB,SAAQ,OAAO;IAC3C,OAAO,CAAC,0BAA0B,CAA6B;IAW/D;;;;;;;;;;;;;;;;;;;;OAoBG;IAEI,gBAAgB,CACrB,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,OAAO,UAAQ,EACf,aAAa,UAAQ,EACrB,OAAO,CAAC,EAAE,MAAM,GACf,uBAAuB;IAoB1B;;;;;;;;;;;;;;;;OAgBG;IAEI,wBAAwB,CAC7B,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,OAAO,UAAQ,EACf,aAAa,UAAQ,EACrB,OAAO,CAAC,EAAE,MAAM,GACf,uBAAuB;CAa3B"}
1
+ {"version":3,"file":"SpawnCollectible.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/SpawnCollectible.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAO7E,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGhD,qBAAa,gBAAiB,SAAQ,OAAO;IAC3C,OAAO,CAAC,0BAA0B,CAA6B;IAW/D;;;;;;;;;;;;;;;;;;;;;;OAsBG;IAEI,gBAAgB,CACrB,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,OAAO,UAAQ,EACf,aAAa,UAAQ,EACrB,OAAO,CAAC,EAAE,MAAM,GACf,uBAAuB;IAoB1B;;;;;;;;;;;;;;;;;;OAkBG;IAEI,wBAAwB,CAC7B,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,OAAO,UAAQ,EACf,aAAa,UAAQ,EACrB,OAAO,CAAC,EAAE,MAAM,GACf,uBAAuB;CAa3B"}
@@ -26,6 +26,9 @@ export declare class SpawnRockAltRewards extends Feature {
26
26
  * The logic in this function is based on the rewards listed on the wiki:
27
27
  * https://bindingofisaacrebirth.fandom.com/wiki/Rocks
28
28
  *
29
+ * In order to use this function, you must upgrade your mod with
30
+ * `ISCFeature.SPAWN_ALT_ROCK_REWARDS`.
31
+ *
29
32
  * @param position The place to spawn the reward.
30
33
  * @param rockAltType The type of reward to spawn. For example, `RockAltType.URN` will have a
31
34
  * chance at spawning coins and spiders.
@@ -40,6 +43,9 @@ export declare class SpawnRockAltRewards extends Feature {
40
43
  * breaks of `RockAltType.URN`.
41
44
  *
42
45
  * For more information, see the documentation for the `spawnRockAltReward` function.
46
+ *
47
+ * In order to use this function, you must upgrade your mod with
48
+ * `ISCFeature.SPAWN_ALT_ROCK_REWARDS`.
43
49
  */
44
50
  spawnRockAltRewardUrn(position: Vector, rng: RNG): boolean;
45
51
  /**
@@ -47,6 +53,9 @@ export declare class SpawnRockAltRewards extends Feature {
47
53
  * breaks of `RockAltType.MUSHROOM`.
48
54
  *
49
55
  * For more information, see the documentation for the `spawnRockAltReward` function.
56
+ *
57
+ * In order to use this function, you must upgrade your mod with
58
+ * `ISCFeature.SPAWN_ALT_ROCK_REWARDS`.
50
59
  */
51
60
  spawnRockAltRewardMushroom(position: Vector, rng: RNG): boolean;
52
61
  /**
@@ -54,6 +63,9 @@ export declare class SpawnRockAltRewards extends Feature {
54
63
  * breaks of `RockAltType.SKULL`.
55
64
  *
56
65
  * For more information, see the documentation for the `spawnRockAltReward` function.
66
+ *
67
+ * In order to use this function, you must upgrade your mod with
68
+ * `ISCFeature.SPAWN_ALT_ROCK_REWARDS`.
57
69
  */
58
70
  spawnRockAltRewardSkull(position: Vector, rng: RNG): boolean;
59
71
  /**
@@ -61,6 +73,9 @@ export declare class SpawnRockAltRewards extends Feature {
61
73
  * breaks of `RockAltType.POLYP`.
62
74
  *
63
75
  * For more information, see the documentation for the `spawnRockAltReward` function.
76
+ *
77
+ * In order to use this function, you must upgrade your mod with
78
+ * `ISCFeature.SPAWN_ALT_ROCK_REWARDS`.
64
79
  */
65
80
  spawnRockAltRewardPolyp(position: Vector, rng: RNG): boolean;
66
81
  /**
@@ -68,6 +83,9 @@ export declare class SpawnRockAltRewards extends Feature {
68
83
  * breaks of `RockAltType.BUCKET_DOWNPOUR`.
69
84
  *
70
85
  * For more information, see the documentation for the `spawnRockAltReward` function.
86
+ *
87
+ * In order to use this function, you must upgrade your mod with
88
+ * `ISCFeature.SPAWN_ALT_ROCK_REWARDS`.
71
89
  */
72
90
  spawnRockAltRewardBucketDownpour(position: Vector, rng: RNG): boolean;
73
91
  /**
@@ -75,6 +93,9 @@ export declare class SpawnRockAltRewards extends Feature {
75
93
  * breaks of `RockAltType.BUCKET_DROSS`.
76
94
  *
77
95
  * For more information, see the documentation for the `spawnRockAltReward` function.
96
+ *
97
+ * In order to use this function, you must upgrade your mod with
98
+ * `ISCFeature.SPAWN_ALT_ROCK_REWARDS`.
78
99
  */
79
100
  spawnRockAltRewardBucketDross(position: Vector, rng: RNG): boolean;
80
101
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SpawnRockAltRewards.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/SpawnRockAltRewards.ts"],"names":[],"mappings":";;;AAgBA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAkBzD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAwBhD,qBAAa,mBAAoB,SAAQ,OAAO;IAC9C,OAAO,CAAC,iBAAiB,CAAoB;IAW7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IAEI,kBAAkB,CACvB,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,WAAW,EACxB,SAAS,GAAE,IAAI,GAAG,GAAqB,GACtC,OAAO;IA8BV;;;;;OAKG;IAEI,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO;IAwDjE;;;;;OAKG;IAEI,0BAA0B,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO;IA+EtE;;;;;OAKG;IAEI,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO;IA6DnE;;;;;OAKG;IAEI,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO;IAoEnE;;;;;OAKG;IAEI,gCAAgC,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO;IA2E5E;;;;;OAKG;IAEI,6BAA6B,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO;CAsE1E"}
1
+ {"version":3,"file":"SpawnRockAltRewards.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/SpawnRockAltRewards.ts"],"names":[],"mappings":";;;AAgBA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAkBzD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAwBhD,qBAAa,mBAAoB,SAAQ,OAAO;IAC9C,OAAO,CAAC,iBAAiB,CAAoB;IAW7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IAEI,kBAAkB,CACvB,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,WAAW,EACxB,SAAS,GAAE,IAAI,GAAG,GAAqB,GACtC,OAAO;IA8BV;;;;;;;;OAQG;IAEI,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO;IAwDjE;;;;;;;;OAQG;IAEI,0BAA0B,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO;IA+EtE;;;;;;;;OAQG;IAEI,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO;IA6DnE;;;;;;;;OAQG;IAEI,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO;IAoEnE;;;;;;;;OAQG;IAEI,gCAAgC,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO;IA2E5E;;;;;;;;OAQG;IAEI,6BAA6B,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO;CAsE1E"}
@@ -10,6 +10,8 @@ export declare class StageHistory extends Feature {
10
10
  * that the next stage type can be properly calculated on The Ascent (which makes it unlike the
11
11
  * `getNextStageType` function).
12
12
  *
13
+ * In order to use this function, you must upgrade your mod with `ISCFeature.STAGE_HISTORY`.
14
+ *
13
15
  * @param upwards Whether or not the player should go up to Cathedral in the case of being on Womb
14
16
  * 2. Default is false.
15
17
  */
@@ -21,9 +23,15 @@ export declare class StageHistory extends Feature {
21
23
  * This function accounts for the previous floors that a player has visited thus far on the run so
22
24
  * that the next stage can be properly calculated on The Ascent (which makes it unlike the
23
25
  * `getNextStage` function).
26
+ *
27
+ * In order to use this function, you must upgrade your mod with `ISCFeature.STAGE_HISTORY`.
24
28
  */
25
29
  getNextStageWithHistory(): LevelStage;
26
- /** Helper function to get all of the stages that a player has visited thus far on this run. */
30
+ /**
31
+ * Helper function to get all of the stages that a player has visited thus far on this run.
32
+ *
33
+ * In order to use this function, you must upgrade your mod with `ISCFeature.STAGE_HISTORY`.
34
+ */
27
35
  getStageHistory(): ReadonlyArray<[
28
36
  stage: LevelStage,
29
37
  stageType: StageType
@@ -32,6 +40,8 @@ export declare class StageHistory extends Feature {
32
40
  * Helper function to check if a player has previous visited a particular stage (or stage + stage
33
41
  * type combination) on this run.
34
42
  *
43
+ * In order to use this function, you must upgrade your mod with `ISCFeature.STAGE_HISTORY`.
44
+ *
35
45
  * @param stage The stage to check for.
36
46
  * @param stageType Optional. If provided, will check for a specific stage and stage type
37
47
  * combination.
@@ -1 +1 @@
1
- {"version":3,"file":"StageHistory.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/StageHistory.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,SAAS,EACV,MAAM,8BAA8B,CAAC;AAUtC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,qBAAa,YAAa,SAAQ,OAAO;IAqBvC,OAAO,CAAC,qBAAqB,CAM3B;IAEF;;;;;;;;;;OAUG;IAEI,2BAA2B,CAAC,OAAO,UAAQ,GAAG,SAAS;IAiG9D;;;;;;;OAOG;IAEI,uBAAuB,IAAI,UAAU;IA8H5C,+FAA+F;IAExF,eAAe,IAAI,aAAa,CACrC;QAAC,KAAK,EAAE,UAAU;QAAE,SAAS,EAAE,SAAS;KAAC,CAC1C;IAID;;;;;;;OAOG;IAEI,eAAe,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO;CAY1E"}
1
+ {"version":3,"file":"StageHistory.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/StageHistory.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,SAAS,EACV,MAAM,8BAA8B,CAAC;AAUtC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,qBAAa,YAAa,SAAQ,OAAO;IAqBvC,OAAO,CAAC,qBAAqB,CAM3B;IAEF;;;;;;;;;;;;OAYG;IAEI,2BAA2B,CAAC,OAAO,UAAQ,GAAG,SAAS;IAiG9D;;;;;;;;;OASG;IAEI,uBAAuB,IAAI,UAAU;IA8H5C;;;;OAIG;IAEI,eAAe,IAAI,aAAa,CACrC;QAAC,KAAK,EAAE,UAAU;QAAE,SAAS,EAAE,SAAS;KAAC,CAC1C;IAID;;;;;;;;;OASG;IAEI,eAAe,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO;CAY1E"}
@@ -6,6 +6,8 @@ export declare class StartAmbush extends Feature {
6
6
  *
7
7
  * Specifically, this is performed by spawning a sack on top of the player, waiting a game frame,
8
8
  * and then removing the sack and the pickups that the sack dropped.
9
+ *
10
+ * In order to use this function, you must upgrade your mod with `ISCFeature.START_AMBUSH`.
9
11
  */
10
12
  startAmbush(): void;
11
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"StartAmbush.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/StartAmbush.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAMhD,qBAAa,WAAY,SAAQ,OAAO;IACtC,OAAO,CAAC,YAAY,CAAe;IAWnC;;;;;OAKG;IAEI,WAAW,IAAI,IAAI;CA+B3B"}
1
+ {"version":3,"file":"StartAmbush.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/StartAmbush.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAMhD,qBAAa,WAAY,SAAQ,OAAO;IACtC,OAAO,CAAC,YAAY,CAAe;IAWnC;;;;;;;OAOG;IAEI,WAAW,IAAI,IAAI;CA+B3B"}
@@ -27,6 +27,9 @@ export declare class TaintedLazarusPlayers extends Feature {
27
27
  * If you call the `EntityPlayer.Exists` method on the returned object, it will return false.
28
28
  * However, you can still call the other methods like you normally would (e.g.
29
29
  * `EntityPlayer.AddCollectible`).
30
+ *
31
+ * In order to use this function, you must upgrade your mod with
32
+ * `ISCFeature.CHARACTER_HEALTH_CONVERSION`.
30
33
  */
31
34
  getTaintedLazarusSubPlayer(player: EntityPlayer): EntityPlayer | undefined;
32
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TaintedLazarusPlayers.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/TaintedLazarusPlayers.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD;;;GAGG;AACH,qBAAa,qBAAsB,SAAQ,OAAO;IAyBhC,gBAAgB,QAAO,OAAO,CAAU;IAYxD,OAAO,CAAC,cAAc,CAYpB;IAEF;;;;;;;;OAQG;IACH,OAAO,CAAC,YAAY;IA6BpB;;;;;;;;;;OAUG;IAEI,0BAA0B,CAC/B,MAAM,EAAE,YAAY,GACnB,YAAY,GAAG,SAAS;CAI5B"}
1
+ {"version":3,"file":"TaintedLazarusPlayers.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/TaintedLazarusPlayers.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD;;;GAGG;AACH,qBAAa,qBAAsB,SAAQ,OAAO;IAyBhC,gBAAgB,QAAO,OAAO,CAAU;IAYxD,OAAO,CAAC,cAAc,CAYpB;IAEF;;;;;;;;OAQG;IACH,OAAO,CAAC,YAAY;IA6BpB;;;;;;;;;;;;;OAaG;IAEI,0BAA0B,CAC/B,MAAM,EAAE,YAAY,GACnB,YAAY,GAAG,SAAS;CAI5B"}
@@ -15,7 +15,7 @@ import { Writeable } from "./Writable";
15
15
  * By specifying one or more optional features, end-users will get a version of `ModUpgraded` that
16
16
  * has extra methods corresponding to the features that were specified.
17
17
  */
18
- export declare type ModUpgraded<T extends readonly ISCFeature[]> = ModUpgradedBase & ISCFeaturesToKeys<T>;
18
+ export declare type ModUpgraded<T extends readonly ISCFeature[] = []> = ModUpgradedBase & ISCFeaturesToKeys<T>;
19
19
  /**
20
20
  * We want to only extract the class public methods, so we omit the keys of the `Feature` base
21
21
  * class.
@@ -1 +1 @@
1
- {"version":3,"file":"ModUpgraded.d.ts","sourceRoot":"","sources":["../../../src/types/ModUpgraded.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC;;;;;;;;;GASG;AACH,oBAAY,WAAW,CAAC,CAAC,SAAS,SAAS,UAAU,EAAE,IAAI,eAAe,GACxE,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAEvB;;;GAGG;AACH,aAAK,iBAAiB,CAAC,CAAC,SAAS,SAAS,UAAU,EAAE,IAAI,IAAI,CAC5D,mBAAmB,CAAC,2BAA2B,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,EAC9D,MAAM,OAAO,CACd,CAAC;AAEF;;;GAGG;AACH,aAAK,2BAA2B,CAAC,CAAC,SAAS,UAAU,EAAE,IAAI;KACxD,CAAC,IAAI,MAAM,CAAC,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACzD,CAAC"}
1
+ {"version":3,"file":"ModUpgraded.d.ts","sourceRoot":"","sources":["../../../src/types/ModUpgraded.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC;;;;;;;;;GASG;AACH,oBAAY,WAAW,CAAC,CAAC,SAAS,SAAS,UAAU,EAAE,GAAG,EAAE,IAC1D,eAAe,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAEzC;;;GAGG;AACH,aAAK,iBAAiB,CAAC,CAAC,SAAS,SAAS,UAAU,EAAE,IAAI,IAAI,CAC5D,mBAAmB,CAAC,2BAA2B,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,EAC9D,MAAM,OAAO,CACd,CAAC;AAEF;;;GAGG;AACH,aAAK,2BAA2B,CAAC,CAAC,SAAS,UAAU,EAAE,IAAI;KACxD,CAAC,IAAI,MAAM,CAAC,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACzD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "15.0.0",
3
+ "version": "15.0.1",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -144,6 +144,9 @@ export class CustomGridEntities extends Feature {
144
144
  * will reappear if the player leaves and re-enters the room. (It will be manually respawned in
145
145
  * the `POST_NEW_ROOM` callback.)
146
146
  *
147
+ * In order to use this function, you must upgrade your mod with
148
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
149
+ *
147
150
  * Custom grid entities are built on top of real grid entities. You can use any existing grid
148
151
  * entity type as a base. For example, if you want to create a custom rock that would be breakable
149
152
  * like a normal rock, then you should specify `GridEntityType.ROCK` as the base grid entity type.
@@ -274,6 +277,9 @@ export class CustomGridEntities extends Feature {
274
277
  /**
275
278
  * Helper function to remove a custom grid entity created by the `spawnCustomGrid` function.
276
279
  *
280
+ * In order to use this function, you must upgrade your mod with
281
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
282
+ *
277
283
  * @param gridIndexOrPositionOrGridEntity You can specify the custom grid entity to remove by
278
284
  * providing the grid index, the room position, or the grid entity
279
285
  * itself.
@@ -332,6 +338,9 @@ export class CustomGridEntities extends Feature {
332
338
  /**
333
339
  * Helper function to get the custom grid entities in the current room. Returns an array of tuples
334
340
  * containing the raw decoration grid entity and the associated entity data.
341
+ *
342
+ * In order to use this function, you must upgrade your mod with
343
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
335
344
  */
336
345
  @Exported
337
346
  public getCustomGridEntities(): Array<
@@ -360,6 +369,9 @@ export class CustomGridEntities extends Feature {
360
369
  * Helper function to get the custom `GridEntityType` from a `GridEntity` or grid index. Returns
361
370
  * undefined if the provided `GridEntity` is not a custom grid entity, or if there was not a grid
362
371
  * entity on the provided grid index.
372
+ *
373
+ * In order to use this function, you must upgrade your mod with
374
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
363
375
  */
364
376
  @Exported
365
377
  public getCustomGridEntityType(
@@ -392,6 +404,9 @@ export class CustomGridEntities extends Feature {
392
404
  /**
393
405
  * Helper function to check if a `GridEntity` is a custom grid entity or if a grid index has a
394
406
  * custom grid entity.
407
+ *
408
+ * In order to use this function, you must upgrade your mod with
409
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
395
410
  */
396
411
  @Exported
397
412
  public isCustomGridEntity(gridEntityOrGridIndex: GridEntity | int): boolean {
@@ -1,11 +1,3 @@
1
- // By default, callbacks fire in the following order:
2
- // - `POST_NEW_ROOM` --> `POST_NEW_LEVEL` --> `POST_GAME_STARTED`
3
-
4
- // It is easier to write mod code if the callbacks run in a more logical order:
5
- // - `POST_GAME_STARTED` --> `POST_NEW_LEVEL` --> `POST_NEW_ROOM`
6
-
7
- // Manually reorganize the callback execution so that this is the case.
8
-
9
1
  import {
10
2
  CollectibleType,
11
3
  LevelStage,
@@ -20,6 +12,15 @@ import { PostNewLevelReordered } from "../../callbacks/PostNewLevelReordered";
20
12
  import { PostNewRoomReordered } from "../../callbacks/PostNewRoomReordered";
21
13
  import { Feature } from "../../private/Feature";
22
14
 
15
+ /**
16
+ * By default, callbacks fire in the following order:
17
+ * - `POST_NEW_ROOM` --> `POST_NEW_LEVEL` --> `POST_GAME_STARTED`
18
+ *
19
+ * It is easier to write mod code if the callbacks run in a more logical order:
20
+ * - `POST_GAME_STARTED` --> `POST_NEW_LEVEL` --> `POST_NEW_ROOM`
21
+ *
22
+ * Manually reorganize the callback execution so that this is the case.
23
+ */
23
24
  export class GameReorderedCallbacks extends Feature {
24
25
  private currentStage: int | null = null;
25
26
  private currentStageType: int | null = null;
@@ -134,16 +135,50 @@ export class GameReorderedCallbacks extends Feature {
134
135
  this.currentStageType = stageType;
135
136
  }
136
137
 
138
+ /**
139
+ * Helper function to tell the `POST_NEW_LEVEL_REORDERED` callback that it should always fire on
140
+ * the next `POST_NEW_LEVEL`.
141
+ *
142
+ * If some specific cases, mods can change the current level during run initialization on the 0th
143
+ * frame. However, due to how the callback reordering works, the custom `POST_NEW_LEVEL` callback
144
+ * will never fire on the 0th frame. To get around this, call this function before changing levels
145
+ * to temporarily force the callback to fire.
146
+ *
147
+ * In order to use this function, you must upgrade your mod with
148
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
149
+ */
137
150
  @Exported
138
151
  public forceNewLevelCallback(): void {
139
152
  this.forceNewLevel = true;
140
153
  }
141
154
 
155
+ /**
156
+ * Helper function to tell the `POST_NEW_ROOM_REORDERED` callback that it should always fire on
157
+ * the next `POST_NEW_ROOM`.
158
+ *
159
+ * If some specific cases, mods can change the current room during run initialization on the 0th
160
+ * frame. However, due to how the callback reordering works, the custom `POST_NEW_ROOM` callback
161
+ * will never fire on the 0th frame. To get around this, call this function before changing rooms
162
+ * to temporarily force the callback to fire.
163
+ *
164
+ * In order to use this function, you must upgrade your mod with
165
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
166
+ */
142
167
  @Exported
143
168
  public forceNewRoomCallback(): void {
144
169
  this.forceNewRoom = true;
145
170
  }
146
171
 
172
+ /**
173
+ * Helper function to manually set the variable that the reordered callback logic uses to track
174
+ * the current stage and stage type.
175
+ *
176
+ * This is useful because if the stage is changed with the `Game.SetStage` method, the reordered
177
+ * callbacks will stop working.
178
+ *
179
+ * In order to use this function, you must upgrade your mod with
180
+ * `ISCFeature.CUSTOM_GRID_ENTITIES`.
181
+ */
147
182
  @Exported
148
183
  public reorderedCallbacksSetStage(
149
184
  stage: LevelStage,
@@ -80,6 +80,9 @@ export class CharacterHealthConversion extends Feature {
80
80
  * containers --> soul hearts) or Dark Judas (red heart containers --> black hearts).
81
81
  *
82
82
  * Call this function once at the beginning of your mod to declare the health conversion type.
83
+ *
84
+ * In order to use this function, you must upgrade your mod with
85
+ * `ISCFeature.CHARACTER_HEALTH_CONVERSION`.
83
86
  */
84
87
  @Exported
85
88
  public registerCharacterHealthConversion(
@@ -56,6 +56,8 @@ export class CharacterStats extends Feature {
56
56
  *
57
57
  * Note that the format for the `CacheFlag.FIRE_DELAY` value should be in the tears stat format,
58
58
  * not the `MaxFireDelay` format.
59
+ *
60
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CHARACTER_STATS`.
59
61
  */
60
62
  @Exported
61
63
  public registerCharacterStats(
@@ -49,6 +49,9 @@ export class CollectibleItemPoolType extends Feature {
49
49
  * Helper function to get the item pool type that a given collectible came from. Since there is no
50
50
  * native method in the API to get this, we listen in the `PRE_GET_COLLECTIBLE` callback for item
51
51
  * pool types, and then assume that the next spawned collectible will match.
52
+ *
53
+ * In order to use this function, you must upgrade your mod with
54
+ * `ISCFeature.COLLECTIBLE_ITEM_POOL_TYPE`.
52
55
  */
53
56
  @Exported
54
57
  public getCollectibleItemPoolType(collectible: EntityPickup): ItemPoolType {
@@ -71,6 +71,8 @@ export class CustomHotkeys extends Feature {
71
71
  * hardcoded and is instead the return value of a provided function. This is useful for situations
72
72
  * where the key can change (like if end-users can specify a custom hotkey using Mod Config Menu).
73
73
  *
74
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_HOTKEYS`.
75
+ *
74
76
  * @param getKeyFunc The function that returns the key that will trigger the hotkey.
75
77
  * @param triggerFunc A function containing the arbitrary code that you want to execute when the
76
78
  * hotkey is triggered.
@@ -95,6 +97,8 @@ export class CustomHotkeys extends Feature {
95
97
  * This can be used to easily set up custom hotkeys to facilitate custom game features or to
96
98
  * assist in debugging.
97
99
  *
100
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_HOTKEYS`.
101
+ *
98
102
  * @param keyboard The key that you want to trigger the hotkey.
99
103
  * @param triggerFunc A function containing the arbitrary code that you want to execute when the
100
104
  * hotkey is triggered.
@@ -113,6 +117,8 @@ export class CustomHotkeys extends Feature {
113
117
  /**
114
118
  * Helper function to remove a hotkey created with the `setConditionalHotkey` function.
115
119
  *
120
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_HOTKEYS`.
121
+ *
116
122
  * @param getKeyFunc Equal to the `getKeyFunc` that you passed when initially registering the
117
123
  * hotkey.
118
124
  */
@@ -130,6 +136,8 @@ export class CustomHotkeys extends Feature {
130
136
  /**
131
137
  * Helper function to remove a hotkey created with the `setHotkey` function.
132
138
  *
139
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_HOTKEYS`.
140
+ *
133
141
  * @param keyboard Equal to the keyboard value that you passed when initially registering the
134
142
  * hotkey.
135
143
  */
@@ -64,6 +64,8 @@ export class CustomItemPools extends Feature {
64
64
  *
65
65
  * Note that custom item pools do not currently support partial weight decrementation on sight.
66
66
  *
67
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_ITEM_POOLS`.
68
+ *
67
69
  * @param itemPoolTypeCustom An integer that identifies what kind of item pool you are creating.
68
70
  * It should correspond to a local `ItemPoolTypeCustom` enum in your
69
71
  * mod. The integer can be any unique value and can safely overlap with
@@ -95,6 +97,8 @@ export class CustomItemPools extends Feature {
95
97
  * By default, a collectible will not be removed from the pool once it is selected, unless the
96
98
  * `decrease` argument is set to true (similar to how a vanilla item pool works).
97
99
  *
100
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_ITEM_POOLS`.
101
+ *
98
102
  * @param itemPoolTypeCustom An integer representing the custom item pool to use.
99
103
  * @param decrease Optional. Whether or not to remove the selected collectible from the item pool.
100
104
  * Default is true.
@@ -120,6 +120,8 @@ export class CustomPickups extends Feature {
120
120
  * Note that when you specify your custom pickup in the "entities2.xml" file, it should have a
121
121
  * type of "5" and be associated with an anm2 file that has a "Collect" animation.
122
122
  *
123
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_PICKUPS`.
124
+ *
123
125
  * @param pickupVariantCustom The variant for the corresponding custom pickup.
124
126
  * @param subType The sub-type for the corresponding custom pickup.
125
127
  * @param collectFunc The function to run when the player collects this pickup.
@@ -31,6 +31,8 @@ export class SpawnCollectible extends Feature {
31
31
  * to be a quest item), then you can use the `spawnCollectibleUnsafe` helper function instead
32
32
  * (which does not require an upgraded mod).
33
33
  *
34
+ * In order to use this function, you must upgrade your mod with `ISCFeature.SPAWN_COLLECTIBLE`.
35
+ *
34
36
  * @param collectibleType The collectible type to spawn.
35
37
  * @param position The position to spawn the collectible at.
36
38
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
@@ -76,6 +78,8 @@ export class SpawnCollectible extends Feature {
76
78
  * collectibles costing coins and preventing quest items from being rotated by Tainted Isaac's
77
79
  * rotation mechanic.
78
80
  *
81
+ * In order to use this function, you must upgrade your mod with `ISCFeature.SPAWN_COLLECTIBLE`.
82
+ *
79
83
  * @param itemPoolType The item pool to draw the collectible type from.
80
84
  * @param position The position to spawn the collectible at.
81
85
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
@@ -89,6 +89,9 @@ export class SpawnRockAltRewards extends Feature {
89
89
  * The logic in this function is based on the rewards listed on the wiki:
90
90
  * https://bindingofisaacrebirth.fandom.com/wiki/Rocks
91
91
  *
92
+ * In order to use this function, you must upgrade your mod with
93
+ * `ISCFeature.SPAWN_ALT_ROCK_REWARDS`.
94
+ *
92
95
  * @param position The place to spawn the reward.
93
96
  * @param rockAltType The type of reward to spawn. For example, `RockAltType.URN` will have a
94
97
  * chance at spawning coins and spiders.
@@ -137,6 +140,9 @@ export class SpawnRockAltRewards extends Feature {
137
140
  * breaks of `RockAltType.URN`.
138
141
  *
139
142
  * For more information, see the documentation for the `spawnRockAltReward` function.
143
+ *
144
+ * In order to use this function, you must upgrade your mod with
145
+ * `ISCFeature.SPAWN_ALT_ROCK_REWARDS`.
140
146
  */
141
147
  @Exported
142
148
  public spawnRockAltRewardUrn(position: Vector, rng: RNG): boolean {
@@ -200,6 +206,9 @@ export class SpawnRockAltRewards extends Feature {
200
206
  * breaks of `RockAltType.MUSHROOM`.
201
207
  *
202
208
  * For more information, see the documentation for the `spawnRockAltReward` function.
209
+ *
210
+ * In order to use this function, you must upgrade your mod with
211
+ * `ISCFeature.SPAWN_ALT_ROCK_REWARDS`.
203
212
  */
204
213
  @Exported
205
214
  public spawnRockAltRewardMushroom(position: Vector, rng: RNG): boolean {
@@ -286,6 +295,9 @@ export class SpawnRockAltRewards extends Feature {
286
295
  * breaks of `RockAltType.SKULL`.
287
296
  *
288
297
  * For more information, see the documentation for the `spawnRockAltReward` function.
298
+ *
299
+ * In order to use this function, you must upgrade your mod with
300
+ * `ISCFeature.SPAWN_ALT_ROCK_REWARDS`.
289
301
  */
290
302
  @Exported
291
303
  public spawnRockAltRewardSkull(position: Vector, rng: RNG): boolean {
@@ -354,6 +366,9 @@ export class SpawnRockAltRewards extends Feature {
354
366
  * breaks of `RockAltType.POLYP`.
355
367
  *
356
368
  * For more information, see the documentation for the `spawnRockAltReward` function.
369
+ *
370
+ * In order to use this function, you must upgrade your mod with
371
+ * `ISCFeature.SPAWN_ALT_ROCK_REWARDS`.
357
372
  */
358
373
  @Exported
359
374
  public spawnRockAltRewardPolyp(position: Vector, rng: RNG): boolean {
@@ -429,6 +444,9 @@ export class SpawnRockAltRewards extends Feature {
429
444
  * breaks of `RockAltType.BUCKET_DOWNPOUR`.
430
445
  *
431
446
  * For more information, see the documentation for the `spawnRockAltReward` function.
447
+ *
448
+ * In order to use this function, you must upgrade your mod with
449
+ * `ISCFeature.SPAWN_ALT_ROCK_REWARDS`.
432
450
  */
433
451
  @Exported
434
452
  public spawnRockAltRewardBucketDownpour(position: Vector, rng: RNG): boolean {
@@ -511,6 +529,9 @@ export class SpawnRockAltRewards extends Feature {
511
529
  * breaks of `RockAltType.BUCKET_DROSS`.
512
530
  *
513
531
  * For more information, see the documentation for the `spawnRockAltReward` function.
532
+ *
533
+ * In order to use this function, you must upgrade your mod with
534
+ * `ISCFeature.SPAWN_ALT_ROCK_REWARDS`.
514
535
  */
515
536
  @Exported
516
537
  public spawnRockAltRewardBucketDross(position: Vector, rng: RNG): boolean {
@@ -51,6 +51,8 @@ export class StageHistory extends Feature {
51
51
  * that the next stage type can be properly calculated on The Ascent (which makes it unlike the
52
52
  * `getNextStageType` function).
53
53
  *
54
+ * In order to use this function, you must upgrade your mod with `ISCFeature.STAGE_HISTORY`.
55
+ *
54
56
  * @param upwards Whether or not the player should go up to Cathedral in the case of being on Womb
55
57
  * 2. Default is false.
56
58
  */
@@ -159,6 +161,8 @@ export class StageHistory extends Feature {
159
161
  * This function accounts for the previous floors that a player has visited thus far on the run so
160
162
  * that the next stage can be properly calculated on The Ascent (which makes it unlike the
161
163
  * `getNextStage` function).
164
+ *
165
+ * In order to use this function, you must upgrade your mod with `ISCFeature.STAGE_HISTORY`.
162
166
  */
163
167
  @Exported
164
168
  public getNextStageWithHistory(): LevelStage {
@@ -287,7 +291,11 @@ export class StageHistory extends Feature {
287
291
  return asNumber(stage) - 1;
288
292
  }
289
293
 
290
- /** Helper function to get all of the stages that a player has visited thus far on this run. */
294
+ /**
295
+ * Helper function to get all of the stages that a player has visited thus far on this run.
296
+ *
297
+ * In order to use this function, you must upgrade your mod with `ISCFeature.STAGE_HISTORY`.
298
+ */
291
299
  @Exported
292
300
  public getStageHistory(): ReadonlyArray<
293
301
  [stage: LevelStage, stageType: StageType]
@@ -299,6 +307,8 @@ export class StageHistory extends Feature {
299
307
  * Helper function to check if a player has previous visited a particular stage (or stage + stage
300
308
  * type combination) on this run.
301
309
  *
310
+ * In order to use this function, you must upgrade your mod with `ISCFeature.STAGE_HISTORY`.
311
+ *
302
312
  * @param stage The stage to check for.
303
313
  * @param stageType Optional. If provided, will check for a specific stage and stage type
304
314
  * combination.
@@ -29,6 +29,8 @@ export class StartAmbush extends Feature {
29
29
  *
30
30
  * Specifically, this is performed by spawning a sack on top of the player, waiting a game frame,
31
31
  * and then removing the sack and the pickups that the sack dropped.
32
+ *
33
+ * In order to use this function, you must upgrade your mod with `ISCFeature.START_AMBUSH`.
32
34
  */
33
35
  @Exported
34
36
  public startAmbush(): void {
@@ -106,6 +106,9 @@ export class TaintedLazarusPlayers extends Feature {
106
106
  * If you call the `EntityPlayer.Exists` method on the returned object, it will return false.
107
107
  * However, you can still call the other methods like you normally would (e.g.
108
108
  * `EntityPlayer.AddCollectible`).
109
+ *
110
+ * In order to use this function, you must upgrade your mod with
111
+ * `ISCFeature.CHARACTER_HEALTH_CONVERSION`.
109
112
  */
110
113
  @Exported
111
114
  public getTaintedLazarusSubPlayer(
@@ -16,8 +16,8 @@ import { Writeable } from "./Writable";
16
16
  * By specifying one or more optional features, end-users will get a version of `ModUpgraded` that
17
17
  * has extra methods corresponding to the features that were specified.
18
18
  */
19
- export type ModUpgraded<T extends readonly ISCFeature[]> = ModUpgradedBase &
20
- ISCFeaturesToKeys<T>;
19
+ export type ModUpgraded<T extends readonly ISCFeature[] = []> =
20
+ ModUpgradedBase & ISCFeaturesToKeys<T>;
21
21
 
22
22
  /**
23
23
  * We want to only extract the class public methods, so we omit the keys of the `Feature` base