isaacscript-common 4.0.1-dev.0 → 4.0.4

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 (378) hide show
  1. package/callbacks/postCursedTeleport.lua +2 -1
  2. package/callbacks/postEsauJr.lua +2 -1
  3. package/callbacks/postFlip.lua +4 -3
  4. package/callbacks/postItemDischarged.lua +4 -3
  5. package/callbacks/postNewRoomEarly.lua +2 -1
  6. package/callbacks/postSacrifice.lua +3 -2
  7. package/callbacks/postTrinketBreak.lua +3 -2
  8. package/callbacks/reorderedCallbacks.lua +1 -0
  9. package/classes/ModUpgraded.d.ts +5 -1
  10. package/classes/ModUpgraded.lua +2 -2
  11. package/features/playerInventory.lua +1 -0
  12. package/functions/player.lua +9 -14
  13. package/package.json +2 -2
  14. package/cachedClasses.ts +0 -39
  15. package/callbacks/customRevive.ts +0 -215
  16. package/callbacks/itemPickup.ts +0 -101
  17. package/callbacks/postAmbush.ts +0 -73
  18. package/callbacks/postBombExploded.ts +0 -26
  19. package/callbacks/postBombInitLate.ts +0 -36
  20. package/callbacks/postBoneSwing.ts +0 -64
  21. package/callbacks/postCollectibleInitFirst.ts +0 -40
  22. package/callbacks/postCursedTeleport.ts +0 -183
  23. package/callbacks/postCustomDoorEnter.ts +0 -292
  24. package/callbacks/postDiceRoomActivated.ts +0 -60
  25. package/callbacks/postDoorRender.ts +0 -26
  26. package/callbacks/postDoorUpdate.ts +0 -26
  27. package/callbacks/postEffectInitLate.ts +0 -36
  28. package/callbacks/postEffectStateChanged.ts +0 -43
  29. package/callbacks/postEsauJr.ts +0 -107
  30. package/callbacks/postFamiliarInitLate.ts +0 -36
  31. package/callbacks/postFamiliarStateChanged.ts +0 -43
  32. package/callbacks/postFlip.ts +0 -88
  33. package/callbacks/postGreedModeWave.ts +0 -41
  34. package/callbacks/postGridEntity.ts +0 -164
  35. package/callbacks/postGridEntityCollision.ts +0 -69
  36. package/callbacks/postGridEntityRender.ts +0 -26
  37. package/callbacks/postHolyMantleRemoved.ts +0 -55
  38. package/callbacks/postItemDischarged.ts +0 -149
  39. package/callbacks/postKnifeInitLate.ts +0 -36
  40. package/callbacks/postLaserInitLate.ts +0 -36
  41. package/callbacks/postNPCInitLate.ts +0 -36
  42. package/callbacks/postNPCStateChanged.ts +0 -42
  43. package/callbacks/postNewRoomEarly.ts +0 -90
  44. package/callbacks/postPickupCollect.ts +0 -48
  45. package/callbacks/postPickupInitFirst.ts +0 -70
  46. package/callbacks/postPickupInitLate.ts +0 -36
  47. package/callbacks/postPickupStateChanged.ts +0 -43
  48. package/callbacks/postPitRender.ts +0 -26
  49. package/callbacks/postPitUpdate.ts +0 -26
  50. package/callbacks/postPlayerChangeHealth.ts +0 -62
  51. package/callbacks/postPlayerChangeType.ts +0 -56
  52. package/callbacks/postPlayerCollectible.ts +0 -113
  53. package/callbacks/postPlayerFatalDamage.ts +0 -141
  54. package/callbacks/postPlayerInitLate.ts +0 -37
  55. package/callbacks/postPlayerReordered.ts +0 -142
  56. package/callbacks/postPoopRender.ts +0 -26
  57. package/callbacks/postPoopUpdate.ts +0 -26
  58. package/callbacks/postPressurePlateRender.ts +0 -26
  59. package/callbacks/postPressurePlateUpdate.ts +0 -26
  60. package/callbacks/postProjectileInitLate.ts +0 -36
  61. package/callbacks/postPurchase.ts +0 -64
  62. package/callbacks/postRockRender.ts +0 -26
  63. package/callbacks/postRockUpdate.ts +0 -26
  64. package/callbacks/postRoomClearChanged.ts +0 -57
  65. package/callbacks/postSacrifice.ts +0 -62
  66. package/callbacks/postSlotDestroyed.ts +0 -92
  67. package/callbacks/postSlotInitUpdate.ts +0 -68
  68. package/callbacks/postSlotRender.ts +0 -69
  69. package/callbacks/postSpikesRender.ts +0 -26
  70. package/callbacks/postSpikesUpdate.ts +0 -26
  71. package/callbacks/postTNTRender.ts +0 -26
  72. package/callbacks/postTNTUpdate.ts +0 -26
  73. package/callbacks/postTearInitLate.ts +0 -36
  74. package/callbacks/postTearInitVeryLate.ts +0 -41
  75. package/callbacks/postTransformation.ts +0 -59
  76. package/callbacks/postTrinketBreak.ts +0 -110
  77. package/callbacks/preBerserkDeath.ts +0 -49
  78. package/callbacks/preNewLevel.ts +0 -55
  79. package/callbacks/reorderedCallbacks.ts +0 -166
  80. package/callbacks/subscriptions/postAmbushFinished.ts +0 -32
  81. package/callbacks/subscriptions/postAmbushStarted.ts +0 -32
  82. package/callbacks/subscriptions/postBombInitLate.ts +0 -32
  83. package/callbacks/subscriptions/postBoneExploded.ts +0 -32
  84. package/callbacks/subscriptions/postBoneSwing.ts +0 -24
  85. package/callbacks/subscriptions/postCollectibleInitFirst.ts +0 -37
  86. package/callbacks/subscriptions/postCursedTeleport.ts +0 -24
  87. package/callbacks/subscriptions/postCustomDoorEnter.ts +0 -45
  88. package/callbacks/subscriptions/postCustomRevive.ts +0 -36
  89. package/callbacks/subscriptions/postDiceRoomActivated.ts +0 -38
  90. package/callbacks/subscriptions/postDoorRender.ts +0 -35
  91. package/callbacks/subscriptions/postDoorUpdate.ts +0 -35
  92. package/callbacks/subscriptions/postEffectInitLate.ts +0 -32
  93. package/callbacks/subscriptions/postEffectStateChanged.ts +0 -40
  94. package/callbacks/subscriptions/postEsauJr.ts +0 -24
  95. package/callbacks/subscriptions/postFamiliarInitLate.ts +0 -32
  96. package/callbacks/subscriptions/postFamiliarStateChanged.ts +0 -40
  97. package/callbacks/subscriptions/postFirstEsauJr.ts +0 -24
  98. package/callbacks/subscriptions/postFirstFlip.ts +0 -24
  99. package/callbacks/subscriptions/postFlip.ts +0 -22
  100. package/callbacks/subscriptions/postGameStartedReordered.ts +0 -24
  101. package/callbacks/subscriptions/postGreedModeWave.ts +0 -24
  102. package/callbacks/subscriptions/postGridEntityBroken.ts +0 -51
  103. package/callbacks/subscriptions/postGridEntityCollision.ts +0 -54
  104. package/callbacks/subscriptions/postGridEntityInit.ts +0 -51
  105. package/callbacks/subscriptions/postGridEntityRemove.ts +0 -52
  106. package/callbacks/subscriptions/postGridEntityRender.ts +0 -51
  107. package/callbacks/subscriptions/postGridEntityStateChanged.ts +0 -55
  108. package/callbacks/subscriptions/postGridEntityUpdate.ts +0 -51
  109. package/callbacks/subscriptions/postHolyMantleRemoved.ts +0 -48
  110. package/callbacks/subscriptions/postItemDischarged.ts +0 -43
  111. package/callbacks/subscriptions/postItemPickup.ts +0 -64
  112. package/callbacks/subscriptions/postKnifeInitLate.ts +0 -32
  113. package/callbacks/subscriptions/postLaserInitLate.ts +0 -32
  114. package/callbacks/subscriptions/postNPCInitLate.ts +0 -32
  115. package/callbacks/subscriptions/postNPCStateChanged.ts +0 -42
  116. package/callbacks/subscriptions/postNewLevelReordered.ts +0 -22
  117. package/callbacks/subscriptions/postNewRoomEarly.ts +0 -22
  118. package/callbacks/subscriptions/postNewRoomReordered.ts +0 -22
  119. package/callbacks/subscriptions/postPEffectUpdateReordered.ts +0 -40
  120. package/callbacks/subscriptions/postPickupCollect.ts +0 -35
  121. package/callbacks/subscriptions/postPickupInitFirst.ts +0 -32
  122. package/callbacks/subscriptions/postPickupInitLate.ts +0 -32
  123. package/callbacks/subscriptions/postPickupStateChanged.ts +0 -40
  124. package/callbacks/subscriptions/postPitRender.ts +0 -35
  125. package/callbacks/subscriptions/postPitUpdate.ts +0 -35
  126. package/callbacks/subscriptions/postPlayerChangeHealth.ts +0 -49
  127. package/callbacks/subscriptions/postPlayerChangeType.ts +0 -40
  128. package/callbacks/subscriptions/postPlayerCollectibleAdded.ts +0 -38
  129. package/callbacks/subscriptions/postPlayerCollectibleRemoved.ts +0 -38
  130. package/callbacks/subscriptions/postPlayerFatalDamage.ts +0 -68
  131. package/callbacks/subscriptions/postPlayerInitLate.ts +0 -40
  132. package/callbacks/subscriptions/postPlayerInitReordered.ts +0 -40
  133. package/callbacks/subscriptions/postPlayerRenderReordered.ts +0 -40
  134. package/callbacks/subscriptions/postPlayerUpdateReordered.ts +0 -40
  135. package/callbacks/subscriptions/postPoopRender.ts +0 -35
  136. package/callbacks/subscriptions/postPoopUpdate.ts +0 -35
  137. package/callbacks/subscriptions/postPressurePlateRender.ts +0 -37
  138. package/callbacks/subscriptions/postPressurePlateUpdate.ts +0 -37
  139. package/callbacks/subscriptions/postProjectileInitLate.ts +0 -35
  140. package/callbacks/subscriptions/postPurchase.ts +0 -31
  141. package/callbacks/subscriptions/postRockRender.ts +0 -35
  142. package/callbacks/subscriptions/postRockUpdate.ts +0 -35
  143. package/callbacks/subscriptions/postRoomClearChanged.ts +0 -30
  144. package/callbacks/subscriptions/postSacrifice.ts +0 -43
  145. package/callbacks/subscriptions/postSlotAnimationChanged.ts +0 -40
  146. package/callbacks/subscriptions/postSlotDestroyed.ts +0 -55
  147. package/callbacks/subscriptions/postSlotInit.ts +0 -32
  148. package/callbacks/subscriptions/postSlotRender.ts +0 -32
  149. package/callbacks/subscriptions/postSlotUpdate.ts +0 -32
  150. package/callbacks/subscriptions/postSpikesRender.ts +0 -35
  151. package/callbacks/subscriptions/postSpikesUpdate.ts +0 -35
  152. package/callbacks/subscriptions/postTNTRender.ts +0 -35
  153. package/callbacks/subscriptions/postTNTUpdate.ts +0 -35
  154. package/callbacks/subscriptions/postTearInitLate.ts +0 -32
  155. package/callbacks/subscriptions/postTearInitVeryLate.ts +0 -32
  156. package/callbacks/subscriptions/postTransformation.ts +0 -40
  157. package/callbacks/subscriptions/postTrinketBreak.ts +0 -38
  158. package/callbacks/subscriptions/preBerserkDeath.ts +0 -42
  159. package/callbacks/subscriptions/preCustomRevive.ts +0 -46
  160. package/callbacks/subscriptions/preItemPickup.ts +0 -64
  161. package/callbacks/subscriptions/preNewLevel.ts +0 -24
  162. package/classes/DefaultMap.ts +0 -174
  163. package/classes/ModUpgraded.ts +0 -77
  164. package/constants.ts +0 -162
  165. package/constantsFirstLast.ts +0 -217
  166. package/enums/AmbushType.ts +0 -4
  167. package/enums/HealthType.ts +0 -16
  168. package/enums/ModCallbackCustom.ts +0 -1278
  169. package/enums/PocketItemType.ts +0 -8
  170. package/enums/SerializationType.ts +0 -5
  171. package/enums/SlotDestructionType.ts +0 -4
  172. package/enums/private/CopyableIsaacAPIClassType.ts +0 -7
  173. package/enums/private/SaveDataKey.ts +0 -14
  174. package/enums/private/SerializationBrand.ts +0 -42
  175. package/features/characterHealthConversion.ts +0 -111
  176. package/features/characterStats.ts +0 -61
  177. package/features/debugDisplay/debugDisplay.ts +0 -221
  178. package/features/debugDisplay/exports.ts +0 -368
  179. package/features/debugDisplay/v.ts +0 -65
  180. package/features/deployJSONRoom.ts +0 -743
  181. package/features/disableInputs.ts +0 -193
  182. package/features/disableSound.ts +0 -77
  183. package/features/extraConsoleCommands/commandsDisplay.ts +0 -290
  184. package/features/extraConsoleCommands/commandsSubroutines.ts +0 -139
  185. package/features/extraConsoleCommands/init.ts +0 -334
  186. package/features/extraConsoleCommands/listCommands.ts +0 -1299
  187. package/features/extraConsoleCommands/v.ts +0 -14
  188. package/features/fadeInRemover.ts +0 -60
  189. package/features/fastReset.ts +0 -75
  190. package/features/forgottenSwitch.ts +0 -50
  191. package/features/getCollectibleItemPoolType.ts +0 -66
  192. package/features/persistentEntities.ts +0 -183
  193. package/features/playerInventory.ts +0 -133
  194. package/features/ponyDetection.ts +0 -74
  195. package/features/preventCollectibleRotation.ts +0 -115
  196. package/features/runInNFrames.ts +0 -148
  197. package/features/saveDataManager/constants.ts +0 -4
  198. package/features/saveDataManager/exports.ts +0 -229
  199. package/features/saveDataManager/load.ts +0 -99
  200. package/features/saveDataManager/main.ts +0 -195
  201. package/features/saveDataManager/maps.ts +0 -13
  202. package/features/saveDataManager/merge.ts +0 -194
  203. package/features/saveDataManager/save.ts +0 -74
  204. package/features/saveDataManager/serializationBrand.ts +0 -16
  205. package/features/sirenHelpers.ts +0 -129
  206. package/features/taintedLazarusPlayers.ts +0 -113
  207. package/featuresInitialized.ts +0 -20
  208. package/functions/ambush.ts +0 -47
  209. package/functions/array.ts +0 -410
  210. package/functions/benchmark.ts +0 -36
  211. package/functions/bitwise.ts +0 -24
  212. package/functions/bombs.ts +0 -12
  213. package/functions/boss.ts +0 -227
  214. package/functions/cacheFlag.ts +0 -12
  215. package/functions/cards.ts +0 -271
  216. package/functions/challenges.ts +0 -13
  217. package/functions/character.ts +0 -126
  218. package/functions/charge.ts +0 -237
  219. package/functions/chargeBar.ts +0 -67
  220. package/functions/collectibleCacheFlag.ts +0 -90
  221. package/functions/collectibleSet.ts +0 -56
  222. package/functions/collectibleTag.ts +0 -89
  223. package/functions/collectibles.ts +0 -659
  224. package/functions/color.ts +0 -128
  225. package/functions/debug.ts +0 -68
  226. package/functions/deepCopy.ts +0 -535
  227. package/functions/deepCopyTests.ts +0 -386
  228. package/functions/direction.ts +0 -49
  229. package/functions/doors.ts +0 -347
  230. package/functions/easing.ts +0 -182
  231. package/functions/eden.ts +0 -47
  232. package/functions/effects.ts +0 -20
  233. package/functions/entity.ts +0 -439
  234. package/functions/entitySpecific.ts +0 -889
  235. package/functions/entityTypes.ts +0 -6
  236. package/functions/enums.ts +0 -146
  237. package/functions/familiars.ts +0 -106
  238. package/functions/flag.ts +0 -165
  239. package/functions/flying.ts +0 -117
  240. package/functions/globals.ts +0 -242
  241. package/functions/gridEntity.ts +0 -511
  242. package/functions/gridEntitySpecific.ts +0 -112
  243. package/functions/input.ts +0 -139
  244. package/functions/isaacAPIClass.ts +0 -67
  245. package/functions/jsonHelpers.ts +0 -45
  246. package/functions/jsonRoom.ts +0 -100
  247. package/functions/kColor.ts +0 -129
  248. package/functions/language.ts +0 -13
  249. package/functions/level.ts +0 -31
  250. package/functions/log.ts +0 -720
  251. package/functions/map.ts +0 -56
  252. package/functions/math.ts +0 -149
  253. package/functions/mergeTests.ts +0 -288
  254. package/functions/npc.ts +0 -148
  255. package/functions/pickupVariants.ts +0 -60
  256. package/functions/pickups.ts +0 -499
  257. package/functions/pills.ts +0 -205
  258. package/functions/player.ts +0 -1060
  259. package/functions/playerDataStructures.ts +0 -150
  260. package/functions/playerHealth.ts +0 -382
  261. package/functions/playerIndex.ts +0 -195
  262. package/functions/pocketItems.ts +0 -149
  263. package/functions/positionVelocity.ts +0 -188
  264. package/functions/random.ts +0 -77
  265. package/functions/revive.ts +0 -201
  266. package/functions/rng.ts +0 -172
  267. package/functions/roomData.ts +0 -199
  268. package/functions/roomGrid.ts +0 -109
  269. package/functions/roomShape.ts +0 -80
  270. package/functions/rooms.ts +0 -648
  271. package/functions/run.ts +0 -36
  272. package/functions/saveFile.ts +0 -128
  273. package/functions/seeds.ts +0 -19
  274. package/functions/serialization.ts +0 -91
  275. package/functions/set.ts +0 -95
  276. package/functions/sound.ts +0 -9
  277. package/functions/spawnCollectible.ts +0 -104
  278. package/functions/sprite.ts +0 -107
  279. package/functions/stage.ts +0 -125
  280. package/functions/string.ts +0 -47
  281. package/functions/table.ts +0 -189
  282. package/functions/tears.ts +0 -32
  283. package/functions/transformations.ts +0 -131
  284. package/functions/trinketCacheFlag.ts +0 -60
  285. package/functions/trinketGive.ts +0 -157
  286. package/functions/trinkets.ts +0 -215
  287. package/functions/tstlClass.ts +0 -157
  288. package/functions/types.ts +0 -36
  289. package/functions/ui.ts +0 -138
  290. package/functions/utils.ts +0 -189
  291. package/functions/vector.ts +0 -126
  292. package/index.ts +0 -172
  293. package/initCustomCallbacks.ts +0 -132
  294. package/initFeatures.ts +0 -39
  295. package/interfaces/AddCallbackParameterCustom.ts +0 -188
  296. package/interfaces/ChargeBarSprites.ts +0 -12
  297. package/interfaces/JSONDoor.ts +0 -13
  298. package/interfaces/JSONEntity.ts +0 -16
  299. package/interfaces/JSONRoom.ts +0 -36
  300. package/interfaces/JSONRooms.ts +0 -12
  301. package/interfaces/JSONSpawn.ts +0 -14
  302. package/interfaces/PlayerHealth.ts +0 -16
  303. package/interfaces/PocketItemDescription.ts +0 -9
  304. package/interfaces/SaveData.ts +0 -29
  305. package/interfaces/TrinketSituation.ts +0 -9
  306. package/interfaces/private/TSTLClassMetatable.ts +0 -8
  307. package/maps/PHDPillConversions.ts +0 -21
  308. package/maps/cardMap.ts +0 -209
  309. package/maps/characterMap.ts +0 -87
  310. package/maps/collectibleDescriptionMap.ts +0 -732
  311. package/maps/collectibleNameMap.ts +0 -731
  312. package/maps/defaultPlayerStatMap.ts +0 -17
  313. package/maps/falsePHDPillConversions.ts +0 -35
  314. package/maps/gridEntityTypeToBrokenStateMap.ts +0 -50
  315. package/maps/gridEntityXMLMap.ts +0 -176
  316. package/maps/pillEffectMap.ts +0 -88
  317. package/maps/roomShapeToTopLeftWallGridIndexMap.ts +0 -18
  318. package/maps/roomTypeMap.ts +0 -40
  319. package/maps/trinketDescriptionMap.ts +0 -200
  320. package/maps/trinketNameMap.ts +0 -198
  321. package/objects/LRoomShapeToRectangles.ts +0 -44
  322. package/objects/callbackRegisterFunctions.ts +0 -187
  323. package/objects/cardDescriptions.ts +0 -105
  324. package/objects/cardNames.ts +0 -105
  325. package/objects/cardTypes.ts +0 -104
  326. package/objects/challengeNames.ts +0 -52
  327. package/objects/characterNames.ts +0 -48
  328. package/objects/coinSubTypeToValue.ts +0 -14
  329. package/objects/colors.ts +0 -16
  330. package/objects/directionNames.ts +0 -11
  331. package/objects/directionToDegrees.ts +0 -11
  332. package/objects/directionToVector.ts +0 -12
  333. package/objects/doorSlotFlagToDoorSlot.ts +0 -16
  334. package/objects/doorSlotToDirection.ts +0 -14
  335. package/objects/isaacAPIClassTypeToBrand.ts +0 -11
  336. package/objects/isaacAPIClassTypeToCopyFunction.ts +0 -18
  337. package/objects/languageNames.ts +0 -13
  338. package/objects/oppositeDoorSlots.ts +0 -15
  339. package/objects/pillEffectClasses.ts +0 -63
  340. package/objects/pillEffectNames.ts +0 -57
  341. package/objects/pillEffectTypes.ts +0 -62
  342. package/objects/roomShapeBounds.ts +0 -71
  343. package/objects/roomShapeLayoutSizes.ts +0 -45
  344. package/objects/roomShapeToBottomRightPosition.ts +0 -25
  345. package/objects/roomShapeToDoorSlots.ts +0 -83
  346. package/objects/roomShapeToDoorSlotsToGridIndexDelta.ts +0 -127
  347. package/objects/roomShapeToGridWidth.ts +0 -21
  348. package/objects/roomShapeToTopLeftPosition.ts +0 -26
  349. package/objects/roomShapeVolumes.ts +0 -38
  350. package/objects/roomTypeNames.ts +0 -36
  351. package/objects/serializedIsaacAPIClassTypeToIdentityFunction.ts +0 -14
  352. package/objects/stageTypeToLetter.ts +0 -15
  353. package/objects/transformationNames.ts +0 -18
  354. package/patchErrorFunctions.ts +0 -92
  355. package/sets/LRoomShapesSet.ts +0 -8
  356. package/sets/bossSets.ts +0 -470
  357. package/sets/charactersThatStartWithAnActiveItemSet.ts +0 -16
  358. package/sets/charactersWithBlackHeartFromEternalHeartSet.ts +0 -7
  359. package/sets/charactersWithFreeDevilDealsSet.ts +0 -4
  360. package/sets/charactersWithNoRedHeartsSet.ts +0 -17
  361. package/sets/charactersWithNoSoulHeartsSet.ts +0 -14
  362. package/sets/chestPickupVariantsSet.ts +0 -16
  363. package/sets/familiarsThatShootPlayerTearsSet.ts +0 -13
  364. package/sets/lostStyleCharactersSet.ts +0 -13
  365. package/sets/mineShaftRoomSubTypesSet.ts +0 -10
  366. package/sets/redHeartSubTypesSet.ts +0 -7
  367. package/sets/sinEntityTypesSet.ts +0 -11
  368. package/sets/singleUseActiveCollectibleTypesSet.ts +0 -13
  369. package/sets/storyBossesSet.ts +0 -17
  370. package/types/AnyEntity.ts +0 -12
  371. package/types/AwaitingTextInput.d.ts +0 -2
  372. package/types/CollectibleIndex.ts +0 -16
  373. package/types/PickingUpItem.ts +0 -89
  374. package/types/PlayerIndex.ts +0 -13
  375. package/types/private/IsaacAPIClass.ts +0 -3
  376. package/types/private/SerializedIsaacAPIClass.ts +0 -3
  377. package/types/private/TSTLClass.ts +0 -3
  378. package/upgradeMod.ts +0 -55
@@ -1,1278 +0,0 @@
1
- /*
2
- eslint isaacscript/member-ordering: ["warn", {
3
- enums: {
4
- memberTypes: ["method", "field"],
5
- order: "alphabetically"
6
- },
7
- }]
8
- */
9
-
10
- /**
11
- * - The Isaac API offers a lot of callbacks, but a lot of times there isn't one for the specific
12
- * thing that you are looking to do. So, `isaacscript-common` adds a bunch of new callbacks that
13
- * you can use.
14
- * - The extra callbacks are efficient such that no code is executed until there is one or more
15
- * subscriptions.
16
- * - You must upgrade your mod with the `upgradeMod` helper function before using a custom callback.
17
- */
18
- export enum ModCallbackCustom {
19
- /**
20
- * Fires from the `POST_UPDATE` callback when a Challenge Room or Boss Rush is started.
21
- * Specifically, this happens on the first frame that `Room.IsAmbushDone` is true.
22
- *
23
- * When registering the callback, takes an optional second argument that will make the callback
24
- * only fire if for the `AmbushType` provided.
25
- *
26
- * ```ts
27
- * function postAmbushFinished(ambushType: AmbushType): void {}
28
- * ```
29
- */
30
- POST_AMBUSH_FINISHED,
31
-
32
- /**
33
- * Fires from the `POST_UPDATE` callback when a Challenge Room or Boss Rush is completed.
34
- * Specifically, this happens on the first frame that `Room.IsAmbushActive` is true.
35
- *
36
- * When registering the callback, takes an optional second argument that will make the callback
37
- * only fire if for the `AmbushType` provided.
38
- *
39
- * ```ts
40
- * function postAmbushStarted(ambushType: AmbushType): void {}
41
- * ```
42
- */
43
- POST_AMBUSH_STARTED,
44
-
45
- /**
46
- * Fires on the `POST_BOMB_UPDATE` callback that it explodes.
47
- *
48
- * When registering the callback, takes an optional second argument that will make the callback
49
- * only fire if the bomb variant matches the `BombVariant` provided.
50
- *
51
- * ```ts
52
- * function postBombDetonated(bomb: EntityBomb): void {}
53
- * ```
54
- */
55
- POST_BOMB_EXPLODED,
56
-
57
- /**
58
- * Fires on the first `POST_BOMB_UPDATE` frame for each bomb.
59
- *
60
- * This callback is useful because many attributes cannot be set or retrieved properly in the
61
- * normal `POST_BOMB_INIT` callback.
62
- *
63
- * When registering the callback, takes an optional second argument that will make the callback
64
- * only fire if the bomb variant matches the `BombVariant` provided.
65
- *
66
- * ```ts
67
- * function postBombInitLate(bomb: EntityBomb): void {}
68
- * ```
69
- */
70
- POST_BOMB_INIT_LATE,
71
-
72
- /**
73
- * Fires from the `POST_RENDER` callback when one of Forgotten's bone clubs is swung or thrown.
74
- *
75
- * ```ts
76
- * function postBoneSwing(boneClub: EntityKnife): void {}
77
- * ```
78
- */
79
- POST_BONE_SWING,
80
-
81
- /**
82
- * Fires from the `POST_PICKUP_INIT` callback on the first time that a player has seen the
83
- * respective collectible on the run. For more details on how this is calculated, see the
84
- * documentation for the `getCollectibleIndex` helper function.
85
- *
86
- * This callback is useful because collectibles will despawn upon leaving the room and respawn
87
- * upon re-entering the room. Additionally, when playing as Tainted Isaac, the `POST_PICKUP_INIT`
88
- * callback will fire every time the item shifts.
89
- *
90
- * When registering the callback, takes an optional second argument that will make the callback
91
- * only fire if the collectible type matches the `CollectibleType` provided.
92
- *
93
- * ```ts
94
- * function postCollectibleInitLate(collectible: EntityPickup): void {}
95
- * ```
96
- */
97
- POST_COLLECTIBLE_INIT_FIRST,
98
-
99
- /**
100
- * Fires from the `POST_PLAYER_RENDER` callback on the first frame that the "TeleportUp" animation
101
- * begins playing after a player triggers a Cursed Eye teleport or a Cursed Skull teleport. (Both
102
- * of these have the same effect in causing Isaac to be teleported to a random room.)
103
- *
104
- * ```ts
105
- * function postCursedTeleport(player: EntityPlayer): void {}
106
- * ```
107
- */
108
- POST_CURSED_TELEPORT,
109
-
110
- /**
111
- * Fires from the `POST_PEFFECT_UPDATE` callback when a player enters the loading zone of a custom
112
- * door created with the `spawnCustomDoor` helper function.
113
- *
114
- * When registering the callback, takes an optional second argument that will make the callback
115
- * only fire if it matches the `DoorVariant` provided.
116
- *
117
- * ```ts
118
- * function postCustomDoorEnter(
119
- * player: EntityPlayer,
120
- * effectVariant: int,
121
- * doorSlot: DoorSlot,
122
- * direction: Direction,
123
- * ): void {}
124
- * ```
125
- */
126
- POST_CUSTOM_DOOR_ENTER,
127
-
128
- /**
129
- * Fires from the `POST_PLAYER_UPDATE` callback after the player has finished the death animation,
130
- * has teleported to the previous room, and is ready to play the animation for the modded revival
131
- * item. The `revivalType` will match the value returned from the `PRE_CUSTOM_REVIVE` callback.
132
- *
133
- * In this callback, you must play an animation with something along the lines of
134
- * `player.AnimateCollectible(CollectibleTypeCustom.COLLECTIBLE_MY_REVIVAL_ITEM);`, otherwise the
135
- * animation for a 1-Up will play.
136
- *
137
- * When registering the callback, takes an optional second argument that will make the callback
138
- * only fire if the revival type matches the one provided.
139
- *
140
- * ```ts
141
- * function postCustomRevive(player: EntityPlayer, revivalType: int): void {}
142
- * ```
143
- */
144
- POST_CUSTOM_REVIVE,
145
-
146
- /**
147
- * Fires from the `EFFECT_POST_UPDATE` callback after a player has entered the range of a Dice
148
- * Room floor.
149
- *
150
- * When registering the callback, takes an optional second argument that will make the callback
151
- * only fire if the `DiceFloorSubType` type matches the one provided.
152
- *
153
- * ```ts
154
- * function postDiceRoomActivated(
155
- * player: EntityPlayer,
156
- * diceFloorSubType: DiceFloorSubType,
157
- * ): void {}
158
- * ```
159
- */
160
- POST_DICE_ROOM_ACTIVATED,
161
-
162
- /**
163
- * Fires from the `POST_RENDER` callback on every frame that a door exists.
164
- *
165
- * When registering the callback, takes an optional second argument that will make the callback
166
- * only fire if it matches the variant provided.
167
- *
168
- * ```ts
169
- * function postDoorRender(door: GridEntityDoor): void {}
170
- * ```
171
- */
172
- POST_DOOR_RENDER,
173
-
174
- /**
175
- * Fires from the `POST_UPDATE` callback on every frame that a door exists.
176
- *
177
- * When registering the callback, takes an optional second argument that will make the callback
178
- * only fire if it matches the variant provided.
179
- *
180
- * ```ts
181
- * function postDoorUpdate(door: GridEntityDoor): void {}
182
- * ```
183
- */
184
- POST_DOOR_UPDATE,
185
-
186
- /**
187
- * Fires on the first `POST_EFFECT_UPDATE` frame for each effect.
188
- *
189
- * This callback is useful because many attributes cannot be set or retrieved properly in the
190
- * normal `POST_EFFECT_INIT` callback.
191
- *
192
- * When registering the callback, takes an optional second argument that will make the callback
193
- * only fire if the effect variant matches the `EffectVariant` provided.
194
- *
195
- * ```ts
196
- * function postEffectInitLate(effect: EntityEffect): void {}
197
- * ```
198
- */
199
- POST_EFFECT_INIT_LATE,
200
-
201
- /**
202
- * Fires from the `POST_EFFECT_UPDATE` callback when an effect's state has changed from what it
203
- * was on the previous frame.
204
- *
205
- * When registering the callback, takes an optional second argument that will make the callback
206
- * only fire if it matches the `EffectVariant` provided.
207
- *
208
- * ```ts
209
- * function postEffectStateChanged(
210
- * effect: EntityEffect,
211
- * previousState: int,
212
- * currentState: int,
213
- * ): void {}
214
- * ```
215
- */
216
- POST_EFFECT_STATE_CHANGED,
217
-
218
- /**
219
- * Fires one `POST_UPDATE` frame after the player has used the Esau Jr. item. (The player is not
220
- * updated to the new character until a game frame has passed.)
221
- *
222
- * ```ts
223
- * function postEsauJr(player: EntityPlayer): void {}
224
- * ```
225
- */
226
- POST_ESAU_JR,
227
-
228
- /**
229
- * Fires on the first `FAMILIAR_UPDATE` frame for each familiar.
230
- *
231
- * This callback is useful because many attributes cannot be set or retrieved properly in the
232
- * normal `POST_TEAR_INIT` callback.
233
- *
234
- * When registering the callback, takes an optional second argument that will make the callback
235
- * only fire if the familiar variant matches the `FamiliarVariant` provided.
236
- *
237
- * ```ts
238
- * function postFamiliarInitLate(familiar: EntityFamiliar): void {}
239
- * ```
240
- */
241
- POST_FAMILIAR_INIT_LATE,
242
-
243
- /**
244
- * Fires from the `POST_FAMILIAR_UPDATE` callback when a familiar's state has changed from what it
245
- * was on the previous frame.
246
- *
247
- * When registering the callback, takes an optional second argument that will make the callback
248
- * only fire if it matches the `FamiliarVariant` provided.
249
- *
250
- * ```ts
251
- * function postFamiliarStateChanged(
252
- * familiar: EntityFamiliar,
253
- * previousState: int,
254
- * currentState: int,
255
- * ): void {}
256
- * ```
257
- */
258
- POST_FAMILIAR_STATE_CHANGED,
259
-
260
- /**
261
- * Fires one `POST_UPDATE` frame after the player has first used the Esau Jr. item. (The player is
262
- * not updated to the new character until a game frame has passed.)
263
- *
264
- * This callback is useful because there is no way to get access to the Esau Jr. character entity
265
- * before the player has actually used the Esau Jr. item.
266
- *
267
- * ```ts
268
- * function postFirstEsauJr(player: EntityPlayer): void {}
269
- * ```
270
- */
271
- POST_FIRST_ESAU_JR,
272
-
273
- /**
274
- * Fires after the player has used the Flip item for the first time. Unlike the vanilla `USE_ITEM`
275
- * callback, this callback will return the player object for the new Lazarus (not the one who used
276
- * the Flip item).
277
- *
278
- * This callback is useful because there is no way to get access to the "flipped" character entity
279
- * before the player has actually used the Flip item.
280
- *
281
- * ```ts
282
- * function postFirstFlip(player: EntityPlayer): void {}
283
- * ```
284
- */
285
- POST_FIRST_FLIP,
286
-
287
- /**
288
- * Fires after the player has used the Flip item. Unlike the vanilla `USE_ITEM` callback, this
289
- * callback will return the player object for the new Lazarus (not the one who used the Flip
290
- * item).
291
- *
292
- * This callback is useful because there is no way to get access to the "flipped" character entity
293
- * before the player has actually used the Flip item.
294
- *
295
- * ```ts
296
- * function postFlip(player: EntityPlayer): void {}
297
- * ```
298
- */
299
- POST_FLIP,
300
-
301
- /**
302
- * Similar to the vanilla callback of the same name, but fires in the correct order with respect
303
- * to the `POST_NEW_LEVEL` and the `POST_NEW_ROOM` callbacks:
304
- *
305
- * `POST_GAME_STARTED_REORDERED` --> `POST_NEW_LEVEL_REORDERED` --> `POST_NEW_ROOM_REORDERED`
306
- *
307
- * ```ts
308
- * function postGameStartedReordered(isContinued: boolean): void {}
309
- * ```
310
- */
311
- POST_GAME_STARTED_REORDERED,
312
-
313
- /**
314
- * Fires from the `POST_UPDATE` callback when the Greed Mode wave increases.
315
- *
316
- * ```ts
317
- * function postGreedModeWave(oldWave: int, newWave: int): void {}
318
- * ```
319
- */
320
- POST_GREED_MODE_WAVE,
321
-
322
- /**
323
- * Fires from the `POST_UPDATE` update when a grid entity changes to a state that corresponds to
324
- * the broken state for the respective grid entity type.
325
- *
326
- * When registering the callback, takes an optional second argument that will make the callback
327
- * only fire if it matches the `GridEntityType` provided.
328
- *
329
- * ```ts
330
- * function postGridEntityBroken(gridEntity: GridEntity): void {}
331
- * ```
332
- */
333
- POST_GRID_ENTITY_BROKEN,
334
-
335
- /**
336
- * Fires from the `POST_UPDATE` callback when a new entity collides with a grid entity.
337
- *
338
- * When registering the callback, takes an optional second argument that will make the callback
339
- * only fire if it matches the `GridEntityType` provided.
340
- *
341
- * ```ts
342
- * function postGridEntityCollision(
343
- * gridEntity: GridEntity,
344
- * entity: Entity,
345
- * ): void {}
346
- * ```
347
- */
348
- POST_GRID_ENTITY_COLLISION,
349
-
350
- /**
351
- * Fires when a new grid entity is initialized. Specifically, this is either:
352
- *
353
- * - in the `POST_NEW_ROOM` callback (firing every time a room is entered, even if the entity was
354
- * previously there on a previous room entry)
355
- * - in the `POST_UPDATE` callback (if the entity appeared mid-way through the room, like when the
356
- * trapdoor appears after defeating It Lives!)
357
- *
358
- * When registering the callback, takes an optional second argument that will make the callback
359
- * only fire if it matches the `GridEntityType` provided.
360
- *
361
- * ```ts
362
- * function postGridEntityInit(gridEntity: GridEntity): void {}
363
- * ```
364
- */
365
- POST_GRID_ENTITY_INIT,
366
-
367
- /**
368
- * Fires from the `POST_UPDATE` callback when a new grid entity is removed. Specifically, this on
369
- * the frame after it no longer exists (where it did exist a frame ago).
370
- *
371
- * When registering the callback, takes an optional second argument that will make the callback
372
- * only fire if it matches the `GridEntityType` provided.
373
- *
374
- * ```ts
375
- * function postGridEntityRemove(
376
- * gridIndex: int,
377
- * gridEntityType: GridEntityType,
378
- * ): void {}
379
- * ```
380
- */
381
- POST_GRID_ENTITY_REMOVE,
382
-
383
- /**
384
- * Fires from the `POST_RENDER` callback on every frame that a grid entity exists.
385
- *
386
- * - When registering the callback, takes an optional second argument that will make the callback
387
- * only fire if it matches the `GridEntityType` provided.
388
- * - When registering the callback, takes an optional third argument that will make the callback
389
- * only fire if it matches the variant provided.
390
- *
391
- * ```ts
392
- * function postGridEntityRender(gridEntity: GridEntity): void {}
393
- * ```
394
- */
395
- POST_GRID_ENTITY_RENDER,
396
-
397
- /**
398
- * Fires from the `POST_UPDATE` callback when a grid entity changes its state.
399
- *
400
- * When registering the callback, takes an optional second argument that will make the callback
401
- * only fire if it matches the `GridEntityType` provided.
402
- *
403
- * ```ts
404
- * function postGridEntityStateChanged(
405
- * gridEntity: GridEntity,
406
- * oldState: int,
407
- * newState: int,
408
- * ): void {}
409
- * ```
410
- */
411
- POST_GRID_ENTITY_STATE_CHANGED,
412
-
413
- /**
414
- * Fires from the `POST_UPDATE` callback on every frame that a grid entity exists.
415
- *
416
- * - When registering the callback, takes an optional second argument that will make the callback
417
- * only fire if it matches the `GridEntityType` provided.
418
- * - When registering the callback, takes an optional third argument that will make the callback
419
- * only fire if it matches the variant provided.
420
- *
421
- * ```ts
422
- * function postGridEntityUpdate(gridEntity: GridEntity): void {}
423
- * ```
424
- */
425
- POST_GRID_ENTITY_UPDATE,
426
-
427
- /**
428
- * Fires from the `POST_PEFFECT_UPDATE` callback when the player loses a Holy Mantle temporary
429
- * collectible effect.
430
- *
431
- * This callback is useful because you might want to have code that happens when the player is hit
432
- * from an enemy. Normally, you would accomplish this via the `ENTITY_TAKE_DMG` callback, but that
433
- * callback never fires if the player has a Holy Mantle shield.
434
- *
435
- * - When registering the callback, takes an optional second argument that will make the callback
436
- * only fire if the player matches the `PlayerVariant` provided.
437
- * - When registering the callback, takes an optional third argument that will make the callback
438
- * only fire if the player matches the `PlayerType` provided.
439
- *
440
- * ```ts
441
- * function postPlayerInitReordered(
442
- * player: EntityPlayer,
443
- * oldNumHolyMantles: int,
444
- * newNumHolyMantles: int,
445
- * ): void {}
446
- * ```
447
- */
448
- POST_HOLY_MANTLE_REMOVED,
449
-
450
- /**
451
- * Fires from `POST_PEFFECT_UPDATE` callback when the player loses charge on their active
452
- * collectible item, implying that the item was just used.
453
- *
454
- * This callback is useful because the `USE_ITEM` callback does not fire when The Candle, Red
455
- * Candle, and Bob's Rotten Brain are discharged.
456
- *
457
- * Note that this callback will not fire if the active item is both discharged and swapped for
458
- * another item / discharged on the same frame, like in the case of Alabaster Box.
459
- *
460
- * When registering the callback, takes an optional second argument that will make the callback
461
- * only fire if it matches the `CollectibleType` provided.
462
- *
463
- * ```ts
464
- * function postItemDischarge(
465
- * player: EntityPlayer,
466
- * collectibleType: CollectibleType,
467
- * activeSlot: ActiveSlot,
468
- * ): void {}
469
- * ```
470
- */
471
- POST_ITEM_DISCHARGE,
472
-
473
- /**
474
- * Fires from the `POST_PEFFECT_UPDATE` callback when an item is no longer queued (i.e. when the
475
- * animation of the player holding the item above their head is finished and the item is actually
476
- * added to the player's inventory).
477
- *
478
- * Note that this callback will only fire once per Forgotten/Soul pair.
479
- *
480
- * - When registering the callback, takes an optional second argument that will make the callback
481
- * only fire if it matches the `ItemType` provided.
482
- * - When registering the callback, takes an optional third argument that will make the callback
483
- * only fire if the `CollectibleType` or the `TrinketType` matches the ID provided.
484
- *
485
- * ```ts
486
- * function postItemPickup(
487
- * player: EntityPlayer,
488
- * pickingUpItem: PickingUpItem,
489
- * ): void {}
490
- * ```
491
- */
492
- POST_ITEM_PICKUP,
493
-
494
- /**
495
- * Fires on the first `POST_KNIFE_UPDATE` frame for each knife.
496
- *
497
- * This callback is useful because many attributes cannot be set or retrieved properly in the
498
- * normal `POST_KNIFE_INIT` callback.
499
- *
500
- * When registering the callback, takes an optional second argument that will make the callback
501
- * only fire if the knife variant matches the `KnifeVariant` provided.
502
- *
503
- * ```ts
504
- * function postKnifeInitLate(knife: EntityKnife): void {}
505
- * ```
506
- */
507
- POST_KNIFE_INIT_LATE,
508
-
509
- /**
510
- * Fires on the first `POST_LASER_UPDATE` frame for each laser.
511
- *
512
- * This callback is useful because many attributes cannot be set or retrieved properly in the
513
- * normal `POST_LASER_INIT` callback.
514
- *
515
- * When registering the callback, takes an optional second argument that will make the callback
516
- * only fire if the laser variant matches the `LaserVariant` provided.
517
- *
518
- * ```ts
519
- * function postLaserInitLate(laser: EntityLaser): void {}
520
- * ```
521
- */
522
- POST_LASER_INIT_LATE,
523
-
524
- /**
525
- * The same as the vanilla callback of the same name, but fires in the correct order with respect
526
- * to the `POST_GAME_STARTED` and the `POST_NEW_ROOM` callbacks:
527
- *
528
- * `POST_GAME_STARTED_REORDERED` --> `POST_NEW_LEVEL_REORDERED` --> `POST_NEW_ROOM_REORDERED`
529
- *
530
- * If some specific cases, mods can change the current level during run initialization (on the 0th
531
- * frame). However, due to how the callback reordering works, the custom
532
- * `POST_NEW_LEVEL_REORDERED` callback will never fire on the 0th frame. To get around this, call
533
- * the `forceNewLevelCallback()` function before changing levels to temporarily force the callback
534
- * to fire.
535
- *
536
- * ```ts
537
- * function postNewLevelReordered(): void {}
538
- * ```
539
- */
540
- POST_NEW_LEVEL_REORDERED,
541
-
542
- /**
543
- * Fires on the first `POST_NEW_ROOM` or `PRE_ENTITY_SPAWN` callback where being in a new room is
544
- * detected. This is useful because the vanilla `POST_NEW_ROOM` callback fires only after entities
545
- * in the room have been initialized and updated once, which means that it is possible for
546
- * entity-related code to run before room-related-initialization has been performed.
547
- *
548
- * ```ts
549
- * function postNewRoomEarly(): void {}
550
- * ```
551
- */
552
- POST_NEW_ROOM_EARLY,
553
-
554
- /**
555
- * The same as the vanilla callback of the same name, but fires in the correct order with respect
556
- * to the `POST_GAME_STARTED` and the `POST_NEW_LEVEL` callbacks:
557
- *
558
- * `POST_GAME_STARTED_REORDERED` --> `POST_NEW_LEVEL_REORDERED` --> `POST_NEW_ROOM_REORDERED`
559
- *
560
- * If some specific cases, mods can change the current room during run initialization (on the 0th
561
- * frame). However, due to how the callback reordering works, the custom `POST_NEW_ROOM_REORDERED`
562
- * callback will never fire on the 0th frame. To get around this, call the
563
- * `forceNewRoomCallback()` function before changing levels to temporarily force the callback to
564
- * fire.
565
- *
566
- * ```ts
567
- * function postNewRoomReordered(): void {}
568
- * ```
569
- */
570
- POST_NEW_ROOM_REORDERED,
571
-
572
- /**
573
- * Fires on the first `NPC_UPDATE` frame for each NPC.
574
- *
575
- * This callback is useful because many attributes cannot be set or retrieved properly in the
576
- * normal `POST_NPC_INIT` callback.
577
- *
578
- * When registering the callback, takes an optional second argument that will make the callback
579
- * only fire if the NPC's entity type matches the entity type provided.
580
- *
581
- * ```ts
582
- * function postNPCInitLate(npc: EntityNPC): void {}
583
- * ```
584
- */
585
- POST_NPC_INIT_LATE,
586
-
587
- /**
588
- * Fires from the `POST_NPC_UPDATE` callback when an NPC's state has changed from what it was on
589
- * the previous frame.
590
- *
591
- * - When registering the callback, takes an optional second argument that will make the callback
592
- * only fire if it matches the `EntityType` provided.
593
- * - When registering the callback, takes an optional third argument that will make the callback
594
- * only fire if it matches the variant provided.
595
- *
596
- * ```ts
597
- * function postNPCStateChanged(
598
- * npc: EntityNPC,
599
- * previousState: int,
600
- * currentState: int,
601
- * ): void {}
602
- * ```
603
- */
604
- POST_NPC_STATE_CHANGED,
605
-
606
- /**
607
- * Similar to the vanilla callback of the same name, but fires after the `POST_GAME_STARTED`
608
- * callback fires (if the player is being updated on the 0th game frame of the run).
609
- *
610
- * This callback is useful for two reasons:
611
- *
612
- * 1. Normally, `POST_PEFFECT_UPDATE` fires before `POST_GAME_STARTED`. Since mod variables are
613
- * often initialized at the beginning of the `POST_GAME_STARTED` callback, this can cause
614
- * problems.
615
- * 1. Some functions do not work (or crash the game) when called before the `POST_NEW_ROOM`
616
- * callback. For example, since the level is not generated yet, you will not be able to access
617
- * any rooms.
618
- *
619
- * - When registering the callback, takes an optional second argument that will make the callback
620
- * only fire if the player matches the `PlayerVariant` provided.
621
- * - When registering the callback, takes an optional third argument that will make the callback
622
- * only fire if the player matches the `PlayerType` provided.
623
- *
624
- * ```ts
625
- * function postPEffectUpdateReordered(player: EntityPlayer): void {}
626
- * ```
627
- */
628
- POST_PEFFECT_UPDATE_REORDERED,
629
-
630
- /**
631
- * Fires on the first `POST_RENDER` frame that a pickup plays the "Collect" animation.
632
- *
633
- * Use this callback to know when a pickup is added to the player's inventory or health.
634
- *
635
- * When registering the callback, takes an optional second argument that will make the callback
636
- * only fire if the pickup variant matches the `PickupVariant` provided.
637
- *
638
- * ```ts
639
- * function postPickupCollect(pickup: EntityPickup, player: EntityPlayer): void {}
640
- * ```
641
- */
642
- POST_PICKUP_COLLECT,
643
-
644
- /**
645
- * Fires from the `POST_PICKUP_INIT` callback on the first time that a player has seen the
646
- * respective pickup on the run.
647
- *
648
- * This callback is useful because pickups will despawn upon leaving the room and respawn upon
649
- * re-entering the room.
650
- *
651
- * For most cases, this callback will simply fire when `POST_PICKUP_INIT` fires and the player is
652
- * not re-entering a previously visited room.
653
- *
654
- * The special case is when a player enters a post-Ascent Treasure Room or Boss Room. For these
655
- * cases, the `InitSeed` of any pickups seen from previous floors is kept track of to prevent the
656
- * callback from firing when re-entering the room.
657
- *
658
- * When registering the callback, takes an optional second argument that will make the callback
659
- * only fire if the collectible type matches the `PickupVariant` provided.
660
- *
661
- * ```ts
662
- * function postPickupInitFirst(pickup: EntityPickup): void {}
663
- * ```
664
- */
665
- POST_PICKUP_INIT_FIRST,
666
-
667
- /**
668
- * Fires on the first `POST_PICKUP_UPDATE` frame for each pickup.
669
- *
670
- * This callback is useful because many attributes cannot be set or retrieved properly in the
671
- * normal `POST_PICKUP_INIT` callback.
672
- *
673
- * When registering the callback, takes an optional second argument that will make the callback
674
- * only fire if the pickup variant matches the `PickupVariant` provided.
675
- *
676
- * ```ts
677
- * function postPickupInitLate(pickup: EntityPickup): void {}
678
- * ```
679
- */
680
- POST_PICKUP_INIT_LATE,
681
-
682
- /**
683
- * Fires from the `POST_PICKUP_UPDATE` callback when a pickup's state has changed from what it was
684
- * on the previous frame.
685
- *
686
- * When registering the callback, takes an optional second argument that will make the callback
687
- * only fire if it matches the `PickupVariant` provided.
688
- *
689
- * ```ts
690
- * function postPickupStateChanged(
691
- * pickup: EntityPickup,
692
- * previousState: int,
693
- * currentState: int,
694
- * ): void {}
695
- * ```
696
- */
697
- POST_PICKUP_STATE_CHANGED,
698
-
699
- /**
700
- * Fires from the `POST_RENDER` callback on every frame that a pit exists.
701
- *
702
- * When registering the callback, takes an optional second argument that will make the callback
703
- * only fire if it matches the variant provided.
704
- *
705
- * ```ts
706
- * function postPitRender(pit: GridEntityPit): void {}
707
- * ```
708
- */
709
- POST_PIT_RENDER,
710
-
711
- /**
712
- * Fires from the `POST_UPDATE` callback on every frame that a pit exists.
713
- *
714
- * When registering the callback, takes an optional second argument that will make the callback
715
- * only fire if it matches the variant provided.
716
- *
717
- * ```ts
718
- * function postPitUpdate(pit: GridEntityPit): void {}
719
- * ```
720
- */
721
- POST_PIT_UPDATE,
722
-
723
- /**
724
- * Fires from the `POST_PEFFECT_UPDATE` callback when a player entity gains or loses any health
725
- * (i.e. hearts). For more information, see the `PlayerHealth` enum.
726
- *
727
- * - When registering the callback, takes an optional second argument that will make the callback
728
- * only fire if the player matches the `PlayerVariant` provided.
729
- * - When registering the callback, takes an optional third argument that will make the callback
730
- * only fire if the player matches the `PlayerType` provided.
731
- *
732
- * ```ts
733
- * function postPlayerChangeHealth(
734
- * player: EntityPlayer,
735
- * healthType: HealthType,
736
- * difference: int,
737
- * ): void {}
738
- * ```
739
- */
740
- POST_PLAYER_CHANGE_HEALTH,
741
-
742
- /**
743
- * Fires from the `POST_PEFFECT_UPDATE` callback when a player entity changes its player type
744
- * (i.e. character). For example, it will fire after using Clicker, after dying with the Judas'
745
- * Shadow collectible, etc.
746
- *
747
- * Notably, it does not fire after the player uses the Flip item or the Esau Jr. item, because
748
- * those items cause separate player entities to be created. Use the `POST_FLIP` and
749
- * `POST_ESAU_JR` callbacks to handle those situations.
750
- *
751
- * ```ts
752
- * function postPlayerChangeType(
753
- * player: EntityPlayer,
754
- * oldCharacter: PlayerType,
755
- * newCharacter: PlayerType,
756
- * ): void {}
757
- * ```
758
- */
759
- POST_PLAYER_CHANGE_TYPE,
760
-
761
- /**
762
- * Fires from the `POST_PEFFECT_UPDATE` callback when a player's collectible count is higher than
763
- * what it was on the previous frame.
764
- *
765
- * When registering the callback, takes an optional second argument that will make the callback
766
- * only fire if the player matches the `CollectibleType` provided.
767
- *
768
- * ```ts
769
- * function postPlayerCollectibleAdded(
770
- * player: EntityPlayer,
771
- * collectibleType: CollectibleType,
772
- * ): void {}
773
- * ```
774
- */
775
- POST_PLAYER_COLLECTIBLE_ADDED,
776
-
777
- /**
778
- * Fires from the `POST_PEFFECT_UPDATE` callback when a player's collectible count is lower than
779
- * what it was on the previous frame.
780
- *
781
- * When registering the callback, takes an optional second argument that will make the callback
782
- * only fire if the player matches the `CollectibleType` provided.
783
- *
784
- * ```ts
785
- * function postPlayerCollectibleRemoved(
786
- * player: EntityPlayer,
787
- * collectibleType: CollectibleType,
788
- * ): void {}
789
- * ```
790
- */
791
- POST_PLAYER_COLLECTIBLE_REMOVED,
792
-
793
- /**
794
- * Fires from the `ENTITY_TAKE_DMG` callback when a player takes fatal damage. Return false to
795
- * prevent the fatal damage.
796
- *
797
- * Note that this function does properly take into account Guppy's Collar, Broken Ankh, Spirit
798
- * Shackles, and Mysterious Paper. It also takes into account using The Bible on Satan.
799
- *
800
- * - When registering the callback, takes an optional second argument that will make the callback
801
- * only fire if the player matches the `PlayerVariant` provided.
802
- * - When registering the callback, takes an optional third argument that will make the callback
803
- * only fire if the player matches the `PlayerType` provided.
804
- *
805
- * ```ts
806
- * function postPlayerFatalDamage(player: EntityPlayer): boolean | undefined {}
807
- * ```
808
- */
809
- POST_PLAYER_FATAL_DAMAGE,
810
-
811
- /**
812
- * Fires on the first `POST_PLAYER_UPDATE` frame for each player.
813
- *
814
- * This callback is useful because many attributes cannot be set or retrieved properly in the
815
- * normal `POST_PLAYER_INIT` callback.
816
- *
817
- * - When registering the callback, takes an optional second argument that will make the callback
818
- * only fire if the player matches the `PlayerVariant` provided.
819
- * - When registering the callback, takes an optional third argument that will make the callback
820
- * only fire if the player matches the `PlayerType` provided.
821
- *
822
- * ```ts
823
- * function postPlayerInitLate(pickup: EntityPickup): void {}
824
- * ```
825
- */
826
- POST_PLAYER_INIT_LATE,
827
-
828
- /**
829
- * Similar to the vanilla callback of the same name, but fires after the `POST_GAME_STARTED`
830
- * callback fires (if the player is spawning on the 0th game frame of the run).
831
- *
832
- * This callback is useful for two reasons:
833
- *
834
- * 1. Normally, `POST_PLAYER_INIT` fires before `POST_GAME_STARTED`. Since mod variables are often
835
- * initialized at the beginning of the `POST_GAME_STARTED` callback, this can cause problems.
836
- * 1. Some functions do not work (or crash the game) when called before the `POST_NEW_ROOM`
837
- * callback. For example, since the level is not generated yet, you will not be able to access
838
- * any rooms.
839
- *
840
- * - When registering the callback, takes an optional second argument that will make the callback
841
- * only fire if the player matches the `PlayerVariant` provided.
842
- * - When registering the callback, takes an optional third argument that will make the callback
843
- * only fire if the player matches the `PlayerType` provided.
844
- *
845
- * ```ts
846
- * function postPlayerInitReordered(player: EntityPlayer): void {}
847
- * ```
848
- */
849
- POST_PLAYER_INIT_REORDERED,
850
-
851
- /**
852
- * Similar to the vanilla callback of the same name, but fires after the `POST_GAME_STARTED`
853
- * callback fires (if the player is spawning on the 0th game frame of the run).
854
- *
855
- * This callback is useful for two reasons:
856
- *
857
- * 1. Normally, `POST_PLAYER_RENDER` fires before `POST_GAME_STARTED`. Since mod variables are
858
- * often initialized at the beginning of the `POST_GAME_STARTED` callback, this can cause
859
- * problems.
860
- * 1. Some functions do not work (or crash the game) when called before the `POST_NEW_ROOM`
861
- * callback. For example, since the level is not generated yet, you will not be able to access
862
- * any rooms.
863
- *
864
- * - When registering the callback, takes an optional second argument that will make the callback
865
- * only fire if the player matches the `PlayerVariant` provided.
866
- * - When registering the callback, takes an optional third argument that will make the callback
867
- * only fire if the player matches the `PlayerType` provided.
868
- *
869
- * ```ts
870
- * function postPlayerRenderReordered(player: EntityPlayer): void {}
871
- * ```
872
- */
873
- POST_PLAYER_RENDER_REORDERED,
874
-
875
- /**
876
- * Similar to the vanilla callback of the same name, but fires after the `POST_GAME_STARTED`
877
- * callback fires (if the player is being updated on the 0th game frame of the run).
878
- *
879
- * This callback is useful for two reasons:
880
- *
881
- * 1. Normally, `POST_PLAYER_UPDATE` fires before `POST_GAME_STARTED`. Since mod variables are
882
- * often initialized at the beginning of the `POST_GAME_STARTED` callback, this can cause
883
- * problems.
884
- * 1. Some functions do not work (or crash the game) when called before the `POST_NEW_ROOM`
885
- * callback. For example, since the level is not generated yet, you will not be able to access
886
- * any rooms.
887
- *
888
- * - When registering the callback, takes an optional second argument that will make the callback
889
- * only fire if the player matches the `PlayerVariant` provided.
890
- * - When registering the callback, takes an optional third argument that will make the callback
891
- * only fire if the player matches the `PlayerType` provided.
892
- *
893
- * ```ts
894
- * function postPlayerUpdateReordered(player: EntityPlayer): void {}
895
- * ```
896
- */
897
- POST_PLAYER_UPDATE_REORDERED,
898
-
899
- /**
900
- * Fires from the `POST_RENDER` callback on every frame that a poop exists.
901
- *
902
- * When registering the callback, takes an optional second argument that will make the callback
903
- * only fire if it matches the variant provided.
904
- *
905
- * ```ts
906
- * function postPoopRender(poop: GridEntityPoop): void {}
907
- * ```
908
- */
909
- POST_POOP_RENDER,
910
-
911
- /**
912
- * Fires from the `POST_UPDATE` callback on every frame that a poop exists.
913
- *
914
- * When registering the callback, takes an optional second argument that will make the callback
915
- * only fire if it matches the variant provided.
916
- *
917
- * ```ts
918
- * function postPoopUpdate(poop: GridEntityPoop): void {}
919
- * ```
920
- */
921
- POST_POOP_UPDATE,
922
-
923
- /**
924
- * Fires from the `POST_RENDER` callback on every frame that a pressure plate exists.
925
- *
926
- * When registering the callback, takes an optional second argument that will make the callback
927
- * only fire if it matches the variant provided.
928
- *
929
- * ```ts
930
- * function postPressurePlateRender(pressurePlate: GridEntityPressurePlate): void {}
931
- * ```
932
- */
933
- POST_PRESSURE_PLATE_RENDER,
934
-
935
- /**
936
- * Fires from the `POST_UPDATE` callback on every frame that a pressure plate exists.
937
- *
938
- * When registering the callback, takes an optional second argument that will make the callback
939
- * only fire if it matches the variant provided.
940
- *
941
- * ```ts
942
- * function postPressurePlateUpdate(pressurePlate: GridEntityPressurePlate): void {}
943
- * ```
944
- */
945
- POST_PRESSURE_PLATE_UPDATE,
946
-
947
- /**
948
- * Fires on the first `POST_PROJECTILE_UPDATE` frame for each projectile.
949
- *
950
- * This callback is useful because many attributes cannot be set or retrieved properly in the
951
- * normal `POST_PROJECTILE_INIT` callback.
952
- *
953
- * When registering the callback, takes an optional second argument that will make the callback
954
- * only fire if the projectile variant matches the `ProjectileVariant` provided.
955
- *
956
- * ```ts
957
- * function postProjectileInitLate(projectile: EntityProjectile): void {}
958
- * ```
959
- */
960
- POST_PROJECTILE_INIT_LATE,
961
-
962
- /**
963
- * Fires from the `POST_PEFFECT_UPDATE` callback when a player first picks up a new item. The
964
- * pickup returned in the callback is assumed to be the first pickup that no longer exists.
965
- *
966
- * - When registering the callback, takes an optional second argument that will make the callback
967
- * only fire if it matches the `PickupVariant` provided.
968
- * - When registering the callback, takes an optional third argument that will make the callback
969
- * only fire if it matches the sub-type provided.
970
- *
971
- * ```ts
972
- * function postPurchase(player: EntityPlayer, pickup: EntityPickup): void {}
973
- * ```
974
- */
975
- POST_PURCHASE,
976
-
977
- /**
978
- * Fires from the `POST_RENDER` callback on every frame that a rock exists.
979
- *
980
- * When registering the callback, takes an optional second argument that will make the callback
981
- * only fire if it matches the variant provided.
982
- *
983
- * ```ts
984
- * function postRockRender(rock: GridEntityRock): void {}
985
- * ```
986
- */
987
- POST_ROCK_RENDER,
988
-
989
- /**
990
- * Fires from the `POST_UPDATE` callback on every frame that a rock exists.
991
- *
992
- * When registering the callback, takes an optional second argument that will make the callback
993
- * only fire if it matches the variant provided.
994
- *
995
- * ```ts
996
- * function postRockUpdate(rock: GridEntityRock): void {}
997
- * ```
998
- */
999
- POST_ROCK_UPDATE,
1000
-
1001
- /**
1002
- * Fires from the `POST_UPDATE` callback when the clear state of a room changes.
1003
- *
1004
- * When registering the callback, takes an optional second argument that will make the callback
1005
- * only fire if the room clear state matches the boolean provided.
1006
- *
1007
- * ```ts
1008
- * function postRoomClearChanged(roomClear: boolean): void {}
1009
- * ```
1010
- */
1011
- POST_ROOM_CLEAR_CHANGED,
1012
-
1013
- /**
1014
- * Fires from the `ENTITY_TAKE_DMG` callback when a player takes damage from spikes in a Sacrifice
1015
- * Room.
1016
- *
1017
- * - When registering the callback, takes an optional second argument that will make the callback
1018
- * only fire if the player matches the `PlayerVariant` provided.
1019
- * - When registering the callback, takes an optional third argument that will make the callback
1020
- * only fire if the player matches the `PlayerType` provided.
1021
- *
1022
- * ```ts
1023
- * function postSacrifice(player: EntityPlayer, numSacrifices: int): void {}
1024
- * ```
1025
- */
1026
- POST_SACRIFICE,
1027
-
1028
- /**
1029
- * Fires from the `POST_RENDER` callback when a slot entity's animation changes.
1030
- *
1031
- * When registering the callback, takes an optional second argument that will make the callback
1032
- * only fire if it matches the `SlotVariant` provided.
1033
- *
1034
- * ```ts
1035
- * function postSlotAnimationChanged(slot: Entity): void {}
1036
- * ```
1037
- */
1038
- POST_SLOT_ANIMATION_CHANGED,
1039
-
1040
- /**
1041
- * Fires from the `POST_RENDER` callback when a slot plays the animation that indicates that it
1042
- * has broken.
1043
- *
1044
- * - When registering the callback, takes an optional second argument that will make the callback
1045
- * only fire if it matches the `SlotVariant` provided.
1046
- * - When registering the callback, takes an optional third argument that will make the callback
1047
- * only fire if the destruction type matches the `SlotDestructionType` provided.
1048
- *
1049
- * ```ts
1050
- * function postSlotDestroyed(slot: Entity, slotDestructionType: SlotDestructionType): void {}
1051
- * ```
1052
- */
1053
- POST_SLOT_DESTROYED,
1054
-
1055
- /**
1056
- * Fires when a new slot entity is initialized. Specifically, this is either:
1057
- *
1058
- * - in the `POST_NEW_ROOM` callback (firing every time a room is entered, even if the entity was
1059
- * previously there on a previous room entry)
1060
- * - in the `POST_UPDATE` callback (if the entity appeared mid-way through the room, like when a
1061
- * Wheel of Fortune card is used)
1062
- *
1063
- * When registering the callback, takes an optional second argument that will make the callback
1064
- * only fire if it matches the `SlotVariant` provided.
1065
- *
1066
- * ```ts
1067
- * function postSlotInit(slot: Entity): void {}
1068
- * ```
1069
- */
1070
- POST_SLOT_INIT,
1071
-
1072
- /**
1073
- * Fires from the `POST_RENDER` callback on every frame that a slot entity exists.
1074
- *
1075
- * When registering the callback, takes an optional second argument that will make the callback
1076
- * only fire if it matches the `SlotVariant` provided.
1077
- *
1078
- * ```ts
1079
- * function postSlotRender(slot: Entity): void {}
1080
- * ```
1081
- */
1082
- POST_SLOT_RENDER,
1083
-
1084
- /**
1085
- * Fires from the `POST_UPDATE` callback on every frame that a slot entity exists.
1086
- *
1087
- * When registering the callback, takes an optional second argument that will make the callback
1088
- * only fire if it matches the `SlotVariant` provided.
1089
- *
1090
- * ```ts
1091
- * function postSlotUpdate(slot: Entity): void {}
1092
- * ```
1093
- */
1094
- POST_SLOT_UPDATE,
1095
-
1096
- /**
1097
- * Fires from the `POST_RENDER` callback on every frame that spikes exist.
1098
- *
1099
- * When registering the callback, takes an optional second argument that will make the callback
1100
- * only fire if it matches the variant provided.
1101
- *
1102
- * ```ts
1103
- * function postSpikesRender(spikes: GridEntitySpikes): void {}
1104
- * ```
1105
- */
1106
- POST_SPIKES_RENDER,
1107
-
1108
- /**
1109
- * Fires from the `POST_UPDATE` callback on every frame that spikes exist.
1110
- *
1111
- * When registering the callback, takes an optional second argument that will make the callback
1112
- * only fire if it matches the variant provided.
1113
- *
1114
- * ```ts
1115
- * function postSpikesUpdate(spikes: GridEntitySpikes): void {}
1116
- * ```
1117
- */
1118
- POST_SPIKES_UPDATE,
1119
-
1120
- /**
1121
- * Fires on the first `POST_TEAR_UPDATE` frame for each tear (which is when
1122
- * `EntityTear.FrameCount` is equal to 0).
1123
- *
1124
- * This callback is useful because many attributes cannot be set or retrieved properly in the
1125
- * normal `POST_TEAR_INIT` callback.
1126
- *
1127
- * When registering the callback, takes an optional second argument that will make the callback
1128
- * only fire if the tear variant matches the `TearVariant` provided.
1129
- *
1130
- * ```ts
1131
- * function postTearInitLate(tear: EntityTear): void {}
1132
- * ```
1133
- */
1134
- POST_TEAR_INIT_LATE,
1135
-
1136
- /**
1137
- * Fires on the second `POST_TEAR_UPDATE` frame for each tear (which is when
1138
- * `EntityTear.FrameCount` is equal to 1).
1139
- *
1140
- * This callback is useful because Incubus tears are not distinguishable until the second frame.
1141
- *
1142
- * When registering the callback, takes an optional second argument that will make the callback
1143
- * only fire if the tear variant matches the `TearVariant` provided.
1144
- *
1145
- * ```ts
1146
- * function postTearInitVeryLate(tear: EntityTear): void {}
1147
- * ```
1148
- */
1149
- POST_TEAR_INIT_VERY_LATE,
1150
-
1151
- /**
1152
- * Fires from the `POST_RENDER` callback on every frame that a TNT exists.
1153
- *
1154
- * When registering the callback, takes an optional second argument that will make the callback
1155
- * only fire if it matches the variant provided.
1156
- *
1157
- * ```ts
1158
- * function postTNTRender(tnt: GridEntityTNT): void {}
1159
- * ```
1160
- */
1161
- POST_TNT_RENDER,
1162
-
1163
- /**
1164
- * Fires from the `POST_UPDATE` callback on every frame that a TNT exists.
1165
- *
1166
- * When registering the callback, takes an optional second argument that will make the callback
1167
- * only fire if it matches the variant provided.
1168
- *
1169
- * ```ts
1170
- * function postTNTUpdate(tnt: GridEntityTNT): void {}
1171
- * ```
1172
- */
1173
- POST_TNT_UPDATE,
1174
-
1175
- /**
1176
- * Fires from the `POST_PEFFECT_UPDATE` callback when a player gains or loses a new
1177
- * transformation.
1178
- *
1179
- * Note that this callback will only fire once per Forgotten/Soul pair.
1180
- *
1181
- * When registering the callback, takes an optional second argument that will make the callback
1182
- * only fire if it matches the `PlayerForm` provided.
1183
- *
1184
- * ```ts
1185
- * function postTransformation(
1186
- * player: EntityPlayer,
1187
- * playerForm: PlayerForm,
1188
- * hasForm: boolean,
1189
- * ): void {}
1190
- * ```
1191
- */
1192
- POST_TRANSFORMATION,
1193
-
1194
- /**
1195
- * Fires from `ENTITY_TAKE_DMG` callback when a Wishbone or a Walnut breaks.
1196
- *
1197
- * When registering the callback, takes an optional second argument that will make the callback
1198
- * only fire if it matches the `TrinketType` provided.
1199
- *
1200
- * ```ts
1201
- * function postTrinketBreak(
1202
- * player: EntityPlayer,
1203
- * trinketType: TrinketType,
1204
- * ): void {}
1205
- * ```
1206
- */
1207
- POST_TRINKET_BREAK,
1208
-
1209
- /**
1210
- * Fires from the `POST_PEFFECT_UPDATE` callback on the frame before a Berserk effect ends when
1211
- * the player is predicted to die (e.g. they currently have no health left or they took damage in
1212
- * a "Lost" form).
1213
- *
1214
- * - When registering the callback, takes an optional second argument that will make the callback
1215
- * only fire if the player matches the `PlayerVariant` provided.
1216
- * - When registering the callback, takes an optional third argument that will make the callback
1217
- * only fire if the player matches the `PlayerType` provided.
1218
- *
1219
- * ```ts
1220
- * function preBerserkDeath(player: EntityPlayer): void {}
1221
- * ```
1222
- */
1223
- PRE_BERSERK_DEATH,
1224
-
1225
- /**
1226
- * Fires from the `POST_PLAYER_FATAL_DAMAGE` callback when a player is about to die. If you want
1227
- * to initiate a custom revival, return an integer that corresponds to the item or type of revival
1228
- * that you are doing. Otherwise, return undefined to continue the fatal damage.
1229
- *
1230
- * This callback is useful because reviving the player after the game things that player should
1231
- * have died will result in the save data for the run getting deleted.
1232
- *
1233
- * - When registering the callback, takes an optional second argument that will make the callback
1234
- * only fire if the player matches the `PlayerVariant` provided.
1235
- * - When registering the callback, takes an optional third argument that will make the callback
1236
- * only fire if the player matches the `PlayerType` provided.
1237
- *
1238
- * ```ts
1239
- * function preCustomRevive(player: EntityPlayer): int | undefined {}
1240
- * ```
1241
- */
1242
- PRE_CUSTOM_REVIVE,
1243
-
1244
- /**
1245
- * Fires from the `POST_PEFFECT_UPDATE` callback when an item becomes queued (i.e. when the player
1246
- * begins to hold the item above their head).
1247
- *
1248
- * Note that this callback will only fire once per Forgotten/Soul pair.
1249
- *
1250
- * - When registering the callback, takes an optional second argument that will make the callback
1251
- * only fire if it matches the `ItemType` provided.
1252
- * - When registering the callback, takes an optional third argument that will make the callback
1253
- * only fire if the `CollectibleType` or the `TrinketType` matches the ID provided.
1254
- *
1255
- * ```ts
1256
- * function preItemPickup(
1257
- * player: EntityPlayer,
1258
- * pickingUpItem: PickingUpItem,
1259
- * ): void {}
1260
- * ```
1261
- */
1262
- PRE_ITEM_PICKUP,
1263
-
1264
- /**
1265
- * Fires on the `POST_RENDER` frame before the player is taken to a new floor. Only fires when a
1266
- * player jumps into a trapdoor or enters a heaven door (beam of light). Does not fire on the
1267
- * first floor of the run. Does not fire when the player reloads/reseeds the current floor (i.e.
1268
- * Forget Me Now, 5-pip dice room).
1269
- *
1270
- * This callback passes the `EntityPlayer` object for the player who jumped into the trapdoor or
1271
- * entered the heaven door, if needed.
1272
- *
1273
- * ```ts
1274
- * function preNewLevel(player: EntityPlayer): void {}
1275
- * ```
1276
- */
1277
- PRE_NEW_LEVEL,
1278
- }