isaacscript-common 6.2.1 → 6.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/callbacks/reorderedCallbacks.d.ts +9 -0
  2. package/callbacks/reorderedCallbacks.lua +9 -0
  3. package/constants.d.ts +9 -0
  4. package/constants.lua +7 -0
  5. package/enums/CornerType.d.ts +6 -0
  6. package/enums/CornerType.lua +11 -0
  7. package/features/customStage/backdrop.d.ts +2 -0
  8. package/features/customStage/backdrop.lua +200 -0
  9. package/features/customStage/boss.d.ts +2 -0
  10. package/features/customStage/boss.lua +74 -0
  11. package/features/customStage/exports.d.ts +1 -0
  12. package/features/customStage/exports.lua +28 -1
  13. package/features/customStage/init.d.ts +2 -1
  14. package/features/customStage/init.lua +39 -10
  15. package/features/customStage/stageAPIBoss.d.ts +29 -0
  16. package/features/customStage/stageAPIBoss.lua +9 -0
  17. package/features/customStage/v.d.ts +7 -0
  18. package/features/customStage/v.lua +2 -0
  19. package/features/debugDisplay/debugDisplay.lua +2 -0
  20. package/features/debugDisplay/exports.d.ts +108 -0
  21. package/features/debugDisplay/exports.lua +145 -0
  22. package/features/debugDisplay/v.d.ts +2 -0
  23. package/features/debugDisplay/v.lua +9 -0
  24. package/features/extraConsoleCommands/init.lua +8 -1
  25. package/features/extraConsoleCommands/listCommands.d.ts +12 -4
  26. package/features/extraConsoleCommands/listCommands.lua +30 -15
  27. package/features/extraConsoleCommands/v.d.ts +1 -0
  28. package/features/extraConsoleCommands/v.lua +2 -1
  29. package/features/pause.d.ts +11 -0
  30. package/features/pause.lua +71 -0
  31. package/features/runNextRoom.d.ts +8 -0
  32. package/features/runNextRoom.lua +40 -0
  33. package/functions/chargeBar.lua +4 -6
  34. package/functions/direction.d.ts +1 -1
  35. package/functions/doors.d.ts +2 -2
  36. package/functions/playerCenter.lua +4 -5
  37. package/functions/playerIndex.d.ts +3 -0
  38. package/functions/playerIndex.lua +3 -0
  39. package/functions/roomShape.d.ts +10 -4
  40. package/functions/roomShape.lua +15 -2
  41. package/functions/sprite.d.ts +1 -1
  42. package/functions/sprite.lua +1 -1
  43. package/index.d.ts +1 -1
  44. package/index.lua +2 -0
  45. package/initFeatures.lua +7 -1
  46. package/interfaces/Corner.d.ts +6 -0
  47. package/interfaces/Corner.lua +2 -0
  48. package/interfaces/CustomStageLua.d.ts +13 -9
  49. package/objects/roomShapeCorners.d.ts +6 -0
  50. package/objects/roomShapeCorners.lua +259 -0
  51. package/objects/roomShapeToBottomRightPosition.d.ts +1 -1
  52. package/objects/roomShapeToTopLeftPosition.d.ts +1 -1
  53. package/package.json +1 -1
  54. package/sets/narrowRoomShapesSet.d.ts +2 -0
  55. package/sets/narrowRoomShapesSet.lua +8 -0
@@ -20,197 +20,305 @@
20
20
  * After using the "playerDisplay" console command, text will be drawn on each player for debugging
21
21
  * purposes. Use this function to specify a callback function that will returns the string that
22
22
  * should be drawn.
23
+ *
24
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
25
+ * mod in order for this console command to work.
23
26
  */
24
27
  export declare function setPlayerDisplay(textCallback: (player: EntityPlayer) => string): void;
25
28
  /**
26
29
  * After using the "tearDisplay" console command, text will be drawn on each tear for debugging
27
30
  * purposes. Use this function to specify a callback function that will returns the string that
28
31
  * should be drawn.
32
+ *
33
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
34
+ * mod in order for this console command to work.
29
35
  */
30
36
  export declare function setTearDisplay(textCallback: (tear: EntityTear) => string): void;
31
37
  /**
32
38
  * After using the "familiarDisplay" console command, text will be drawn on each familiar for
33
39
  * debugging purposes. Use this function to specify a callback function that will returns the string
34
40
  * that should be drawn.
41
+ *
42
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
43
+ * mod in order for this console command to work.
35
44
  */
36
45
  export declare function setFamiliarDisplay(textCallback: (familiar: EntityFamiliar) => string): void;
37
46
  /**
38
47
  * After using the "bombDisplay" console command, text will be drawn on each bomb for debugging
39
48
  * purposes. Use this function to specify a callback function that will returns the string that
40
49
  * should be drawn.
50
+ *
51
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
52
+ * mod in order for this console command to work.
41
53
  */
42
54
  export declare function setBombDisplay(textCallback: (bomb: EntityBomb) => string): void;
43
55
  /**
44
56
  * After using the "pickupDisplay" console command, text will be drawn on each pickup for debugging
45
57
  * purposes. Use this function to specify a callback function that will returns the string that
46
58
  * should be drawn.
59
+ *
60
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
61
+ * mod in order for this console command to work.
47
62
  */
48
63
  export declare function setPickupDisplay(textCallback: (pickup: EntityPickup) => string): void;
49
64
  /**
50
65
  * After using the "slotDisplay" console command, text will be drawn on each slot for debugging
51
66
  * purposes. Use this function to specify a callback function that will returns the string that
52
67
  * should be drawn.
68
+ *
69
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
70
+ * mod in order for this console command to work.
53
71
  */
54
72
  export declare function setSlotDisplay(textCallback: (slot: Entity) => string): void;
55
73
  /**
56
74
  * After using the "laserDisplay" console command, text will be drawn on each laser for debugging
57
75
  * purposes. Use this function to specify a callback function that will returns the string that
58
76
  * should be drawn.
77
+ *
78
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
79
+ * mod in order for this console command to work.
59
80
  */
60
81
  export declare function setLaserDisplay(textCallback: (laser: EntityLaser) => string): void;
61
82
  /**
62
83
  * After using the "knifeDisplay" console command, text will be drawn on each knife for debugging
63
84
  * purposes. Use this function to specify a callback function that will returns the string that
64
85
  * should be drawn.
86
+ *
87
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
88
+ * mod in order for this console command to work.
65
89
  */
66
90
  export declare function setKnifeDisplay(textCallback: (knife: EntityKnife) => string): void;
67
91
  /**
68
92
  * After using the "projectileDisplay" console command, text will be drawn on each projectile for
69
93
  * debugging purposes. Use this function to specify a callback function that will returns the string
70
94
  * that should be drawn.
95
+ *
96
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
97
+ * mod in order for this console command to work.
71
98
  */
72
99
  export declare function setProjectileDisplay(textCallback: (projectile: EntityProjectile) => string): void;
73
100
  /**
74
101
  * After using the "effectDisplay" console command, text will be drawn on each effect for debugging
75
102
  * purposes. Use this function to specify a callback function that will returns the string that
76
103
  * should be drawn.
104
+ *
105
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
106
+ * mod in order for this console command to work.
77
107
  */
78
108
  export declare function setEffectDisplay(textCallback: (effect: EntityEffect) => string): void;
79
109
  /**
80
110
  * After using the "npcDisplay" console command, text will be drawn on each NPC for debugging
81
111
  * purposes. Use this function to specify a callback function that will returns the string that
82
112
  * should be drawn.
113
+ *
114
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
115
+ * mod in order for this console command to work.
83
116
  */
84
117
  export declare function setNPCDisplay(textCallback: (npc: EntityNPC) => string): void;
85
118
  /**
86
119
  * After using the "rockDisplay" console command, text will be drawn on each rock for debugging
87
120
  * purposes. Use this function to specify a callback function that will returns the string that
88
121
  * should be drawn.
122
+ *
123
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
124
+ * mod in order for this console command to work.
89
125
  */
90
126
  export declare function setRockDisplay(textCallback: (rock: GridEntityRock) => string): void;
91
127
  /**
92
128
  * After using the "pitDisplay" console command, text will be drawn on each pit for debugging
93
129
  * purposes. Use this function to specify a callback function that will returns the string that
94
130
  * should be drawn.
131
+ *
132
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
133
+ * mod in order for this console command to work.
95
134
  */
96
135
  export declare function setPitDisplay(textCallback: (pit: GridEntityPit) => string): void;
97
136
  /**
98
137
  * After using the "spikesDisplay" console command, text will be drawn on each spikes for debugging
99
138
  * purposes. Use this function to specify a callback function that will returns the string that
100
139
  * should be drawn.
140
+ *
141
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
142
+ * mod in order for this console command to work.
101
143
  */
102
144
  export declare function setSpikesDisplay(textCallback: (spikes: GridEntitySpikes) => string): void;
103
145
  /**
104
146
  * After using the "tntDisplay" console command, text will be drawn on each TNT for debugging
105
147
  * purposes. Use this function to specify a callback function that will returns the string that
106
148
  * should be drawn.
149
+ *
150
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
151
+ * mod in order for this console command to work.
107
152
  */
108
153
  export declare function setTNTDisplay(textCallback: (tnt: GridEntityTNT) => string): void;
109
154
  /**
110
155
  * After using the "poopDisplay" console command, text will be drawn on each poop for debugging
111
156
  * purposes. Use this function to specify a callback function that will returns the string that
112
157
  * should be drawn.
158
+ *
159
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
160
+ * mod in order for this console command to work.
113
161
  */
114
162
  export declare function setPoopDisplay(textCallback: (poop: GridEntityPoop) => string): void;
115
163
  /**
116
164
  * After using the "poopDisplay" console command, text will be drawn on each poop for debugging
117
165
  * purposes. Use this function to specify a callback function that will returns the string that
118
166
  * should be drawn.
167
+ *
168
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
169
+ * mod in order for this console command to work.
119
170
  */
120
171
  export declare function setDoorDisplay(textCallback: (door: GridEntityDoor) => string): void;
121
172
  /**
122
173
  * After using the "pressurePlateDisplay" console command, text will be drawn on each pressure plate
123
174
  * for debugging purposes. Use this function to specify a callback function that will returns the
124
175
  * string that should be drawn.
176
+ *
177
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
178
+ * mod in order for this console command to work.
125
179
  */
126
180
  export declare function setPressurePlateDisplay(textCallback: (pressurePlate: GridEntityPressurePlate) => string): void;
127
181
  /**
128
182
  * Toggles the debug display for players. This is the function that runs when you use the
129
183
  * "playerDisplay" custom console command.
184
+ *
185
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
186
+ * mod in order for this feature to work.
130
187
  */
131
188
  export declare function togglePlayerDisplay(): void;
132
189
  /**
133
190
  * Toggles the debug display for tears. This is the function that runs when you use the
134
191
  * "tearDisplay" custom console command.
192
+ *
193
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
194
+ * mod in order for this feature to work.
135
195
  */
136
196
  export declare function toggleTearDisplay(): void;
137
197
  /**
138
198
  * Toggles the debug display for familiars. This is the function that runs when you use the
139
199
  * "familiarDisplay" custom console command.
200
+ *
201
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
202
+ * mod in order for this feature to work.
140
203
  */
141
204
  export declare function toggleFamiliarDisplay(): void;
142
205
  /**
143
206
  * Toggles the debug display for bombs. This is the function that runs when you use the
144
207
  * "bombDisplay" custom console command.
208
+ *
209
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
210
+ * mod in order for this feature to work.
145
211
  */
146
212
  export declare function toggleBombDisplay(): void;
147
213
  /**
148
214
  * Toggles the debug display for pickups. This is the function that runs when you use the
149
215
  * "pickupDisplay" custom console command.
216
+ *
217
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
218
+ * mod in order for this feature to work.
150
219
  */
151
220
  export declare function togglePickupDisplay(): void;
152
221
  /**
153
222
  * Toggles the debug display for slots. This is the function that runs when you use the
154
223
  * "slotDisplay" custom console command.
224
+ *
225
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
226
+ * mod in order for this feature to work.
155
227
  */
156
228
  export declare function toggleSlotDisplay(): void;
157
229
  /**
158
230
  * Toggles the debug display for lasers. This is the function that runs when you use the
159
231
  * "laserDisplay" custom console command.
232
+ *
233
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
234
+ * mod in order for this feature to work.
160
235
  */
161
236
  export declare function toggleLaserDisplay(): void;
162
237
  /**
163
238
  * Toggles the debug display for knives. This is the function that runs when you use the
164
239
  * "knifeDisplay" custom console command.
240
+ *
241
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
242
+ * mod in order for this feature to work.
165
243
  */
166
244
  export declare function toggleKnifeDisplay(): void;
167
245
  /**
168
246
  * Toggles the debug display for projectiles. This is the function that runs when you use the
169
247
  * "projectileDisplay" custom console command.
248
+ *
249
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
250
+ * mod in order for this feature to work.
170
251
  */
171
252
  export declare function toggleProjectileDisplay(): void;
172
253
  /**
173
254
  * Toggles the debug display for effects. This is the function that runs when you use the
174
255
  * "effectDisplay" custom console command.
256
+ *
257
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
258
+ * mod in order for this feature to work.
175
259
  */
176
260
  export declare function toggleEffectDisplay(): void;
177
261
  /**
178
262
  * Toggles the debug display for NPCs. This is the function that runs when you use the "npcDisplay"
179
263
  * custom console command.
264
+ *
265
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
266
+ * mod in order for this feature to work.
180
267
  */
181
268
  export declare function toggleNPCDisplay(): void;
182
269
  /**
183
270
  * Toggles the debug display for rocks. This is the function that runs when you use the
184
271
  * "rockDisplay" custom console command.
272
+ *
273
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
274
+ * mod in order for this feature to work.
185
275
  */
186
276
  export declare function toggleRockDisplay(): void;
187
277
  /**
188
278
  * Toggles the debug display for pits. This is the function that runs when you use the "pitDisplay"
189
279
  * custom console command.
280
+ *
281
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
282
+ * mod in order for this feature to work.
190
283
  */
191
284
  export declare function togglePitDisplay(): void;
192
285
  /**
193
286
  * Toggles the debug display for spikes. This is the function that runs when you use the
194
287
  * "spikesDisplay" custom console command.
288
+ *
289
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
290
+ * mod in order for this feature to work.
195
291
  */
196
292
  export declare function toggleSpikesDisplay(): void;
197
293
  /**
198
294
  * Toggles the debug display for TNT. This is the function that runs when you use the "tntDisplay"
199
295
  * custom console command.
296
+ *
297
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
298
+ * mod in order for this feature to work.
200
299
  */
201
300
  export declare function toggleTNTDisplay(): void;
202
301
  /**
203
302
  * Toggles the debug display for poop. This is the function that runs when you use the "poopDisplay"
204
303
  * custom console command.
304
+ *
305
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
306
+ * mod in order for this feature to work.
205
307
  */
206
308
  export declare function togglePoopDisplay(): void;
207
309
  /**
208
310
  * Toggles the debug display for doors. This is the function that runs when you use the
209
311
  * "doorDisplay" custom console command.
312
+ *
313
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
314
+ * mod in order for this feature to work.
210
315
  */
211
316
  export declare function toggleDoorDisplay(): void;
212
317
  /**
213
318
  * Toggles the debug display for pressure plates. This is the function that runs when you use the
214
319
  * "pressurePlateDisplay" custom console command.
320
+ *
321
+ * Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
322
+ * mod in order for this feature to work.
215
323
  */
216
324
  export declare function togglePressurePlateDisplay(): void;
@@ -4,219 +4,364 @@ local printEnabled = ____utils.printEnabled
4
4
  local ____v = require("features.debugDisplay.v")
5
5
  local v = ____v.default
6
6
  local debugDisplayTextCallbacks = ____v.debugDisplayTextCallbacks
7
+ local errorIfDebugDisplayNotInitialized = ____v.errorIfDebugDisplayNotInitialized
7
8
  --- After using the "playerDisplay" console command, text will be drawn on each player for debugging
8
9
  -- purposes. Use this function to specify a callback function that will returns the string that
9
10
  -- should be drawn.
11
+ --
12
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
13
+ -- mod in order for this console command to work.
10
14
  function ____exports.setPlayerDisplay(self, textCallback)
15
+ errorIfDebugDisplayNotInitialized(nil)
11
16
  debugDisplayTextCallbacks.player = textCallback
12
17
  end
13
18
  --- After using the "tearDisplay" console command, text will be drawn on each tear for debugging
14
19
  -- purposes. Use this function to specify a callback function that will returns the string that
15
20
  -- should be drawn.
21
+ --
22
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
23
+ -- mod in order for this console command to work.
16
24
  function ____exports.setTearDisplay(self, textCallback)
25
+ errorIfDebugDisplayNotInitialized(nil)
17
26
  debugDisplayTextCallbacks.tear = textCallback
18
27
  end
19
28
  --- After using the "familiarDisplay" console command, text will be drawn on each familiar for
20
29
  -- debugging purposes. Use this function to specify a callback function that will returns the string
21
30
  -- that should be drawn.
31
+ --
32
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
33
+ -- mod in order for this console command to work.
22
34
  function ____exports.setFamiliarDisplay(self, textCallback)
35
+ errorIfDebugDisplayNotInitialized(nil)
23
36
  debugDisplayTextCallbacks.familiar = textCallback
24
37
  end
25
38
  --- After using the "bombDisplay" console command, text will be drawn on each bomb for debugging
26
39
  -- purposes. Use this function to specify a callback function that will returns the string that
27
40
  -- should be drawn.
41
+ --
42
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
43
+ -- mod in order for this console command to work.
28
44
  function ____exports.setBombDisplay(self, textCallback)
45
+ errorIfDebugDisplayNotInitialized(nil)
29
46
  debugDisplayTextCallbacks.bomb = textCallback
30
47
  end
31
48
  --- After using the "pickupDisplay" console command, text will be drawn on each pickup for debugging
32
49
  -- purposes. Use this function to specify a callback function that will returns the string that
33
50
  -- should be drawn.
51
+ --
52
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
53
+ -- mod in order for this console command to work.
34
54
  function ____exports.setPickupDisplay(self, textCallback)
55
+ errorIfDebugDisplayNotInitialized(nil)
35
56
  debugDisplayTextCallbacks.pickup = textCallback
36
57
  end
37
58
  --- After using the "slotDisplay" console command, text will be drawn on each slot for debugging
38
59
  -- purposes. Use this function to specify a callback function that will returns the string that
39
60
  -- should be drawn.
61
+ --
62
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
63
+ -- mod in order for this console command to work.
40
64
  function ____exports.setSlotDisplay(self, textCallback)
65
+ errorIfDebugDisplayNotInitialized(nil)
41
66
  debugDisplayTextCallbacks.slot = textCallback
42
67
  end
43
68
  --- After using the "laserDisplay" console command, text will be drawn on each laser for debugging
44
69
  -- purposes. Use this function to specify a callback function that will returns the string that
45
70
  -- should be drawn.
71
+ --
72
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
73
+ -- mod in order for this console command to work.
46
74
  function ____exports.setLaserDisplay(self, textCallback)
75
+ errorIfDebugDisplayNotInitialized(nil)
47
76
  debugDisplayTextCallbacks.laser = textCallback
48
77
  end
49
78
  --- After using the "knifeDisplay" console command, text will be drawn on each knife for debugging
50
79
  -- purposes. Use this function to specify a callback function that will returns the string that
51
80
  -- should be drawn.
81
+ --
82
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
83
+ -- mod in order for this console command to work.
52
84
  function ____exports.setKnifeDisplay(self, textCallback)
85
+ errorIfDebugDisplayNotInitialized(nil)
53
86
  debugDisplayTextCallbacks.knife = textCallback
54
87
  end
55
88
  --- After using the "projectileDisplay" console command, text will be drawn on each projectile for
56
89
  -- debugging purposes. Use this function to specify a callback function that will returns the string
57
90
  -- that should be drawn.
91
+ --
92
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
93
+ -- mod in order for this console command to work.
58
94
  function ____exports.setProjectileDisplay(self, textCallback)
95
+ errorIfDebugDisplayNotInitialized(nil)
59
96
  debugDisplayTextCallbacks.projectile = textCallback
60
97
  end
61
98
  --- After using the "effectDisplay" console command, text will be drawn on each effect for debugging
62
99
  -- purposes. Use this function to specify a callback function that will returns the string that
63
100
  -- should be drawn.
101
+ --
102
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
103
+ -- mod in order for this console command to work.
64
104
  function ____exports.setEffectDisplay(self, textCallback)
105
+ errorIfDebugDisplayNotInitialized(nil)
65
106
  debugDisplayTextCallbacks.effect = textCallback
66
107
  end
67
108
  --- After using the "npcDisplay" console command, text will be drawn on each NPC for debugging
68
109
  -- purposes. Use this function to specify a callback function that will returns the string that
69
110
  -- should be drawn.
111
+ --
112
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
113
+ -- mod in order for this console command to work.
70
114
  function ____exports.setNPCDisplay(self, textCallback)
115
+ errorIfDebugDisplayNotInitialized(nil)
71
116
  debugDisplayTextCallbacks.npc = textCallback
72
117
  end
73
118
  --- After using the "rockDisplay" console command, text will be drawn on each rock for debugging
74
119
  -- purposes. Use this function to specify a callback function that will returns the string that
75
120
  -- should be drawn.
121
+ --
122
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
123
+ -- mod in order for this console command to work.
76
124
  function ____exports.setRockDisplay(self, textCallback)
125
+ errorIfDebugDisplayNotInitialized(nil)
77
126
  debugDisplayTextCallbacks.rock = textCallback
78
127
  end
79
128
  --- After using the "pitDisplay" console command, text will be drawn on each pit for debugging
80
129
  -- purposes. Use this function to specify a callback function that will returns the string that
81
130
  -- should be drawn.
131
+ --
132
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
133
+ -- mod in order for this console command to work.
82
134
  function ____exports.setPitDisplay(self, textCallback)
135
+ errorIfDebugDisplayNotInitialized(nil)
83
136
  debugDisplayTextCallbacks.pit = textCallback
84
137
  end
85
138
  --- After using the "spikesDisplay" console command, text will be drawn on each spikes for debugging
86
139
  -- purposes. Use this function to specify a callback function that will returns the string that
87
140
  -- should be drawn.
141
+ --
142
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
143
+ -- mod in order for this console command to work.
88
144
  function ____exports.setSpikesDisplay(self, textCallback)
145
+ errorIfDebugDisplayNotInitialized(nil)
89
146
  debugDisplayTextCallbacks.spikes = textCallback
90
147
  end
91
148
  --- After using the "tntDisplay" console command, text will be drawn on each TNT for debugging
92
149
  -- purposes. Use this function to specify a callback function that will returns the string that
93
150
  -- should be drawn.
151
+ --
152
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
153
+ -- mod in order for this console command to work.
94
154
  function ____exports.setTNTDisplay(self, textCallback)
155
+ errorIfDebugDisplayNotInitialized(nil)
95
156
  debugDisplayTextCallbacks.tnt = textCallback
96
157
  end
97
158
  --- After using the "poopDisplay" console command, text will be drawn on each poop for debugging
98
159
  -- purposes. Use this function to specify a callback function that will returns the string that
99
160
  -- should be drawn.
161
+ --
162
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
163
+ -- mod in order for this console command to work.
100
164
  function ____exports.setPoopDisplay(self, textCallback)
165
+ errorIfDebugDisplayNotInitialized(nil)
101
166
  debugDisplayTextCallbacks.poop = textCallback
102
167
  end
103
168
  --- After using the "poopDisplay" console command, text will be drawn on each poop for debugging
104
169
  -- purposes. Use this function to specify a callback function that will returns the string that
105
170
  -- should be drawn.
171
+ --
172
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
173
+ -- mod in order for this console command to work.
106
174
  function ____exports.setDoorDisplay(self, textCallback)
175
+ errorIfDebugDisplayNotInitialized(nil)
107
176
  debugDisplayTextCallbacks.door = textCallback
108
177
  end
109
178
  --- After using the "pressurePlateDisplay" console command, text will be drawn on each pressure plate
110
179
  -- for debugging purposes. Use this function to specify a callback function that will returns the
111
180
  -- string that should be drawn.
181
+ --
182
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
183
+ -- mod in order for this console command to work.
112
184
  function ____exports.setPressurePlateDisplay(self, textCallback)
185
+ errorIfDebugDisplayNotInitialized(nil)
113
186
  debugDisplayTextCallbacks.pressurePlate = textCallback
114
187
  end
115
188
  --- Toggles the debug display for players. This is the function that runs when you use the
116
189
  -- "playerDisplay" custom console command.
190
+ --
191
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
192
+ -- mod in order for this feature to work.
117
193
  function ____exports.togglePlayerDisplay(self)
194
+ errorIfDebugDisplayNotInitialized(nil)
118
195
  v.run.player = not v.run.player
119
196
  printEnabled(nil, v.run.player, "player display")
120
197
  end
121
198
  --- Toggles the debug display for tears. This is the function that runs when you use the
122
199
  -- "tearDisplay" custom console command.
200
+ --
201
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
202
+ -- mod in order for this feature to work.
123
203
  function ____exports.toggleTearDisplay(self)
204
+ errorIfDebugDisplayNotInitialized(nil)
124
205
  v.run.tear = not v.run.tear
125
206
  printEnabled(nil, v.run.tear, "tear display")
126
207
  end
127
208
  --- Toggles the debug display for familiars. This is the function that runs when you use the
128
209
  -- "familiarDisplay" custom console command.
210
+ --
211
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
212
+ -- mod in order for this feature to work.
129
213
  function ____exports.toggleFamiliarDisplay(self)
214
+ errorIfDebugDisplayNotInitialized(nil)
130
215
  v.run.familiar = not v.run.familiar
131
216
  printEnabled(nil, v.run.familiar, "familiar display")
132
217
  end
133
218
  --- Toggles the debug display for bombs. This is the function that runs when you use the
134
219
  -- "bombDisplay" custom console command.
220
+ --
221
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
222
+ -- mod in order for this feature to work.
135
223
  function ____exports.toggleBombDisplay(self)
224
+ errorIfDebugDisplayNotInitialized(nil)
136
225
  v.run.bomb = not v.run.bomb
137
226
  printEnabled(nil, v.run.bomb, "bomb display")
138
227
  end
139
228
  --- Toggles the debug display for pickups. This is the function that runs when you use the
140
229
  -- "pickupDisplay" custom console command.
230
+ --
231
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
232
+ -- mod in order for this feature to work.
141
233
  function ____exports.togglePickupDisplay(self)
234
+ errorIfDebugDisplayNotInitialized(nil)
142
235
  v.run.pickup = not v.run.pickup
143
236
  printEnabled(nil, v.run.pickup, "pickup display")
144
237
  end
145
238
  --- Toggles the debug display for slots. This is the function that runs when you use the
146
239
  -- "slotDisplay" custom console command.
240
+ --
241
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
242
+ -- mod in order for this feature to work.
147
243
  function ____exports.toggleSlotDisplay(self)
244
+ errorIfDebugDisplayNotInitialized(nil)
148
245
  v.run.slot = not v.run.slot
149
246
  printEnabled(nil, v.run.slot, "slot display")
150
247
  end
151
248
  --- Toggles the debug display for lasers. This is the function that runs when you use the
152
249
  -- "laserDisplay" custom console command.
250
+ --
251
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
252
+ -- mod in order for this feature to work.
153
253
  function ____exports.toggleLaserDisplay(self)
254
+ errorIfDebugDisplayNotInitialized(nil)
154
255
  v.run.laser = not v.run.laser
155
256
  printEnabled(nil, v.run.laser, "laser display")
156
257
  end
157
258
  --- Toggles the debug display for knives. This is the function that runs when you use the
158
259
  -- "knifeDisplay" custom console command.
260
+ --
261
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
262
+ -- mod in order for this feature to work.
159
263
  function ____exports.toggleKnifeDisplay(self)
264
+ errorIfDebugDisplayNotInitialized(nil)
160
265
  v.run.knife = not v.run.knife
161
266
  printEnabled(nil, v.run.knife, "knife display")
162
267
  end
163
268
  --- Toggles the debug display for projectiles. This is the function that runs when you use the
164
269
  -- "projectileDisplay" custom console command.
270
+ --
271
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
272
+ -- mod in order for this feature to work.
165
273
  function ____exports.toggleProjectileDisplay(self)
274
+ errorIfDebugDisplayNotInitialized(nil)
166
275
  v.run.projectile = not v.run.projectile
167
276
  printEnabled(nil, v.run.projectile, "projectile display")
168
277
  end
169
278
  --- Toggles the debug display for effects. This is the function that runs when you use the
170
279
  -- "effectDisplay" custom console command.
280
+ --
281
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
282
+ -- mod in order for this feature to work.
171
283
  function ____exports.toggleEffectDisplay(self)
284
+ errorIfDebugDisplayNotInitialized(nil)
172
285
  v.run.effect = not v.run.effect
173
286
  printEnabled(nil, v.run.effect, "effect display")
174
287
  end
175
288
  --- Toggles the debug display for NPCs. This is the function that runs when you use the "npcDisplay"
176
289
  -- custom console command.
290
+ --
291
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
292
+ -- mod in order for this feature to work.
177
293
  function ____exports.toggleNPCDisplay(self)
294
+ errorIfDebugDisplayNotInitialized(nil)
178
295
  v.run.npc = not v.run.npc
179
296
  printEnabled(nil, v.run.npc, "NPC display")
180
297
  end
181
298
  --- Toggles the debug display for rocks. This is the function that runs when you use the
182
299
  -- "rockDisplay" custom console command.
300
+ --
301
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
302
+ -- mod in order for this feature to work.
183
303
  function ____exports.toggleRockDisplay(self)
304
+ errorIfDebugDisplayNotInitialized(nil)
184
305
  v.run.rock = not v.run.rock
185
306
  printEnabled(nil, v.run.rock, "rock display")
186
307
  end
187
308
  --- Toggles the debug display for pits. This is the function that runs when you use the "pitDisplay"
188
309
  -- custom console command.
310
+ --
311
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
312
+ -- mod in order for this feature to work.
189
313
  function ____exports.togglePitDisplay(self)
314
+ errorIfDebugDisplayNotInitialized(nil)
190
315
  v.run.pit = not v.run.pit
191
316
  printEnabled(nil, v.run.pit, "pit display")
192
317
  end
193
318
  --- Toggles the debug display for spikes. This is the function that runs when you use the
194
319
  -- "spikesDisplay" custom console command.
320
+ --
321
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
322
+ -- mod in order for this feature to work.
195
323
  function ____exports.toggleSpikesDisplay(self)
324
+ errorIfDebugDisplayNotInitialized(nil)
196
325
  v.run.spikes = not v.run.spikes
197
326
  printEnabled(nil, v.run.spikes, "spikes display")
198
327
  end
199
328
  --- Toggles the debug display for TNT. This is the function that runs when you use the "tntDisplay"
200
329
  -- custom console command.
330
+ --
331
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
332
+ -- mod in order for this feature to work.
201
333
  function ____exports.toggleTNTDisplay(self)
334
+ errorIfDebugDisplayNotInitialized(nil)
202
335
  v.run.tnt = not v.run.tnt
203
336
  printEnabled(nil, v.run.tnt, "TNT display")
204
337
  end
205
338
  --- Toggles the debug display for poop. This is the function that runs when you use the "poopDisplay"
206
339
  -- custom console command.
340
+ --
341
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
342
+ -- mod in order for this feature to work.
207
343
  function ____exports.togglePoopDisplay(self)
344
+ errorIfDebugDisplayNotInitialized(nil)
208
345
  v.run.poop = not v.run.poop
209
346
  printEnabled(nil, v.run.poop, "poop display")
210
347
  end
211
348
  --- Toggles the debug display for doors. This is the function that runs when you use the
212
349
  -- "doorDisplay" custom console command.
350
+ --
351
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
352
+ -- mod in order for this feature to work.
213
353
  function ____exports.toggleDoorDisplay(self)
354
+ errorIfDebugDisplayNotInitialized(nil)
214
355
  v.run.door = not v.run.door
215
356
  printEnabled(nil, v.run.door, "door display")
216
357
  end
217
358
  --- Toggles the debug display for pressure plates. This is the function that runs when you use the
218
359
  -- "pressurePlateDisplay" custom console command.
360
+ --
361
+ -- Note that you have to run the `enableExtraConsoleCommands` function once at the beginning of your
362
+ -- mod in order for this feature to work.
219
363
  function ____exports.togglePressurePlateDisplay(self)
364
+ errorIfDebugDisplayNotInitialized(nil)
220
365
  v.run.pressurePlate = not v.run.pressurePlate
221
366
  printEnabled(nil, v.run.pressurePlate, "pressure plate display")
222
367
  end
@@ -1,3 +1,5 @@
1
+ export declare function setDebugDisplayEnabled(): void;
2
+ export declare function errorIfDebugDisplayNotInitialized(): void;
1
3
  declare const v: {
2
4
  run: {
3
5
  player: boolean;