isaacscript-common 2.3.2 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (337) hide show
  1. package/cachedClasses.d.ts +6 -4
  2. package/cachedClasses.lua +24 -0
  3. package/callbacks/customRevive.lua +2 -0
  4. package/callbacks/itemPickup.lua +2 -0
  5. package/callbacks/postBombInitLate.lua +2 -0
  6. package/callbacks/postBoneSwing.lua +2 -0
  7. package/callbacks/postCollectibleInitFirst.lua +2 -0
  8. package/callbacks/postCursedTeleport.lua +2 -0
  9. package/callbacks/postCustomDoorEnter.lua +44 -0
  10. package/callbacks/postDoorRender.lua +2 -0
  11. package/callbacks/postDoorUpdate.lua +2 -0
  12. package/callbacks/postEffectInitLate.lua +2 -0
  13. package/callbacks/postEffectStateChanged.lua +2 -0
  14. package/callbacks/postEsauJr.lua +2 -0
  15. package/callbacks/postFamiliarInitLate.lua +2 -0
  16. package/callbacks/postFamiliarStateChanged.lua +2 -0
  17. package/callbacks/postFlip.lua +2 -0
  18. package/callbacks/postGreedModeWave.lua +2 -0
  19. package/callbacks/postGridEntity.lua +2 -0
  20. package/callbacks/postGridEntityCollision.lua +2 -0
  21. package/callbacks/postGridEntityRender.lua +2 -0
  22. package/callbacks/postHolyMantleRemoved.lua +2 -0
  23. package/callbacks/postKnifeInitLate.lua +2 -0
  24. package/callbacks/postLaserInitLate.lua +2 -0
  25. package/callbacks/postNPCInitLate.lua +2 -0
  26. package/callbacks/postNPCStateChanged.lua +2 -0
  27. package/callbacks/postNewRoomEarly.lua +2 -0
  28. package/callbacks/postPickupCollect.lua +2 -0
  29. package/callbacks/postPickupInitFirst.d.ts +1 -0
  30. package/callbacks/postPickupInitFirst.lua +55 -0
  31. package/callbacks/postPickupInitLate.lua +2 -0
  32. package/callbacks/postPickupStateChanged.lua +2 -0
  33. package/callbacks/postPitRender.lua +2 -0
  34. package/callbacks/postPitUpdate.lua +2 -0
  35. package/callbacks/postPlayerChangeHealth.lua +2 -0
  36. package/callbacks/postPlayerChangeType.lua +2 -0
  37. package/callbacks/postPlayerFatalDamage.lua +2 -0
  38. package/callbacks/postPlayerInitLate.lua +2 -0
  39. package/callbacks/postPlayerReordered.lua +2 -0
  40. package/callbacks/postPoopRender.lua +2 -0
  41. package/callbacks/postPoopUpdate.lua +2 -0
  42. package/callbacks/postPressurePlateRender.lua +2 -0
  43. package/callbacks/postPressurePlateUpdate.lua +2 -0
  44. package/callbacks/postProjectileInitLate.lua +2 -0
  45. package/callbacks/postPurchase.lua +2 -0
  46. package/callbacks/postRockRender.lua +2 -0
  47. package/callbacks/postRockUpdate.lua +2 -0
  48. package/callbacks/postRoomClearChanged.lua +2 -0
  49. package/callbacks/postSacrifice.lua +2 -0
  50. package/callbacks/postSlotDestroyed.d.ts +1 -0
  51. package/callbacks/postSlotDestroyed.lua +66 -0
  52. package/callbacks/postSlotInitUpdate.lua +2 -0
  53. package/callbacks/postSlotRender.lua +5 -21
  54. package/callbacks/postSpikesRender.lua +2 -0
  55. package/callbacks/postSpikesUpdate.lua +2 -0
  56. package/callbacks/postTNTRender.lua +2 -0
  57. package/callbacks/postTNTUpdate.lua +2 -0
  58. package/callbacks/postTearInitLate.lua +2 -0
  59. package/callbacks/postTearInitVeryLate.lua +2 -0
  60. package/callbacks/postTransformation.lua +2 -0
  61. package/callbacks/postTrinketBreak.lua +2 -0
  62. package/callbacks/preBerserkDeath.lua +2 -0
  63. package/callbacks/preNewLevel.lua +2 -0
  64. package/callbacks/reorderedCallbacks.lua +16 -0
  65. package/callbacks/subscriptions/postBombInitLate.lua +6 -0
  66. package/callbacks/subscriptions/postBoneSwing.lua +6 -0
  67. package/callbacks/subscriptions/postCollectibleInitFirst.lua +6 -0
  68. package/callbacks/subscriptions/postCursedTeleport.lua +6 -0
  69. package/callbacks/subscriptions/postCustomDoorEnter.lua +6 -0
  70. package/callbacks/subscriptions/postCustomRevive.d.ts +1 -0
  71. package/callbacks/subscriptions/postCustomRevive.lua +6 -0
  72. package/callbacks/subscriptions/postDoorRender.d.ts +1 -0
  73. package/callbacks/subscriptions/postDoorRender.lua +6 -0
  74. package/callbacks/subscriptions/postDoorUpdate.d.ts +1 -0
  75. package/callbacks/subscriptions/postDoorUpdate.lua +6 -0
  76. package/callbacks/subscriptions/postEffectInitLate.lua +6 -0
  77. package/callbacks/subscriptions/postEffectStateChanged.lua +6 -0
  78. package/callbacks/subscriptions/postEsauJr.lua +6 -0
  79. package/callbacks/subscriptions/postFamiliarInitLate.lua +6 -0
  80. package/callbacks/subscriptions/postFamiliarStateChanged.lua +6 -0
  81. package/callbacks/subscriptions/postFirstEsauJr.lua +6 -0
  82. package/callbacks/subscriptions/postFirstFlip.lua +6 -0
  83. package/callbacks/subscriptions/postFlip.lua +6 -0
  84. package/callbacks/subscriptions/postGameStartedReordered.lua +6 -0
  85. package/callbacks/subscriptions/postGreedModeWave.lua +6 -0
  86. package/callbacks/subscriptions/postGridEntityBroken.lua +6 -0
  87. package/callbacks/subscriptions/postGridEntityCollision.lua +6 -0
  88. package/callbacks/subscriptions/postGridEntityInit.lua +6 -0
  89. package/callbacks/subscriptions/postGridEntityRemove.lua +6 -0
  90. package/callbacks/subscriptions/postGridEntityRender.lua +6 -0
  91. package/callbacks/subscriptions/postGridEntityStateChanged.lua +6 -0
  92. package/callbacks/subscriptions/postGridEntityUpdate.lua +6 -0
  93. package/callbacks/subscriptions/postHolyMantleRemoved.lua +6 -0
  94. package/callbacks/subscriptions/postItemDischarged.lua +6 -0
  95. package/callbacks/subscriptions/postItemPickup.lua +6 -0
  96. package/callbacks/subscriptions/postKnifeInitLate.lua +6 -0
  97. package/callbacks/subscriptions/postLaserInitLate.lua +6 -0
  98. package/callbacks/subscriptions/postNPCInitLate.lua +6 -0
  99. package/callbacks/subscriptions/postNPCStateChanged.lua +6 -0
  100. package/callbacks/subscriptions/postNewLevelReordered.lua +6 -0
  101. package/callbacks/subscriptions/postNewRoomEarly.lua +6 -0
  102. package/callbacks/subscriptions/postNewRoomReordered.lua +6 -0
  103. package/callbacks/subscriptions/postPEffectUpdateReordered.lua +6 -0
  104. package/callbacks/subscriptions/postPickupCollect.d.ts +1 -0
  105. package/callbacks/subscriptions/postPickupCollect.lua +6 -0
  106. package/callbacks/subscriptions/postPickupInitFirst.d.ts +3 -0
  107. package/callbacks/subscriptions/postPickupInitFirst.lua +29 -0
  108. package/callbacks/subscriptions/postPickupInitLate.lua +6 -0
  109. package/callbacks/subscriptions/postPickupStateChanged.d.ts +1 -0
  110. package/callbacks/subscriptions/postPickupStateChanged.lua +6 -0
  111. package/callbacks/subscriptions/postPitRender.d.ts +1 -0
  112. package/callbacks/subscriptions/postPitRender.lua +6 -0
  113. package/callbacks/subscriptions/postPitUpdate.d.ts +1 -0
  114. package/callbacks/subscriptions/postPitUpdate.lua +6 -0
  115. package/callbacks/subscriptions/postPlayerChangeHealth.lua +6 -0
  116. package/callbacks/subscriptions/postPlayerChangeType.lua +6 -0
  117. package/callbacks/subscriptions/postPlayerFatalDamage.lua +6 -0
  118. package/callbacks/subscriptions/postPlayerInitLate.lua +6 -0
  119. package/callbacks/subscriptions/postPlayerInitReordered.lua +6 -0
  120. package/callbacks/subscriptions/postPlayerRenderReordered.lua +6 -0
  121. package/callbacks/subscriptions/postPlayerUpdateReordered.lua +6 -0
  122. package/callbacks/subscriptions/postPoopRender.d.ts +1 -0
  123. package/callbacks/subscriptions/postPoopRender.lua +6 -0
  124. package/callbacks/subscriptions/postPoopUpdate.d.ts +1 -0
  125. package/callbacks/subscriptions/postPoopUpdate.lua +6 -0
  126. package/callbacks/subscriptions/postPressurePlateRender.d.ts +1 -0
  127. package/callbacks/subscriptions/postPressurePlateRender.lua +6 -0
  128. package/callbacks/subscriptions/postPressurePlateUpdate.d.ts +1 -0
  129. package/callbacks/subscriptions/postPressurePlateUpdate.lua +6 -0
  130. package/callbacks/subscriptions/postProjectileInitLate.lua +6 -0
  131. package/callbacks/subscriptions/postPurchase.lua +6 -0
  132. package/callbacks/subscriptions/postRockRender.d.ts +1 -0
  133. package/callbacks/subscriptions/postRockRender.lua +6 -0
  134. package/callbacks/subscriptions/postRockUpdate.d.ts +1 -0
  135. package/callbacks/subscriptions/postRockUpdate.lua +6 -0
  136. package/callbacks/subscriptions/postRoomClearChanged.lua +6 -0
  137. package/callbacks/subscriptions/postSacrifice.lua +6 -0
  138. package/callbacks/subscriptions/postSlotAnimationChanged.lua +6 -0
  139. package/callbacks/subscriptions/postSlotDestroyed.lua +6 -0
  140. package/callbacks/subscriptions/postSlotInit.lua +6 -0
  141. package/callbacks/subscriptions/postSlotRender.lua +6 -0
  142. package/callbacks/subscriptions/postSlotUpdate.lua +6 -0
  143. package/callbacks/subscriptions/postSpikesRender.d.ts +1 -0
  144. package/callbacks/subscriptions/postSpikesRender.lua +6 -0
  145. package/callbacks/subscriptions/postSpikesUpdate.d.ts +1 -0
  146. package/callbacks/subscriptions/postSpikesUpdate.lua +6 -0
  147. package/callbacks/subscriptions/postTNTRender.d.ts +1 -0
  148. package/callbacks/subscriptions/postTNTRender.lua +6 -0
  149. package/callbacks/subscriptions/postTNTUpdate.d.ts +1 -0
  150. package/callbacks/subscriptions/postTNTUpdate.lua +6 -0
  151. package/callbacks/subscriptions/postTearInitLate.lua +6 -0
  152. package/callbacks/subscriptions/postTearInitVeryLate.lua +6 -0
  153. package/callbacks/subscriptions/postTransformation.lua +6 -0
  154. package/callbacks/subscriptions/postTrinketBreak.lua +6 -0
  155. package/callbacks/subscriptions/preBerserkDeath.lua +6 -0
  156. package/callbacks/subscriptions/preCustomRevive.lua +6 -0
  157. package/callbacks/subscriptions/preItemPickup.lua +6 -0
  158. package/callbacks/subscriptions/preNewLevel.lua +6 -0
  159. package/classes/DefaultMap.d.ts +70 -39
  160. package/classes/DefaultMap.lua +94 -43
  161. package/classes/ModUpgraded.d.ts +3 -3
  162. package/classes/ModUpgraded.lua +5 -0
  163. package/constants.lua +41 -0
  164. package/constantsFirstLast.lua +63 -0
  165. package/enums/HealthType.lua +3 -0
  166. package/enums/ModCallbackCustom.d.ts +62 -40
  167. package/enums/ModCallbackCustom.lua +46 -38
  168. package/enums/private/CopyableIsaacAPIClassType.lua +1 -0
  169. package/enums/private/SerializationBrand.lua +5 -0
  170. package/features/characterHealthConversion.lua +6 -0
  171. package/features/characterStats.lua +17 -0
  172. package/features/debugDisplay/exports.d.ts +17 -0
  173. package/features/debugDisplay/exports.lua +90 -0
  174. package/features/debugDisplay/v.d.ts +17 -0
  175. package/features/deployJSONRoom.d.ts +1 -0
  176. package/features/deployJSONRoom.lua +56 -0
  177. package/features/disableInputs.lua +45 -0
  178. package/features/disableSound.lua +14 -0
  179. package/features/extraConsoleCommands/commandsDisplay.lua +90 -0
  180. package/features/extraConsoleCommands/init.lua +16 -0
  181. package/features/extraConsoleCommands/listCommands.lua +172 -0
  182. package/features/fadeInRemover.lua +10 -0
  183. package/features/fastReset.lua +10 -0
  184. package/features/forgottenSwitch.lua +4 -0
  185. package/features/getCollectibleItemPoolType.lua +5 -0
  186. package/features/playerInventory.lua +18 -0
  187. package/features/ponyDetection.lua +4 -0
  188. package/features/preventCollectibleRotation.lua +9 -0
  189. package/features/runInNFrames.lua +50 -0
  190. package/features/saveDataManager/constants.lua +1 -0
  191. package/features/saveDataManager/exports.lua +115 -0
  192. package/features/saveDataManager/load.lua +12 -8
  193. package/features/saveDataManager/main.lua +16 -3
  194. package/features/saveDataManager/maps.lua +3 -0
  195. package/features/saveDataManager/merge.lua +53 -21
  196. package/features/saveDataManager/save.lua +12 -7
  197. package/features/sirenHelpers.lua +13 -0
  198. package/features/taintedLazarusPlayers.lua +11 -0
  199. package/featuresInitialized.lua +6 -0
  200. package/functions/array.d.ts +2 -0
  201. package/functions/array.lua +85 -0
  202. package/functions/benchmark.lua +6 -0
  203. package/functions/bombs.d.ts +3 -0
  204. package/functions/bombs.lua +12 -0
  205. package/functions/boss.lua +35 -0
  206. package/functions/cacheFlag.lua +4 -0
  207. package/functions/cards.lua +60 -0
  208. package/functions/challenges.lua +1 -0
  209. package/functions/character.lua +23 -0
  210. package/functions/charge.lua +39 -0
  211. package/functions/chargeBar.d.ts +1 -0
  212. package/functions/chargeBar.lua +4 -0
  213. package/functions/collectibleCacheFlag.lua +15 -0
  214. package/functions/collectibleSet.lua +3 -0
  215. package/functions/collectibleTag.lua +9 -0
  216. package/functions/collectibles.d.ts +13 -8
  217. package/functions/collectibles.lua +147 -3
  218. package/functions/color.lua +18 -0
  219. package/functions/debug.lua +18 -0
  220. package/functions/deepCopy.lua +60 -26
  221. package/functions/deepCopyTests.lua +8 -5
  222. package/functions/direction.d.ts +8 -0
  223. package/functions/direction.lua +27 -0
  224. package/functions/doors.d.ts +1 -0
  225. package/functions/doors.lua +58 -0
  226. package/functions/entity.d.ts +4 -4
  227. package/functions/entity.lua +94 -6
  228. package/functions/entitySpecific.d.ts +20 -20
  229. package/functions/entitySpecific.lua +182 -0
  230. package/functions/entityTypes.d.ts +1 -1
  231. package/functions/entityTypes.lua +1 -0
  232. package/functions/enums.d.ts +2 -0
  233. package/functions/enums.lua +62 -0
  234. package/functions/familiars.lua +52 -0
  235. package/functions/flag.lua +77 -0
  236. package/functions/flying.lua +10 -0
  237. package/functions/globals.lua +8 -10
  238. package/functions/gridEntity.lua +105 -0
  239. package/functions/gridEntitySpecific.d.ts +5 -0
  240. package/functions/gridEntitySpecific.lua +8 -0
  241. package/functions/input.lua +11 -0
  242. package/functions/isaacAPIClass.d.ts +4 -4
  243. package/functions/isaacAPIClass.lua +15 -3
  244. package/functions/jsonHelpers.lua +11 -0
  245. package/functions/jsonRoom.d.ts +2 -0
  246. package/functions/jsonRoom.lua +5 -0
  247. package/functions/kColor.lua +9 -0
  248. package/functions/language.lua +5 -0
  249. package/functions/log.lua +31 -3
  250. package/functions/map.lua +18 -0
  251. package/functions/math.lua +26 -0
  252. package/functions/npc.lua +24 -0
  253. package/functions/pickupVariants.d.ts +11 -11
  254. package/functions/pickupVariants.lua +11 -0
  255. package/functions/pickups.d.ts +9 -9
  256. package/functions/pickups.lua +67 -0
  257. package/functions/pills.lua +45 -0
  258. package/functions/player.d.ts +7 -0
  259. package/functions/player.lua +210 -9
  260. package/functions/playerDataStructures.lua +65 -0
  261. package/functions/playerHealth.d.ts +3 -0
  262. package/functions/playerHealth.lua +92 -63
  263. package/functions/playerIndex.d.ts +2 -0
  264. package/functions/playerIndex.lua +47 -0
  265. package/functions/pocketItems.lua +18 -0
  266. package/functions/positionVelocity.d.ts +3 -0
  267. package/functions/positionVelocity.lua +46 -0
  268. package/functions/random.d.ts +2 -0
  269. package/functions/random.lua +32 -0
  270. package/functions/revive.d.ts +2 -0
  271. package/functions/revive.lua +15 -0
  272. package/functions/rng.d.ts +1 -0
  273. package/functions/rng.lua +19 -0
  274. package/functions/roomData.lua +68 -0
  275. package/functions/roomGrid.lua +21 -0
  276. package/functions/roomShape.lua +22 -0
  277. package/functions/rooms.lua +100 -0
  278. package/functions/run.lua +5 -0
  279. package/functions/seeds.lua +4 -0
  280. package/functions/serialization.lua +6 -2
  281. package/functions/set.d.ts +1 -0
  282. package/functions/set.lua +22 -0
  283. package/functions/spawnCollectible.lua +24 -0
  284. package/functions/sprite.d.ts +2 -0
  285. package/functions/sprite.lua +25 -0
  286. package/functions/stage.lua +16 -0
  287. package/functions/string.lua +6 -0
  288. package/functions/table.d.ts +12 -0
  289. package/functions/table.lua +53 -0
  290. package/functions/tears.d.ts +1 -0
  291. package/functions/tears.lua +12 -0
  292. package/functions/transformations.lua +18 -0
  293. package/functions/trinketCacheFlag.lua +3 -0
  294. package/functions/trinketGive.lua +24 -0
  295. package/functions/trinkets.lua +52 -0
  296. package/functions/tstlClass.d.ts +34 -0
  297. package/functions/tstlClass.lua +63 -9
  298. package/functions/ui.d.ts +2 -0
  299. package/functions/ui.lua +16 -0
  300. package/functions/utils.d.ts +16 -0
  301. package/functions/utils.lua +108 -0
  302. package/functions/vector.lua +13 -16
  303. package/index.d.ts +1 -0
  304. package/index.lua +8 -0
  305. package/initCustomCallbacks.lua +6 -0
  306. package/interfaces/AddCallbackParameterCustom.d.ts +2 -0
  307. package/interfaces/ChargeBarSprites.d.ts +1 -0
  308. package/interfaces/private/TSTLClassMetatable.d.ts +2 -0
  309. package/lualib_bundle.lua +21 -34
  310. package/maps/cardMap.lua +1 -0
  311. package/maps/characterMap.lua +1 -0
  312. package/maps/defaultPlayerStatMap.lua +1 -0
  313. package/maps/gridEntityXMLMap.lua +2 -0
  314. package/maps/pillEffectMap.lua +1 -0
  315. package/maps/roomShapeToTopLeftWallGridIndexMap.lua +2 -0
  316. package/maps/roomTypeMap.lua +1 -0
  317. package/objects/LRoomShapeToRectangles.lua +2 -0
  318. package/objects/callbackRegisterFunctions.lua +3 -0
  319. package/objects/colors.lua +4 -0
  320. package/objects/oppositeDoorSlots.d.ts +4 -0
  321. package/objects/oppositeDoorSlots.lua +15 -0
  322. package/objects/roomShapeBounds.lua +2 -0
  323. package/objects/roomShapeLayoutSizes.lua +4 -0
  324. package/objects/roomShapeToBottomRightPosition.lua +2 -0
  325. package/objects/roomShapeToDoorSlotsToGridIndexDelta.lua +2 -0
  326. package/objects/roomShapeToTopLeftPosition.lua +2 -0
  327. package/objects/roomShapeVolumes.lua +3 -0
  328. package/package.json +2 -2
  329. package/patchErrorFunctions.lua +8 -0
  330. package/sets/bossSets.lua +23 -0
  331. package/sets/charactersWithNoRedHeartsSet.lua +2 -0
  332. package/sets/charactersWithNoSoulHeartsSet.lua +2 -0
  333. package/sets/lostStyleCharactersSet.lua +2 -0
  334. package/types/AnyEntity.d.ts +10 -0
  335. package/types/PickingUpItem.lua +7 -0
  336. package/upgradeMod.d.ts +4 -4
  337. package/upgradeMod.lua +18 -0
@@ -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.")
@@ -97,45 +97,66 @@ local spawnTrapdoorOrCrawlspace = ____commandsSubroutines.spawnTrapdoorOrCrawlsp
97
97
  local warpToRoomType = ____commandsSubroutines.warpToRoomType
98
98
  local ____v = require("features.extraConsoleCommands.v")
99
99
  local v = ____v.default
100
+ --- Gives a half black heart. Provide a number to give a custom amount of hearts. (You can use
101
+ -- negative numbers to remove hearts.)
100
102
  function ____exports.blackHearts(self, params)
101
103
  addHeart(nil, params, HealthType.BLACK)
102
104
  end
105
+ --- Toggles Chaos Card tears. Useful for killing enemies very fast without using "debug 10".
103
106
  function ____exports.chaosCardTears(self)
104
107
  v.run.chaosCardTears = not v.run.chaosCardTears
105
108
  printEnabled(nil, v.run.chaosCardTears, "Chaos Card tears")
106
109
  end
110
+ --- Warps to the Devil Room for the floor. If the Angel Room has already been visited or initialized,
111
+ -- this will uninitialize it and make an Devil Room instead.
107
112
  function ____exports.devil(self)
108
113
  devilAngel(nil, true)
109
114
  end
115
+ --- Gives an eternal heart. Provide a number to give a custom amount of hearts. (You can use negative
116
+ -- numbers to remove hearts.)
110
117
  function ____exports.eternalHearts(self, params)
111
118
  addHeart(nil, params, HealthType.ETERNAL)
112
119
  end
120
+ --- Gives the player a golden bomb.
113
121
  function ____exports.goldenBomb(self)
114
122
  local player = Isaac.GetPlayer()
115
123
  player:AddGoldenBomb()
116
124
  end
125
+ --- Gives a golden heart. Provide a number to give a custom amount of hearts. (You can use negative
126
+ -- numbers to remove hearts.)
117
127
  function ____exports.goldenHearts(self, params)
118
128
  addHeart(nil, params, HealthType.GOLDEN)
119
129
  end
130
+ --- Gives the player a golden key.
120
131
  function ____exports.goldenKey(self)
121
132
  local player = Isaac.GetPlayer()
122
133
  player:AddGoldenKey()
123
134
  end
135
+ --- Gives a half red heart. Provide a number to give a custom amount of hearts. (You can use negative
136
+ -- numbers to remove hearts.)
124
137
  function ____exports.hearts(self, params)
125
138
  addHeart(nil, params, HealthType.RED)
126
139
  end
140
+ --- Warps to the I AM ERROR room for the floor.
127
141
  function ____exports.iAmError(self)
128
142
  changeRoom(nil, GridRoom.ERROR)
129
143
  end
144
+ --- Sets every NPC in the room to 1 HP.
130
145
  function ____exports.oneHP(self)
131
146
  for ____, npc in ipairs(getNPCs(nil)) do
132
147
  npc.HitPoints = 1
133
148
  end
134
149
  printConsole(nil, "Set every NPC to 1 HP.")
135
150
  end
151
+ --- Gives a half soul heart. Provide a number to give a custom amount of hearts. (You can use
152
+ -- negative numbers to remove hearts.)
136
153
  function ____exports.soulHearts(self, params)
137
154
  addHeart(nil, params, HealthType.SOUL)
138
155
  end
156
+ --- Play the supplied sound effect.
157
+ --
158
+ -- For example:
159
+ -- - sound 1 - Plays the 1-Up sound effect.
139
160
  function ____exports.sound(self, params)
140
161
  local soundEffect = tonumber(params)
141
162
  if soundEffect == nil then
@@ -144,11 +165,15 @@ function ____exports.sound(self, params)
144
165
  end
145
166
  sfxManager:Play(soundEffect)
146
167
  end
168
+ --- Warps to the starting room of the floor.
147
169
  function ____exports.startingRoom(self)
148
170
  local level = game:GetLevel()
149
171
  local startingRoomIndex = level:GetStartingRoomIndex()
150
172
  changeRoom(nil, startingRoomIndex)
151
173
  end
174
+ --- Adds a single charge to the player's specified active item. You must provide the active slot
175
+ -- number. Provide a second number to give a custom amount of charges. (You can use negative numbers
176
+ -- to remove charge.)
152
177
  function ____exports.addCharges(self, params)
153
178
  if params == "" then
154
179
  printConsole(nil, "You must specify a slot number. (Use 0 for the primary slot, 1 for the Schoolbag slot, 2 for the pocket item slot, and 3 for the Dice Bag slot.)")
@@ -189,14 +214,18 @@ function ____exports.addCharges(self, params)
189
214
  local newCharge = currentCharge + chargeNum
190
215
  player:SetActiveCharge(newCharge, activeSlot)
191
216
  end
217
+ --- Warps to the Angel Room for the floor. If the Devil Room has already been visited or initialized,
218
+ -- this will uninitialize it and make an Angel Room instead.
192
219
  function ____exports.angel(self)
193
220
  devilAngel(nil, false)
194
221
  end
222
+ --- Activates the flags for the Ascent (i.e. Backwards Path).
195
223
  function ____exports.ascent(self)
196
224
  game:SetStateFlag(GameStateFlag.BACKWARDS_PATH_INIT, true)
197
225
  game:SetStateFlag(GameStateFlag.BACKWARDS_PATH, true)
198
226
  printConsole(nil, "Set Ascent flags.")
199
227
  end
228
+ --- Warps to the first Clean Bedroom or Dirty Bedroom on the floor.
200
229
  function ____exports.bedroom(self)
201
230
  local cleanBedroomGridIndexes = getRoomGridIndexesForType(nil, RoomType.CLEAN_BEDROOM)
202
231
  if #cleanBedroomGridIndexes > 0 then
@@ -210,12 +239,16 @@ function ____exports.bedroom(self)
210
239
  end
211
240
  printConsole(nil, "There are no Clean Bedrooms or Dirty Bedrooms on this floor.")
212
241
  end
242
+ --- Alias for the "blackhearts" command.
213
243
  function ____exports.bh(self, params)
214
244
  ____exports.blackHearts(nil, params)
215
245
  end
246
+ --- Warps to the Black Market for the floor.
216
247
  function ____exports.blackMarket(self)
217
248
  changeRoom(nil, GridRoom.BLACK_MARKET)
218
249
  end
250
+ --- Gives a blood charge. This only affects Bethany. Provide a number to give a custom amount of
251
+ -- charges. (You can use negative numbers to remove charges.)
219
252
  function ____exports.bloodCharges(self, params)
220
253
  local charges = 1
221
254
  if params ~= "" then
@@ -229,9 +262,12 @@ function ____exports.bloodCharges(self, params)
229
262
  local player = Isaac.GetPlayer()
230
263
  player:AddBloodCharge(charges)
231
264
  end
265
+ --- Alias for the "blackMarket" command.
232
266
  function ____exports.bm(self)
233
267
  ____exports.blackMarket(nil)
234
268
  end
269
+ --- Gives a bomb. Provide a number to give a custom amount of bombs. (You can use negative numbers to
270
+ -- remove bombs.)
235
271
  function ____exports.bomb(self, params)
236
272
  local numBombs = 1
237
273
  if params ~= "" then
@@ -245,6 +281,8 @@ function ____exports.bomb(self, params)
245
281
  local player = Isaac.GetPlayer()
246
282
  player:AddBombs(numBombs)
247
283
  end
284
+ --- Gives 99 bombs. Provide a number to give a custom amount of bombs. (You can use negative numbers
285
+ -- to remove bombs.)
248
286
  function ____exports.bombs(self, params)
249
287
  local numBombs = 99
250
288
  if params ~= "" then
@@ -258,18 +296,29 @@ function ____exports.bombs(self, params)
258
296
  local player = Isaac.GetPlayer()
259
297
  player:AddBombs(numBombs)
260
298
  end
299
+ --- Gives a bone heart. Provide a number to give a custom amount of hearts. (You can use negative
300
+ -- numbers to remove hearts.)
261
301
  function ____exports.boneHearts(self, params)
262
302
  addHeart(nil, params, HealthType.BONE)
263
303
  end
304
+ --- Warps to the first Boss Room on the floor.
264
305
  function ____exports.boss(self)
265
306
  warpToRoomType(nil, RoomType.BOSS)
266
307
  end
308
+ --- Warps to the Boss Rush for the floor.
267
309
  function ____exports.bossRush(self)
268
310
  changeRoom(nil, GridRoom.BOSS_RUSH)
269
311
  end
312
+ --- Gives a broken heart. Provide a number to give a custom amount of hearts. (You can use negative
313
+ -- numbers to remove hearts.)
270
314
  function ____exports.brokenHearts(self, params)
271
315
  addHeart(nil, params, HealthType.BROKEN)
272
316
  end
317
+ --- Gives the specified card. Accepts either the card sub-type or the partial name of the card.
318
+ --
319
+ -- For example:
320
+ -- - card 5 - Gives The Emperor.
321
+ -- - card spa - Gives 2 of Spades.
273
322
  function ____exports.card(self, params)
274
323
  if params == "" then
275
324
  printConsole(nil, "You must specify a card name or number.")
@@ -301,6 +350,7 @@ function ____exports.card(self, params)
301
350
  ((("Gave card: " .. cardName) .. " (") .. tostring(cardNum)) .. ")"
302
351
  )
303
352
  end
353
+ --- Spawns every card on the ground, starting at the top-left-most tile.
304
354
  function ____exports.cards(self)
305
355
  local cardType = 1
306
356
  do
@@ -322,9 +372,16 @@ function ____exports.cards(self)
322
372
  end
323
373
  end
324
374
  end
375
+ --- Alias for the "chaosCardTears" command.
325
376
  function ____exports.cc(self)
326
377
  ____exports.chaosCardTears(nil)
327
378
  end
379
+ --- Restart as the specified character. Accepts either the character sub-type or the partial name of
380
+ -- the character.
381
+ --
382
+ -- For example:
383
+ -- - character 2 - Restarts as Cain.
384
+ -- - character ta - Restarts as Tainted Azazel.
328
385
  function ____exports.characterCommand(self, params)
329
386
  if params == "" then
330
387
  printConsole(nil, "You must specify a character name or number.")
@@ -356,12 +413,16 @@ function ____exports.characterCommand(self, params)
356
413
  ((("Restarting as character: " .. characterName) .. " (") .. tostring(character)) .. ")"
357
414
  )
358
415
  end
416
+ --- Alias for the "addCharges" command.
359
417
  function ____exports.charge(self, params)
360
418
  ____exports.addCharges(nil, params)
361
419
  end
420
+ --- Warps to the first Clean Bedroom on the floor.
362
421
  function ____exports.cleanBedroom(self)
363
422
  warpToRoomType(nil, RoomType.CLEAN_BEDROOM)
364
423
  end
424
+ --- Gives a coin. Provide a number to give a custom amount of coins. (You can use negative numbers to
425
+ -- remove coins.)
365
426
  function ____exports.coin(self, params)
366
427
  local numCoins = 1
367
428
  if params ~= "" then
@@ -375,6 +436,8 @@ function ____exports.coin(self, params)
375
436
  local player = Isaac.GetPlayer()
376
437
  player:AddCoins(numCoins)
377
438
  end
439
+ --- Gives 999 coins. Provide a number to give a custom amount of coins. (You can use negative numbers
440
+ -- to remove coins.)
378
441
  function ____exports.coins(self, params)
379
442
  local numCoins = 999
380
443
  if params ~= "" then
@@ -388,51 +451,65 @@ function ____exports.coins(self, params)
388
451
  local player = Isaac.GetPlayer()
389
452
  player:AddCoins(numCoins)
390
453
  end
454
+ --- Creates a crawlspace next to the player.
391
455
  function ____exports.crawlspace(self)
392
456
  spawnTrapdoorOrCrawlspace(nil, false)
393
457
  end
458
+ --- Uses the D20.
394
459
  function ____exports.d20(self)
395
460
  local player = Isaac.GetPlayer()
396
461
  useActiveItemTemp(nil, player, CollectibleType.D20)
397
462
  end
463
+ --- Uses the D6.
398
464
  function ____exports.d6(self)
399
465
  local player = Isaac.GetPlayer()
400
466
  useActiveItemTemp(nil, player, CollectibleType.D6)
401
467
  end
468
+ --- Toggles extremely high-damage tears.
402
469
  function ____exports.damage(self)
403
470
  v.run.maxDamage = not v.run.maxDamage
404
471
  printEnabled(nil, v.run.maxDamage, "debug damage")
405
472
  end
473
+ --- Alias for the "devil" command.
406
474
  function ____exports.dd(self)
407
475
  ____exports.devil(nil)
408
476
  end
477
+ --- Warps to the first Dirty Bedroom on the floor.
409
478
  function ____exports.dirtyBedroom(self)
410
479
  warpToRoomType(nil, RoomType.DIRTY_BEDROOM)
411
480
  end
481
+ --- Toggles whether or not curses can appear.
412
482
  function ____exports.disableCurses(self)
413
483
  v.persistent.disableCurses = not v.persistent.disableCurses
414
484
  printEnabled(nil, not v.persistent.disableCurses, "curses")
415
485
  end
486
+ --- Moves the player 0.5 units down. Provide a number to move a custom amount of units.
416
487
  function ____exports.down(self, params)
417
488
  movePlayer(nil, params, Direction.DOWN)
418
489
  end
490
+ --- Warps to the Dungeon (i.e. Crawlspace) for the floor.
419
491
  function ____exports.dungeon(self)
420
492
  changeRoom(nil, GridRoom.DUNGEON)
421
493
  end
494
+ --- Logs the player's current temporary effects to the "log.txt" file.
422
495
  function ____exports.effects(self)
423
496
  local player = Isaac.GetPlayer()
424
497
  logEffects(player)
425
498
  printConsole(nil, "Logged the player's effects to the \"log.txt\" file.")
426
499
  end
500
+ --- Alias for the "eternalHearts" command.
427
501
  function ____exports.eh(self, params)
428
502
  ____exports.eternalHearts(nil, params)
429
503
  end
504
+ --- Alias for the "iAmError" command.
430
505
  function ____exports.error(self)
431
506
  ____exports.iAmError(nil)
432
507
  end
508
+ --- Alias for the "startingRoom" command.
433
509
  function ____exports.fool(self)
434
510
  ____exports.startingRoom(nil)
435
511
  end
512
+ --- Prints the current position of all players.
436
513
  function ____exports.getPosition(self)
437
514
  for ____, player in ipairs(getPlayers(nil)) do
438
515
  local playerName = getPlayerName(nil, player)
@@ -442,6 +519,8 @@ function ____exports.getPosition(self)
442
519
  )
443
520
  end
444
521
  end
522
+ --- Gives a Giga Bomb. Provide a number to give a custom amount of Giga Bombs. (You can use negative
523
+ -- numbers to remove bombs.)
445
524
  function ____exports.gigaBomb(self, params)
446
525
  local numBombs = 1
447
526
  if params ~= "" then
@@ -455,21 +534,27 @@ function ____exports.gigaBomb(self, params)
455
534
  local player = Isaac.GetPlayer()
456
535
  player:AddGigaBombs(numBombs)
457
536
  end
537
+ --- Alias for the "goldenBomb" command.
458
538
  function ____exports.goldBomb(self)
459
539
  ____exports.goldenBomb(nil)
460
540
  end
541
+ --- Alias for the "goldenHearts" command.
461
542
  function ____exports.goldHearts(self, params)
462
543
  ____exports.goldenHearts(nil, params)
463
544
  end
545
+ --- Alias for the "goldenKey" command.
464
546
  function ____exports.goldKey(self)
465
547
  ____exports.goldenKey(nil)
466
548
  end
549
+ --- Alias for the "debug 2" command.
467
550
  function ____exports.grid(self)
468
551
  Isaac.ExecuteCommand("debug 2")
469
552
  end
553
+ --- Alias for the "debug 11" command.
470
554
  function ____exports.grid2(self)
471
555
  Isaac.ExecuteCommand("debug 11")
472
556
  end
557
+ --- Spawns every grid entity, starting at the top-left-most tile.
473
558
  function ____exports.gridEntities(self)
474
559
  local gridEntityTypes = getEnumValues(nil, GridEntityType)
475
560
  local gridEntityTypeIndex = -1
@@ -493,12 +578,16 @@ function ____exports.gridEntities(self)
493
578
  end
494
579
  end
495
580
  end
581
+ --- Alias for the "hearts" command.
496
582
  function ____exports.h(self, params)
497
583
  ____exports.hearts(nil, params)
498
584
  end
585
+ --- Alias for the "debug 6" command.
499
586
  function ____exports.hitboxes(self)
500
587
  Isaac.ExecuteCommand("debug 6")
501
588
  end
589
+ --- Gives a key. Provide a number to give a custom amount of key. (You can use negative numbers to
590
+ -- remove keys.)
502
591
  function ____exports.key(self, params)
503
592
  local numKeys = 1
504
593
  if params ~= "" then
@@ -512,6 +601,8 @@ function ____exports.key(self, params)
512
601
  local player = Isaac.GetPlayer()
513
602
  player:AddKeys(numKeys)
514
603
  end
604
+ --- Gives 99 keys. Provide a number to give a custom amount of coins. (You can use negative numbers
605
+ -- to remove keys.)
515
606
  function ____exports.keys(self, params)
516
607
  local numKeys = 99
517
608
  if params ~= "" then
@@ -525,30 +616,49 @@ function ____exports.keys(self, params)
525
616
  local player = Isaac.GetPlayer()
526
617
  player:AddKeys(numKeys)
527
618
  end
619
+ --- Moves the player 0.5 units left. Provide a number to move a custom amount of units.
528
620
  function ____exports.left(self, params)
529
621
  movePlayer(nil, params, Direction.LEFT)
530
622
  end
623
+ --- Warps to the first Library on the floor.
531
624
  function ____exports.library(self)
532
625
  warpToRoomType(nil, RoomType.LIBRARY)
533
626
  end
627
+ --- Logs the entities in the room to the "log.txt" file. Provide a number to only log that specific
628
+ -- `EntityType`.
629
+ --
630
+ -- By default, this command will exclude background effects. If that is not desired, use the
631
+ -- "listAll" command instead.
534
632
  function ____exports.list(self, params)
535
633
  listEntities(nil, params, false)
536
634
  end
635
+ --- Logs the entities in the room to the "log.txt" file. Provide a number to only log that specific
636
+ -- `EntityType`.
537
637
  function ____exports.listAll(self, params)
538
638
  listEntities(nil, params, true)
539
639
  end
640
+ --- Logs the grid entities in the room to the "log.txt" file. Provide a number to only log that
641
+ -- specific `GridEntityType`.
642
+ --
643
+ -- By default, this command will exclude walls. If that is not desired, use the "listGridAll"
644
+ -- command instead.
540
645
  function ____exports.listGrid(self, params)
541
646
  listGridEntities(nil, params, false)
542
647
  end
648
+ --- Logs the grid entities in the room to the "log.txt" file. Provide a number to only log that
649
+ -- specific `GridEntityType`.
543
650
  function ____exports.listGridAll(self, params)
544
651
  listGridEntities(nil, params, true)
545
652
  end
653
+ --- Alias for the "1hp" command.
546
654
  function ____exports.lowHP(self)
547
655
  ____exports.oneHP(nil)
548
656
  end
657
+ --- Alias for "debug 9".
549
658
  function ____exports.luck(self)
550
659
  Isaac.ExecuteCommand("debug 9")
551
660
  end
661
+ --- Completely reveals the entire map, including the Ultra Secret Room.
552
662
  function ____exports.map(self)
553
663
  local level = game:GetLevel()
554
664
  local displayFlags = addFlag(nil, DisplayFlag.VISIBLE, DisplayFlag.SHADOW, DisplayFlag.SHOW_ICON)
@@ -558,18 +668,30 @@ function ____exports.map(self)
558
668
  end
559
669
  level:UpdateVisibility()
560
670
  end
671
+ --- Gives a heart container. Provide a number to give a custom amount of heart containers. (You can
672
+ -- use negative numbers to remove heart containers.)
561
673
  function ____exports.maxHearts(self, params)
562
674
  addHeart(nil, params, HealthType.MAX_HEARTS)
563
675
  end
676
+ --- Alias for the "maxHearts" command.
564
677
  function ____exports.mh(self, params)
565
678
  ____exports.maxHearts(nil, params)
566
679
  end
680
+ --- Warps to the first Miniboss Room on the floor.
567
681
  function ____exports.miniboss(self)
568
682
  warpToRoomType(nil, RoomType.MINI_BOSS)
569
683
  end
684
+ --- Alias for the "disableCurses" command.
570
685
  function ____exports.noCurses(self)
571
686
  ____exports.disableCurses(nil)
572
687
  end
688
+ --- Gives a pill with the specified pill effect. Accepts either the effect ID or the partial name of
689
+ -- the effect.
690
+ --
691
+ -- For example:
692
+ --
693
+ -- - `pill 5` - Gives a "Full Health" pill.
694
+ -- - `pill suns` - Gives a "Feels like I'm walking on sunshine" pill.
573
695
  function ____exports.pill(self, params)
574
696
  if params == "" then
575
697
  printConsole(nil, "You must specify a pill name or number.")
@@ -601,6 +723,7 @@ function ____exports.pill(self, params)
601
723
  ((("Gave pill: " .. pillEffectName) .. " (") .. tostring(pillEffect)) .. ")"
602
724
  )
603
725
  end
726
+ --- Spawns every pill on the ground, starting at the top-left-most tile.
604
727
  function ____exports.pills(self)
605
728
  local pillColors = __TS__ArrayFilter(
606
729
  getEnumValues(nil, PillColor),
@@ -627,12 +750,15 @@ function ____exports.pills(self)
627
750
  end
628
751
  end
629
752
  end
753
+ --- Warps to the first Planetarium on the floor.
630
754
  function ____exports.planetarium(self)
631
755
  warpToRoomType(nil, RoomType.PLANETARIUM)
632
756
  end
757
+ --- Alias for the "sound" command.
633
758
  function ____exports.playSound(self, params)
634
759
  ____exports.sound(nil, params)
635
760
  end
761
+ --- Sets the player's pocket item to the specified collectible type.
636
762
  function ____exports.pocket(self, params)
637
763
  if params == "" then
638
764
  printConsole(nil, "You must supply a collectible type to put as the pocket item.")
@@ -650,6 +776,8 @@ function ____exports.pocket(self, params)
650
776
  local player = Isaac.GetPlayer()
651
777
  player:SetPocketActiveItem(collectibleType, ActiveSlot.POCKET)
652
778
  end
779
+ --- Gives a poop mana charge. This only affects Tainted Blue Baby. Provide a number to give a custom
780
+ -- amount of charges. (You can use negative numbers to remove charges.)
653
781
  function ____exports.poopMana(self, params)
654
782
  local charges = 1
655
783
  if params ~= "" then
@@ -663,24 +791,36 @@ function ____exports.poopMana(self, params)
663
791
  local player = Isaac.GetPlayer()
664
792
  player:AddPoopMana(charges)
665
793
  end
794
+ --- Alias for the "getPosition" command.
666
795
  function ____exports.positionCommand(self)
667
796
  ____exports.getPosition(nil)
668
797
  end
798
+ --- Alias for the "hearts" command.
669
799
  function ____exports.redHearts(self, params)
670
800
  ____exports.hearts(nil, params)
671
801
  end
802
+ --- Alias for the "redHearts" command.
672
803
  function ____exports.rh(self, params)
673
804
  ____exports.redHearts(nil, params)
674
805
  end
806
+ --- Moves the player 0.5 units right. Provide a number to move a custom amount of units.
675
807
  function ____exports.right(self, params)
676
808
  movePlayer(nil, params, Direction.RIGHT)
677
809
  end
810
+ --- Logs information about the room to the "log.txt" file.
678
811
  function ____exports.roomCommand(self)
679
812
  logRoom()
680
813
  end
814
+ --- Gives a rotten heart. Provide a number to give a custom amount of hearts. (You can use negative
815
+ -- numbers to remove hearts.)
681
816
  function ____exports.rottenHearts(self, params)
682
817
  addHeart(nil, params, HealthType.ROTTEN)
683
818
  end
819
+ --- Alias for the "stage" command.
820
+ --
821
+ -- For example:
822
+ -- - s 3 - Warps to Caves 1.
823
+ -- - s 1c - Warps to Downpour 1.
684
824
  function ____exports.s(self, params)
685
825
  if params == "" then
686
826
  printConsole(nil, "You must specify a stage number.")
@@ -713,21 +853,27 @@ function ____exports.s(self, params)
713
853
  end
714
854
  Isaac.ExecuteCommand(("stage " .. tostring(stage)) .. stageTypeLetter)
715
855
  end
856
+ --- Warps to the first Sacrifice Room on the floor.
716
857
  function ____exports.sacrifice(self)
717
858
  warpToRoomType(nil, RoomType.SACRIFICE)
718
859
  end
860
+ --- Warps to the first Secret Room on the floor.
719
861
  function ____exports.secret(self)
720
862
  warpToRoomType(nil, RoomType.SECRET)
721
863
  end
864
+ --- Changes to a seeded run, using the seed of the current run.
722
865
  function ____exports.seedStick(self)
723
866
  local seeds = game:GetSeeds()
724
867
  local startSeedString = seeds:GetStartSeedString()
725
868
  Isaac.ExecuteCommand("seed " .. startSeedString)
726
869
  end
870
+ --- Logs all of the current run's seed effects to the "log.txt" file.
727
871
  function ____exports.seedsCommand(self)
728
872
  logSeedEffects()
729
873
  printConsole(nil, "Logged the seed effects to the \"log.txt\" file.")
730
874
  end
875
+ --- Sets a charge to the player's specified active item. You must provide the active slot number and
876
+ -- the number of charges to set.
731
877
  function ____exports.setCharges(self, params)
732
878
  if params == "" then
733
879
  printConsole(nil, "You must specify a slot number and a charge amount. (Use 0 for the primary slot, 1 for the Schoolbag slot, 2 for the pocket item slot, and 3 for the Dice Bag slot.)")
@@ -777,6 +923,10 @@ function ____exports.setCharges(self, params)
777
923
  local player = Isaac.GetPlayer()
778
924
  player:SetActiveCharge(chargeNum, activeSlot)
779
925
  end
926
+ --- Moves the first player to the specified position.
927
+ --
928
+ -- For example:
929
+ -- - setPosition 100 50
780
930
  function ____exports.setPosition(self, params)
781
931
  if params == "" then
782
932
  printConsole(nil, "You must specify a position. (e.g. \"setPosition 100 50\")")
@@ -808,16 +958,21 @@ function ____exports.setPosition(self, params)
808
958
  local position = Vector(x, y)
809
959
  player.Position = position
810
960
  end
961
+ --- Alias for the "soulHearts" command.
811
962
  function ____exports.sh(self, params)
812
963
  ____exports.soulHearts(nil, params)
813
964
  end
965
+ --- Warps to the first shop on the floor.
814
966
  function ____exports.shop(self)
815
967
  warpToRoomType(nil, RoomType.SHOP)
816
968
  end
969
+ --- Uses the Smelter to smelt the current player's trinket.
817
970
  function ____exports.smelt(self)
818
971
  local player = Isaac.GetPlayer()
819
972
  useActiveItemTemp(nil, player, CollectibleType.SMELTER)
820
973
  end
974
+ --- Gives a soul charge. This only affects Tainted Bethany. Provide a number to give a custom amount
975
+ -- of charges. (You can use negative numbers to remove charges.)
821
976
  function ____exports.soulCharges(self, params)
822
977
  local charges = 1
823
978
  if params ~= "" then
@@ -831,14 +986,18 @@ function ____exports.soulCharges(self, params)
831
986
  local player = Isaac.GetPlayer()
832
987
  player:AddSoulCharge(charges)
833
988
  end
989
+ --- Logs all of the currently playing sound effects to the "log.txt" file.
834
990
  function ____exports.sounds(self)
835
991
  logSounds()
836
992
  printConsole(nil, "Logged the currently playing sound effects to the \"log.txt\" file.")
837
993
  end
994
+ --- Toggles spamming Blood Rights on every frame. Useful for killing enemies very fast without using
995
+ -- "debug 10".
838
996
  function ____exports.spam(self)
839
997
  v.run.spamBloodRights = not v.run.spamBloodRights
840
998
  printEnabled(nil, v.run.maxSpeed, "spamming Blood Rights")
841
999
  end
1000
+ --- Spawns a golden version of the specified trinket type.
842
1001
  function ____exports.spawnGoldenTrinket(self, params)
843
1002
  if params == "" then
844
1003
  printConsole(nil, "You must specify the number corresponding to the trinket type.")
@@ -854,6 +1013,7 @@ function ____exports.spawnGoldenTrinket(self, params)
854
1013
  local centerPos = room:GetCenterPos()
855
1014
  spawnTrinket(nil, goldenTrinketType, centerPos)
856
1015
  end
1016
+ --- Toggles maximum movement speed and flight.
857
1017
  function ____exports.speed(self)
858
1018
  local player = Isaac.GetPlayer()
859
1019
  v.run.maxSpeed = not v.run.maxSpeed
@@ -871,9 +1031,11 @@ function ____exports.speed(self)
871
1031
  player:EvaluateItems()
872
1032
  printEnabled(nil, v.run.maxSpeed, "max speed")
873
1033
  end
1034
+ --- Warps to the first Super Secret Room on the floor.
874
1035
  function ____exports.superSecret(self)
875
1036
  warpToRoomType(nil, RoomType.SUPER_SECRET)
876
1037
  end
1038
+ --- Toggles extremely high tears stat (e.g. fire rate), equivalent of that to soy milk.
877
1039
  function ____exports.tears(self)
878
1040
  v.run.maxTears = not v.run.maxTears
879
1041
  local player = Isaac.GetPlayer()
@@ -881,18 +1043,28 @@ function ____exports.tears(self)
881
1043
  player:EvaluateItems()
882
1044
  printEnabled(nil, v.run.maxDamage, "debug tear-rate")
883
1045
  end
1046
+ --- Creates a trapdoor next to the player.
884
1047
  function ____exports.trapdoorCommand(self)
885
1048
  spawnTrapdoorOrCrawlspace(nil, true)
886
1049
  end
1050
+ --- Warps to the first Treasure Room on the floor.
887
1051
  function ____exports.treasure(self)
888
1052
  warpToRoomType(nil, RoomType.TREASURE)
889
1053
  end
1054
+ --- Warps to the first Ultra Secret Room on the floor.
890
1055
  function ____exports.ultraSecret(self)
891
1056
  warpToRoomType(nil, RoomType.ULTRA_SECRET)
892
1057
  end
1058
+ --- Moves the player 0.5 units up. Provide a number to move a custom amount of units.
893
1059
  function ____exports.up(self, params)
894
1060
  movePlayer(nil, params, Direction.UP)
895
1061
  end
1062
+ --- Warps to the specified room type. Accepts either the room type number or the partial name of the
1063
+ -- room type.
1064
+ --
1065
+ -- For example:
1066
+ -- - warp 5 - Warps to the first Boss Room on the floor, if any.
1067
+ -- - warp tr - Warps to the first Treasure Room on the floor, if any.
896
1068
  function ____exports.warp(self, params)
897
1069
  if params == "" then
898
1070
  printConsole(nil, "You must specify a room type name or number.")
@@ -25,6 +25,8 @@ local FEATURE_NAME = "fade-in remover"
25
25
  FADE_IN_SPEED = 1
26
26
  enabled = false
27
27
  v = {run = {removedFadeIn = false}}
28
+ ---
29
+ -- @internal
28
30
  function ____exports.fadeInRemoverInit(self, mod)
29
31
  saveDataManager(
30
32
  nil,
@@ -34,10 +36,18 @@ function ____exports.fadeInRemoverInit(self, mod)
34
36
  )
35
37
  mod:AddCallback(ModCallback.POST_RENDER, postRender)
36
38
  end
39
+ --- Removes the fade-in that occurs at the beginning of a run. If this behavior is desired, call this
40
+ -- function once at the beginning of your mod.
41
+ --
42
+ -- This is useful for debugging, when you are resetting the game often.
43
+ --
44
+ -- You can restore the vanilla behavior with the `restoreFadeIn` function.
37
45
  function ____exports.removeFadeIn(self)
38
46
  errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
39
47
  enabled = true
40
48
  end
49
+ --- Disables the fade-in remover. Only useful if you have previously called the `removeFadeIn`
50
+ -- function.
41
51
  function ____exports.restoreFadeIn(self)
42
52
  errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
43
53
  enabled = false