isaacscript-common 2.3.2 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/cachedClasses.lua +24 -0
  2. package/callbacks/customRevive.lua +2 -0
  3. package/callbacks/itemPickup.lua +2 -0
  4. package/callbacks/postBombInitLate.lua +2 -0
  5. package/callbacks/postBoneSwing.lua +2 -0
  6. package/callbacks/postCollectibleInitFirst.lua +2 -0
  7. package/callbacks/postCursedTeleport.lua +2 -0
  8. package/callbacks/postCustomDoorEnter.lua +44 -0
  9. package/callbacks/postDoorRender.lua +2 -0
  10. package/callbacks/postDoorUpdate.lua +2 -0
  11. package/callbacks/postEffectInitLate.lua +2 -0
  12. package/callbacks/postEffectStateChanged.lua +2 -0
  13. package/callbacks/postEsauJr.lua +2 -0
  14. package/callbacks/postFamiliarInitLate.lua +2 -0
  15. package/callbacks/postFamiliarStateChanged.lua +2 -0
  16. package/callbacks/postFlip.lua +2 -0
  17. package/callbacks/postGreedModeWave.lua +2 -0
  18. package/callbacks/postGridEntity.lua +2 -0
  19. package/callbacks/postGridEntityCollision.lua +2 -0
  20. package/callbacks/postGridEntityRender.lua +2 -0
  21. package/callbacks/postHolyMantleRemoved.lua +2 -0
  22. package/callbacks/postKnifeInitLate.lua +2 -0
  23. package/callbacks/postLaserInitLate.lua +2 -0
  24. package/callbacks/postNPCInitLate.lua +2 -0
  25. package/callbacks/postNPCStateChanged.lua +2 -0
  26. package/callbacks/postNewRoomEarly.lua +2 -0
  27. package/callbacks/postPickupCollect.lua +2 -0
  28. package/callbacks/postPickupInitLate.lua +2 -0
  29. package/callbacks/postPickupStateChanged.lua +2 -0
  30. package/callbacks/postPitRender.lua +2 -0
  31. package/callbacks/postPitUpdate.lua +2 -0
  32. package/callbacks/postPlayerChangeHealth.lua +2 -0
  33. package/callbacks/postPlayerChangeType.lua +2 -0
  34. package/callbacks/postPlayerFatalDamage.lua +2 -0
  35. package/callbacks/postPlayerInitLate.lua +2 -0
  36. package/callbacks/postPlayerReordered.lua +2 -0
  37. package/callbacks/postPoopRender.lua +2 -0
  38. package/callbacks/postPoopUpdate.lua +2 -0
  39. package/callbacks/postPressurePlateRender.lua +2 -0
  40. package/callbacks/postPressurePlateUpdate.lua +2 -0
  41. package/callbacks/postProjectileInitLate.lua +2 -0
  42. package/callbacks/postPurchase.lua +2 -0
  43. package/callbacks/postRockRender.lua +2 -0
  44. package/callbacks/postRockUpdate.lua +2 -0
  45. package/callbacks/postRoomClearChanged.lua +2 -0
  46. package/callbacks/postSacrifice.lua +2 -0
  47. package/callbacks/postSlotInitUpdate.lua +2 -0
  48. package/callbacks/postSlotRender.lua +2 -0
  49. package/callbacks/postSpikesRender.lua +2 -0
  50. package/callbacks/postSpikesUpdate.lua +2 -0
  51. package/callbacks/postTNTRender.lua +2 -0
  52. package/callbacks/postTNTUpdate.lua +2 -0
  53. package/callbacks/postTearInitLate.lua +2 -0
  54. package/callbacks/postTearInitVeryLate.lua +2 -0
  55. package/callbacks/postTransformation.lua +2 -0
  56. package/callbacks/postTrinketBreak.lua +2 -0
  57. package/callbacks/preBerserkDeath.lua +2 -0
  58. package/callbacks/preNewLevel.lua +2 -0
  59. package/callbacks/reorderedCallbacks.lua +16 -0
  60. package/callbacks/subscriptions/postBombInitLate.lua +6 -0
  61. package/callbacks/subscriptions/postBoneSwing.lua +6 -0
  62. package/callbacks/subscriptions/postCollectibleInitFirst.lua +6 -0
  63. package/callbacks/subscriptions/postCursedTeleport.lua +6 -0
  64. package/callbacks/subscriptions/postCustomDoorEnter.lua +6 -0
  65. package/callbacks/subscriptions/postCustomRevive.lua +6 -0
  66. package/callbacks/subscriptions/postDoorRender.lua +6 -0
  67. package/callbacks/subscriptions/postDoorUpdate.lua +6 -0
  68. package/callbacks/subscriptions/postEffectInitLate.lua +6 -0
  69. package/callbacks/subscriptions/postEffectStateChanged.lua +6 -0
  70. package/callbacks/subscriptions/postEsauJr.lua +6 -0
  71. package/callbacks/subscriptions/postFamiliarInitLate.lua +6 -0
  72. package/callbacks/subscriptions/postFamiliarStateChanged.lua +6 -0
  73. package/callbacks/subscriptions/postFirstEsauJr.lua +6 -0
  74. package/callbacks/subscriptions/postFirstFlip.lua +6 -0
  75. package/callbacks/subscriptions/postFlip.lua +6 -0
  76. package/callbacks/subscriptions/postGameStartedReordered.lua +6 -0
  77. package/callbacks/subscriptions/postGreedModeWave.lua +6 -0
  78. package/callbacks/subscriptions/postGridEntityBroken.lua +6 -0
  79. package/callbacks/subscriptions/postGridEntityCollision.lua +6 -0
  80. package/callbacks/subscriptions/postGridEntityInit.lua +6 -0
  81. package/callbacks/subscriptions/postGridEntityRemove.lua +6 -0
  82. package/callbacks/subscriptions/postGridEntityRender.lua +6 -0
  83. package/callbacks/subscriptions/postGridEntityStateChanged.lua +6 -0
  84. package/callbacks/subscriptions/postGridEntityUpdate.lua +6 -0
  85. package/callbacks/subscriptions/postHolyMantleRemoved.lua +6 -0
  86. package/callbacks/subscriptions/postItemDischarged.lua +6 -0
  87. package/callbacks/subscriptions/postItemPickup.lua +6 -0
  88. package/callbacks/subscriptions/postKnifeInitLate.lua +6 -0
  89. package/callbacks/subscriptions/postLaserInitLate.lua +6 -0
  90. package/callbacks/subscriptions/postNPCInitLate.lua +6 -0
  91. package/callbacks/subscriptions/postNPCStateChanged.lua +6 -0
  92. package/callbacks/subscriptions/postNewLevelReordered.lua +6 -0
  93. package/callbacks/subscriptions/postNewRoomEarly.lua +6 -0
  94. package/callbacks/subscriptions/postNewRoomReordered.lua +6 -0
  95. package/callbacks/subscriptions/postPEffectUpdateReordered.lua +6 -0
  96. package/callbacks/subscriptions/postPickupCollect.lua +6 -0
  97. package/callbacks/subscriptions/postPickupInitLate.lua +6 -0
  98. package/callbacks/subscriptions/postPickupStateChanged.lua +6 -0
  99. package/callbacks/subscriptions/postPitRender.lua +6 -0
  100. package/callbacks/subscriptions/postPitUpdate.lua +6 -0
  101. package/callbacks/subscriptions/postPlayerChangeHealth.lua +6 -0
  102. package/callbacks/subscriptions/postPlayerChangeType.lua +6 -0
  103. package/callbacks/subscriptions/postPlayerFatalDamage.lua +6 -0
  104. package/callbacks/subscriptions/postPlayerInitLate.lua +6 -0
  105. package/callbacks/subscriptions/postPlayerInitReordered.lua +6 -0
  106. package/callbacks/subscriptions/postPlayerRenderReordered.lua +6 -0
  107. package/callbacks/subscriptions/postPlayerUpdateReordered.lua +6 -0
  108. package/callbacks/subscriptions/postPoopRender.lua +6 -0
  109. package/callbacks/subscriptions/postPoopUpdate.lua +6 -0
  110. package/callbacks/subscriptions/postPressurePlateRender.lua +6 -0
  111. package/callbacks/subscriptions/postPressurePlateUpdate.lua +6 -0
  112. package/callbacks/subscriptions/postProjectileInitLate.lua +6 -0
  113. package/callbacks/subscriptions/postPurchase.lua +6 -0
  114. package/callbacks/subscriptions/postRockRender.lua +6 -0
  115. package/callbacks/subscriptions/postRockUpdate.lua +6 -0
  116. package/callbacks/subscriptions/postRoomClearChanged.lua +6 -0
  117. package/callbacks/subscriptions/postSacrifice.lua +6 -0
  118. package/callbacks/subscriptions/postSlotAnimationChanged.lua +6 -0
  119. package/callbacks/subscriptions/postSlotDestroyed.lua +6 -0
  120. package/callbacks/subscriptions/postSlotInit.lua +6 -0
  121. package/callbacks/subscriptions/postSlotRender.lua +6 -0
  122. package/callbacks/subscriptions/postSlotUpdate.lua +6 -0
  123. package/callbacks/subscriptions/postSpikesRender.lua +6 -0
  124. package/callbacks/subscriptions/postSpikesUpdate.lua +6 -0
  125. package/callbacks/subscriptions/postTNTRender.lua +6 -0
  126. package/callbacks/subscriptions/postTNTUpdate.lua +6 -0
  127. package/callbacks/subscriptions/postTearInitLate.lua +6 -0
  128. package/callbacks/subscriptions/postTearInitVeryLate.lua +6 -0
  129. package/callbacks/subscriptions/postTransformation.lua +6 -0
  130. package/callbacks/subscriptions/postTrinketBreak.lua +6 -0
  131. package/callbacks/subscriptions/preBerserkDeath.lua +6 -0
  132. package/callbacks/subscriptions/preCustomRevive.lua +6 -0
  133. package/callbacks/subscriptions/preItemPickup.lua +6 -0
  134. package/callbacks/subscriptions/preNewLevel.lua +6 -0
  135. package/classes/DefaultMap.d.ts +70 -39
  136. package/classes/DefaultMap.lua +94 -43
  137. package/classes/ModUpgraded.d.ts +3 -3
  138. package/classes/ModUpgraded.lua +5 -0
  139. package/constants.lua +41 -0
  140. package/constantsFirstLast.lua +63 -0
  141. package/enums/HealthType.lua +3 -0
  142. package/enums/ModCallbackCustom.d.ts +1 -1
  143. package/enums/ModCallbackCustom.lua +6 -0
  144. package/enums/private/CopyableIsaacAPIClassType.lua +1 -0
  145. package/enums/private/SerializationBrand.lua +5 -0
  146. package/features/characterHealthConversion.lua +6 -0
  147. package/features/characterStats.lua +17 -0
  148. package/features/debugDisplay/exports.lua +90 -0
  149. package/features/deployJSONRoom.lua +56 -0
  150. package/features/disableInputs.lua +45 -0
  151. package/features/disableSound.lua +14 -0
  152. package/features/extraConsoleCommands/commandsDisplay.lua +90 -0
  153. package/features/extraConsoleCommands/init.lua +16 -0
  154. package/features/extraConsoleCommands/listCommands.lua +172 -0
  155. package/features/fadeInRemover.lua +10 -0
  156. package/features/fastReset.lua +10 -0
  157. package/features/forgottenSwitch.lua +4 -0
  158. package/features/getCollectibleItemPoolType.lua +5 -0
  159. package/features/playerInventory.lua +18 -0
  160. package/features/ponyDetection.lua +4 -0
  161. package/features/preventCollectibleRotation.lua +9 -0
  162. package/features/runInNFrames.lua +50 -0
  163. package/features/saveDataManager/constants.lua +1 -0
  164. package/features/saveDataManager/exports.lua +115 -0
  165. package/features/saveDataManager/main.lua +6 -0
  166. package/features/saveDataManager/maps.lua +3 -0
  167. package/features/saveDataManager/merge.lua +20 -0
  168. package/features/sirenHelpers.lua +13 -0
  169. package/features/taintedLazarusPlayers.lua +11 -0
  170. package/featuresInitialized.lua +6 -0
  171. package/functions/array.lua +85 -0
  172. package/functions/benchmark.lua +6 -0
  173. package/functions/boss.lua +35 -0
  174. package/functions/cacheFlag.lua +4 -0
  175. package/functions/cards.lua +60 -0
  176. package/functions/challenges.lua +1 -0
  177. package/functions/character.lua +23 -0
  178. package/functions/charge.lua +39 -0
  179. package/functions/chargeBar.lua +4 -0
  180. package/functions/collectibleCacheFlag.lua +15 -0
  181. package/functions/collectibleSet.lua +3 -0
  182. package/functions/collectibleTag.lua +9 -0
  183. package/functions/collectibles.lua +131 -0
  184. package/functions/color.lua +18 -0
  185. package/functions/debug.lua +18 -0
  186. package/functions/deepCopy.lua +25 -0
  187. package/functions/doors.lua +53 -0
  188. package/functions/entity.lua +88 -0
  189. package/functions/entitySpecific.lua +182 -0
  190. package/functions/entityTypes.d.ts +1 -1
  191. package/functions/entityTypes.lua +1 -0
  192. package/functions/enums.lua +62 -0
  193. package/functions/familiars.lua +52 -0
  194. package/functions/flag.lua +77 -0
  195. package/functions/flying.lua +10 -0
  196. package/functions/globals.lua +6 -0
  197. package/functions/gridEntity.lua +105 -0
  198. package/functions/gridEntitySpecific.lua +8 -0
  199. package/functions/input.lua +11 -0
  200. package/functions/isaacAPIClass.lua +12 -0
  201. package/functions/jsonHelpers.lua +11 -0
  202. package/functions/jsonRoom.lua +5 -0
  203. package/functions/kColor.lua +9 -0
  204. package/functions/language.lua +5 -0
  205. package/functions/log.lua +28 -0
  206. package/functions/map.lua +18 -0
  207. package/functions/math.lua +26 -0
  208. package/functions/npc.lua +24 -0
  209. package/functions/pickupVariants.d.ts +11 -11
  210. package/functions/pickupVariants.lua +11 -0
  211. package/functions/pickups.lua +67 -0
  212. package/functions/pills.lua +45 -0
  213. package/functions/player.lua +166 -0
  214. package/functions/playerDataStructures.lua +65 -0
  215. package/functions/playerHealth.lua +10 -0
  216. package/functions/playerIndex.lua +47 -0
  217. package/functions/pocketItems.lua +18 -0
  218. package/functions/positionVelocity.lua +46 -0
  219. package/functions/random.lua +32 -0
  220. package/functions/revive.lua +15 -0
  221. package/functions/rng.lua +19 -0
  222. package/functions/roomData.lua +68 -0
  223. package/functions/roomGrid.lua +21 -0
  224. package/functions/roomShape.lua +22 -0
  225. package/functions/rooms.lua +100 -0
  226. package/functions/run.lua +5 -0
  227. package/functions/seeds.lua +4 -0
  228. package/functions/serialization.lua +4 -0
  229. package/functions/set.lua +22 -0
  230. package/functions/spawnCollectible.lua +24 -0
  231. package/functions/sprite.lua +25 -0
  232. package/functions/stage.lua +16 -0
  233. package/functions/string.lua +6 -0
  234. package/functions/table.lua +19 -0
  235. package/functions/tears.lua +12 -0
  236. package/functions/transformations.lua +18 -0
  237. package/functions/trinketCacheFlag.lua +3 -0
  238. package/functions/trinketGive.lua +24 -0
  239. package/functions/trinkets.lua +52 -0
  240. package/functions/tstlClass.lua +9 -0
  241. package/functions/ui.lua +16 -0
  242. package/functions/utils.d.ts +1 -0
  243. package/functions/utils.lua +88 -0
  244. package/functions/vector.lua +9 -0
  245. package/lualib_bundle.lua +21 -34
  246. package/maps/cardMap.lua +1 -0
  247. package/maps/characterMap.lua +1 -0
  248. package/maps/defaultPlayerStatMap.lua +1 -0
  249. package/maps/gridEntityXMLMap.lua +2 -0
  250. package/maps/pillEffectMap.lua +1 -0
  251. package/maps/roomShapeToTopLeftWallGridIndexMap.lua +2 -0
  252. package/maps/roomTypeMap.lua +1 -0
  253. package/objects/LRoomShapeToRectangles.lua +2 -0
  254. package/objects/colors.lua +4 -0
  255. package/objects/roomShapeBounds.lua +2 -0
  256. package/objects/roomShapeLayoutSizes.lua +4 -0
  257. package/objects/roomShapeToBottomRightPosition.lua +2 -0
  258. package/objects/roomShapeToDoorSlotsToGridIndexDelta.lua +2 -0
  259. package/objects/roomShapeToTopLeftPosition.lua +2 -0
  260. package/objects/roomShapeVolumes.lua +3 -0
  261. package/package.json +2 -2
  262. package/patchErrorFunctions.lua +8 -0
  263. package/sets/bossSets.lua +23 -0
  264. package/sets/charactersWithNoRedHeartsSet.lua +2 -0
  265. package/sets/charactersWithNoSoulHeartsSet.lua +2 -0
  266. package/sets/lostStyleCharactersSet.lua +2 -0
  267. package/types/PickingUpItem.lua +7 -0
  268. package/upgradeMod.d.ts +4 -4
  269. package/upgradeMod.lua +18 -0
@@ -18,111 +18,201 @@ local toggleSlotDisplay = ____exports.toggleSlotDisplay
18
18
  local toggleSpikesDisplay = ____exports.toggleSpikesDisplay
19
19
  local toggleTearDisplay = ____exports.toggleTearDisplay
20
20
  local toggleTNTDisplay = ____exports.toggleTNTDisplay
21
+ --- Toggles custom text to appear next to every spikes. Useful for debugging.
22
+ --
23
+ -- By default, the grid entity ID will be displayed. Use the `setSpikesDisplay` helper function to
24
+ -- assign the text that you want to appear.
21
25
  function ____exports.spikesDisplay(self)
22
26
  toggleSpikesDisplay(nil)
23
27
  end
28
+ --- Toggles custom text to appear next to every bomb. Useful for debugging.
29
+ --
30
+ -- By default, the entity ID will be displayed. Use the `setBombDisplay` helper function to assign
31
+ -- the text that you want to appear.
24
32
  function ____exports.bombDisplay(self)
25
33
  toggleBombDisplay(nil)
26
34
  end
35
+ --- Alias for the "bombDisplay" command.
27
36
  function ____exports.bombsDisplay(self)
28
37
  ____exports.bombDisplay(nil)
29
38
  end
39
+ --- Toggles custom text to appear next to every door. Useful for debugging.
40
+ --
41
+ -- By default, the grid entity ID will be displayed. Use the `setDoorDisplay` helper function to
42
+ -- assign the text that you want to appear.
30
43
  function ____exports.doorDisplay(self)
31
44
  toggleDoorDisplay(nil)
32
45
  end
46
+ --- Alias for the "doorDisplay" command.
33
47
  function ____exports.doorsDisplay(self)
34
48
  ____exports.doorDisplay(nil)
35
49
  end
50
+ --- Toggles custom text to appear next to every effect. Useful for debugging.
51
+ --
52
+ -- By default, the entity ID will be displayed. Use the `setEffectDisplay` helper function to assign
53
+ -- the text that you want to appear.
36
54
  function ____exports.effectDisplay(self)
37
55
  toggleEffectDisplay(nil)
38
56
  end
57
+ --- Alias for the "effectDisplay" command.
39
58
  function ____exports.effectsDisplay(self)
40
59
  ____exports.effectDisplay(nil)
41
60
  end
61
+ --- Toggles custom text to appear next to every familiar. Useful for debugging.
62
+ --
63
+ -- By default, the entity ID will be displayed. Use the `setFamiliarDisplay` helper function to
64
+ -- assign the text that you want to appear.
42
65
  function ____exports.familiarDisplay(self)
43
66
  toggleFamiliarDisplay(nil)
44
67
  end
68
+ --- Alias for the "familiarDisplay" command.
45
69
  function ____exports.familiarsDisplay(self)
46
70
  ____exports.familiarDisplay(nil)
47
71
  end
72
+ --- Toggles custom text to appear next to every knife. Useful for debugging.
73
+ --
74
+ -- By default, the entity ID will be displayed. Use the `setKnifeDisplay` helper function to assign
75
+ -- the text that you want to appear.
48
76
  function ____exports.knifeDisplay(self)
49
77
  toggleKnifeDisplay(nil)
50
78
  end
79
+ --- Alias for the "knifeDisplay" command.
51
80
  function ____exports.knivesDisplay(self)
52
81
  ____exports.knifeDisplay(nil)
53
82
  end
83
+ --- Toggles custom text to appear next to every laser. Useful for debugging.
84
+ --
85
+ -- By default, the entity ID will be displayed. Use the `setLaserDisplay` helper function to assign
86
+ -- the text that you want to appear.
54
87
  function ____exports.laserDisplay(self)
55
88
  toggleLaserDisplay(nil)
56
89
  end
90
+ --- Alias for the "laserDisplay" command.
57
91
  function ____exports.lasersDisplay(self)
58
92
  ____exports.laserDisplay(nil)
59
93
  end
94
+ --- Toggles custom text to appear next to every NPC. Useful for debugging.
95
+ --
96
+ -- By default, the entity ID will be displayed. Use the `setNPCDisplay` helper function to assign
97
+ -- the text that you want to appear.
60
98
  function ____exports.npcDisplay(self)
61
99
  toggleNPCDisplay(nil)
62
100
  end
101
+ --- Alias for the "npcDisplay" command.
63
102
  function ____exports.npcsDisplay(self)
64
103
  ____exports.npcDisplay(nil)
65
104
  end
105
+ --- Toggles custom text to appear next to every pickup. Useful for debugging.
106
+ --
107
+ -- By default, the entity ID will be displayed. Use the `setPickupDisplay` helper function to assign
108
+ -- the text that you want to appear.
66
109
  function ____exports.pickupDisplay(self)
67
110
  togglePickupDisplay(nil)
68
111
  end
112
+ --- Alias for the "pickupDisplay" command.
69
113
  function ____exports.pickupsDisplay(self)
70
114
  ____exports.pickupDisplay(nil)
71
115
  end
116
+ --- Toggles custom text to appear next to every pit. Useful for debugging.
117
+ --
118
+ -- By default, the grid entity ID will be displayed. Use the `setPitDisplay` helper function to
119
+ -- assign the text that you want to appear.
72
120
  function ____exports.pitDisplay(self)
73
121
  togglePitDisplay(nil)
74
122
  end
123
+ --- Alias for the "pitDisplay" command.
75
124
  function ____exports.pitsDisplay(self)
76
125
  ____exports.pitDisplay(nil)
77
126
  end
127
+ --- Toggles custom text to appear next to every player. Useful for debugging.
128
+ --
129
+ -- By default, the entity ID will be displayed. Use the `setPlayerDisplay` helper function to assign
130
+ -- the text that you want to appear.
78
131
  function ____exports.playerDisplay(self)
79
132
  togglePlayerDisplay(nil)
80
133
  end
134
+ --- Alias for the "playerDisplay" command.
81
135
  function ____exports.playersDisplay(self)
82
136
  ____exports.playerDisplay(nil)
83
137
  end
138
+ --- Toggles custom text to appear next to every poop. Useful for debugging.
139
+ --
140
+ -- By default, the grid entity ID will be displayed. Use the `setPoopDisplay` helper function to
141
+ -- assign the text that you want to appear.
84
142
  function ____exports.poopDisplay(self)
85
143
  togglePoopDisplay(nil)
86
144
  end
145
+ --- Alias for the "poopDisplay" command.
87
146
  function ____exports.poopsDisplay(self)
88
147
  ____exports.poopDisplay(nil)
89
148
  end
149
+ --- Toggles custom text to appear next to every pressure plate. Useful for debugging.
150
+ --
151
+ -- By default, the grid entity ID will be displayed. Use the `setPressurePlateDisplay` helper
152
+ -- function to assign the text that you want to appear.
90
153
  function ____exports.pressurePlateDisplay(self)
91
154
  togglePressurePlateDisplay(nil)
92
155
  end
156
+ --- Alias for the "pressurePlateDisplay" command.
93
157
  function ____exports.pressurePlatesDisplay(self)
94
158
  ____exports.pressurePlateDisplay(nil)
95
159
  end
160
+ --- Toggles custom text to appear next to every projectile. Useful for debugging.
161
+ --
162
+ -- By default, the entity ID will be displayed. Use the `setProjectileDisplay` helper function to
163
+ -- assign the text that you want to appear.
96
164
  function ____exports.projectileDisplay(self)
97
165
  toggleProjectileDisplay(nil)
98
166
  end
167
+ --- Alias for the "projectileDisplay" command.
99
168
  function ____exports.projectilesDisplay(self)
100
169
  ____exports.projectileDisplay(nil)
101
170
  end
171
+ --- Toggles custom text to appear next to every rock. Useful for debugging.
172
+ --
173
+ -- By default, the grid entity ID will be displayed. Use the `setRockDisplay` helper function to
174
+ -- assign the text that you want to appear.
102
175
  function ____exports.rockDisplay(self)
103
176
  toggleRockDisplay(nil)
104
177
  end
178
+ --- Alias for the "rockDisplay" command.
105
179
  function ____exports.rocksDisplay(self)
106
180
  ____exports.rockDisplay(nil)
107
181
  end
182
+ --- Toggles custom text to appear next to every slot. Useful for debugging.
183
+ --
184
+ -- By default, the entity ID will be displayed. Use the `setSlotDisplay` helper function to assign
185
+ -- the text that you want to appear.
108
186
  function ____exports.slotDisplay(self)
109
187
  toggleSlotDisplay(nil)
110
188
  end
189
+ --- Alias for the "slotDisplay" command.
111
190
  function ____exports.slotsDisplay(self)
112
191
  ____exports.slotDisplay(nil)
113
192
  end
193
+ --- Alias for the "spikesDisplay" command.
114
194
  function ____exports.spikeDisplay(self)
115
195
  ____exports.spikesDisplay(nil)
116
196
  end
197
+ --- Toggles custom text to appear next to every tear. Useful for debugging.
198
+ --
199
+ -- By default, the entity ID will be displayed. Use the `setTearDisplay` helper function to assign
200
+ -- the text that you want to appear.
117
201
  function ____exports.tearDisplay(self)
118
202
  toggleTearDisplay(nil)
119
203
  end
204
+ --- Alias for the "tearDisplay" command.
120
205
  function ____exports.tearsDisplay(self)
121
206
  ____exports.tearDisplay(nil)
122
207
  end
208
+ --- Toggles custom text to appear next to every TNT. Useful for debugging.
209
+ --
210
+ -- By default, the grid entity ID will be displayed. Use the `setTNTDisplay` helper function to
211
+ -- assign the text that you want to appear.
123
212
  function ____exports.tntDisplay(self)
124
213
  toggleTNTDisplay(nil)
125
214
  end
215
+ --- Alias for the "tntDisplay" command.
126
216
  function ____exports.tntsDisplay(self)
127
217
  ____exports.tntDisplay(nil)
128
218
  end
@@ -73,6 +73,9 @@ function postFireTear(self, tear)
73
73
  end
74
74
  commandFunctionsMap = __TS__New(Map)
75
75
  initialized = false
76
+ --- Enables extra console commands which are useful for debugging. See [the
77
+ -- docs](https://isaacscript.github.io/isaacscript-common/features/extraConsoleCommands_listCommands)
78
+ -- for the specific commands that are added.
76
79
  function ____exports.enableExtraConsoleCommands(self, mod)
77
80
  initialized = true
78
81
  saveDataManager(nil, "extraConsoleCommands", v, featureEnabled)
@@ -85,6 +88,13 @@ function ____exports.enableExtraConsoleCommands(self, mod)
85
88
  mod:AddCallback(ModCallback.EXECUTE_CMD, executeCmd)
86
89
  mod:AddCallback(ModCallback.POST_FIRE_TEAR, postFireTear)
87
90
  end
91
+ --- Helper function to add a custom console command.
92
+ --
93
+ -- The standard library comes with many existing console commands that are useful for debugging, but
94
+ -- you can also add your own commands that are useful for your particular mod. It's easier to add
95
+ -- commands to the existing command system than to add logic manually to the ExecuteCmd callback.
96
+ --
97
+ -- Before using this function, you must first invoke `enableExtraConsoleCommands`.
88
98
  function ____exports.addConsoleCommand(self, commandName, commandFunction)
89
99
  if not initialized then
90
100
  error("Before adding extra console commands, you must first enable the feature by invoking the \"enableExtraConsoleCommands\" function.")
@@ -94,6 +104,12 @@ function ____exports.addConsoleCommand(self, commandName, commandFunction)
94
104
  end
95
105
  commandFunctionsMap:set(commandName, commandFunction)
96
106
  end
107
+ --- Helper function to remove a custom console command.
108
+ --
109
+ -- The standard library comes with many existing console commands that are useful for debugging. If
110
+ -- you want to disable one of them, use this function.
111
+ --
112
+ -- Before using this function, you must first invoke `enableExtraConsoleCommands`.
97
113
  function ____exports.removeConsoleCommand(self, commandName)
98
114
  if not initialized then
99
115
  error("Before removing console commands, you must first enable the feature by invoking the \"enableExtraConsoleCommands\" function.")