isaacscript-common 87.9.7 → 87.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (567) hide show
  1. package/dist/cachedEnumValues.js +29 -32
  2. package/dist/callbackClasses.js +142 -289
  3. package/dist/callbacks.js +147 -183
  4. package/dist/classes/DefaultMap.js +4 -8
  5. package/dist/classes/ModFeature.js +21 -25
  6. package/dist/classes/ModUpgraded.js +43 -47
  7. package/dist/classes/callbacks/EntityTakeDmgFilter.js +6 -10
  8. package/dist/classes/callbacks/EntityTakeDmgPlayer.js +7 -11
  9. package/dist/classes/callbacks/InputActionFilter.js +4 -8
  10. package/dist/classes/callbacks/InputActionPlayer.js +4 -8
  11. package/dist/classes/callbacks/PostAmbushFinished.js +10 -14
  12. package/dist/classes/callbacks/PostAmbushStarted.js +10 -14
  13. package/dist/classes/callbacks/PostBombExploded.js +8 -12
  14. package/dist/classes/callbacks/PostBombInitFilter.js +6 -10
  15. package/dist/classes/callbacks/PostBombInitLate.js +6 -10
  16. package/dist/classes/callbacks/PostBombRenderFilter.js +6 -10
  17. package/dist/classes/callbacks/PostBombUpdateFilter.js +6 -10
  18. package/dist/classes/callbacks/PostBoneSwing.js +7 -11
  19. package/dist/classes/callbacks/PostCollectibleEmpty.js +6 -10
  20. package/dist/classes/callbacks/PostCursedTeleport.js +30 -34
  21. package/dist/classes/callbacks/PostCustomRevive.js +4 -8
  22. package/dist/classes/callbacks/PostDiceRoomActivated.js +9 -13
  23. package/dist/classes/callbacks/PostDoorRender.js +8 -12
  24. package/dist/classes/callbacks/PostDoorUpdate.js +8 -12
  25. package/dist/classes/callbacks/PostEffectInitFilter.js +6 -10
  26. package/dist/classes/callbacks/PostEffectInitLate.js +6 -10
  27. package/dist/classes/callbacks/PostEffectRenderFilter.js +6 -10
  28. package/dist/classes/callbacks/PostEffectStateChanged.js +8 -12
  29. package/dist/classes/callbacks/PostEffectUpdateFilter.js +6 -10
  30. package/dist/classes/callbacks/PostEntityKillFilter.js +6 -10
  31. package/dist/classes/callbacks/PostEntityRemoveFilter.js +6 -10
  32. package/dist/classes/callbacks/PostEsauJr.js +4 -8
  33. package/dist/classes/callbacks/PostFamiliarInitFilter.js +6 -10
  34. package/dist/classes/callbacks/PostFamiliarInitLate.js +6 -10
  35. package/dist/classes/callbacks/PostFamiliarRenderFilter.js +6 -10
  36. package/dist/classes/callbacks/PostFamiliarStateChanged.js +8 -12
  37. package/dist/classes/callbacks/PostFamiliarUpdateFilter.js +6 -10
  38. package/dist/classes/callbacks/PostFirstEsauJr.js +4 -8
  39. package/dist/classes/callbacks/PostFirstFlip.js +4 -8
  40. package/dist/classes/callbacks/PostFlip.js +4 -8
  41. package/dist/classes/callbacks/PostGameEndFilter.js +6 -10
  42. package/dist/classes/callbacks/PostGameStartedReordered.js +6 -10
  43. package/dist/classes/callbacks/PostGameStartedReorderedLast.js +6 -10
  44. package/dist/classes/callbacks/PostGreedModeWave.js +7 -11
  45. package/dist/classes/callbacks/PostGridEntityBroken.js +6 -10
  46. package/dist/classes/callbacks/PostGridEntityCollision.js +4 -8
  47. package/dist/classes/callbacks/PostGridEntityCustomBroken.js +6 -10
  48. package/dist/classes/callbacks/PostGridEntityCustomCollision.js +4 -8
  49. package/dist/classes/callbacks/PostGridEntityCustomInit.js +6 -10
  50. package/dist/classes/callbacks/PostGridEntityCustomRemove.js +4 -8
  51. package/dist/classes/callbacks/PostGridEntityCustomRender.js +6 -10
  52. package/dist/classes/callbacks/PostGridEntityCustomStateChanged.js +6 -10
  53. package/dist/classes/callbacks/PostGridEntityCustomUpdate.js +6 -10
  54. package/dist/classes/callbacks/PostGridEntityInit.js +6 -10
  55. package/dist/classes/callbacks/PostGridEntityRemove.js +4 -8
  56. package/dist/classes/callbacks/PostGridEntityRender.js +6 -10
  57. package/dist/classes/callbacks/PostGridEntityStateChanged.js +6 -10
  58. package/dist/classes/callbacks/PostGridEntityUpdate.js +6 -10
  59. package/dist/classes/callbacks/PostHolyMantleRemoved.js +15 -19
  60. package/dist/classes/callbacks/PostItemDischarge.js +23 -27
  61. package/dist/classes/callbacks/PostItemPickup.js +6 -10
  62. package/dist/classes/callbacks/PostKeyboardChanged.js +9 -13
  63. package/dist/classes/callbacks/PostKnifeInitFilter.js +6 -10
  64. package/dist/classes/callbacks/PostKnifeInitLate.js +6 -10
  65. package/dist/classes/callbacks/PostKnifeRenderFilter.js +6 -10
  66. package/dist/classes/callbacks/PostKnifeUpdateFilter.js +6 -10
  67. package/dist/classes/callbacks/PostLaserInitFilter.js +6 -10
  68. package/dist/classes/callbacks/PostLaserInitLate.js +6 -10
  69. package/dist/classes/callbacks/PostLaserRenderFilter.js +6 -10
  70. package/dist/classes/callbacks/PostLaserUpdateFilter.js +6 -10
  71. package/dist/classes/callbacks/PostNPCDeathFilter.js +6 -10
  72. package/dist/classes/callbacks/PostNPCInitFilter.js +6 -10
  73. package/dist/classes/callbacks/PostNPCInitLate.js +6 -10
  74. package/dist/classes/callbacks/PostNPCRenderFilter.js +6 -10
  75. package/dist/classes/callbacks/PostNPCStateChanged.js +8 -12
  76. package/dist/classes/callbacks/PostNPCUpdateFilter.js +6 -10
  77. package/dist/classes/callbacks/PostNewLevelReordered.js +6 -10
  78. package/dist/classes/callbacks/PostNewRoomEarly.js +17 -21
  79. package/dist/classes/callbacks/PostNewRoomReordered.js +6 -10
  80. package/dist/classes/callbacks/PostPEffectUpdateReordered.js +6 -10
  81. package/dist/classes/callbacks/PostPickupChanged.js +6 -10
  82. package/dist/classes/callbacks/PostPickupCollect.js +8 -12
  83. package/dist/classes/callbacks/PostPickupInitFilter.js +6 -10
  84. package/dist/classes/callbacks/PostPickupInitFirst.js +10 -14
  85. package/dist/classes/callbacks/PostPickupInitLate.js +6 -10
  86. package/dist/classes/callbacks/PostPickupRenderFilter.js +6 -10
  87. package/dist/classes/callbacks/PostPickupSelectionFilter.js +4 -8
  88. package/dist/classes/callbacks/PostPickupStateChanged.js +8 -12
  89. package/dist/classes/callbacks/PostPickupUpdateFilter.js +6 -10
  90. package/dist/classes/callbacks/PostPitRender.js +8 -12
  91. package/dist/classes/callbacks/PostPitUpdate.js +8 -12
  92. package/dist/classes/callbacks/PostPlayerChangeHealth.js +14 -18
  93. package/dist/classes/callbacks/PostPlayerChangeStat.js +26 -30
  94. package/dist/classes/callbacks/PostPlayerChangeType.js +11 -15
  95. package/dist/classes/callbacks/PostPlayerCollectibleAdded.js +6 -10
  96. package/dist/classes/callbacks/PostPlayerCollectibleRemoved.js +6 -10
  97. package/dist/classes/callbacks/PostPlayerFatalDamage.js +24 -28
  98. package/dist/classes/callbacks/PostPlayerInitFirst.js +12 -16
  99. package/dist/classes/callbacks/PostPlayerInitLate.js +9 -13
  100. package/dist/classes/callbacks/PostPlayerRenderReordered.js +6 -10
  101. package/dist/classes/callbacks/PostPlayerUpdateReordered.js +6 -10
  102. package/dist/classes/callbacks/PostPoopRender.js +8 -12
  103. package/dist/classes/callbacks/PostPoopUpdate.js +8 -12
  104. package/dist/classes/callbacks/PostPressurePlateRender.js +8 -12
  105. package/dist/classes/callbacks/PostPressurePlateUpdate.js +8 -12
  106. package/dist/classes/callbacks/PostProjectileInitFilter.js +6 -10
  107. package/dist/classes/callbacks/PostProjectileInitLate.js +6 -10
  108. package/dist/classes/callbacks/PostProjectileKill.js +8 -12
  109. package/dist/classes/callbacks/PostProjectileRenderFilter.js +6 -10
  110. package/dist/classes/callbacks/PostProjectileUpdateFilter.js +6 -10
  111. package/dist/classes/callbacks/PostPurchase.js +21 -25
  112. package/dist/classes/callbacks/PostRockRender.js +8 -12
  113. package/dist/classes/callbacks/PostRockUpdate.js +8 -12
  114. package/dist/classes/callbacks/PostRoomClearChanged.js +9 -13
  115. package/dist/classes/callbacks/PostSacrifice.js +12 -16
  116. package/dist/classes/callbacks/PostSlotAnimationChanged.js +6 -10
  117. package/dist/classes/callbacks/PostSlotCollision.js +8 -12
  118. package/dist/classes/callbacks/PostSlotDestroyed.js +6 -10
  119. package/dist/classes/callbacks/PostSlotInit.js +6 -10
  120. package/dist/classes/callbacks/PostSlotRender.js +6 -10
  121. package/dist/classes/callbacks/PostSlotUpdate.js +6 -10
  122. package/dist/classes/callbacks/PostSpikesRender.js +8 -12
  123. package/dist/classes/callbacks/PostSpikesUpdate.js +8 -12
  124. package/dist/classes/callbacks/PostTNTRender.js +8 -12
  125. package/dist/classes/callbacks/PostTNTUpdate.js +8 -12
  126. package/dist/classes/callbacks/PostTearInitFilter.js +6 -10
  127. package/dist/classes/callbacks/PostTearInitLate.js +6 -10
  128. package/dist/classes/callbacks/PostTearInitVeryLate.js +6 -10
  129. package/dist/classes/callbacks/PostTearKill.js +8 -12
  130. package/dist/classes/callbacks/PostTearRenderFilter.js +6 -10
  131. package/dist/classes/callbacks/PostTearUpdateFilter.js +6 -10
  132. package/dist/classes/callbacks/PostTransformation.js +10 -14
  133. package/dist/classes/callbacks/PostTrinketBreak.js +16 -20
  134. package/dist/classes/callbacks/PostUsePillFilter.js +18 -22
  135. package/dist/classes/callbacks/PreBerserkDeath.js +14 -18
  136. package/dist/classes/callbacks/PreBombCollisionFilter.js +6 -10
  137. package/dist/classes/callbacks/PreCustomRevive.js +6 -10
  138. package/dist/classes/callbacks/PreEntitySpawnFilter.js +4 -8
  139. package/dist/classes/callbacks/PreFamiliarCollisionFilter.js +6 -10
  140. package/dist/classes/callbacks/PreGetPedestal.js +8 -12
  141. package/dist/classes/callbacks/PreItemPickup.js +6 -10
  142. package/dist/classes/callbacks/PreKnifeCollisionFilter.js +6 -10
  143. package/dist/classes/callbacks/PreNPCCollisionFilter.js +6 -10
  144. package/dist/classes/callbacks/PreNPCUpdateFilter.js +6 -10
  145. package/dist/classes/callbacks/PreNewLevel.js +10 -14
  146. package/dist/classes/callbacks/PreProjectileCollisionFilter.js +6 -10
  147. package/dist/classes/callbacks/PreRoomEntitySpawnFilter.js +4 -8
  148. package/dist/classes/callbacks/PreTearCollisionFilter.js +6 -10
  149. package/dist/classes/features/callbackLogic/CustomGridEntities.js +46 -50
  150. package/dist/classes/features/callbackLogic/CustomRevive.js +28 -32
  151. package/dist/classes/features/callbackLogic/EsauJrDetection.js +11 -15
  152. package/dist/classes/features/callbackLogic/FlipDetection.js +11 -15
  153. package/dist/classes/features/callbackLogic/GameReorderedCallbacks.js +26 -30
  154. package/dist/classes/features/callbackLogic/GridEntityCollisionDetection.js +10 -14
  155. package/dist/classes/features/callbackLogic/GridEntityRenderDetection.js +6 -10
  156. package/dist/classes/features/callbackLogic/GridEntityUpdateDetection.js +12 -16
  157. package/dist/classes/features/callbackLogic/ItemPickupDetection.js +17 -21
  158. package/dist/classes/features/callbackLogic/PickupChangeDetection.js +6 -10
  159. package/dist/classes/features/callbackLogic/PlayerCollectibleDetection.js +39 -43
  160. package/dist/classes/features/callbackLogic/PlayerReorderedCallbacks.js +18 -22
  161. package/dist/classes/features/callbackLogic/SlotDestroyedDetection.js +17 -21
  162. package/dist/classes/features/callbackLogic/SlotRenderDetection.js +8 -12
  163. package/dist/classes/features/callbackLogic/SlotUpdateDetection.js +9 -13
  164. package/dist/classes/features/other/CharacterHealthConversion.js +13 -17
  165. package/dist/classes/features/other/CharacterStats.js +9 -13
  166. package/dist/classes/features/other/CollectibleItemPoolType.js +17 -21
  167. package/dist/classes/features/other/CustomHotkeys.js +15 -19
  168. package/dist/classes/features/other/CustomItemPools.js +20 -24
  169. package/dist/classes/features/other/CustomPickups.js +15 -19
  170. package/dist/classes/features/other/CustomStages.js +116 -153
  171. package/dist/classes/features/other/CustomTrapdoors.js +119 -123
  172. package/dist/classes/features/other/DebugDisplay.js +77 -81
  173. package/dist/classes/features/other/DeployJSONRoom.js +65 -69
  174. package/dist/classes/features/other/DisableAllSound.js +14 -18
  175. package/dist/classes/features/other/DisableInputs.js +24 -28
  176. package/dist/classes/features/other/EdenStartingStatsHealth.js +36 -40
  177. package/dist/classes/features/other/ExtraConsoleCommands.js +65 -102
  178. package/dist/classes/features/other/FadeInRemover.js +9 -13
  179. package/dist/classes/features/other/FastReset.js +18 -22
  180. package/dist/classes/features/other/FlyingDetection.js +10 -14
  181. package/dist/classes/features/other/ForgottenSwitch.js +8 -12
  182. package/dist/classes/features/other/ItemPoolDetection.js +35 -39
  183. package/dist/classes/features/other/ModdedElementDetection.js +43 -47
  184. package/dist/classes/features/other/ModdedElementSets.js +135 -139
  185. package/dist/classes/features/other/NoSirenSteal.js +7 -11
  186. package/dist/classes/features/other/Pause.js +48 -52
  187. package/dist/classes/features/other/PersistentEntities.js +16 -20
  188. package/dist/classes/features/other/PickupIndexCreation.js +31 -35
  189. package/dist/classes/features/other/PlayerCollectibleTracking.js +18 -22
  190. package/dist/classes/features/other/PonyDetection.js +22 -26
  191. package/dist/classes/features/other/PressInput.js +10 -14
  192. package/dist/classes/features/other/PreventChildEntities.js +6 -10
  193. package/dist/classes/features/other/PreventGridEntityRespawn.js +34 -38
  194. package/dist/classes/features/other/RerunDetection.js +11 -15
  195. package/dist/classes/features/other/RoomClearFrame.js +11 -15
  196. package/dist/classes/features/other/RoomHistory.js +30 -34
  197. package/dist/classes/features/other/RunInNFrames.js +24 -28
  198. package/dist/classes/features/other/RunNextRoom.js +8 -12
  199. package/dist/classes/features/other/RunNextRun.js +8 -12
  200. package/dist/classes/features/other/SaveDataManager.js +61 -65
  201. package/dist/classes/features/other/SpawnRockAltRewards.js +115 -119
  202. package/dist/classes/features/other/StageHistory.js +76 -80
  203. package/dist/classes/features/other/StartAmbush.js +12 -16
  204. package/dist/classes/features/other/TaintedLazarusPlayers.js +10 -14
  205. package/dist/classes/features/other/UnlockAchievementsDetection.js +10 -14
  206. package/dist/classes/features/other/customStages/backdrop.js +68 -71
  207. package/dist/classes/features/other/customStages/constants.js +7 -10
  208. package/dist/classes/features/other/customStages/gridEntities.js +23 -30
  209. package/dist/classes/features/other/customStages/shadows.js +27 -30
  210. package/dist/classes/features/other/customStages/streakText.js +55 -60
  211. package/dist/classes/features/other/customStages/utils.js +13 -17
  212. package/dist/classes/features/other/customStages/v.js +4 -7
  213. package/dist/classes/features/other/customStages/versusScreen.js +46 -50
  214. package/dist/classes/features/other/debugDisplay/DebugDisplayBomb.js +8 -12
  215. package/dist/classes/features/other/debugDisplay/DebugDisplayDoor.js +8 -12
  216. package/dist/classes/features/other/debugDisplay/DebugDisplayEffect.js +8 -12
  217. package/dist/classes/features/other/debugDisplay/DebugDisplayFamiliar.js +8 -12
  218. package/dist/classes/features/other/debugDisplay/DebugDisplayKnife.js +8 -12
  219. package/dist/classes/features/other/debugDisplay/DebugDisplayLaser.js +8 -12
  220. package/dist/classes/features/other/debugDisplay/DebugDisplayNPC.js +8 -12
  221. package/dist/classes/features/other/debugDisplay/DebugDisplayPickup.js +8 -12
  222. package/dist/classes/features/other/debugDisplay/DebugDisplayPit.js +8 -12
  223. package/dist/classes/features/other/debugDisplay/DebugDisplayPlayer.js +8 -12
  224. package/dist/classes/features/other/debugDisplay/DebugDisplayPoop.js +8 -12
  225. package/dist/classes/features/other/debugDisplay/DebugDisplayPressurePlate.js +8 -12
  226. package/dist/classes/features/other/debugDisplay/DebugDisplayProjectile.js +8 -12
  227. package/dist/classes/features/other/debugDisplay/DebugDisplayRock.js +8 -12
  228. package/dist/classes/features/other/debugDisplay/DebugDisplaySlot.js +8 -12
  229. package/dist/classes/features/other/debugDisplay/DebugDisplaySpikes.js +8 -12
  230. package/dist/classes/features/other/debugDisplay/DebugDisplayTNT.js +8 -12
  231. package/dist/classes/features/other/debugDisplay/DebugDisplayTear.js +8 -12
  232. package/dist/classes/features/other/debugDisplay/utils.js +6 -10
  233. package/dist/classes/features/other/extraConsoleCommands/commands.js +411 -557
  234. package/dist/classes/features/other/extraConsoleCommands/subroutines.js +47 -57
  235. package/dist/classes/features/other/extraConsoleCommands/v.js +1 -4
  236. package/dist/classes/features/other/saveDataManager/constants.js +1 -4
  237. package/dist/classes/features/other/saveDataManager/glowingHourGlass.js +17 -21
  238. package/dist/classes/features/other/saveDataManager/loadFromDisk.js +19 -22
  239. package/dist/classes/features/other/saveDataManager/restoreDefaults.js +20 -25
  240. package/dist/classes/features/other/saveDataManager/saveToDisk.js +13 -16
  241. package/dist/classes/private/CustomCallback.js +4 -8
  242. package/dist/classes/private/Feature.js +1 -5
  243. package/dist/core/cachedClasses.js +12 -15
  244. package/dist/core/constants.js +126 -130
  245. package/dist/core/constantsFirstLast.js +22 -25
  246. package/dist/core/constantsVanilla.js +25 -28
  247. package/dist/core/upgradeMod.js +7 -10
  248. package/dist/decorators.js +6 -10
  249. package/dist/enums/AmbushType.js +2 -5
  250. package/dist/enums/CornerType.js +2 -5
  251. package/dist/enums/HealthType.js +2 -5
  252. package/dist/enums/ISCFeature.js +2 -5
  253. package/dist/enums/LadderSubTypeCustom.js +2 -5
  254. package/dist/enums/ModCallbackCustom.js +2 -5
  255. package/dist/enums/MysteriousPaperEffect.js +2 -5
  256. package/dist/enums/PlayerStat.js +2 -5
  257. package/dist/enums/PocketItemType.js +2 -5
  258. package/dist/enums/RockAltType.js +2 -5
  259. package/dist/enums/SaveDataKey.js +2 -5
  260. package/dist/enums/SerializationType.js +2 -5
  261. package/dist/enums/SlotDestructionType.js +2 -5
  262. package/dist/enums/private/GridEntityTypeCustom.js +1 -4
  263. package/dist/enums/private/SerializationBrand.js +2 -5
  264. package/dist/enums/private/StageTravelState.js +2 -5
  265. package/dist/enums/private/TrapdoorAnimation.js +2 -5
  266. package/dist/enums/private/UIStreakAnimation.js +2 -5
  267. package/dist/features.js +138 -141
  268. package/dist/functions/ambush.js +9 -12
  269. package/dist/functions/array.js +45 -76
  270. package/dist/functions/arrayLua.js +7 -16
  271. package/dist/functions/benchmark.js +4 -7
  272. package/dist/functions/bitSet128.js +19 -26
  273. package/dist/functions/bitwise.js +14 -23
  274. package/dist/functions/bombs.js +1 -4
  275. package/dist/functions/bosses.js +68 -85
  276. package/dist/functions/cards.js +44 -62
  277. package/dist/functions/challenges.js +28 -39
  278. package/dist/functions/characters.js +68 -87
  279. package/dist/functions/charge.js +41 -52
  280. package/dist/functions/chargeBar.js +2 -6
  281. package/dist/functions/collectibleTag.js +9 -13
  282. package/dist/functions/collectibles.js +133 -172
  283. package/dist/functions/color.js +29 -38
  284. package/dist/functions/console.js +4 -8
  285. package/dist/functions/curses.js +6 -10
  286. package/dist/functions/debugFunctions.js +7 -14
  287. package/dist/functions/decorators.js +13 -19
  288. package/dist/functions/deepCopy.js +96 -99
  289. package/dist/functions/deepCopyTests.js +56 -59
  290. package/dist/functions/dimensions.js +10 -14
  291. package/dist/functions/direction.js +22 -30
  292. package/dist/functions/doors.js +104 -154
  293. package/dist/functions/easing.js +30 -62
  294. package/dist/functions/effects.js +6 -10
  295. package/dist/functions/emptyRoom.js +30 -34
  296. package/dist/functions/entities.js +88 -115
  297. package/dist/functions/entitiesSpecific.js +83 -125
  298. package/dist/functions/entityTypes.js +3 -6
  299. package/dist/functions/enums.js +27 -41
  300. package/dist/functions/external.js +4 -8
  301. package/dist/functions/familiars.js +17 -25
  302. package/dist/functions/flag.js +10 -19
  303. package/dist/functions/frames.js +31 -51
  304. package/dist/functions/globals.js +26 -66
  305. package/dist/functions/gridEntities.js +231 -269
  306. package/dist/functions/gridEntitiesSpecific.js +86 -126
  307. package/dist/functions/gridIndex.js +8 -11
  308. package/dist/functions/hash.js +1 -4
  309. package/dist/functions/hex.js +7 -11
  310. package/dist/functions/input.js +65 -88
  311. package/dist/functions/isaacAPIClass.js +28 -53
  312. package/dist/functions/itemPool.js +39 -48
  313. package/dist/functions/jsonHelpers.js +5 -42
  314. package/dist/functions/jsonRoom.js +39 -46
  315. package/dist/functions/kColor.js +30 -39
  316. package/dist/functions/language.js +3 -6
  317. package/dist/functions/level.js +20 -26
  318. package/dist/functions/levelGrid.js +81 -108
  319. package/dist/functions/log.js +6 -12
  320. package/dist/functions/logEntities.js +49 -59
  321. package/dist/functions/logMisc.js +183 -214
  322. package/dist/functions/map.js +10 -20
  323. package/dist/functions/math.js +16 -31
  324. package/dist/functions/merge.js +48 -51
  325. package/dist/functions/mergeTests.js +34 -37
  326. package/dist/functions/minimap.js +34 -46
  327. package/dist/functions/modFeatures.js +1 -4
  328. package/dist/functions/newArray.js +5 -8
  329. package/dist/functions/nextStage.js +63 -67
  330. package/dist/functions/npcDataStructures.js +9 -20
  331. package/dist/functions/npcs.js +37 -45
  332. package/dist/functions/pickupVariants.js +26 -39
  333. package/dist/functions/pickups.js +43 -59
  334. package/dist/functions/pickupsSpecific.js +76 -118
  335. package/dist/functions/pills.js +52 -72
  336. package/dist/functions/playerCenter.js +13 -16
  337. package/dist/functions/playerCollectibles.js +59 -79
  338. package/dist/functions/playerDataStructures.js +18 -29
  339. package/dist/functions/playerEffects.js +12 -19
  340. package/dist/functions/playerHealth.js +91 -113
  341. package/dist/functions/playerIndex.js +22 -33
  342. package/dist/functions/playerTrinkets.js +31 -43
  343. package/dist/functions/players.js +87 -126
  344. package/dist/functions/pocketItems.js +33 -43
  345. package/dist/functions/positionVelocity.js +23 -32
  346. package/dist/functions/pressurePlate.js +7 -10
  347. package/dist/functions/projectiles.js +11 -15
  348. package/dist/functions/random.js +8 -13
  349. package/dist/functions/readOnly.js +3 -8
  350. package/dist/functions/render.js +7 -12
  351. package/dist/functions/revive.js +38 -45
  352. package/dist/functions/rng.js +31 -44
  353. package/dist/functions/rockAlt.js +18 -22
  354. package/dist/functions/roomData.js +24 -40
  355. package/dist/functions/roomGrid.js +17 -25
  356. package/dist/functions/roomShape.js +39 -55
  357. package/dist/functions/roomShapeWalls.js +67 -71
  358. package/dist/functions/roomTransition.js +13 -17
  359. package/dist/functions/rooms.js +181 -244
  360. package/dist/functions/run.js +29 -39
  361. package/dist/functions/seeds.js +6 -10
  362. package/dist/functions/serialization.js +27 -34
  363. package/dist/functions/set.js +24 -40
  364. package/dist/functions/slots.js +18 -22
  365. package/dist/functions/sort.js +9 -15
  366. package/dist/functions/sound.js +12 -16
  367. package/dist/functions/spawnCollectible.js +21 -26
  368. package/dist/functions/sprites.js +16 -24
  369. package/dist/functions/stage.js +122 -164
  370. package/dist/functions/stats.js +37 -43
  371. package/dist/functions/storyBosses.js +36 -40
  372. package/dist/functions/string.js +19 -33
  373. package/dist/functions/table.js +21 -31
  374. package/dist/functions/tears.js +6 -14
  375. package/dist/functions/transformations.js +35 -42
  376. package/dist/functions/trinketGive.js +29 -36
  377. package/dist/functions/trinkets.js +45 -60
  378. package/dist/functions/tstlClass.js +11 -20
  379. package/dist/functions/types.js +22 -46
  380. package/dist/functions/ui.js +25 -40
  381. package/dist/functions/utils.js +22 -36
  382. package/dist/functions/vector.js +33 -46
  383. package/dist/functions/versusScreen.js +12 -18
  384. package/dist/functions/weighted.js +8 -12
  385. package/dist/index.js +150 -166
  386. package/dist/index.rollup.d.ts +11 -11
  387. package/dist/indexLua.js +151 -167
  388. package/dist/interfaces/ChargeBarSprites.js +1 -2
  389. package/dist/interfaces/Corner.js +1 -2
  390. package/dist/interfaces/CustomStageTSConfig.js +1 -2
  391. package/dist/interfaces/GridEntityCustomData.js +1 -2
  392. package/dist/interfaces/JSONRoomsFile.js +1 -2
  393. package/dist/interfaces/PlayerHealth.d.ts +11 -11
  394. package/dist/interfaces/PlayerHealth.d.ts.map +1 -1
  395. package/dist/interfaces/PlayerHealth.js +1 -2
  396. package/dist/interfaces/PlayerStats.js +2 -4
  397. package/dist/interfaces/PocketItemDescription.js +1 -2
  398. package/dist/interfaces/RoomDescription.js +1 -2
  399. package/dist/interfaces/SaveData.js +1 -2
  400. package/dist/interfaces/StageHistoryEntry.js +1 -2
  401. package/dist/interfaces/TSTLClassMetatable.js +1 -2
  402. package/dist/interfaces/TrinketSituation.js +1 -2
  403. package/dist/interfaces/private/AddCallbackParametersCustom.js +2 -4
  404. package/dist/interfaces/private/CustomStage.js +1 -2
  405. package/dist/interfaces/private/CustomTrapdoorDescription.js +1 -2
  406. package/dist/interfaces/private/ModUpgradedInterface.js +1 -2
  407. package/dist/isaacscript-common.lua +1 -1
  408. package/dist/maps/PHDPillConversionsMap.js +19 -22
  409. package/dist/maps/cardNameToTypeMap.js +205 -208
  410. package/dist/maps/characterNameToTypeMap.js +85 -88
  411. package/dist/maps/collectibleNameToTypeMap.js +5 -8
  412. package/dist/maps/defaultPlayerStatMap.js +10 -13
  413. package/dist/maps/entityTypeVariantToBossIDMap.js +3 -6
  414. package/dist/maps/falsePHDPillConversionsMap.js +33 -36
  415. package/dist/maps/gridEntityTypeToBrokenStateMap.js +15 -18
  416. package/dist/maps/gridEntityXMLMap.js +52 -55
  417. package/dist/maps/itemPoolTypeToItemPoolName.js +33 -36
  418. package/dist/maps/keyboardToStringMap.js +66 -69
  419. package/dist/maps/pillNameToEffectMap.js +83 -86
  420. package/dist/maps/roomNameToTypeMap.js +38 -41
  421. package/dist/maps/roomShapeToTopLeftWallGridIndexMap.js +9 -12
  422. package/dist/maps/transformationNameToPlayerFormMap.js +30 -33
  423. package/dist/maps/trinketNameToTypeMap.js +5 -8
  424. package/dist/objects/LRoomShapeToRectangles.js +22 -25
  425. package/dist/objects/backdropTypeToRockAltType.js +65 -68
  426. package/dist/objects/batteryNames.js +8 -11
  427. package/dist/objects/bombNames.js +11 -14
  428. package/dist/objects/bossIDToEntityTypeVariant.js +116 -119
  429. package/dist/objects/bossNamePNGFileNames.js +104 -107
  430. package/dist/objects/bossNames.js +105 -108
  431. package/dist/objects/bossPortraitPNGFileNames.js +104 -107
  432. package/dist/objects/cardDescriptions.js +101 -104
  433. package/dist/objects/cardNames.js +101 -104
  434. package/dist/objects/challengeBosses.js +49 -52
  435. package/dist/objects/challengeCharacters.js +49 -52
  436. package/dist/objects/challengeCollectibleTypes.js +160 -163
  437. package/dist/objects/challengeNames.js +49 -52
  438. package/dist/objects/challengeTrinketType.js +48 -51
  439. package/dist/objects/characterDamageMultipliers.js +44 -47
  440. package/dist/objects/characterNames.js +44 -47
  441. package/dist/objects/characterSpritePNGFileNames.js +44 -47
  442. package/dist/objects/characterStartingCollectibleTypes.js +49 -52
  443. package/dist/objects/characterStartingTrinketTypes.js +44 -47
  444. package/dist/objects/chestNames.js +15 -18
  445. package/dist/objects/coinNames.js +11 -14
  446. package/dist/objects/coinSubTypeToValue.js +11 -14
  447. package/dist/objects/collectibleDescriptions.js +725 -728
  448. package/dist/objects/collectibleNames.js +725 -728
  449. package/dist/objects/colors.js +1 -4
  450. package/dist/objects/directionNames.js +7 -10
  451. package/dist/objects/directionToDegrees.js +7 -10
  452. package/dist/objects/directionToMoveAction.js +7 -10
  453. package/dist/objects/directionToShootAction.js +7 -10
  454. package/dist/objects/directionToVector.js +9 -12
  455. package/dist/objects/doorSlotFlagToDoorSlot.js +11 -14
  456. package/dist/objects/doorSlotToDirection.js +11 -14
  457. package/dist/objects/doorSlotToDoorSlotFlag.js +11 -14
  458. package/dist/objects/gridEntityTypeToANM2Name.js +30 -33
  459. package/dist/objects/heartNames.js +16 -19
  460. package/dist/objects/isaacAPIClassTypeToBrand.js +8 -11
  461. package/dist/objects/isaacAPIClassTypeToFunctions.js +37 -40
  462. package/dist/objects/itemPoolTypeToCollectibleTypesSet.js +9 -45
  463. package/dist/objects/kColors.js +1 -4
  464. package/dist/objects/keyNames.js +8 -11
  465. package/dist/objects/languageNames.js +9 -12
  466. package/dist/objects/oppositeDoorSlots.js +11 -14
  467. package/dist/objects/pillEffectClasses.js +53 -56
  468. package/dist/objects/pillEffectNames.js +53 -56
  469. package/dist/objects/pillEffectTypeToPillEffects.js +11 -14
  470. package/dist/objects/pillEffectTypes.js +53 -56
  471. package/dist/objects/playerNamePNGFileNames.js +44 -47
  472. package/dist/objects/playerPortraitPNGFileNames.js +44 -47
  473. package/dist/objects/roomShapeBounds.js +23 -26
  474. package/dist/objects/roomShapeCorners.js +128 -131
  475. package/dist/objects/roomShapeLayoutSizes.js +23 -26
  476. package/dist/objects/roomShapeToBottomRightPosition.js +17 -20
  477. package/dist/objects/roomShapeToDoorSlotCoordinates.js +78 -81
  478. package/dist/objects/roomShapeToDoorSlots.js +48 -51
  479. package/dist/objects/roomShapeToDoorSlotsToGridIndexDelta.js +82 -85
  480. package/dist/objects/roomShapeToGridWidth.js +14 -17
  481. package/dist/objects/roomShapeToTopLeftPosition.js +18 -21
  482. package/dist/objects/roomShapeVolumes.js +21 -24
  483. package/dist/objects/roomTypeNames.js +32 -35
  484. package/dist/objects/roomTypeSpecialGotoPrefixes.js +32 -35
  485. package/dist/objects/sackNames.js +6 -9
  486. package/dist/objects/slotNames.js +21 -24
  487. package/dist/objects/stageIDNames.js +33 -36
  488. package/dist/objects/stageToMusic.js +69 -72
  489. package/dist/objects/stageToStageID.js +90 -93
  490. package/dist/objects/stageTypeSuffixes.js +8 -11
  491. package/dist/objects/transformationNames.js +16 -19
  492. package/dist/objects/trinketDescriptions.js +192 -195
  493. package/dist/objects/trinketNames.js +192 -195
  494. package/dist/objects/versusScreenBackgroundColors.js +39 -42
  495. package/dist/objects/versusScreenDirtSpotColors.js +39 -42
  496. package/dist/patchErrorFunctions.js +4 -7
  497. package/dist/serialization.js +6 -9
  498. package/dist/sets/LRoomShapesSet.js +7 -10
  499. package/dist/sets/bigRoomShapesSet.js +10 -13
  500. package/dist/sets/bossSets.js +261 -264
  501. package/dist/sets/charactersThatStartWithAnActiveItemSet.js +14 -17
  502. package/dist/sets/charactersWithBlackHeartFromEternalHeartSet.js +5 -8
  503. package/dist/sets/charactersWithFreeDevilDealsSet.js +3 -6
  504. package/dist/sets/charactersWithNoRedHeartsSet.js +11 -14
  505. package/dist/sets/charactersWithNoSoulHeartsSet.js +8 -11
  506. package/dist/sets/consoleCommandsSet.js +2 -5
  507. package/dist/sets/entitiesWithArmorSet.js +44 -47
  508. package/dist/sets/familiarsThatShootPlayerTearsSet.js +11 -14
  509. package/dist/sets/itemConfigCardTypesForCards.js +7 -10
  510. package/dist/sets/lostStyleCharactersSet.js +8 -11
  511. package/dist/sets/mineShaftRoomSubTypesSet.js +8 -11
  512. package/dist/sets/narrowRoomShapesSet.js +7 -10
  513. package/dist/sets/poopGridEntityXMLTypesSet.js +12 -15
  514. package/dist/sets/redHeartSubTypesSet.js +6 -9
  515. package/dist/sets/repentanceBossIDsSet.js +26 -29
  516. package/dist/sets/sinEntityTypesSet.js +10 -13
  517. package/dist/sets/singleUseActiveCollectibleTypesSet.js +11 -14
  518. package/dist/shaderCrashFix.js +4 -7
  519. package/dist/shouldFire.js +28 -58
  520. package/dist/types/AddSubtract.js +1 -2
  521. package/dist/types/AllButFirst.js +1 -2
  522. package/dist/types/AllButLast.js +1 -2
  523. package/dist/types/AnyClass.js +1 -2
  524. package/dist/types/AnyEntity.js +1 -2
  525. package/dist/types/AnyFunction.js +1 -2
  526. package/dist/types/AnyGridEntity.js +1 -2
  527. package/dist/types/CompositionTypeSatisfiesEnum.js +1 -2
  528. package/dist/types/ConversionHeartSubType.js +1 -2
  529. package/dist/types/Decrement.js +1 -2
  530. package/dist/types/ERange.js +1 -2
  531. package/dist/types/EntityID.js +1 -2
  532. package/dist/types/FunctionTuple.js +1 -2
  533. package/dist/types/GridEntityID.js +1 -2
  534. package/dist/types/HasFunction.js +1 -2
  535. package/dist/types/IRange.js +1 -2
  536. package/dist/types/Immutable.js +1 -2
  537. package/dist/types/Increment.js +1 -2
  538. package/dist/types/LowercaseKeys.js +1 -2
  539. package/dist/types/NaturalNumbersLessThan.js +1 -2
  540. package/dist/types/NaturalNumbersLessThanOrEqualTo.js +1 -2
  541. package/dist/types/ObjectValues.js +1 -2
  542. package/dist/types/PickingUpItem.js +15 -22
  543. package/dist/types/PickupIndex.js +1 -2
  544. package/dist/types/PlayerIndex.js +1 -2
  545. package/dist/types/PossibleStatType.js +1 -2
  546. package/dist/types/PublicInterface.js +1 -2
  547. package/dist/types/ReadonlyMap.js +1 -4
  548. package/dist/types/ReadonlyRecord.js +1 -2
  549. package/dist/types/ReadonlySet.js +1 -4
  550. package/dist/types/StartsWithLowercase.js +1 -2
  551. package/dist/types/StartsWithUppercase.js +1 -2
  552. package/dist/types/TSTLClass.js +1 -2
  553. package/dist/types/Tuple.js +1 -2
  554. package/dist/types/TupleKeys.js +1 -2
  555. package/dist/types/TupleToIntersection.js +1 -2
  556. package/dist/types/TupleToUnion.js +1 -2
  557. package/dist/types/TupleWithLengthBetween.js +1 -2
  558. package/dist/types/TupleWithMaxLength.js +1 -2
  559. package/dist/types/UnionToIntersection.js +1 -2
  560. package/dist/types/UppercaseKeys.js +1 -2
  561. package/dist/types/WeightedArray.js +1 -2
  562. package/dist/types/WidenLiteral.js +1 -2
  563. package/dist/types/Writable.js +1 -2
  564. package/dist/types/private/CallbackTuple.js +1 -2
  565. package/dist/types/private/ModUpgradedWithFeatures.js +1 -2
  566. package/package.json +3 -3
  567. package/src/interfaces/PlayerHealth.ts +12 -11
@@ -1,92 +1,54 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.convertXMLGridEntityType = convertXMLGridEntityType;
4
- exports.doesGridEntityExist = doesGridEntityExist;
5
- exports.getAllGridIndexes = getAllGridIndexes;
6
- exports.getCollidingEntitiesWithGridEntity = getCollidingEntitiesWithGridEntity;
7
- exports.getConstituentsFromGridEntityID = getConstituentsFromGridEntityID;
8
- exports.getGridEntities = getGridEntities;
9
- exports.getGridEntitiesExcept = getGridEntitiesExcept;
10
- exports.getGridEntitiesInRadius = getGridEntitiesInRadius;
11
- exports.getGridEntitiesMap = getGridEntitiesMap;
12
- exports.getGridEntityANM2Path = getGridEntityANM2Path;
13
- exports.getGridEntityCollisionPoints = getGridEntityCollisionPoints;
14
- exports.getGridEntityID = getGridEntityID;
15
- exports.getGridEntityIDFromConstituents = getGridEntityIDFromConstituents;
16
- exports.getMatchingGridEntities = getMatchingGridEntities;
17
- exports.getRockPNGPath = getRockPNGPath;
18
- exports.getSurroundingGridEntities = getSurroundingGridEntities;
19
- exports.getSurroundingGridIndexes = getSurroundingGridIndexes;
20
- exports.getTopLeftWall = getTopLeftWall;
21
- exports.getTopLeftWallGridIndex = getTopLeftWallGridIndex;
22
- exports.isGridEntityBreakableByExplosion = isGridEntityBreakableByExplosion;
23
- exports.isGridEntityBroken = isGridEntityBroken;
24
- exports.isGridEntityXMLType = isGridEntityXMLType;
25
- exports.isGridIndexAdjacentToDoor = isGridIndexAdjacentToDoor;
26
- exports.isPoopGridEntityXMLType = isPoopGridEntityXMLType;
27
- exports.isPostBossVoidPortal = isPostBossVoidPortal;
28
- exports.removeAllGridEntitiesExcept = removeAllGridEntitiesExcept;
29
- exports.removeAllMatchingGridEntities = removeAllMatchingGridEntities;
30
- exports.removeEntitiesSpawnedFromGridEntity = removeEntitiesSpawnedFromGridEntity;
31
- exports.removeGridEntities = removeGridEntities;
32
- exports.removeGridEntity = removeGridEntity;
33
- exports.setGridEntityInvisible = setGridEntityInvisible;
34
- exports.setGridEntityType = setGridEntityType;
35
- exports.spawnGiantPoop = spawnGiantPoop;
36
- exports.spawnGridEntity = spawnGridEntity;
37
- exports.spawnGridEntityWithVariant = spawnGridEntityWithVariant;
38
- exports.spawnVoidPortal = spawnVoidPortal;
39
- const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
40
- const cachedEnumValues_1 = require("../cachedEnumValues");
41
- const cachedClasses_1 = require("../core/cachedClasses");
42
- const constants_1 = require("../core/constants");
43
- const gridEntityTypeToBrokenStateMap_1 = require("../maps/gridEntityTypeToBrokenStateMap");
44
- const gridEntityXMLMap_1 = require("../maps/gridEntityXMLMap");
45
- const roomShapeToTopLeftWallGridIndexMap_1 = require("../maps/roomShapeToTopLeftWallGridIndexMap");
46
- const gridEntityTypeToANM2Name_1 = require("../objects/gridEntityTypeToANM2Name");
47
- const poopGridEntityXMLTypesSet_1 = require("../sets/poopGridEntityXMLTypesSet");
48
- const ReadonlySet_1 = require("../types/ReadonlySet");
49
- const entities_1 = require("./entities");
50
- const entitiesSpecific_1 = require("./entitiesSpecific");
51
- const math_1 = require("./math");
52
- const rooms_1 = require("./rooms");
53
- const types_1 = require("./types");
54
- const utils_1 = require("./utils");
55
- const vector_1 = require("./vector");
1
+ import { BackdropType, EffectVariant, GridCollisionClass, GridEntityType, PoopGridEntityVariant, StatueVariant, TrapdoorVariant, } from "isaac-typescript-definitions";
2
+ import { GRID_ENTITY_XML_TYPE_VALUES } from "../cachedEnumValues";
3
+ import { game } from "../core/cachedClasses";
4
+ import { DISTANCE_OF_GRID_TILE, VectorOne } from "../core/constants";
5
+ import { GRID_ENTITY_TYPE_TO_BROKEN_STATE_MAP } from "../maps/gridEntityTypeToBrokenStateMap";
6
+ import { GRID_ENTITY_XML_MAP } from "../maps/gridEntityXMLMap";
7
+ import { DEFAULT_TOP_LEFT_WALL_GRID_INDEX, ROOM_SHAPE_TO_TOP_LEFT_WALL_GRID_INDEX_MAP, } from "../maps/roomShapeToTopLeftWallGridIndexMap";
8
+ import { GRID_ENTITY_TYPE_TO_ANM2_NAME } from "../objects/gridEntityTypeToANM2Name";
9
+ import { POOP_GRID_ENTITY_XML_TYPES_SET } from "../sets/poopGridEntityXMLTypesSet";
10
+ import { ReadonlySet } from "../types/ReadonlySet";
11
+ import { removeEntities } from "./entities";
12
+ import { getEffects } from "./entitiesSpecific";
13
+ import { isCircleIntersectingRectangle } from "./math";
14
+ import { roomUpdateSafe } from "./rooms";
15
+ import { isInteger, parseIntSafe } from "./types";
16
+ import { assertDefined, eRange, iRange } from "./utils";
17
+ import { isVector, vectorEquals } from "./vector";
56
18
  /**
57
19
  * For some specific grid entities, the variant defined in the XML is what is used by the actual
58
20
  * game (which is not the case for e.g. poops).
59
21
  */
60
- const GRID_ENTITY_TYPES_THAT_KEEP_GRID_ENTITY_XML_VARIANT = new ReadonlySet_1.ReadonlySet([
61
- isaac_typescript_definitions_1.GridEntityType.SPIKES_ON_OFF, // 9
62
- isaac_typescript_definitions_1.GridEntityType.PRESSURE_PLATE, // 20
63
- isaac_typescript_definitions_1.GridEntityType.TELEPORTER, // 23
22
+ const GRID_ENTITY_TYPES_THAT_KEEP_GRID_ENTITY_XML_VARIANT = new ReadonlySet([
23
+ GridEntityType.SPIKES_ON_OFF, // 9
24
+ GridEntityType.PRESSURE_PLATE, // 20
25
+ GridEntityType.TELEPORTER, // 23
64
26
  ]);
65
- const BREAKABLE_GRID_ENTITY_TYPES_BY_EXPLOSIONS = new ReadonlySet_1.ReadonlySet([
66
- isaac_typescript_definitions_1.GridEntityType.ROCK, // 2
67
- isaac_typescript_definitions_1.GridEntityType.ROCK_TINTED, // 4
68
- isaac_typescript_definitions_1.GridEntityType.ROCK_BOMB, // 5
69
- isaac_typescript_definitions_1.GridEntityType.ROCK_ALT, // 6
70
- isaac_typescript_definitions_1.GridEntityType.SPIDER_WEB, // 10
71
- isaac_typescript_definitions_1.GridEntityType.TNT, // 12
27
+ const BREAKABLE_GRID_ENTITY_TYPES_BY_EXPLOSIONS = new ReadonlySet([
28
+ GridEntityType.ROCK, // 2
29
+ GridEntityType.ROCK_TINTED, // 4
30
+ GridEntityType.ROCK_BOMB, // 5
31
+ GridEntityType.ROCK_ALT, // 6
32
+ GridEntityType.SPIDER_WEB, // 10
33
+ GridEntityType.TNT, // 12
72
34
  // GridEntityType.FIREPLACE (13) does not count since it is turned into a non-grid entity upon
73
35
  // spawning.
74
- isaac_typescript_definitions_1.GridEntityType.POOP, // 14
75
- isaac_typescript_definitions_1.GridEntityType.ROCK_SUPER_SPECIAL, // 22
76
- isaac_typescript_definitions_1.GridEntityType.ROCK_SPIKED, // 25
77
- isaac_typescript_definitions_1.GridEntityType.ROCK_ALT_2, // 26
78
- isaac_typescript_definitions_1.GridEntityType.ROCK_GOLD, // 27
36
+ GridEntityType.POOP, // 14
37
+ GridEntityType.ROCK_SUPER_SPECIAL, // 22
38
+ GridEntityType.ROCK_SPIKED, // 25
39
+ GridEntityType.ROCK_ALT_2, // 26
40
+ GridEntityType.ROCK_GOLD, // 27
79
41
  ]);
80
- const BREAKABLE_GRID_ENTITY_TYPES_VARIANTS_BY_EXPLOSIONS = new ReadonlySet_1.ReadonlySet([`${isaac_typescript_definitions_1.GridEntityType.STATUE}.${isaac_typescript_definitions_1.StatueVariant.ANGEL}`]);
81
- const GRID_ENTITY_XML_TYPES_SET = new ReadonlySet_1.ReadonlySet(cachedEnumValues_1.GRID_ENTITY_XML_TYPE_VALUES);
42
+ const BREAKABLE_GRID_ENTITY_TYPES_VARIANTS_BY_EXPLOSIONS = new ReadonlySet([`${GridEntityType.STATUE}.${StatueVariant.ANGEL}`]);
43
+ const GRID_ENTITY_XML_TYPES_SET = new ReadonlySet(GRID_ENTITY_XML_TYPE_VALUES);
82
44
  /**
83
45
  * Helper function to convert the grid entity type found in a room XML file to the corresponding
84
46
  * grid entity type and variant normally used by the game. For example, `GridEntityXMLType.ROCK` is
85
47
  * 1000 (in a room XML file), but `GridEntityType.ROCK` is equal to 2 (in-game).
86
48
  */
87
- function convertXMLGridEntityType(gridEntityXMLType, gridEntityXMLVariant) {
88
- const gridEntityArray = gridEntityXMLMap_1.GRID_ENTITY_XML_MAP.get(gridEntityXMLType);
89
- (0, utils_1.assertDefined)(gridEntityArray, `Failed to find an entry in the grid entity map for XML entity type: ${gridEntityXMLType}`);
49
+ export function convertXMLGridEntityType(gridEntityXMLType, gridEntityXMLVariant) {
50
+ const gridEntityArray = GRID_ENTITY_XML_MAP.get(gridEntityXMLType);
51
+ assertDefined(gridEntityArray, `Failed to find an entry in the grid entity map for XML entity type: ${gridEntityXMLType}`);
90
52
  const gridEntityType = gridEntityArray[0];
91
53
  const variant = GRID_ENTITY_TYPES_THAT_KEEP_GRID_ENTITY_XML_VARIANT.has(gridEntityType)
92
54
  ? gridEntityXMLVariant
@@ -100,8 +62,8 @@ function convertXMLGridEntityType(gridEntityXMLType, gridEntityXMLVariant) {
100
62
  * @param gridEntityType The grid entity type to match.
101
63
  * @param variant Optional. Default is -1, which matches every variant.
102
64
  */
103
- function doesGridEntityExist(gridEntityType, variant = -1) {
104
- const room = cachedClasses_1.game.GetRoom();
65
+ export function doesGridEntityExist(gridEntityType, variant = -1) {
66
+ const room = game.GetRoom();
105
67
  const gridIndexes = getAllGridIndexes();
106
68
  return gridIndexes.some((gridIndex) => {
107
69
  const gridEntity = room.GetGridEntity(gridIndex);
@@ -119,10 +81,10 @@ function doesGridEntityExist(gridEntityType, variant = -1) {
119
81
  *
120
82
  * Under the hood, this uses the `Room.GetGridSize` method.
121
83
  */
122
- function getAllGridIndexes() {
123
- const room = cachedClasses_1.game.GetRoom();
84
+ export function getAllGridIndexes() {
85
+ const room = game.GetRoom();
124
86
  const gridSize = room.GetGridSize();
125
- return (0, utils_1.eRange)(gridSize);
87
+ return eRange(gridSize);
126
88
  }
127
89
  /**
128
90
  * Gets the entities that have a hitbox that overlaps with any part of the square that the grid
@@ -134,28 +96,28 @@ function getAllGridIndexes() {
134
96
  * Note that this function will not work properly in the `POST_NEW_ROOM` callback since entities do
135
97
  * not have collision yet in that callback.
136
98
  */
137
- function getCollidingEntitiesWithGridEntity(gridEntity) {
99
+ export function getCollidingEntitiesWithGridEntity(gridEntity) {
138
100
  const { topLeft, bottomRight } = getGridEntityCollisionPoints(gridEntity);
139
- const closeEntities = Isaac.FindInRadius(gridEntity.Position, constants_1.DISTANCE_OF_GRID_TILE * 2);
101
+ const closeEntities = Isaac.FindInRadius(gridEntity.Position, DISTANCE_OF_GRID_TILE * 2);
140
102
  return closeEntities.filter((entity) => entity.CollidesWithGrid()
141
- && (0, math_1.isCircleIntersectingRectangle)(entity.Position,
103
+ && isCircleIntersectingRectangle(entity.Position,
142
104
  // We arbitrarily add 0.1 to account for entities that are already pushed back by the time
143
105
  // the `POST_UPDATE` callback fires.
144
106
  entity.Size + 0.1, topLeft, bottomRight));
145
107
  }
146
108
  /** Helper function to get the grid entity type and variant from a `GridEntityID`. */
147
- function getConstituentsFromGridEntityID(gridEntityID) {
109
+ export function getConstituentsFromGridEntityID(gridEntityID) {
148
110
  const parts = gridEntityID.split(".");
149
111
  if (parts.length !== 2) {
150
112
  error(`Failed to get the constituents from a grid entity ID: ${gridEntityID}`);
151
113
  }
152
114
  const [gridEntityTypeString, variantString] = parts;
153
- (0, utils_1.assertDefined)(gridEntityTypeString, `Failed to get the first constituent from a grid entity ID: ${gridEntityID}`);
154
- (0, utils_1.assertDefined)(variantString, `Failed to get the second constituent from a grid entity ID: ${gridEntityID}`);
155
- const gridEntityType = (0, types_1.parseIntSafe)(gridEntityTypeString);
156
- (0, utils_1.assertDefined)(gridEntityType, `Failed to convert the grid entity type to a number: ${gridEntityTypeString}`);
157
- const variant = (0, types_1.parseIntSafe)(variantString);
158
- (0, utils_1.assertDefined)(variant, `Failed to convert the grid entity variant to an integer: ${variantString}`);
115
+ assertDefined(gridEntityTypeString, `Failed to get the first constituent from a grid entity ID: ${gridEntityID}`);
116
+ assertDefined(variantString, `Failed to get the second constituent from a grid entity ID: ${gridEntityID}`);
117
+ const gridEntityType = parseIntSafe(gridEntityTypeString);
118
+ assertDefined(gridEntityType, `Failed to convert the grid entity type to a number: ${gridEntityTypeString}`);
119
+ const variant = parseIntSafe(variantString);
120
+ assertDefined(variant, `Failed to convert the grid entity variant to an integer: ${variantString}`);
159
121
  return [gridEntityType, variant];
160
122
  }
161
123
  /**
@@ -184,12 +146,12 @@ function getConstituentsFromGridEntityID(gridEntityID) {
184
146
  *
185
147
  * @allowEmptyVariadic
186
148
  */
187
- function getGridEntities(...gridEntityTypes) {
149
+ export function getGridEntities(...gridEntityTypes) {
188
150
  const gridEntities = getAllGridEntities();
189
151
  if (gridEntityTypes.length === 0) {
190
152
  return gridEntities;
191
153
  }
192
- const gridEntityTypesSet = new ReadonlySet_1.ReadonlySet(gridEntityTypes);
154
+ const gridEntityTypesSet = new ReadonlySet(gridEntityTypes);
193
155
  return gridEntities.filter((gridEntity) => {
194
156
  const gridEntityType = gridEntity.GetType();
195
157
  return gridEntityTypesSet.has(gridEntityType);
@@ -201,30 +163,30 @@ function getGridEntities(...gridEntityTypes) {
201
163
  * This function is variadic, meaning that you can specify as many grid entity types as you want to
202
164
  * exclude.
203
165
  */
204
- function getGridEntitiesExcept(...gridEntityTypes) {
166
+ export function getGridEntitiesExcept(...gridEntityTypes) {
205
167
  const gridEntities = getAllGridEntities();
206
168
  if (gridEntityTypes.length === 0) {
207
169
  return gridEntities;
208
170
  }
209
- const gridEntityTypesSet = new ReadonlySet_1.ReadonlySet(gridEntityTypes);
171
+ const gridEntityTypesSet = new ReadonlySet(gridEntityTypes);
210
172
  return gridEntities.filter((gridEntity) => {
211
173
  const gridEntityType = gridEntity.GetType();
212
174
  return !gridEntityTypesSet.has(gridEntityType);
213
175
  });
214
176
  }
215
177
  /** Helper function to get all grid entities in a given radius around a given point. */
216
- function getGridEntitiesInRadius(targetPosition, radius) {
178
+ export function getGridEntitiesInRadius(targetPosition, radius) {
217
179
  radius = Math.abs(radius);
218
- const topLeftOffset = constants_1.VectorOne.mul(-radius);
180
+ const topLeftOffset = VectorOne.mul(-radius);
219
181
  const mostTopLeftPosition = targetPosition.add(topLeftOffset);
220
- const room = cachedClasses_1.game.GetRoom();
182
+ const room = game.GetRoom();
221
183
  const diameter = radius * 2;
222
- const iterations = Math.ceil(diameter / constants_1.DISTANCE_OF_GRID_TILE);
184
+ const iterations = Math.ceil(diameter / DISTANCE_OF_GRID_TILE);
223
185
  const separation = diameter / iterations;
224
186
  const gridEntities = [];
225
187
  const registeredGridIndexes = new Set();
226
- for (const x of (0, utils_1.iRange)(iterations)) {
227
- for (const y of (0, utils_1.iRange)(iterations)) {
188
+ for (const x of iRange(iterations)) {
189
+ for (const y of iRange(iterations)) {
228
190
  const position = mostTopLeftPosition.add(Vector(x * separation, y * separation));
229
191
  const gridIndex = room.GetGridIndex(position);
230
192
  const gridEntity = room.GetGridEntityFromPos(position);
@@ -233,7 +195,7 @@ function getGridEntitiesInRadius(targetPosition, radius) {
233
195
  }
234
196
  registeredGridIndexes.add(gridIndex);
235
197
  const { topLeft, bottomRight } = getGridEntityCollisionPoints(gridEntity);
236
- if ((0, math_1.isCircleIntersectingRectangle)(targetPosition, radius, topLeft, bottomRight)) {
198
+ if (isCircleIntersectingRectangle(targetPosition, radius, topLeft, bottomRight)) {
237
199
  gridEntities.push(gridEntity);
238
200
  }
239
201
  }
@@ -249,7 +211,7 @@ function getGridEntitiesInRadius(targetPosition, radius) {
249
211
  *
250
212
  * @allowEmptyVariadic
251
213
  */
252
- function getGridEntitiesMap(...gridEntityTypes) {
214
+ export function getGridEntitiesMap(...gridEntityTypes) {
253
215
  const gridEntities = getGridEntities(...gridEntityTypes);
254
216
  const gridEntityMap = new Map();
255
217
  for (const gridEntity of gridEntities) {
@@ -259,21 +221,21 @@ function getGridEntitiesMap(...gridEntityTypes) {
259
221
  return gridEntityMap;
260
222
  }
261
223
  /** Helper function to get the ANM2 path for a grid entity type. */
262
- function getGridEntityANM2Path(gridEntityType) {
224
+ export function getGridEntityANM2Path(gridEntityType) {
263
225
  const gridEntityANM2Name = getGridEntityANM2Name(gridEntityType);
264
226
  return `gfx/grid/${gridEntityANM2Name}`;
265
227
  }
266
228
  /** Helper function to get the top left and bottom right corners of a given grid entity. */
267
- function getGridEntityCollisionPoints(gridEntity) {
268
- const topLeft = Vector(gridEntity.Position.X - constants_1.DISTANCE_OF_GRID_TILE / 2, gridEntity.Position.Y - constants_1.DISTANCE_OF_GRID_TILE / 2);
269
- const bottomRight = Vector(gridEntity.Position.X + constants_1.DISTANCE_OF_GRID_TILE / 2, gridEntity.Position.Y + constants_1.DISTANCE_OF_GRID_TILE / 2);
229
+ export function getGridEntityCollisionPoints(gridEntity) {
230
+ const topLeft = Vector(gridEntity.Position.X - DISTANCE_OF_GRID_TILE / 2, gridEntity.Position.Y - DISTANCE_OF_GRID_TILE / 2);
231
+ const bottomRight = Vector(gridEntity.Position.X + DISTANCE_OF_GRID_TILE / 2, gridEntity.Position.Y + DISTANCE_OF_GRID_TILE / 2);
270
232
  return {
271
233
  topLeft,
272
234
  bottomRight,
273
235
  };
274
236
  }
275
237
  /** Helper function to get a string containing the grid entity's type and variant. */
276
- function getGridEntityID(gridEntity) {
238
+ export function getGridEntityID(gridEntity) {
277
239
  const gridEntityType = gridEntity.GetType();
278
240
  const variant = gridEntity.GetVariant();
279
241
  return `${gridEntityType}.${variant}`;
@@ -282,7 +244,7 @@ function getGridEntityID(gridEntity) {
282
244
  * Helper function to get a formatted string in the format returned by the `getGridEntityID`
283
245
  * function.
284
246
  */
285
- function getGridEntityIDFromConstituents(gridEntityType, variant) {
247
+ export function getGridEntityIDFromConstituents(gridEntityType, variant) {
286
248
  return `${gridEntityType}.${variant}`;
287
249
  }
288
250
  /**
@@ -291,7 +253,7 @@ function getGridEntityIDFromConstituents(gridEntityType, variant) {
291
253
  *
292
254
  * If you want to match every variant, use the `getGridEntities` function instead.
293
255
  */
294
- function getMatchingGridEntities(gridEntityType, variant) {
256
+ export function getMatchingGridEntities(gridEntityType, variant) {
295
257
  const gridEntities = getGridEntities(gridEntityType);
296
258
  return gridEntities.filter((gridEntity) => gridEntity.GetVariant() === variant);
297
259
  }
@@ -301,7 +263,7 @@ function getMatchingGridEntities(gridEntityType, variant) {
301
263
  *
302
264
  * All of the rock PNGs are in the "gfx/grid" directory.
303
265
  */
304
- function getRockPNGPath() {
266
+ export function getRockPNGPath() {
305
267
  const rockPNGName = getRockPNGName();
306
268
  return `gfx/grid/${rockPNGName}`;
307
269
  }
@@ -311,8 +273,8 @@ function getRockPNGPath() {
311
273
  * For example, if a rock was surrounded by rocks on all sides, this would return an array of 8
312
274
  * rocks (e.g. top-left + top + top-right + left + right + bottom-left + bottom + right).
313
275
  */
314
- function getSurroundingGridEntities(gridEntity) {
315
- const room = cachedClasses_1.game.GetRoom();
276
+ export function getSurroundingGridEntities(gridEntity) {
277
+ const room = game.GetRoom();
316
278
  const gridIndex = gridEntity.GetGridIndex();
317
279
  const surroundingGridIndexes = getSurroundingGridIndexes(gridIndex);
318
280
  const surroundingGridEntities = [];
@@ -331,8 +293,8 @@ function getSurroundingGridEntities(gridEntity) {
331
293
  * bottom-left + bottom + right), even if the computed values would be negative or otherwise
332
294
  * invalid.
333
295
  */
334
- function getSurroundingGridIndexes(gridIndex) {
335
- const room = cachedClasses_1.game.GetRoom();
296
+ export function getSurroundingGridIndexes(gridIndex) {
297
+ const room = game.GetRoom();
336
298
  const gridWidth = room.GetGridWidth();
337
299
  return [
338
300
  gridIndex - gridWidth - 1, // Top-left
@@ -350,8 +312,8 @@ function getSurroundingGridIndexes(gridIndex) {
350
312
  *
351
313
  * This function can be useful in certain situations to determine if the room is currently loaded.
352
314
  */
353
- function getTopLeftWall() {
354
- const room = cachedClasses_1.game.GetRoom();
315
+ export function getTopLeftWall() {
316
+ const room = game.GetRoom();
355
317
  const topLeftWallGridIndex = getTopLeftWallGridIndex();
356
318
  return room.GetGridEntity(topLeftWallGridIndex);
357
319
  }
@@ -361,11 +323,11 @@ function getTopLeftWall() {
361
323
  *
362
324
  * This function can be useful in certain situations to determine if the room is currently loaded.
363
325
  */
364
- function getTopLeftWallGridIndex() {
365
- const room = cachedClasses_1.game.GetRoom();
326
+ export function getTopLeftWallGridIndex() {
327
+ const room = game.GetRoom();
366
328
  const roomShape = room.GetRoomShape();
367
- const topLeftWallGridIndex = roomShapeToTopLeftWallGridIndexMap_1.ROOM_SHAPE_TO_TOP_LEFT_WALL_GRID_INDEX_MAP.get(roomShape);
368
- return topLeftWallGridIndex ?? roomShapeToTopLeftWallGridIndexMap_1.DEFAULT_TOP_LEFT_WALL_GRID_INDEX;
329
+ const topLeftWallGridIndex = ROOM_SHAPE_TO_TOP_LEFT_WALL_GRID_INDEX_MAP.get(roomShape);
330
+ return topLeftWallGridIndex ?? DEFAULT_TOP_LEFT_WALL_GRID_INDEX;
369
331
  }
370
332
  /**
371
333
  * Helper function to detect if a particular grid entity would "break" if it was touched by an
@@ -373,7 +335,7 @@ function getTopLeftWallGridIndex() {
373
335
  *
374
336
  * For example, rocks and pots are breakable by explosions, but blocks are not.
375
337
  */
376
- function isGridEntityBreakableByExplosion(gridEntity) {
338
+ export function isGridEntityBreakableByExplosion(gridEntity) {
377
339
  const gridEntityType = gridEntity.GetType();
378
340
  const variant = gridEntity.GetVariant();
379
341
  const gridEntityTypeVariant = `${gridEntityType}.${variant}`;
@@ -387,24 +349,24 @@ function isGridEntityBreakableByExplosion(gridEntity) {
387
349
  * Note that in the case of `GridEntityType.LOCK` (11), the state will turn to being broken before
388
350
  * the actual collision for the entity is removed.
389
351
  */
390
- function isGridEntityBroken(gridEntity) {
352
+ export function isGridEntityBroken(gridEntity) {
391
353
  const gridEntityType = gridEntity.GetType();
392
- const brokenState = gridEntityTypeToBrokenStateMap_1.GRID_ENTITY_TYPE_TO_BROKEN_STATE_MAP.get(gridEntityType);
354
+ const brokenState = GRID_ENTITY_TYPE_TO_BROKEN_STATE_MAP.get(gridEntityType);
393
355
  return gridEntity.State === brokenState;
394
356
  }
395
357
  /**
396
358
  * Helper function to see if an arbitrary number is a valid `GridEntityXMLType`. This is useful in
397
359
  * the `PRE_ROOM_ENTITY_SPAWN` callback for narrowing the type of the first argument.
398
360
  */
399
- function isGridEntityXMLType(num) {
361
+ export function isGridEntityXMLType(num) {
400
362
  return GRID_ENTITY_XML_TYPES_SET.has(num); // eslint-disable-line complete/strict-enums
401
363
  }
402
364
  /**
403
365
  * Helper function to check if the provided grid index has a door on it or if the surrounding 8 grid
404
366
  * indexes have a door on it.
405
367
  */
406
- function isGridIndexAdjacentToDoor(gridIndex) {
407
- const room = cachedClasses_1.game.GetRoom();
368
+ export function isGridIndexAdjacentToDoor(gridIndex) {
369
+ const room = game.GetRoom();
408
370
  const surroundingGridIndexes = getSurroundingGridIndexes(gridIndex);
409
371
  const gridIndexes = [gridIndex, ...surroundingGridIndexes];
410
372
  for (const gridIndexToInspect of gridIndexes) {
@@ -419,8 +381,8 @@ function isGridIndexAdjacentToDoor(gridIndex) {
419
381
  return false;
420
382
  }
421
383
  /** Helper function to see if a `GridEntityXMLType` is some kind of poop. */
422
- function isPoopGridEntityXMLType(gridEntityXMLType) {
423
- return poopGridEntityXMLTypesSet_1.POOP_GRID_ENTITY_XML_TYPES_SET.has(gridEntityXMLType);
384
+ export function isPoopGridEntityXMLType(gridEntityXMLType) {
385
+ return POOP_GRID_ENTITY_XML_TYPES_SET.has(gridEntityXMLType);
424
386
  }
425
387
  /**
426
388
  * Helper function to detect whether a given Void Portal is one that randomly spawns after a boss is
@@ -430,11 +392,11 @@ function isPoopGridEntityXMLType(gridEntityXMLType) {
430
392
  * - The `VarData` of Void Portals that are spawned after bosses will be equal to 1.
431
393
  * - The `VarData` of the Void Portal in the room after Hush is equal to 0.
432
394
  */
433
- function isPostBossVoidPortal(gridEntity) {
395
+ export function isPostBossVoidPortal(gridEntity) {
434
396
  const saveState = gridEntity.GetSaveState();
435
- return (saveState.Type === isaac_typescript_definitions_1.GridEntityType.TRAPDOOR
397
+ return (saveState.Type === GridEntityType.TRAPDOOR
436
398
  // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
437
- && saveState.Variant === isaac_typescript_definitions_1.TrapdoorVariant.VOID_PORTAL
399
+ && saveState.Variant === TrapdoorVariant.VOID_PORTAL
438
400
  && saveState.VarData === 1);
439
401
  }
440
402
  /**
@@ -455,8 +417,8 @@ function isPostBossVoidPortal(gridEntity) {
455
417
  *
456
418
  * @returns The grid entities that were removed.
457
419
  */
458
- function removeAllGridEntitiesExcept(...gridEntityTypes) {
459
- const gridEntityTypeExceptions = new ReadonlySet_1.ReadonlySet(gridEntityTypes);
420
+ export function removeAllGridEntitiesExcept(...gridEntityTypes) {
421
+ const gridEntityTypeExceptions = new ReadonlySet(gridEntityTypes);
460
422
  const gridEntities = getGridEntities();
461
423
  const removedGridEntities = [];
462
424
  for (const gridEntity of gridEntities) {
@@ -467,7 +429,7 @@ function removeAllGridEntitiesExcept(...gridEntityTypes) {
467
429
  }
468
430
  }
469
431
  if (removedGridEntities.length > 0) {
470
- (0, rooms_1.roomUpdateSafe)();
432
+ roomUpdateSafe();
471
433
  }
472
434
  return removedGridEntities;
473
435
  }
@@ -490,7 +452,7 @@ function removeAllGridEntitiesExcept(...gridEntityTypes) {
490
452
  *
491
453
  * @returns An array of the grid entities removed.
492
454
  */
493
- function removeAllMatchingGridEntities(...gridEntityType) {
455
+ export function removeAllMatchingGridEntities(...gridEntityType) {
494
456
  const gridEntities = getGridEntities(...gridEntityType);
495
457
  if (gridEntities.length === 0) {
496
458
  return [];
@@ -498,7 +460,7 @@ function removeAllMatchingGridEntities(...gridEntityType) {
498
460
  for (const gridEntity of gridEntities) {
499
461
  removeGridEntity(gridEntity, false);
500
462
  }
501
- (0, rooms_1.roomUpdateSafe)();
463
+ roomUpdateSafe();
502
464
  return gridEntities;
503
465
  }
504
466
  /**
@@ -508,10 +470,10 @@ function removeAllMatchingGridEntities(...gridEntityType) {
508
470
  *
509
471
  * You must specify an array of entities to look through.
510
472
  */
511
- function removeEntitiesSpawnedFromGridEntity(entities, gridEntity) {
473
+ export function removeEntitiesSpawnedFromGridEntity(entities, gridEntity) {
512
474
  const entitiesFromGridEntity = entities.filter((entity) => entity.FrameCount === 0
513
- && (0, vector_1.vectorEquals)(entity.Position, gridEntity.Position));
514
- (0, entities_1.removeEntities)(entitiesFromGridEntity);
475
+ && vectorEquals(entity.Position, gridEntity.Position));
476
+ removeEntities(entitiesFromGridEntity);
515
477
  }
516
478
  /**
517
479
  * Helper function to remove all of the grid entities in the supplied array.
@@ -525,7 +487,7 @@ function removeEntitiesSpawnedFromGridEntity(entities, gridEntity) {
525
487
  * @param cap Optional. If specified, will only remove the given amount of entities.
526
488
  * @returns An array of the entities that were removed.
527
489
  */
528
- function removeGridEntities(gridEntities, updateRoom, cap) {
490
+ export function removeGridEntities(gridEntities, updateRoom, cap) {
529
491
  if (gridEntities.length === 0) {
530
492
  return [];
531
493
  }
@@ -538,7 +500,7 @@ function removeGridEntities(gridEntities, updateRoom, cap) {
538
500
  }
539
501
  }
540
502
  if (updateRoom) {
541
- (0, rooms_1.roomUpdateSafe)();
503
+ roomUpdateSafe();
542
504
  }
543
505
  return gridEntitiesRemoved;
544
506
  }
@@ -556,9 +518,9 @@ function removeGridEntities(gridEntities, updateRoom, cap) {
556
518
  * this is expensive, since it involves a call to `Isaac.GetRoomEntities`, so set
557
519
  * this to false if you need to run this function multiple times.
558
520
  */
559
- function removeGridEntity(gridEntityOrGridIndex, updateRoom) {
560
- const room = cachedClasses_1.game.GetRoom();
561
- const gridEntity = (0, types_1.isInteger)(gridEntityOrGridIndex)
521
+ export function removeGridEntity(gridEntityOrGridIndex, updateRoom) {
522
+ const room = game.GetRoom();
523
+ const gridEntity = isInteger(gridEntityOrGridIndex)
562
524
  ? room.GetGridEntity(gridEntityOrGridIndex)
563
525
  : gridEntityOrGridIndex;
564
526
  if (gridEntity === undefined) {
@@ -568,24 +530,24 @@ function removeGridEntity(gridEntityOrGridIndex, updateRoom) {
568
530
  const gridEntityType = gridEntity.GetType();
569
531
  const variant = gridEntity.GetVariant();
570
532
  const position = gridEntity.Position;
571
- const gridIndex = (0, types_1.isInteger)(gridEntityOrGridIndex)
533
+ const gridIndex = isInteger(gridEntityOrGridIndex)
572
534
  ? gridEntityOrGridIndex
573
535
  : gridEntityOrGridIndex.GetGridIndex();
574
536
  room.RemoveGridEntity(gridIndex, 0, false);
575
537
  if (updateRoom) {
576
- (0, rooms_1.roomUpdateSafe)();
538
+ roomUpdateSafe();
577
539
  }
578
540
  // In the special case of removing a Devil Statue or Angel Statue, we also need to delete the
579
541
  // corresponding effect.
580
- if (gridEntityType === isaac_typescript_definitions_1.GridEntityType.STATUE) {
542
+ if (gridEntityType === GridEntityType.STATUE) {
581
543
  const effectVariant =
582
544
  // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
583
- variant === isaac_typescript_definitions_1.StatueVariant.DEVIL
584
- ? isaac_typescript_definitions_1.EffectVariant.DEVIL
585
- : isaac_typescript_definitions_1.EffectVariant.ANGEL;
586
- const effects = (0, entitiesSpecific_1.getEffects)(effectVariant);
587
- const effectsOnTile = effects.filter((effect) => (0, vector_1.vectorEquals)(effect.Position, position));
588
- (0, entities_1.removeEntities)(effectsOnTile);
545
+ variant === StatueVariant.DEVIL
546
+ ? EffectVariant.DEVIL
547
+ : EffectVariant.ANGEL;
548
+ const effects = getEffects(effectVariant);
549
+ const effectsOnTile = effects.filter((effect) => vectorEquals(effect.Position, position));
550
+ removeEntities(effectsOnTile);
589
551
  }
590
552
  }
591
553
  /**
@@ -595,7 +557,7 @@ function removeGridEntity(gridEntityOrGridIndex, updateRoom) {
595
557
  * longer become visible. (This is because the information about the sprite is lost when it is
596
558
  * reset.)
597
559
  */
598
- function setGridEntityInvisible(gridEntity) {
560
+ export function setGridEntityInvisible(gridEntity) {
599
561
  const sprite = gridEntity.GetSprite();
600
562
  sprite.Reset();
601
563
  }
@@ -606,7 +568,7 @@ function setGridEntityInvisible(gridEntity) {
606
568
  *
607
569
  * Setting the new type to `GridEntityType.NULL` (0) will have no effect.
608
570
  */
609
- function setGridEntityType(gridEntity, gridEntityType) {
571
+ export function setGridEntityType(gridEntity, gridEntityType) {
610
572
  gridEntity.SetType(gridEntityType);
611
573
  const sprite = gridEntity.GetSprite();
612
574
  const anm2Path = getGridEntityANM2Path(gridEntityType);
@@ -614,7 +576,7 @@ function setGridEntityType(gridEntity, gridEntityType) {
614
576
  return;
615
577
  }
616
578
  sprite.Load(anm2Path, false);
617
- if (gridEntityType === isaac_typescript_definitions_1.GridEntityType.ROCK) {
579
+ if (gridEntityType === GridEntityType.ROCK) {
618
580
  const pngPath = getRockPNGPath();
619
581
  sprite.ReplaceSpritesheet(0, pngPath);
620
582
  }
@@ -628,8 +590,8 @@ function setGridEntityType(gridEntity, gridEntityType) {
628
590
  *
629
591
  * @returns Whether spawning the four quadrants was successful.
630
592
  */
631
- function spawnGiantPoop(topLeftGridIndex) {
632
- const room = cachedClasses_1.game.GetRoom();
593
+ export function spawnGiantPoop(topLeftGridIndex) {
594
+ const room = game.GetRoom();
633
595
  const gridWidth = room.GetGridWidth();
634
596
  const topRightGridIndex = topLeftGridIndex + 1;
635
597
  const bottomLeftGridIndex = topLeftGridIndex + gridWidth;
@@ -646,26 +608,26 @@ function spawnGiantPoop(topLeftGridIndex) {
646
608
  return false;
647
609
  }
648
610
  }
649
- const topLeft = spawnGridEntityWithVariant(isaac_typescript_definitions_1.GridEntityType.POOP, isaac_typescript_definitions_1.PoopGridEntityVariant.GIANT_TOP_LEFT, topLeftGridIndex);
650
- const topRight = spawnGridEntityWithVariant(isaac_typescript_definitions_1.GridEntityType.POOP, isaac_typescript_definitions_1.PoopGridEntityVariant.GIANT_TOP_RIGHT, topRightGridIndex);
651
- const bottomLeft = spawnGridEntityWithVariant(isaac_typescript_definitions_1.GridEntityType.POOP, isaac_typescript_definitions_1.PoopGridEntityVariant.GIANT_BOTTOM_LEFT, bottomLeftGridIndex);
652
- const bottomRight = spawnGridEntityWithVariant(isaac_typescript_definitions_1.GridEntityType.POOP, isaac_typescript_definitions_1.PoopGridEntityVariant.GIANT_BOTTOM_RIGHT, bottomRightGridIndex);
611
+ const topLeft = spawnGridEntityWithVariant(GridEntityType.POOP, PoopGridEntityVariant.GIANT_TOP_LEFT, topLeftGridIndex);
612
+ const topRight = spawnGridEntityWithVariant(GridEntityType.POOP, PoopGridEntityVariant.GIANT_TOP_RIGHT, topRightGridIndex);
613
+ const bottomLeft = spawnGridEntityWithVariant(GridEntityType.POOP, PoopGridEntityVariant.GIANT_BOTTOM_LEFT, bottomLeftGridIndex);
614
+ const bottomRight = spawnGridEntityWithVariant(GridEntityType.POOP, PoopGridEntityVariant.GIANT_BOTTOM_RIGHT, bottomRightGridIndex);
653
615
  return (topLeft !== undefined
654
- && topLeft.GetType() === isaac_typescript_definitions_1.GridEntityType.POOP
616
+ && topLeft.GetType() === GridEntityType.POOP
655
617
  // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
656
- && topLeft.GetVariant() === isaac_typescript_definitions_1.PoopGridEntityVariant.GIANT_TOP_LEFT
618
+ && topLeft.GetVariant() === PoopGridEntityVariant.GIANT_TOP_LEFT
657
619
  && topRight !== undefined
658
- && topRight.GetType() === isaac_typescript_definitions_1.GridEntityType.POOP
620
+ && topRight.GetType() === GridEntityType.POOP
659
621
  // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
660
- && topRight.GetVariant() === isaac_typescript_definitions_1.PoopGridEntityVariant.GIANT_TOP_RIGHT
622
+ && topRight.GetVariant() === PoopGridEntityVariant.GIANT_TOP_RIGHT
661
623
  && bottomLeft !== undefined
662
- && bottomLeft.GetType() === isaac_typescript_definitions_1.GridEntityType.POOP
624
+ && bottomLeft.GetType() === GridEntityType.POOP
663
625
  // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
664
- && bottomLeft.GetVariant() === isaac_typescript_definitions_1.PoopGridEntityVariant.GIANT_BOTTOM_LEFT
626
+ && bottomLeft.GetVariant() === PoopGridEntityVariant.GIANT_BOTTOM_LEFT
665
627
  && bottomRight !== undefined
666
- && bottomRight.GetType() === isaac_typescript_definitions_1.GridEntityType.POOP
628
+ && bottomRight.GetType() === GridEntityType.POOP
667
629
  // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
668
- && bottomRight.GetVariant() === isaac_typescript_definitions_1.PoopGridEntityVariant.GIANT_BOTTOM_RIGHT);
630
+ && bottomRight.GetVariant() === PoopGridEntityVariant.GIANT_BOTTOM_RIGHT);
669
631
  }
670
632
  /**
671
633
  * Helper function to spawn a grid entity with a specific type.
@@ -687,7 +649,7 @@ function spawnGiantPoop(topLeftGridIndex) {
687
649
  * function will do nothing, since spawning a grid entity on top of
688
650
  * another grid entity will not replace it.
689
651
  */
690
- function spawnGridEntity(gridEntityType, gridIndexOrPosition, shouldRemoveExistingGridEntity = true) {
652
+ export function spawnGridEntity(gridEntityType, gridIndexOrPosition, shouldRemoveExistingGridEntity = true) {
691
653
  return spawnGridEntityWithVariant(gridEntityType, 0, gridIndexOrPosition, shouldRemoveExistingGridEntity);
692
654
  }
693
655
  /**
@@ -708,15 +670,15 @@ function spawnGridEntity(gridEntityType, gridIndexOrPosition, shouldRemoveExisti
708
670
  * function will do nothing, since spawning a grid entity on top of
709
671
  * another grid entity will not replace it.
710
672
  */
711
- function spawnGridEntityWithVariant(gridEntityType, variant, gridIndexOrPosition, shouldRemoveExistingGridEntity = true) {
712
- const room = cachedClasses_1.game.GetRoom();
673
+ export function spawnGridEntityWithVariant(gridEntityType, variant, gridIndexOrPosition, shouldRemoveExistingGridEntity = true) {
674
+ const room = game.GetRoom();
713
675
  // We do an explicit check to prevent run-time errors in Lua environments.
714
676
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
715
677
  if (gridIndexOrPosition === undefined) {
716
678
  const gridEntityID = getGridEntityIDFromConstituents(gridEntityType, variant);
717
679
  error(`Failed to spawn grid entity ${gridEntityID} since an undefined position was passed to the "spawnGridEntityWithVariant" function.`);
718
680
  }
719
- const existingGridEntity = (0, vector_1.isVector)(gridIndexOrPosition)
681
+ const existingGridEntity = isVector(gridIndexOrPosition)
720
682
  ? room.GetGridEntityFromPos(gridIndexOrPosition)
721
683
  : room.GetGridEntity(gridIndexOrPosition);
722
684
  if (existingGridEntity !== undefined) {
@@ -727,14 +689,14 @@ function spawnGridEntityWithVariant(gridEntityType, variant, gridIndexOrPosition
727
689
  return undefined;
728
690
  }
729
691
  }
730
- const position = (0, vector_1.isVector)(gridIndexOrPosition)
692
+ const position = isVector(gridIndexOrPosition)
731
693
  ? gridIndexOrPosition
732
694
  : room.GetGridPosition(gridIndexOrPosition);
733
695
  const gridEntity = Isaac.GridSpawn(gridEntityType, variant, position);
734
696
  if (gridEntity === undefined) {
735
697
  return gridEntity;
736
698
  }
737
- if (gridEntityType === isaac_typescript_definitions_1.GridEntityType.PIT) {
699
+ if (gridEntityType === GridEntityType.PIT) {
738
700
  // For some reason, spawned pits start with a collision class of `NONE`, so we have to manually
739
701
  // set it.
740
702
  const pit = gridEntity.ToPit();
@@ -742,10 +704,10 @@ function spawnGridEntityWithVariant(gridEntityType, variant, gridIndexOrPosition
742
704
  pit.UpdateCollision();
743
705
  }
744
706
  }
745
- else if (gridEntityType === isaac_typescript_definitions_1.GridEntityType.WALL) {
707
+ else if (gridEntityType === GridEntityType.WALL) {
746
708
  // For some reason, spawned walls start with a collision class of `NONE`, so we have to manually
747
709
  // set it.
748
- gridEntity.CollisionClass = isaac_typescript_definitions_1.GridCollisionClass.WALL;
710
+ gridEntity.CollisionClass = GridCollisionClass.WALL;
749
711
  }
750
712
  return gridEntity;
751
713
  }
@@ -753,8 +715,8 @@ function spawnGridEntityWithVariant(gridEntityType, variant, gridIndexOrPosition
753
715
  * Helper function to spawn a Void Portal. This is more complicated than simply spawning a trapdoor
754
716
  * with the appropriate variant, as the game does not give it the correct sprite automatically.
755
717
  */
756
- function spawnVoidPortal(gridIndex) {
757
- const voidPortal = spawnGridEntityWithVariant(isaac_typescript_definitions_1.GridEntityType.TRAPDOOR, isaac_typescript_definitions_1.TrapdoorVariant.VOID_PORTAL, gridIndex);
718
+ export function spawnVoidPortal(gridIndex) {
719
+ const voidPortal = spawnGridEntityWithVariant(GridEntityType.TRAPDOOR, TrapdoorVariant.VOID_PORTAL, gridIndex);
758
720
  if (voidPortal === undefined) {
759
721
  return voidPortal;
760
722
  }
@@ -766,7 +728,7 @@ function spawnVoidPortal(gridIndex) {
766
728
  return voidPortal;
767
729
  }
768
730
  function getAllGridEntities() {
769
- const room = cachedClasses_1.game.GetRoom();
731
+ const room = game.GetRoom();
770
732
  const gridEntities = [];
771
733
  for (const gridIndex of getAllGridIndexes()) {
772
734
  const gridEntity = room.GetGridEntity(gridIndex);
@@ -779,11 +741,11 @@ function getAllGridEntities() {
779
741
  function getGridEntityANM2Name(gridEntityType) {
780
742
  switch (gridEntityType) {
781
743
  // 1
782
- case isaac_typescript_definitions_1.GridEntityType.DECORATION: {
744
+ case GridEntityType.DECORATION: {
783
745
  return getGridEntityANM2NameDecoration();
784
746
  }
785
747
  default: {
786
- return gridEntityTypeToANM2Name_1.GRID_ENTITY_TYPE_TO_ANM2_NAME[gridEntityType];
748
+ return GRID_ENTITY_TYPE_TO_ANM2_NAME[gridEntityType];
787
749
  }
788
750
  }
789
751
  }
@@ -792,91 +754,91 @@ function getGridEntityANM2Name(gridEntityType) {
792
754
  * backdrop. The values are taken from the "backdrops.xml" file.
793
755
  */
794
756
  function getGridEntityANM2NameDecoration() {
795
- const room = cachedClasses_1.game.GetRoom();
757
+ const room = game.GetRoom();
796
758
  const backdropType = room.GetBackdropType();
797
759
  switch (backdropType) {
798
760
  // 1, 2, 3, 36, 49, 52
799
- case isaac_typescript_definitions_1.BackdropType.BASEMENT:
800
- case isaac_typescript_definitions_1.BackdropType.CELLAR:
801
- case isaac_typescript_definitions_1.BackdropType.BURNING_BASEMENT:
802
- case isaac_typescript_definitions_1.BackdropType.DOWNPOUR_ENTRANCE:
803
- case isaac_typescript_definitions_1.BackdropType.ISAACS_BEDROOM:
804
- case isaac_typescript_definitions_1.BackdropType.CLOSET: {
761
+ case BackdropType.BASEMENT:
762
+ case BackdropType.CELLAR:
763
+ case BackdropType.BURNING_BASEMENT:
764
+ case BackdropType.DOWNPOUR_ENTRANCE:
765
+ case BackdropType.ISAACS_BEDROOM:
766
+ case BackdropType.CLOSET: {
805
767
  return "Props_01_Basement.anm2";
806
768
  }
807
769
  // 4, 5, 6, 37
808
- case isaac_typescript_definitions_1.BackdropType.CAVES:
809
- case isaac_typescript_definitions_1.BackdropType.CATACOMBS:
810
- case isaac_typescript_definitions_1.BackdropType.FLOODED_CAVES:
811
- case isaac_typescript_definitions_1.BackdropType.MINES_ENTRANCE: {
770
+ case BackdropType.CAVES:
771
+ case BackdropType.CATACOMBS:
772
+ case BackdropType.FLOODED_CAVES:
773
+ case BackdropType.MINES_ENTRANCE: {
812
774
  return "Props_03_Caves.anm2";
813
775
  }
814
776
  // 7, 8, 9, 30, 33, 38, 39, 40, 41, 42, 53, 60
815
- case isaac_typescript_definitions_1.BackdropType.DEPTHS:
816
- case isaac_typescript_definitions_1.BackdropType.NECROPOLIS:
817
- case isaac_typescript_definitions_1.BackdropType.DANK_DEPTHS:
818
- case isaac_typescript_definitions_1.BackdropType.SACRIFICE:
819
- case isaac_typescript_definitions_1.BackdropType.MAUSOLEUM:
820
- case isaac_typescript_definitions_1.BackdropType.MAUSOLEUM_ENTRANCE:
821
- case isaac_typescript_definitions_1.BackdropType.CORPSE_ENTRANCE:
822
- case isaac_typescript_definitions_1.BackdropType.MAUSOLEUM_2:
823
- case isaac_typescript_definitions_1.BackdropType.MAUSOLEUM_3:
824
- case isaac_typescript_definitions_1.BackdropType.MAUSOLEUM_4:
825
- case isaac_typescript_definitions_1.BackdropType.CLOSET_B:
826
- case isaac_typescript_definitions_1.BackdropType.DARK_CLOSET: {
777
+ case BackdropType.DEPTHS:
778
+ case BackdropType.NECROPOLIS:
779
+ case BackdropType.DANK_DEPTHS:
780
+ case BackdropType.SACRIFICE:
781
+ case BackdropType.MAUSOLEUM:
782
+ case BackdropType.MAUSOLEUM_ENTRANCE:
783
+ case BackdropType.CORPSE_ENTRANCE:
784
+ case BackdropType.MAUSOLEUM_2:
785
+ case BackdropType.MAUSOLEUM_3:
786
+ case BackdropType.MAUSOLEUM_4:
787
+ case BackdropType.CLOSET_B:
788
+ case BackdropType.DARK_CLOSET: {
827
789
  return "Props_05_Depths.anm2";
828
790
  }
829
791
  // 10, 12
830
- case isaac_typescript_definitions_1.BackdropType.WOMB:
831
- case isaac_typescript_definitions_1.BackdropType.SCARRED_WOMB: {
792
+ case BackdropType.WOMB:
793
+ case BackdropType.SCARRED_WOMB: {
832
794
  return "Props_07_The Womb.anm2";
833
795
  }
834
796
  // 11
835
- case isaac_typescript_definitions_1.BackdropType.UTERO: {
797
+ case BackdropType.UTERO: {
836
798
  return "Props_07_Utero.anm2";
837
799
  }
838
800
  // 13, 27
839
- case isaac_typescript_definitions_1.BackdropType.BLUE_WOMB:
840
- case isaac_typescript_definitions_1.BackdropType.BLUE_WOMB_PASS: {
801
+ case BackdropType.BLUE_WOMB:
802
+ case BackdropType.BLUE_WOMB_PASS: {
841
803
  return "Props_07_The Womb_blue.anm2";
842
804
  }
843
805
  // 14, 47
844
- case isaac_typescript_definitions_1.BackdropType.SHEOL:
845
- case isaac_typescript_definitions_1.BackdropType.GEHENNA: {
806
+ case BackdropType.SHEOL:
807
+ case BackdropType.GEHENNA: {
846
808
  return "Props_09_Sheol.anm2";
847
809
  }
848
810
  // 15
849
- case isaac_typescript_definitions_1.BackdropType.CATHEDRAL: {
811
+ case BackdropType.CATHEDRAL: {
850
812
  return "Props_10_Cathedral.anm2";
851
813
  }
852
814
  // 17
853
- case isaac_typescript_definitions_1.BackdropType.CHEST: {
815
+ case BackdropType.CHEST: {
854
816
  return "Props_11_The Chest.anm2";
855
817
  }
856
818
  // 28
857
- case isaac_typescript_definitions_1.BackdropType.GREED_SHOP: {
819
+ case BackdropType.GREED_SHOP: {
858
820
  return "Props_12_Greed.anm2";
859
821
  }
860
822
  // 31
861
- case isaac_typescript_definitions_1.BackdropType.DOWNPOUR: {
823
+ case BackdropType.DOWNPOUR: {
862
824
  return "props_01x_downpour.anm2";
863
825
  }
864
826
  // 32, 46, 58, 59
865
- case isaac_typescript_definitions_1.BackdropType.MINES:
866
- case isaac_typescript_definitions_1.BackdropType.ASHPIT:
867
- case isaac_typescript_definitions_1.BackdropType.MINES_SHAFT:
868
- case isaac_typescript_definitions_1.BackdropType.ASHPIT_SHAFT: {
827
+ case BackdropType.MINES:
828
+ case BackdropType.ASHPIT:
829
+ case BackdropType.MINES_SHAFT:
830
+ case BackdropType.ASHPIT_SHAFT: {
869
831
  return "props_03x_mines.anm2";
870
832
  }
871
833
  // 34, 43, 44, 48
872
- case isaac_typescript_definitions_1.BackdropType.CORPSE:
873
- case isaac_typescript_definitions_1.BackdropType.CORPSE_2:
874
- case isaac_typescript_definitions_1.BackdropType.CORPSE_3:
875
- case isaac_typescript_definitions_1.BackdropType.MORTIS: {
834
+ case BackdropType.CORPSE:
835
+ case BackdropType.CORPSE_2:
836
+ case BackdropType.CORPSE_3:
837
+ case BackdropType.MORTIS: {
876
838
  return "props_07_the corpse.anm2";
877
839
  }
878
840
  // 45
879
- case isaac_typescript_definitions_1.BackdropType.DROSS: {
841
+ case BackdropType.DROSS: {
880
842
  return "props_02x_dross.anm2";
881
843
  }
882
844
  default: {
@@ -885,117 +847,117 @@ function getGridEntityANM2NameDecoration() {
885
847
  }
886
848
  }
887
849
  function getRockPNGName() {
888
- const room = cachedClasses_1.game.GetRoom();
850
+ const room = game.GetRoom();
889
851
  const backdropType = room.GetBackdropType();
890
852
  switch (backdropType) {
891
853
  // 1, 17
892
- case isaac_typescript_definitions_1.BackdropType.BASEMENT:
893
- case isaac_typescript_definitions_1.BackdropType.CHEST: {
854
+ case BackdropType.BASEMENT:
855
+ case BackdropType.CHEST: {
894
856
  return "rocks_basement.png";
895
857
  }
896
858
  // 2
897
- case isaac_typescript_definitions_1.BackdropType.CELLAR: {
859
+ case BackdropType.CELLAR: {
898
860
  return "rocks_cellar.png";
899
861
  }
900
862
  // 3
901
- case isaac_typescript_definitions_1.BackdropType.BURNING_BASEMENT: {
863
+ case BackdropType.BURNING_BASEMENT: {
902
864
  return "rocks_burningbasement.png"; // cspell:ignore burningbasement
903
865
  }
904
866
  // 4
905
- case isaac_typescript_definitions_1.BackdropType.CAVES: {
867
+ case BackdropType.CAVES: {
906
868
  return "rocks_caves.png";
907
869
  }
908
870
  // 5
909
- case isaac_typescript_definitions_1.BackdropType.CATACOMBS: {
871
+ case BackdropType.CATACOMBS: {
910
872
  return "rocks_catacombs.png";
911
873
  }
912
874
  // 6
913
- case isaac_typescript_definitions_1.BackdropType.FLOODED_CAVES: {
875
+ case BackdropType.FLOODED_CAVES: {
914
876
  return "rocks_drownedcaves.png"; // cspell:ignore drownedcaves
915
877
  }
916
878
  // 7, 8, 9, 30, 60
917
- case isaac_typescript_definitions_1.BackdropType.DEPTHS:
918
- case isaac_typescript_definitions_1.BackdropType.NECROPOLIS:
919
- case isaac_typescript_definitions_1.BackdropType.DANK_DEPTHS:
920
- case isaac_typescript_definitions_1.BackdropType.SACRIFICE:
921
- case isaac_typescript_definitions_1.BackdropType.DARK_CLOSET: {
879
+ case BackdropType.DEPTHS:
880
+ case BackdropType.NECROPOLIS:
881
+ case BackdropType.DANK_DEPTHS:
882
+ case BackdropType.SACRIFICE:
883
+ case BackdropType.DARK_CLOSET: {
922
884
  return "rocks_depths.png";
923
885
  }
924
886
  // 10
925
- case isaac_typescript_definitions_1.BackdropType.WOMB: {
887
+ case BackdropType.WOMB: {
926
888
  return "rocks_womb.png";
927
889
  }
928
890
  // 11
929
- case isaac_typescript_definitions_1.BackdropType.UTERO: {
891
+ case BackdropType.UTERO: {
930
892
  return "rocks_utero.png";
931
893
  }
932
894
  // 12
933
- case isaac_typescript_definitions_1.BackdropType.SCARRED_WOMB: {
895
+ case BackdropType.SCARRED_WOMB: {
934
896
  return "rocks_scarredwomb.png"; // cspell:ignore scarredwomb
935
897
  }
936
898
  // 13, 27
937
- case isaac_typescript_definitions_1.BackdropType.BLUE_WOMB:
938
- case isaac_typescript_definitions_1.BackdropType.BLUE_WOMB_PASS: {
899
+ case BackdropType.BLUE_WOMB:
900
+ case BackdropType.BLUE_WOMB_PASS: {
939
901
  return "rocks_bluewomb.png"; // cspell:ignore bluewomb
940
902
  }
941
903
  // 14, 16
942
- case isaac_typescript_definitions_1.BackdropType.SHEOL:
943
- case isaac_typescript_definitions_1.BackdropType.DARK_ROOM: {
904
+ case BackdropType.SHEOL:
905
+ case BackdropType.DARK_ROOM: {
944
906
  return "rocks_sheol.png";
945
907
  }
946
908
  // 15, 35
947
- case isaac_typescript_definitions_1.BackdropType.CATHEDRAL:
948
- case isaac_typescript_definitions_1.BackdropType.PLANETARIUM: {
909
+ case BackdropType.CATHEDRAL:
910
+ case BackdropType.PLANETARIUM: {
949
911
  return "rocks_cathedral.png";
950
912
  }
951
913
  // 23, 32, 37, 58
952
- case isaac_typescript_definitions_1.BackdropType.SECRET:
953
- case isaac_typescript_definitions_1.BackdropType.MINES:
954
- case isaac_typescript_definitions_1.BackdropType.MINES_ENTRANCE:
955
- case isaac_typescript_definitions_1.BackdropType.MINES_SHAFT: {
914
+ case BackdropType.SECRET:
915
+ case BackdropType.MINES:
916
+ case BackdropType.MINES_ENTRANCE:
917
+ case BackdropType.MINES_SHAFT: {
956
918
  return "rocks_secretroom.png"; // cspell:ignore secretroom
957
919
  }
958
920
  // 31, 36
959
- case isaac_typescript_definitions_1.BackdropType.DOWNPOUR:
960
- case isaac_typescript_definitions_1.BackdropType.DOWNPOUR_ENTRANCE: {
921
+ case BackdropType.DOWNPOUR:
922
+ case BackdropType.DOWNPOUR_ENTRANCE: {
961
923
  return "rocks_downpour.png";
962
924
  }
963
925
  // 33, 38, 40, 41, 42
964
- case isaac_typescript_definitions_1.BackdropType.MAUSOLEUM:
965
- case isaac_typescript_definitions_1.BackdropType.MAUSOLEUM_ENTRANCE:
966
- case isaac_typescript_definitions_1.BackdropType.MAUSOLEUM_2:
967
- case isaac_typescript_definitions_1.BackdropType.MAUSOLEUM_3:
968
- case isaac_typescript_definitions_1.BackdropType.MAUSOLEUM_4: {
926
+ case BackdropType.MAUSOLEUM:
927
+ case BackdropType.MAUSOLEUM_ENTRANCE:
928
+ case BackdropType.MAUSOLEUM_2:
929
+ case BackdropType.MAUSOLEUM_3:
930
+ case BackdropType.MAUSOLEUM_4: {
969
931
  return "rocks_mausoleum.png";
970
932
  }
971
933
  // 34, 48
972
- case isaac_typescript_definitions_1.BackdropType.CORPSE:
973
- case isaac_typescript_definitions_1.BackdropType.MORTIS: {
934
+ case BackdropType.CORPSE:
935
+ case BackdropType.MORTIS: {
974
936
  return "rocks_corpse.png";
975
937
  }
976
938
  // 39
977
- case isaac_typescript_definitions_1.BackdropType.CORPSE_ENTRANCE: {
939
+ case BackdropType.CORPSE_ENTRANCE: {
978
940
  return "rocks_corpseentrance.png"; // cspell:ignore corpseentrance
979
941
  }
980
942
  // 43
981
- case isaac_typescript_definitions_1.BackdropType.CORPSE_2: {
943
+ case BackdropType.CORPSE_2: {
982
944
  return "rocks_corpse2.png";
983
945
  }
984
946
  // 44
985
- case isaac_typescript_definitions_1.BackdropType.CORPSE_3: {
947
+ case BackdropType.CORPSE_3: {
986
948
  return "rocks_corpse3.png";
987
949
  }
988
950
  // 45
989
- case isaac_typescript_definitions_1.BackdropType.DROSS: {
951
+ case BackdropType.DROSS: {
990
952
  return "rocks_dross.png";
991
953
  }
992
954
  // 46, 59
993
- case isaac_typescript_definitions_1.BackdropType.ASHPIT:
994
- case isaac_typescript_definitions_1.BackdropType.ASHPIT_SHAFT: {
955
+ case BackdropType.ASHPIT:
956
+ case BackdropType.ASHPIT_SHAFT: {
995
957
  return "rocks_ashpit.png";
996
958
  }
997
959
  // 47
998
- case isaac_typescript_definitions_1.BackdropType.GEHENNA: {
960
+ case BackdropType.GEHENNA: {
999
961
  return "rocks_gehenna.png";
1000
962
  }
1001
963
  default: {