isaacscript-common 15.0.0 → 15.0.2

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 (64) hide show
  1. package/dist/index.d.ts +236 -13
  2. package/dist/isaacscript-common.lua +3 -2
  3. package/dist/src/classes/callbacks/PostPlayerInitFirst.d.ts.map +1 -1
  4. package/dist/src/classes/callbacks/PostPlayerInitFirst.lua +2 -1
  5. package/dist/src/classes/features/callbackLogic/CustomGridEntities.d.ts +15 -0
  6. package/dist/src/classes/features/callbackLogic/CustomGridEntities.d.ts.map +1 -1
  7. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.d.ts +43 -0
  8. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.d.ts.map +1 -1
  9. package/dist/src/classes/features/callbackLogic/GameReorderedCallbacks.lua +7 -0
  10. package/dist/src/classes/features/other/CharacterHealthConversion.d.ts +3 -0
  11. package/dist/src/classes/features/other/CharacterHealthConversion.d.ts.map +1 -1
  12. package/dist/src/classes/features/other/CharacterStats.d.ts +2 -0
  13. package/dist/src/classes/features/other/CharacterStats.d.ts.map +1 -1
  14. package/dist/src/classes/features/other/CollectibleItemPoolType.d.ts +3 -0
  15. package/dist/src/classes/features/other/CollectibleItemPoolType.d.ts.map +1 -1
  16. package/dist/src/classes/features/other/CustomHotkeys.d.ts +8 -0
  17. package/dist/src/classes/features/other/CustomHotkeys.d.ts.map +1 -1
  18. package/dist/src/classes/features/other/CustomItemPools.d.ts +4 -0
  19. package/dist/src/classes/features/other/CustomItemPools.d.ts.map +1 -1
  20. package/dist/src/classes/features/other/CustomPickups.d.ts +2 -0
  21. package/dist/src/classes/features/other/CustomPickups.d.ts.map +1 -1
  22. package/dist/src/classes/features/other/CustomStages.d.ts +5 -2
  23. package/dist/src/classes/features/other/CustomStages.d.ts.map +1 -1
  24. package/dist/src/classes/features/other/CustomTrapdoors.d.ts +4 -0
  25. package/dist/src/classes/features/other/CustomTrapdoors.d.ts.map +1 -1
  26. package/dist/src/classes/features/other/DebugDisplay.d.ts +99 -9
  27. package/dist/src/classes/features/other/DebugDisplay.d.ts.map +1 -1
  28. package/dist/src/classes/features/other/DeployJSONRoom.d.ts +2 -0
  29. package/dist/src/classes/features/other/DeployJSONRoom.d.ts.map +1 -1
  30. package/dist/src/classes/features/other/DisableAllSound.d.ts +4 -0
  31. package/dist/src/classes/features/other/DisableAllSound.d.ts.map +1 -1
  32. package/dist/src/classes/features/other/SpawnCollectible.d.ts +4 -0
  33. package/dist/src/classes/features/other/SpawnCollectible.d.ts.map +1 -1
  34. package/dist/src/classes/features/other/SpawnRockAltRewards.d.ts +21 -0
  35. package/dist/src/classes/features/other/SpawnRockAltRewards.d.ts.map +1 -1
  36. package/dist/src/classes/features/other/StageHistory.d.ts +11 -1
  37. package/dist/src/classes/features/other/StageHistory.d.ts.map +1 -1
  38. package/dist/src/classes/features/other/StartAmbush.d.ts +2 -0
  39. package/dist/src/classes/features/other/StartAmbush.d.ts.map +1 -1
  40. package/dist/src/classes/features/other/TaintedLazarusPlayers.d.ts +3 -0
  41. package/dist/src/classes/features/other/TaintedLazarusPlayers.d.ts.map +1 -1
  42. package/dist/src/types/ModUpgraded.d.ts +1 -1
  43. package/dist/src/types/ModUpgraded.d.ts.map +1 -1
  44. package/package.json +1 -1
  45. package/src/classes/callbacks/PostPlayerInitFirst.ts +3 -1
  46. package/src/classes/features/callbackLogic/CustomGridEntities.ts +15 -0
  47. package/src/classes/features/callbackLogic/GameReorderedCallbacks.ts +43 -8
  48. package/src/classes/features/other/CharacterHealthConversion.ts +3 -0
  49. package/src/classes/features/other/CharacterStats.ts +2 -0
  50. package/src/classes/features/other/CollectibleItemPoolType.ts +3 -0
  51. package/src/classes/features/other/CustomHotkeys.ts +8 -0
  52. package/src/classes/features/other/CustomItemPools.ts +4 -0
  53. package/src/classes/features/other/CustomPickups.ts +2 -0
  54. package/src/classes/features/other/CustomStages.ts +5 -2
  55. package/src/classes/features/other/CustomTrapdoors.ts +4 -0
  56. package/src/classes/features/other/DebugDisplay.ts +99 -9
  57. package/src/classes/features/other/DeployJSONRoom.ts +2 -0
  58. package/src/classes/features/other/DisableAllSound.ts +4 -0
  59. package/src/classes/features/other/SpawnCollectible.ts +4 -0
  60. package/src/classes/features/other/SpawnRockAltRewards.ts +21 -0
  61. package/src/classes/features/other/StageHistory.ts +11 -1
  62. package/src/classes/features/other/StartAmbush.ts +2 -0
  63. package/src/classes/features/other/TaintedLazarusPlayers.ts +3 -0
  64. package/src/types/ModUpgraded.ts +2 -2
@@ -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.
@@ -400,8 +400,9 @@ export class CustomStages extends Feature {
400
400
  * Helper function to warp to a custom stage/level.
401
401
  *
402
402
  * Custom stages/levels must first be defined in the "tsconfig.json" file. See the documentation
403
- * for
404
- * more details: https://isaacscript.github.io/main/custom-stages/
403
+ * for more details: https://isaacscript.github.io/main/custom-stages/
404
+ *
405
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_STAGES`.
405
406
  *
406
407
  * @param name The name of the custom stage, corresponding to what is in the "tsconfig.json" file.
407
408
  * @param firstFloor Optional. Whether to go to the first floor or the second floor. For example,
@@ -489,6 +490,8 @@ export class CustomStages extends Feature {
489
490
  /**
490
491
  * Helper function to disable the custom stage. This is typically called before taking the player
491
492
  * to a vanilla floor.
493
+ *
494
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_STAGES`.
492
495
  */
493
496
  @Exported
494
497
  public disableCustomStage(): void {
@@ -630,6 +630,8 @@ export class CustomTrapdoors extends Feature {
630
630
  * Registration is needed so that custom trapdoors can be serializable when the player saves and
631
631
  * quits.
632
632
  *
633
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_TRAPDOORS`.
634
+ *
633
635
  * @param destinationName The integer that identifies the type of custom trapdoor. It should
634
636
  * correspond to a local `CustomTrapdoorType` enum in your mod. The integer
635
637
  * can be any unique value and can safely overlap with values chosen by
@@ -669,6 +671,8 @@ export class CustomTrapdoors extends Feature {
669
671
  * Under the hood, the custom trapdoor is represented by a decoration grid entity and is manually
670
672
  * respawned every time the player re-enters the room.
671
673
  *
674
+ * In order to use this function, you must upgrade your mod with `ISCFeature.CUSTOM_TRAPDOORS`.
675
+ *
672
676
  * @param gridIndexOrPosition The location in the room to spawn the trapdoor.
673
677
  * @param destinationName Optional. A string representing the name of the of destination that the
674
678
  * custom trapdoor will take the player to. Default is undefined, which
@@ -59,6 +59,8 @@ export class DebugDisplay extends Feature {
59
59
  * If the "togglePlayerDisplay" function is called, text will be drawn on the screen next to each
60
60
  * player. Use this function to specify a callback function that returns the string that should be
61
61
  * drawn.
62
+ *
63
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
62
64
  */
63
65
  @Exported
64
66
  public setPlayerDisplay(
@@ -71,6 +73,8 @@ export class DebugDisplay extends Feature {
71
73
  * If the "toggleTearDisplay" function is called, text will be drawn on the screen next to each
72
74
  * tear. Use this function to specify a callback function that returns the string that should be
73
75
  * drawn.
76
+ *
77
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
74
78
  */
75
79
  @Exported
76
80
  public setTearDisplay(textCallback: (tear: EntityTear) => string): void {
@@ -81,6 +85,8 @@ export class DebugDisplay extends Feature {
81
85
  * If the "toggleFamiliarDisplay" function is called, text will be drawn on the screen next to
82
86
  * each familiar. Use this function to specify a callback function that returns the string that
83
87
  * should be drawn.
88
+ *
89
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
84
90
  */
85
91
  @Exported
86
92
  public setFamiliarDisplay(
@@ -93,6 +99,8 @@ export class DebugDisplay extends Feature {
93
99
  * If the "toggleBombDisplay" function is called, text will be drawn on the screen next to each
94
100
  * bomb. Use this function to specify a callback function that returns the string that should be
95
101
  * drawn.
102
+ *
103
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
96
104
  */
97
105
  @Exported
98
106
  public setBombDisplay(textCallback: (bomb: EntityBomb) => string): void {
@@ -103,6 +111,8 @@ export class DebugDisplay extends Feature {
103
111
  * If the "togglePickupDisplay" function is called, text will be drawn on the screen next to each
104
112
  * pickup. Use this function to specify a callback function that returns the string that should be
105
113
  * drawn.
114
+ *
115
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
106
116
  */
107
117
  @Exported
108
118
  public setPickupDisplay(
@@ -115,6 +125,8 @@ export class DebugDisplay extends Feature {
115
125
  * If the "toggleSlotDisplay" function is called, text will be drawn on the screen next to each
116
126
  * slot. Use this function to specify a callback function that returns the string that should be
117
127
  * drawn.
128
+ *
129
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
118
130
  */
119
131
  @Exported
120
132
  public setSlotDisplay(textCallback: (slot: Entity) => string): void {
@@ -125,6 +137,8 @@ export class DebugDisplay extends Feature {
125
137
  * If the "toggleLaserDisplay" function is called, text will be drawn on the screen next to each
126
138
  * laser. Use this function to specify a callback function that returns the string that should be
127
139
  * drawn.
140
+ *
141
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
128
142
  */
129
143
  @Exported
130
144
  public setLaserDisplay(textCallback: (laser: EntityLaser) => string): void {
@@ -135,6 +149,8 @@ export class DebugDisplay extends Feature {
135
149
  * If the "toggleKnifeDisplay" function is called, text will be drawn on the screen next to each
136
150
  * knife. Use this function to specify a callback function that returns the string that should be
137
151
  * drawn.
152
+ *
153
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
138
154
  */
139
155
  @Exported
140
156
  public setKnifeDisplay(textCallback: (knife: EntityKnife) => string): void {
@@ -145,6 +161,8 @@ export class DebugDisplay extends Feature {
145
161
  * If the "toggleProjectileDisplay" function is called, text will be drawn on the screen next to
146
162
  * each projectile. Use this function to specify a callback function that returns the string that
147
163
  * should be drawn.
164
+ *
165
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
148
166
  */
149
167
  @Exported
150
168
  public setProjectileDisplay(
@@ -157,6 +175,8 @@ export class DebugDisplay extends Feature {
157
175
  * If the "extra console commands" feature is specified, the "effectDisplay" console command will
158
176
  * draw text on the screen next to each effect. Use this function to specify a callback function
159
177
  * that returns the string that should be drawn.
178
+ *
179
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
160
180
  */
161
181
  @Exported
162
182
  public setEffectDisplay(
@@ -169,6 +189,8 @@ export class DebugDisplay extends Feature {
169
189
  * If the "toggleNPCDisplay" function is called, text will be drawn on the screen next to each
170
190
  * NPC. Use this function to specify a callback function that returns the string that should be
171
191
  * drawn.
192
+ *
193
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
172
194
  */
173
195
  @Exported
174
196
  public setNPCDisplay(textCallback: (npc: EntityNPC) => string): void {
@@ -179,6 +201,8 @@ export class DebugDisplay extends Feature {
179
201
  * If the "toggleRockDisplay" function is called, text will be drawn on the screen next to each
180
202
  * rock. Use this function to specify a callback function that returns the string that should be
181
203
  * drawn.
204
+ *
205
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
182
206
  */
183
207
  @Exported
184
208
  public setRockDisplay(textCallback: (rock: GridEntityRock) => string): void {
@@ -189,6 +213,8 @@ export class DebugDisplay extends Feature {
189
213
  * If the "togglePitDisplay" function is called, text will be drawn on the screen next to each
190
214
  * pit. Use this function to specify a callback function that returns the string that should be
191
215
  * drawn.
216
+ *
217
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
192
218
  */
193
219
  @Exported
194
220
  public setPitDisplay(textCallback: (pit: GridEntityPit) => string): void {
@@ -199,6 +225,8 @@ export class DebugDisplay extends Feature {
199
225
  * If the "toggleSpikesDisplay" function is called, text will be drawn on the screen next to each
200
226
  * spikes. Use this function to specify a callback function that returns the string that should be
201
227
  * drawn.
228
+ *
229
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
202
230
  */
203
231
  @Exported
204
232
  public setSpikesDisplay(
@@ -211,6 +239,8 @@ export class DebugDisplay extends Feature {
211
239
  * If the "toggleTNTDisplay" function is called, text will be drawn on the screen next to each
212
240
  * TNT. Use this function to specify a callback function that returns the string that should be
213
241
  * drawn.
242
+ *
243
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
214
244
  */
215
245
  @Exported
216
246
  public setTNTDisplay(textCallback: (tnt: GridEntityTNT) => string): void {
@@ -221,6 +251,8 @@ export class DebugDisplay extends Feature {
221
251
  * If the "togglePoopDisplay" function is called, text will be drawn on the screen next to each
222
252
  * poop. Use this function to specify a callback function that returns the string that should be
223
253
  * drawn.
254
+ *
255
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
224
256
  */
225
257
  @Exported
226
258
  public setPoopDisplay(textCallback: (poop: GridEntityPoop) => string): void {
@@ -231,6 +263,8 @@ export class DebugDisplay extends Feature {
231
263
  * If the "toggleDoorDisplay" function is called, text will be drawn on the screen next to each
232
264
  * door. Use this function to specify a callback function that returns the string that should be
233
265
  * drawn.
266
+ *
267
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
234
268
  */
235
269
  @Exported
236
270
  public setDoorDisplay(textCallback: (door: GridEntityDoor) => string): void {
@@ -241,6 +275,8 @@ export class DebugDisplay extends Feature {
241
275
  * If the "togglePressurePlateDisplay" function is called, text will be drawn on the screen next
242
276
  * to each pressure plate. Use this function to specify a callback function that returns the
243
277
  * string that should be drawn.
278
+ *
279
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
244
280
  */
245
281
  @Exported
246
282
  public setPressurePlateDisplay(
@@ -265,13 +301,19 @@ export class DebugDisplay extends Feature {
265
301
 
266
302
  /**
267
303
  * Toggles the debug display for players, which will draw text on the screen next to each player.
304
+ *
305
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
268
306
  */
269
307
  @Exported
270
308
  public togglePlayerDisplay(): void {
271
309
  this.toggleFeature(this.player, "player");
272
310
  }
273
311
 
274
- /** Toggles the debug display for tears, which will draw text on the screen next to each tear. */
312
+ /**
313
+ * Toggles the debug display for tears, which will draw text on the screen next to each tear.
314
+ *
315
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
316
+ */
275
317
  @Exported
276
318
  public toggleTearDisplay(): void {
277
319
  this.toggleFeature(this.tear, "tear");
@@ -280,13 +322,19 @@ export class DebugDisplay extends Feature {
280
322
  /**
281
323
  * Toggles the debug display for familiars, which will draw text on the screen next to each
282
324
  * familiar.
325
+ *
326
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
283
327
  */
284
328
  @Exported
285
329
  public toggleFamiliarDisplay(): void {
286
330
  this.toggleFeature(this.familiar, "familiar");
287
331
  }
288
332
 
289
- /** Toggles the debug display for bombs, which will draw text on the screen next to each bomb. */
333
+ /**
334
+ * Toggles the debug display for bombs, which will draw text on the screen next to each bomb.
335
+ *
336
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
337
+ */
290
338
  @Exported
291
339
  public toggleBombDisplay(): void {
292
340
  this.toggleFeature(this.bomb, "bomb");
@@ -294,13 +342,19 @@ export class DebugDisplay extends Feature {
294
342
 
295
343
  /**
296
344
  * Toggles the debug display for pickups, which will draw text on the screen next to each pickup.
345
+ *
346
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
297
347
  */
298
348
  @Exported
299
349
  public togglePickupDisplay(): void {
300
350
  this.toggleFeature(this.pickup, "pickup");
301
351
  }
302
352
 
303
- /** Toggles the debug display for slots, which will draw text on the screen next to each slot. */
353
+ /**
354
+ * Toggles the debug display for slots, which will draw text on the screen next to each slot.
355
+ *
356
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
357
+ */
304
358
  @Exported
305
359
  public toggleSlotDisplay(): void {
306
360
  this.toggleFeature(this.slot, "slot");
@@ -308,6 +362,8 @@ export class DebugDisplay extends Feature {
308
362
 
309
363
  /**
310
364
  * Toggles the debug display for lasers, which will draw text on the screen next to each laser.
365
+ *
366
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
311
367
  */
312
368
  @Exported
313
369
  public toggleLaserDisplay(): void {
@@ -316,6 +372,8 @@ export class DebugDisplay extends Feature {
316
372
 
317
373
  /**
318
374
  * Toggles the debug display for knives, which will draw text on the screen next to each knife.
375
+ *
376
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
319
377
  */
320
378
  @Exported
321
379
  public toggleKnifeDisplay(): void {
@@ -325,6 +383,8 @@ export class DebugDisplay extends Feature {
325
383
  /**
326
384
  * Toggles the debug display for projectiles, which will draw text on the screen next to each
327
385
  * projectile.
386
+ *
387
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
328
388
  */
329
389
  @Exported
330
390
  public toggleProjectileDisplay(): void {
@@ -333,25 +393,39 @@ export class DebugDisplay extends Feature {
333
393
 
334
394
  /**
335
395
  * Toggles the debug display for effects, which will draw text on the screen next to each effect.
396
+ *
397
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
336
398
  */
337
399
  @Exported
338
400
  public toggleEffectDisplay(): void {
339
401
  this.toggleFeature(this.effect, "effect");
340
402
  }
341
403
 
342
- /** Toggles the debug display for NPCs, which will draw text on the screen next to each NPC. */
404
+ /**
405
+ * Toggles the debug display for NPCs, which will draw text on the screen next to each NPC.
406
+ *
407
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
408
+ */
343
409
  @Exported
344
410
  public toggleNPCDisplay(): void {
345
411
  this.toggleFeature(this.npc, "NPC");
346
412
  }
347
413
 
348
- /** Toggles the debug display for rocks, which will draw text on the screen next to each rock. */
414
+ /**
415
+ * Toggles the debug display for rocks, which will draw text on the screen next to each rock.
416
+ *
417
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
418
+ */
349
419
  @Exported
350
420
  public toggleRockDisplay(): void {
351
421
  this.toggleFeature(this.rock, "rock");
352
422
  }
353
423
 
354
- /** Toggles the debug display for pits, which will draw text on the screen next to each pit. */
424
+ /**
425
+ * Toggles the debug display for pits, which will draw text on the screen next to each pit.
426
+ *
427
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
428
+ */
355
429
  @Exported
356
430
  public togglePitDisplay(): void {
357
431
  this.toggleFeature(this.pit, "pit");
@@ -359,25 +433,39 @@ export class DebugDisplay extends Feature {
359
433
 
360
434
  /**
361
435
  * Toggles the debug display for spikes, which will draw text on the screen next to each spike.
436
+ *
437
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
362
438
  */
363
439
  @Exported
364
440
  public toggleSpikesDisplay(): void {
365
441
  this.toggleFeature(this.spikes, "spikes");
366
442
  }
367
443
 
368
- /** Toggles the debug display for TNT, which will draw text on the screen next to each TNT. */
444
+ /**
445
+ * Toggles the debug display for TNT, which will draw text on the screen next to each TNT.
446
+ *
447
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
448
+ */
369
449
  @Exported
370
450
  public toggleTNTDisplay(): void {
371
451
  this.toggleFeature(this.tnt, "tnt");
372
452
  }
373
453
 
374
- /** Toggles the debug display for poops, which will draw text on the screen next to each poop. */
454
+ /**
455
+ * Toggles the debug display for poops, which will draw text on the screen next to each poop.
456
+ *
457
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
458
+ */
375
459
  @Exported
376
460
  public togglePoopDisplay(): void {
377
461
  this.toggleFeature(this.poop, "poop");
378
462
  }
379
463
 
380
- /** Toggles the debug display for doors, which will draw text on the screen next to each door. */
464
+ /**
465
+ * Toggles the debug display for doors, which will draw text on the screen next to each door.
466
+ *
467
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
468
+ */
381
469
  @Exported
382
470
  public toggleDoorDisplay(): void {
383
471
  this.toggleFeature(this.door, "door");
@@ -386,6 +474,8 @@ export class DebugDisplay extends Feature {
386
474
  /**
387
475
  * Toggles the debug display for pressure plates, which will draw text on the screen next to each
388
476
  * pressure plate.
477
+ *
478
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
389
479
  */
390
480
  @Exported
391
481
  public togglePressurePlateDisplay(): void {
@@ -216,6 +216,8 @@ export class DeployJSONRoom extends Feature {
216
216
  * }
217
217
  * ```
218
218
  *
219
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DEPLOY_JSON_ROOM`.
220
+ *
219
221
  * @param jsonRoom The JSON room to deploy.
220
222
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
221
223
  * the `RNG.Next` method will be called. Default is `getRandomSeed()`.
@@ -37,6 +37,8 @@ export class DisableAllSound extends Feature {
37
37
  *
38
38
  * Use this function to set things back to normal after having used `disableAllSounds`.
39
39
  *
40
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DISABLE_ALL_SOUND`.
41
+ *
40
42
  * @param key The name of the mod feature that is requesting the enable/disable. This is needed so
41
43
  * that multiple mod features can work in tandem.
42
44
  */
@@ -61,6 +63,8 @@ export class DisableAllSound extends Feature {
61
63
  *
62
64
  * Use the `enableAllSounds` helper function to set things back to normal.
63
65
  *
66
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DISABLE_ALL_SOUND`.
67
+ *
64
68
  * @param key The name of the mod feature that is requesting the enable/disable. This is needed so
65
69
  * that multiple mod features can work in tandem.
66
70
  */
@@ -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 {