isaacscript-common 7.1.0 → 7.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. package/dist/callbacks/itemPickup.d.ts.map +1 -1
  2. package/dist/callbacks/itemPickup.lua +3 -1
  3. package/dist/callbacks/postCustomDoorEnter.d.ts.map +1 -1
  4. package/dist/callbacks/postCustomDoorEnter.lua +14 -11
  5. package/dist/callbacks/postDiceRoomActivated.d.ts.map +1 -1
  6. package/dist/callbacks/postDiceRoomActivated.lua +5 -4
  7. package/dist/callbacks/postItemDischarged.lua +2 -1
  8. package/dist/callbacks/postPlayerChangeStat.d.ts.map +1 -1
  9. package/dist/callbacks/postPlayerChangeStat.lua +44 -15
  10. package/dist/callbacks/postSlotDestroyed.lua +3 -3
  11. package/dist/classes/DefaultMap.d.ts +5 -5
  12. package/dist/classes/DefaultMap.d.ts.map +1 -1
  13. package/dist/core/constants.d.ts +2 -2
  14. package/dist/core/constants.d.ts.map +1 -1
  15. package/dist/core/constants.lua +3 -1
  16. package/dist/core/constantsFirstLast.d.ts +2 -0
  17. package/dist/core/constantsFirstLast.d.ts.map +1 -1
  18. package/dist/core/constantsFirstLast.lua +36 -9
  19. package/dist/enums/AmbushType.d.ts +1 -0
  20. package/dist/enums/AmbushType.d.ts.map +1 -1
  21. package/dist/enums/AmbushType.lua +1 -0
  22. package/dist/enums/CornerType.d.ts +1 -0
  23. package/dist/enums/CornerType.d.ts.map +1 -1
  24. package/dist/enums/CornerType.lua +1 -0
  25. package/dist/enums/PocketItemType.d.ts +1 -0
  26. package/dist/enums/PocketItemType.d.ts.map +1 -1
  27. package/dist/enums/PocketItemType.lua +1 -0
  28. package/dist/enums/RockAltType.d.ts +1 -0
  29. package/dist/enums/RockAltType.d.ts.map +1 -1
  30. package/dist/enums/RockAltType.lua +1 -0
  31. package/dist/enums/SaveDataKey.d.ts +11 -0
  32. package/dist/enums/SaveDataKey.d.ts.map +1 -0
  33. package/dist/enums/{private/SaveDataKey.lua → SaveDataKey.lua} +2 -0
  34. package/dist/enums/SerializationType.d.ts +1 -0
  35. package/dist/enums/SerializationType.d.ts.map +1 -1
  36. package/dist/enums/SerializationType.lua +1 -0
  37. package/dist/enums/SlotDestructionType.d.ts +1 -0
  38. package/dist/enums/SlotDestructionType.d.ts.map +1 -1
  39. package/dist/enums/SlotDestructionType.lua +1 -0
  40. package/dist/enums/StatType.d.ts +1 -3
  41. package/dist/enums/StatType.d.ts.map +1 -1
  42. package/dist/enums/StatType.lua +0 -2
  43. package/dist/enums/index.d.ts +1 -0
  44. package/dist/enums/index.d.ts.map +1 -1
  45. package/dist/enums/index.lua +8 -0
  46. package/dist/features/customGridEntity.d.ts.map +1 -1
  47. package/dist/features/customGridEntity.lua +3 -1
  48. package/dist/features/customStage/backdrop.d.ts +1 -1
  49. package/dist/features/customStage/backdrop.d.ts.map +1 -1
  50. package/dist/features/customStage/backdrop.lua +5 -3
  51. package/dist/features/customStage/customStageGridEntities.d.ts.map +1 -1
  52. package/dist/features/customStage/customStageGridEntities.lua +3 -1
  53. package/dist/features/customStage/exports.d.ts.map +1 -1
  54. package/dist/features/customStage/exports.lua +3 -1
  55. package/dist/features/customStage/init.lua +2 -2
  56. package/dist/features/customStage/shadows.d.ts.map +1 -1
  57. package/dist/features/customStage/shadows.lua +2 -1
  58. package/dist/features/deployJSONRoom.lua +13 -10
  59. package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
  60. package/dist/features/extraConsoleCommands/listCommands.lua +8 -2
  61. package/dist/features/saveDataManager/exports.d.ts +2 -1
  62. package/dist/features/saveDataManager/exports.d.ts.map +1 -1
  63. package/dist/features/saveDataManager/main.d.ts +1 -1
  64. package/dist/features/saveDataManager/main.d.ts.map +1 -1
  65. package/dist/features/saveDataManager/main.lua +1 -1
  66. package/dist/functions/bitSet128.d.ts.map +1 -1
  67. package/dist/functions/bosses.d.ts.map +1 -1
  68. package/dist/functions/bosses.lua +3 -1
  69. package/dist/functions/cacheFlag.d.ts +23 -1
  70. package/dist/functions/cacheFlag.d.ts.map +1 -1
  71. package/dist/functions/cacheFlag.lua +78 -0
  72. package/dist/functions/collectibles.d.ts.map +1 -1
  73. package/dist/functions/deepCopy.lua +2 -1
  74. package/dist/functions/doors.d.ts.map +1 -1
  75. package/dist/functions/doors.lua +3 -1
  76. package/dist/functions/entities.lua +2 -1
  77. package/dist/functions/flying.lua +2 -2
  78. package/dist/functions/gridEntities.lua +2 -1
  79. package/dist/functions/gridEntitiesSpecific.d.ts.map +1 -1
  80. package/dist/functions/gridEntitiesSpecific.lua +5 -3
  81. package/dist/functions/index.d.ts +0 -1
  82. package/dist/functions/index.d.ts.map +1 -1
  83. package/dist/functions/index.lua +0 -8
  84. package/dist/functions/input.d.ts +5 -2
  85. package/dist/functions/input.d.ts.map +1 -1
  86. package/dist/functions/input.lua +11 -3
  87. package/dist/functions/kColor.d.ts.map +1 -1
  88. package/dist/functions/levelGrid.d.ts.map +1 -1
  89. package/dist/functions/levelGrid.lua +3 -1
  90. package/dist/functions/nextStage.d.ts.map +1 -1
  91. package/dist/functions/nextStage.lua +7 -5
  92. package/dist/functions/npcs.d.ts.map +1 -1
  93. package/dist/functions/npcs.lua +4 -2
  94. package/dist/functions/pills.d.ts.map +1 -1
  95. package/dist/functions/pills.lua +9 -3
  96. package/dist/functions/playerIndex.d.ts.map +1 -1
  97. package/dist/functions/playerIndex.lua +2 -1
  98. package/dist/functions/playerStats.d.ts.map +1 -1
  99. package/dist/functions/playerStats.lua +1 -2
  100. package/dist/functions/players.d.ts +1 -1
  101. package/dist/functions/players.d.ts.map +1 -1
  102. package/dist/functions/players.lua +13 -15
  103. package/dist/functions/pocketItems.d.ts.map +1 -1
  104. package/dist/functions/pocketItems.lua +3 -1
  105. package/dist/functions/rng.d.ts.map +1 -1
  106. package/dist/functions/rng.lua +3 -0
  107. package/dist/functions/rockAlt.d.ts.map +1 -1
  108. package/dist/functions/rockAlt.lua +11 -20
  109. package/dist/functions/rooms.d.ts +4 -4
  110. package/dist/functions/rooms.d.ts.map +1 -1
  111. package/dist/functions/rooms.lua +18 -16
  112. package/dist/functions/spawnCollectible.d.ts.map +1 -1
  113. package/dist/functions/stage.d.ts.map +1 -1
  114. package/dist/functions/stage.lua +8 -2
  115. package/dist/functions/trinkets.d.ts.map +1 -1
  116. package/dist/functions/trinkets.lua +4 -2
  117. package/dist/functions/types.d.ts +64 -0
  118. package/dist/functions/types.d.ts.map +1 -1
  119. package/dist/functions/types.lua +63 -0
  120. package/dist/functions/vector.d.ts.map +1 -1
  121. package/dist/interfaces/ChargeBarSprites.d.ts +1 -1
  122. package/dist/interfaces/Corner.d.ts +5 -0
  123. package/dist/interfaces/Corner.d.ts.map +1 -1
  124. package/dist/interfaces/CustomStageLua.d.ts +57 -0
  125. package/dist/interfaces/CustomStageLua.d.ts.map +1 -1
  126. package/dist/interfaces/GridEntityCustomData.d.ts +6 -0
  127. package/dist/interfaces/GridEntityCustomData.d.ts.map +1 -1
  128. package/dist/interfaces/JSONRoomsFile.d.ts +7 -3
  129. package/dist/interfaces/JSONRoomsFile.d.ts.map +1 -1
  130. package/dist/interfaces/PlayerHealth.d.ts +1 -1
  131. package/dist/interfaces/PlayerHealth.d.ts.map +1 -1
  132. package/dist/interfaces/PocketItemDescription.d.ts +1 -1
  133. package/dist/interfaces/PocketItemDescription.d.ts.map +1 -1
  134. package/dist/interfaces/RoomDescription.d.ts +1 -1
  135. package/dist/interfaces/RoomDescription.d.ts.map +1 -1
  136. package/dist/interfaces/StatTypeType.d.ts +4 -1
  137. package/dist/interfaces/StatTypeType.d.ts.map +1 -1
  138. package/dist/interfaces/TrinketSituation.d.ts +1 -1
  139. package/dist/interfaces/TrinketSituation.d.ts.map +1 -1
  140. package/dist/maps/keyboardToString.d.ts +4 -0
  141. package/dist/maps/keyboardToString.d.ts.map +1 -0
  142. package/dist/maps/keyboardToString.lua +73 -0
  143. package/dist/types/AnyEntity.d.ts +5 -0
  144. package/dist/types/AnyEntity.d.ts.map +1 -1
  145. package/dist/types/AnyGridEntity.d.ts +5 -0
  146. package/dist/types/AnyGridEntity.d.ts.map +1 -1
  147. package/dist/types/CollectibleIndex.d.ts +4 -3
  148. package/dist/types/CollectibleIndex.d.ts.map +1 -1
  149. package/dist/types/Immutable.d.ts +3 -1
  150. package/dist/types/Immutable.d.ts.map +1 -1
  151. package/dist/types/PickupIndex.d.ts +4 -2
  152. package/dist/types/PickupIndex.d.ts.map +1 -1
  153. package/dist/types/PlayerIndex.d.ts +3 -2
  154. package/dist/types/PlayerIndex.d.ts.map +1 -1
  155. package/dist/types/SerializedIsaacAPIClass.d.ts +6 -0
  156. package/dist/types/SerializedIsaacAPIClass.d.ts.map +1 -1
  157. package/dist/types/TSTLClass.d.ts +5 -0
  158. package/dist/types/TSTLClass.d.ts.map +1 -1
  159. package/dist/types/TrapdoorDestination.d.ts +3 -0
  160. package/dist/types/TrapdoorDestination.d.ts.map +1 -1
  161. package/package.json +2 -2
  162. package/src/callbacks/itemPickup.ts +5 -2
  163. package/src/callbacks/postCustomDoorEnter.ts +18 -11
  164. package/src/callbacks/postDiceRoomActivated.ts +7 -12
  165. package/src/callbacks/postItemDischarged.ts +3 -1
  166. package/src/callbacks/postPlayerChangeStat.ts +45 -3
  167. package/src/callbacks/postSlotDestroyed.ts +3 -2
  168. package/src/callbacks/reorderedCallbacks.ts +2 -2
  169. package/src/classes/DefaultMap.ts +8 -8
  170. package/src/core/constants.ts +3 -3
  171. package/src/core/constantsFirstLast.ts +29 -14
  172. package/src/enums/AmbushType.ts +1 -0
  173. package/src/enums/CornerType.ts +1 -0
  174. package/src/enums/PocketItemType.ts +1 -0
  175. package/src/enums/RockAltType.ts +1 -0
  176. package/src/enums/SaveDataKey.ts +10 -0
  177. package/src/enums/SerializationType.ts +1 -0
  178. package/src/enums/SlotDestructionType.ts +1 -0
  179. package/src/enums/StatType.ts +7 -7
  180. package/src/enums/index.ts +1 -0
  181. package/src/enums/indexTypeDoc.ts +1 -0
  182. package/src/features/customGridEntity.ts +2 -1
  183. package/src/features/customStage/backdrop.ts +5 -3
  184. package/src/features/customStage/customStageGridEntities.ts +2 -1
  185. package/src/features/customStage/exports.ts +5 -4
  186. package/src/features/customStage/init.ts +2 -2
  187. package/src/features/customStage/shadows.ts +2 -1
  188. package/src/features/deployJSONRoom.ts +14 -19
  189. package/src/features/extraConsoleCommands/listCommands.ts +3 -2
  190. package/src/features/fastReset.ts +1 -1
  191. package/src/features/indexTypeDoc.ts +2 -1
  192. package/src/features/saveDataManager/exports.ts +4 -4
  193. package/src/features/saveDataManager/main.ts +1 -1
  194. package/src/features/saveDataManager/save.ts +1 -1
  195. package/src/functions/bitSet128.ts +1 -5
  196. package/src/functions/bosses.ts +2 -1
  197. package/src/functions/cacheFlag.ts +90 -1
  198. package/src/functions/cards.ts +3 -3
  199. package/src/functions/collectibles.ts +2 -8
  200. package/src/functions/color.ts +1 -1
  201. package/src/functions/deepCopy.ts +2 -2
  202. package/src/functions/dimensions.ts +1 -1
  203. package/src/functions/doors.ts +2 -2
  204. package/src/functions/entities.ts +2 -2
  205. package/src/functions/flying.ts +1 -1
  206. package/src/functions/gridEntities.ts +2 -2
  207. package/src/functions/gridEntitiesSpecific.ts +4 -3
  208. package/src/functions/index.ts +0 -1
  209. package/src/functions/indexTypeDoc.ts +0 -1
  210. package/src/functions/input.ts +17 -4
  211. package/src/functions/jsonHelpers.ts +1 -1
  212. package/src/functions/kColor.ts +1 -5
  213. package/src/functions/levelGrid.ts +3 -2
  214. package/src/functions/nextStage.ts +6 -5
  215. package/src/functions/npcs.ts +3 -2
  216. package/src/functions/pills.ts +11 -9
  217. package/src/functions/playerIndex.ts +3 -1
  218. package/src/functions/playerStats.ts +0 -1
  219. package/src/functions/players.ts +5 -6
  220. package/src/functions/pocketItems.ts +4 -4
  221. package/src/functions/rng.ts +8 -5
  222. package/src/functions/rockAlt.ts +28 -13
  223. package/src/functions/rooms.ts +27 -26
  224. package/src/functions/spawnCollectible.ts +1 -2
  225. package/src/functions/stage.ts +3 -2
  226. package/src/functions/trinkets.ts +6 -5
  227. package/src/functions/types.ts +100 -0
  228. package/src/functions/vector.ts +1 -5
  229. package/src/interfaces/ChargeBarSprites.ts +1 -1
  230. package/src/interfaces/Corner.ts +5 -0
  231. package/src/interfaces/CustomStageLua.ts +66 -0
  232. package/src/interfaces/GridEntityCustomData.ts +6 -0
  233. package/src/interfaces/JSONRoomsFile.ts +7 -3
  234. package/src/interfaces/PlayerHealth.ts +1 -1
  235. package/src/interfaces/PocketItemDescription.ts +1 -1
  236. package/src/interfaces/RoomDescription.ts +1 -1
  237. package/src/interfaces/StatTypeType.ts +4 -1
  238. package/src/interfaces/TrinketSituation.ts +1 -1
  239. package/src/maps/keyboardToString.ts +77 -0
  240. package/src/types/AnyEntity.ts +5 -0
  241. package/src/types/AnyGridEntity.ts +5 -0
  242. package/src/types/CollectibleIndex.ts +4 -3
  243. package/src/types/Immutable.ts +3 -1
  244. package/src/types/PickupIndex.ts +4 -2
  245. package/src/types/PlayerIndex.ts +3 -2
  246. package/src/types/SerializedIsaacAPIClass.ts +6 -0
  247. package/src/types/TSTLClass.ts +5 -0
  248. package/src/types/TrapdoorDestination.ts +3 -0
  249. package/dist/enums/private/SaveDataKey.d.ts +0 -7
  250. package/dist/enums/private/SaveDataKey.d.ts.map +0 -1
  251. package/dist/functions/collectibleCacheFlag.d.ts +0 -24
  252. package/dist/functions/collectibleCacheFlag.d.ts.map +0 -1
  253. package/dist/functions/collectibleCacheFlag.lua +0 -80
  254. package/src/enums/private/SaveDataKey.ts +0 -6
  255. package/src/functions/collectibleCacheFlag.ts +0 -90
@@ -1,5 +1,5 @@
1
1
  local ____exports = {}
2
- local spawnRockAltRewardUrn, spawnRockAltRewardMushroom, spawnRockAltRewardSkull, spawnRockAltRewardPolyp, spawnRockAltRewardBucketDownpour, spawnRockAltRewardBucketDross, ROCK_ALT_CHANCES, COIN_VELOCITY_MULTIPLIER, POLYP_PROJECTILE_SPEED, POLYP_NUM_PROJECTILES
2
+ local spawnRockAltRewardUrn, spawnRockAltRewardMushroom, spawnRockAltRewardSkull, spawnRockAltRewardPolyp, spawnRockAltRewardBucketDownpour, spawnRockAltRewardBucketDross, ROCK_ALT_CHANCES, COIN_VELOCITY_MULTIPLIER, FIND_FREE_INITIAL_STEP, FART_RADIUS, POLYP_PROJECTILE_SPEED, POLYP_NUM_PROJECTILES
3
3
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
4
4
  local Card = ____isaac_2Dtypescript_2Ddefinitions.Card
5
5
  local CoinSubType = ____isaac_2Dtypescript_2Ddefinitions.CoinSubType
@@ -45,6 +45,7 @@ local ____repeat = ____utils["repeat"]
45
45
  local ____vector = require("functions.vector")
46
46
  local getRandomVector = ____vector.getRandomVector
47
47
  function spawnRockAltRewardUrn(self, position, rng)
48
+ local room = game:GetRoom()
48
49
  local chance = getRandom(nil, rng)
49
50
  local totalChance = 0
50
51
  totalChance = totalChance + ROCK_ALT_CHANCES.NOTHING
@@ -88,14 +89,11 @@ function spawnRockAltRewardUrn(self, position, rng)
88
89
  end
89
90
  local numEnemiesChance = getRandom(nil, rng)
90
91
  local numEnemies = numEnemiesChance < 0.5 and 1 or 2
91
- local length = DISTANCE_OF_GRID_TILE * 3
92
92
  ____repeat(
93
93
  nil,
94
94
  numEnemies,
95
95
  function()
96
- local randomVector = getRandomVector(nil, rng)
97
- local offset = randomVector * length
98
- local targetPos = position + offset
96
+ local targetPos = room:FindFreePickupSpawnPosition(position, FIND_FREE_INITIAL_STEP)
99
97
  EntityNPC.ThrowSpider(
100
98
  position,
101
99
  nil,
@@ -156,13 +154,8 @@ function spawnRockAltRewardMushroom(self, position, rng)
156
154
  end
157
155
  return false
158
156
  end
159
- spawnEffectWithSeed(
160
- nil,
161
- EffectVariant.FART,
162
- 0,
163
- position,
164
- rng
165
- )
157
+ game:Fart(position)
158
+ game:ButterBeanFart(position, FART_RADIUS, nil)
166
159
  return true
167
160
  end
168
161
  function spawnRockAltRewardSkull(self, position, rng)
@@ -266,6 +259,7 @@ function spawnRockAltRewardPolyp(self, position, rng)
266
259
  return true
267
260
  end
268
261
  function spawnRockAltRewardBucketDownpour(self, position, rng)
262
+ local room = game:GetRoom()
269
263
  local chance = getRandom(nil, rng)
270
264
  local totalChance = 0
271
265
  totalChance = totalChance + ROCK_ALT_CHANCES.NOTHING
@@ -311,14 +305,11 @@ function spawnRockAltRewardBucketDownpour(self, position, rng)
311
305
  local entityType = enemiesChance < 0.5 and EntityType.SPIDER or EntityType.SMALL_LEECH
312
306
  local numEnemiesChance = getRandom(nil, rng)
313
307
  local numEnemies = numEnemiesChance < 0.5 and 1 or 2
314
- local jumpDistance = DISTANCE_OF_GRID_TILE * 3
315
308
  ____repeat(
316
309
  nil,
317
310
  numEnemies,
318
311
  function()
319
- local randomVector = getRandomVector(nil, rng)
320
- local offset = randomVector * jumpDistance
321
- local targetPos = position + offset
312
+ local targetPos = room:FindFreePickupSpawnPosition(position, FIND_FREE_INITIAL_STEP)
322
313
  local spider = EntityNPC.ThrowSpider(
323
314
  position,
324
315
  nil,
@@ -334,6 +325,7 @@ function spawnRockAltRewardBucketDownpour(self, position, rng)
334
325
  return true
335
326
  end
336
327
  function spawnRockAltRewardBucketDross(self, position, rng)
328
+ local room = game:GetRoom()
337
329
  local chance = getRandom(nil, rng)
338
330
  local totalChance = 0
339
331
  totalChance = totalChance + ROCK_ALT_CHANCES.NOTHING
@@ -379,14 +371,11 @@ function spawnRockAltRewardBucketDross(self, position, rng)
379
371
  local entityType = enemiesChance < 0.5 and EntityType.DRIP or EntityType.SMALL_LEECH
380
372
  local numEnemiesChance = getRandom(nil, rng)
381
373
  local numEnemies = numEnemiesChance < 0.5 and 1 or 2
382
- local jumpDistance = DISTANCE_OF_GRID_TILE * 3
383
374
  ____repeat(
384
375
  nil,
385
376
  numEnemies,
386
377
  function()
387
- local randomVector = getRandomVector(nil, rng)
388
- local offset = randomVector * jumpDistance
389
- local targetPos = position + offset
378
+ local targetPos = room:FindFreePickupSpawnPosition(position, FIND_FREE_INITIAL_STEP)
390
379
  local spider = EntityNPC.ThrowSpider(
391
380
  position,
392
381
  nil,
@@ -401,6 +390,8 @@ function spawnRockAltRewardBucketDross(self, position, rng)
401
390
  end
402
391
  ROCK_ALT_CHANCES = {NOTHING = 0.68, BASIC_DROP = 0.0967, TRINKET = 0.025, COLLECTIBLE = 0.005}
403
392
  COIN_VELOCITY_MULTIPLIER = 2
393
+ FIND_FREE_INITIAL_STEP = 70
394
+ FART_RADIUS = DISTANCE_OF_GRID_TILE * 3
404
395
  POLYP_PROJECTILE_SPEED = 10
405
396
  POLYP_NUM_PROJECTILES = 6
406
397
  --- Helper function to get the alternate rock type (i.e. urn, mushroom, etc.) that the current room
@@ -113,14 +113,14 @@ export declare function inBossRoomOf(bossID: BossID): boolean;
113
113
  */
114
114
  export declare function inCrawlSpace(): boolean;
115
115
  /**
116
- * We cannot use the standard code in the `inDimension` function for this purpose since it is bugged
117
- * with the Death Certificate area.
116
+ * Helper function to detect if the current room is one of the room in the Death Certificate area.
118
117
  */
119
118
  export declare function inDeathCertificateArea(): boolean;
120
119
  /**
121
120
  * Helper function to detect if the current room is a Treasure Room created when entering with a
122
- * Devil's Crown trinket. Under the hood, this checks for the `RoomDescriptorFlag.DEVIL_TREASURE`
123
- * flag.
121
+ * Devil's Crown trinket.
122
+ *
123
+ * Under the hood, this checks for `RoomDescriptorFlag.DEVIL_TREASURE`.
124
124
  */
125
125
  export declare function inDevilsCrownTreasureRoom(): boolean;
126
126
  export declare function inDoubleTrouble(): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"rooms.d.ts","sourceRoot":"","sources":["../../src/functions/rooms.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EACZ,MAAM,EACN,SAAS,EAKT,YAAY,EACZ,UAAU,EAGV,QAAQ,EAGT,MAAM,8BAA8B,CAAC;AAiCtC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,aAAa,EAAE,GAAG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CAItC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAMxC;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,kBAAkB,CAAC,EAAE,QAAQ,EAAE,GAAG,OAAO,CAcxE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAWrC;AAED,+DAA+D;AAC/D,wBAAgB,WAAW,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAG5D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,IAAI,CA8BrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAKvC"}
@@ -28,12 +28,12 @@ local game = ____cachedClasses.game
28
28
  local sfxManager = ____cachedClasses.sfxManager
29
29
  local ____constants = require("core.constants")
30
30
  local MAX_LEVEL_GRID_INDEX = ____constants.MAX_LEVEL_GRID_INDEX
31
- local NUM_DIMENSIONS = ____constants.NUM_DIMENSIONS
32
31
  local ____roomTypeNames = require("objects.roomTypeNames")
33
32
  local ROOM_TYPE_NAMES = ____roomTypeNames.ROOM_TYPE_NAMES
34
33
  local ____mineShaftRoomSubTypesSet = require("sets.mineShaftRoomSubTypesSet")
35
34
  local MINE_SHAFT_ROOM_SUB_TYPE_SET = ____mineShaftRoomSubTypesSet.MINE_SHAFT_ROOM_SUB_TYPE_SET
36
35
  local ____dimensions = require("functions.dimensions")
36
+ local getAllDimensions = ____dimensions.getAllDimensions
37
37
  local inDimension = ____dimensions.inDimension
38
38
  local ____doors = require("functions.doors")
39
39
  local closeAllDoors = ____doors.closeAllDoors
@@ -61,8 +61,9 @@ local ____roomTransition = require("functions.roomTransition")
61
61
  local reloadRoom = ____roomTransition.reloadRoom
62
62
  local ____stage = require("functions.stage")
63
63
  local getGotoCommand = ____stage.getGotoCommand
64
+ local ____types = require("functions.types")
65
+ local asNumber = ____types.asNumber
64
66
  local ____utils = require("functions.utils")
65
- local erange = ____utils.erange
66
67
  local irange = ____utils.irange
67
68
  --- Helper function to get a read-only copy of the room descriptor for every room on the level. This
68
69
  -- includes off-grid rooms, such as the Devil Room, and extra-dimensional rooms, if they are
@@ -102,7 +103,7 @@ function ____exports.getRoomsInsideGrid(self, includeExtraDimensionalRooms)
102
103
  includeExtraDimensionalRooms = false
103
104
  end
104
105
  local level = game:GetLevel()
105
- local dimensions = includeExtraDimensionalRooms and erange(nil, NUM_DIMENSIONS) or ({Dimension.CURRENT})
106
+ local dimensions = includeExtraDimensionalRooms and getAllDimensions(nil) or ({Dimension.CURRENT})
106
107
  --- We use a map instead of an array because room shapes occupy more than one room grid index.
107
108
  local roomDescriptorMap = __TS__New(Map)
108
109
  for ____, dimension in ipairs(dimensions) do
@@ -247,13 +248,13 @@ function ____exports.inAngelShop(self)
247
248
  local room = game:GetRoom()
248
249
  local roomType = room:GetType()
249
250
  local roomSubType = getRoomSubType(nil)
250
- return roomType == RoomType.ANGEL and roomSubType == AngelRoomSubType.SHOP
251
+ return roomType == RoomType.ANGEL and roomSubType == asNumber(nil, AngelRoomSubType.SHOP)
251
252
  end
252
253
  function ____exports.inBeastRoom(self)
253
254
  local room = game:GetRoom()
254
255
  local roomType = room:GetType()
255
256
  local roomSubType = getRoomSubType(nil)
256
- return roomType == RoomType.DUNGEON and roomSubType == DungeonSubType.BEAST_ROOM
257
+ return roomType == RoomType.DUNGEON and roomSubType == asNumber(nil, DungeonSubType.BEAST_ROOM)
257
258
  end
258
259
  --- Helper function to check if the current room is a boss room for a particular boss. This will only
259
260
  -- work for bosses that have dedicated boss rooms in the "00.special rooms.stb" file.
@@ -262,7 +263,7 @@ function ____exports.inBossRoomOf(self, bossID)
262
263
  local roomType = room:GetType()
263
264
  local roomStageID = getRoomStageID(nil)
264
265
  local roomSubType = getRoomSubType(nil)
265
- return roomType == RoomType.BOSS and roomStageID == StageID.SPECIAL_ROOMS and roomSubType == bossID
266
+ return roomType == RoomType.BOSS and roomStageID == StageID.SPECIAL_ROOMS and roomSubType == asNumber(nil, bossID)
266
267
  end
267
268
  --- Helper function for determining whether the current room is a crawl space. Use this function over
268
269
  -- comparing to `RoomType.DUNGEON` or `GridRoom.DUNGEON_IDX` since there is a special case of the
@@ -271,18 +272,18 @@ function ____exports.inCrawlSpace(self)
271
272
  local room = game:GetRoom()
272
273
  local roomType = room:GetType()
273
274
  local roomSubType = getRoomSubType(nil)
274
- return roomType == RoomType.DUNGEON and roomSubType == DungeonSubType.NORMAL
275
+ return roomType == RoomType.DUNGEON and roomSubType == asNumber(nil, DungeonSubType.NORMAL)
275
276
  end
276
- --- We cannot use the standard code in the `inDimension` function for this purpose since it is bugged
277
- -- with the Death Certificate area.
277
+ --- Helper function to detect if the current room is one of the room in the Death Certificate area.
278
278
  function ____exports.inDeathCertificateArea(self)
279
279
  local roomStageID = getRoomStageID(nil)
280
280
  local roomSubType = getRoomSubType(nil)
281
- return roomStageID == StageID.HOME and (roomSubType == HomeRoomSubType.DEATH_CERTIFICATE_ENTRANCE or roomSubType == HomeRoomSubType.DEATH_CERTIFICATE_ITEMS)
281
+ return roomStageID == StageID.HOME and (roomSubType == asNumber(nil, HomeRoomSubType.DEATH_CERTIFICATE_ENTRANCE) or roomSubType == asNumber(nil, HomeRoomSubType.DEATH_CERTIFICATE_ITEMS))
282
282
  end
283
283
  --- Helper function to detect if the current room is a Treasure Room created when entering with a
284
- -- Devil's Crown trinket. Under the hood, this checks for the `RoomDescriptorFlag.DEVIL_TREASURE`
285
- -- flag.
284
+ -- Devil's Crown trinket.
285
+ --
286
+ -- Under the hood, this checks for `RoomDescriptorFlag.DEVIL_TREASURE`.
286
287
  function ____exports.inDevilsCrownTreasureRoom(self)
287
288
  local roomDescriptor = getRoomDescriptorReadOnly(nil)
288
289
  return hasFlag(nil, roomDescriptor.Flags, RoomDescriptorFlag.DEVIL_TREASURE)
@@ -295,7 +296,7 @@ function ____exports.inDoubleTrouble(self)
295
296
  end
296
297
  function ____exports.inGenesisRoom(self)
297
298
  local roomGridIndex = getRoomGridIndex(nil)
298
- return roomGridIndex == GridRoom.GENESIS
299
+ return roomGridIndex == asNumber(nil, GridRoom.GENESIS)
299
300
  end
300
301
  --- Helper function to determine if the current room shape is one of the four L room shapes.
301
302
  function ____exports.inLRoom(self)
@@ -305,7 +306,7 @@ function ____exports.inLRoom(self)
305
306
  end
306
307
  function ____exports.inMegaSatanRoom(self)
307
308
  local roomGridIndex = getRoomGridIndex(nil)
308
- return roomGridIndex == GridRoom.MEGA_SATAN
309
+ return roomGridIndex == asNumber(nil, GridRoom.MEGA_SATAN)
309
310
  end
310
311
  --- Helper function to determine if the current room is part of the Repentance "escape sequence" in
311
312
  -- the Mines/Ashpit.
@@ -321,7 +322,7 @@ function ____exports.inMinibossRoomOf(self, minibossID)
321
322
  local roomType = room:GetType()
322
323
  local roomStageID = getRoomStageID(nil)
323
324
  local roomSubType = getRoomSubType(nil)
324
- return roomType == RoomType.MINI_BOSS and roomStageID == StageID.SPECIAL_ROOMS and roomSubType == minibossID
325
+ return roomType == RoomType.MINI_BOSS and roomStageID == StageID.SPECIAL_ROOMS and roomSubType == asNumber(nil, minibossID)
325
326
  end
326
327
  --- Helper function for checking if the room is a secret shop (from the Member Card collectible).
327
328
  --
@@ -330,7 +331,7 @@ end
330
331
  -- the only way to detect them is by using the grid index.
331
332
  function ____exports.inSecretShop(self)
332
333
  local roomGridIndex = getRoomGridIndex(nil)
333
- return roomGridIndex == GridRoom.SECRET_SHOP
334
+ return roomGridIndex == asNumber(nil, GridRoom.SECRET_SHOP)
334
335
  end
335
336
  --- Helper function to determine whether or not the current room is the starting room of a floor. It
336
337
  -- only returns true for the starting room of the primary dimension (meaning that being in the
@@ -382,6 +383,7 @@ end
382
383
  --- Helper function to set the backdrop of the current room.
383
384
  function ____exports.setBackdrop(self, backdropType)
384
385
  game:ShowHallucination(0, backdropType)
386
+ sfxManager:Stop(SoundEffect.DEATH_CARD)
385
387
  end
386
388
  --- Helper function to convert an uncleared room to a cleared room in the `POST_NEW_ROOM` callback.
387
389
  -- This is useful because if enemies are removed in this callback, a room drop will be awarded and
@@ -1 +1 @@
1
- {"version":3,"file":"spawnCollectible.d.ts","sourceRoot":"","sources":["../../src/functions/spawnCollectible.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAIhB,MAAM,8BAA8B,CAAC;AAUtC;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAC9B,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,OAAO,UAAQ,EACf,aAAa,UAAQ,EACrB,OAAO,CAAC,EAAE,MAAM,GACf,uBAAuB,CAqCzB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,IAAI,GAAG,GAAqB,GACtC,YAAY,CAWd"}
1
+ {"version":3,"file":"spawnCollectible.d.ts","sourceRoot":"","sources":["../../src/functions/spawnCollectible.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAGhB,MAAM,8BAA8B,CAAC;AAUtC;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAC9B,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,OAAO,UAAQ,EACf,aAAa,UAAQ,EACrB,OAAO,CAAC,EAAE,MAAM,GACf,uBAAuB,CAqCzB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,IAAI,GAAG,GAAqB,GACtC,YAAY,CAWd"}
@@ -1 +1 @@
1
- {"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../../src/functions/stage.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,QAAQ,EACR,SAAS,EACV,MAAM,8BAA8B,CAAC;AAMtC;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,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SAAS,CA6B/D;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CAmBzE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,GAAG,CASvC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,GAAG,MAAM,CAG3E;AAED,6CAA6C;AAC7C,wBAAgB,QAAQ,IAAI,UAAU,CAIrC;AAED,iDAAiD;AACjD,wBAAgB,YAAY,IAAI,SAAS,CAIxC;AAED,8FAA8F;AAC9F,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI,CAIvE;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAI/D;AAED,wBAAgB,QAAQ,IAAI,OAAO,CAElC;AAED,wBAAgB,WAAW,IAAI,OAAO,CASrC;AAED,wBAAgB,OAAO,IAAI,OAAO,CASjC;AAED,wBAAgB,UAAU,IAAI,OAAO,CAQpC;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAUtC;AAED,wBAAgB,iBAAiB,IAAI,OAAO,CAK3C;AAED,wBAAgB,OAAO,IAAI,OAAO,CAQjC;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,SAAS,EACpB,MAAM,UAAQ,GACb,IAAI,CAUN;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAE9D"}
@@ -11,6 +11,9 @@ local ____stageTypeSuffixes = require("objects.stageTypeSuffixes")
11
11
  local STAGE_TYPE_SUFFIXES = ____stageTypeSuffixes.STAGE_TYPE_SUFFIXES
12
12
  local ____stageTypeToLetter = require("objects.stageTypeToLetter")
13
13
  local STAGE_TYPE_TO_LETTER = ____stageTypeToLetter.STAGE_TYPE_TO_LETTER
14
+ local ____types = require("functions.types")
15
+ local asLevelStage = ____types.asLevelStage
16
+ local asNumber = ____types.asNumber
14
17
  function ____exports.isRepentanceStage(self, stageType)
15
18
  return stageType == StageType.REPENTANCE or stageType == StageType.REPENTANCE_B
16
19
  end
@@ -46,7 +49,10 @@ function ____exports.calculateStageTypeRepentance(self, stage)
46
49
  return StageType.REPENTANCE
47
50
  end
48
51
  local seeds = game:GetSeeds()
49
- local adjustedStage = stage + 1
52
+ local adjustedStage = asLevelStage(
53
+ nil,
54
+ asNumber(nil, stage) + 1
55
+ )
50
56
  local stageSeed = seeds:GetStageSeed(adjustedStage)
51
57
  local halfStageSeed = math.floor(stageSeed / 2)
52
58
  if halfStageSeed % 2 == 0 then
@@ -61,7 +67,7 @@ function ____exports.getEffectiveStage(self)
61
67
  local level = game:GetLevel()
62
68
  local stage = level:GetStage()
63
69
  if ____exports.onRepentanceStage(nil) then
64
- return stage + 1
70
+ return asNumber(nil, stage) + 1
65
71
  end
66
72
  return stage
67
73
  end
@@ -1 +1 @@
1
- {"version":3,"file":"trinkets.d.ts","sourceRoot":"","sources":["../../src/functions/trinkets.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAGT,WAAW,EACZ,MAAM,8BAA8B,CAAC;AA+BtC;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAE1E;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,WAAW,EAAE,CAMrD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,GAAG,SAAS,CAkBxE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CActE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CAc/D;AAED,wEAAwE;AACxE,wBAAgB,eA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AAE,WAAW,GAAG,OAAO,CAEjE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,MAAM,GAAG,SAAS,GAC1B,IAAI,CAeN;AAED,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,GACnB,OAAO,CAOT"}
@@ -26,6 +26,8 @@ local ____players = require("functions.players")
26
26
  local isCharacter = ____players.isCharacter
27
27
  local ____sprites = require("functions.sprites")
28
28
  local clearSprite = ____sprites.clearSprite
29
+ local ____types = require("functions.types")
30
+ local asNumber = ____types.asNumber
29
31
  local ____utils = require("functions.utils")
30
32
  local irange = ____utils.irange
31
33
  --- Add this to a `TrinketType` to get the corresponding golden trinket type.
@@ -40,7 +42,7 @@ local TRINKET_SPRITE_LAYER = 0
40
42
  -- For example, passing `TrinketType.SWALLOWED_PENNY` would result in 32769, which is the value that
41
43
  -- corresponds to the golden trinket sub-type for Swallowed Penny.
42
44
  function ____exports.getGoldenTrinketType(self, trinketType)
43
- return trinketType + GOLDEN_TRINKET_ADJUSTMENT
45
+ return asNumber(nil, trinketType) + GOLDEN_TRINKET_ADJUSTMENT
44
46
  end
45
47
  --- Helper function to get an array that represents every modded trinket type.
46
48
  --
@@ -132,7 +134,7 @@ function ____exports.hasOpenTrinketSlot(self, player)
132
134
  return openTrinketSlot ~= nil
133
135
  end
134
136
  function ____exports.isGoldenTrinket(self, trinketType)
135
- return trinketType > GOLDEN_TRINKET_ADJUSTMENT
137
+ return asNumber(nil, trinketType) > GOLDEN_TRINKET_ADJUSTMENT
136
138
  end
137
139
  --- Helper function to change the sprite of a trinket entity.
138
140
  --
@@ -1,5 +1,69 @@
1
1
  /// <reference types="typescript-to-lua/language-extensions" />
2
2
  /// <reference types="lua-types/5.3" />
3
+ import { Card, CollectibleType, LevelStage, PillColor, PillEffect, PlayerType, TrinketType } from "isaac-typescript-definitions";
4
+ /**
5
+ * Helper function to safely cast a `number` to a `Card`. (This is better than using the `as`
6
+ * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
7
+ *
8
+ * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
9
+ */
10
+ export declare function asCard(num: number): Card;
11
+ /**
12
+ * Helper function to safely cast a `number` to a `CollectibleType`. (This is better than using the
13
+ * `as` TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
14
+ *
15
+ * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
16
+ */
17
+ export declare function asCollectibleType(num: number): CollectibleType;
18
+ /**
19
+ * Helper function to safely cast a `number` to a `LevelStage`. (This is better than using the `as`
20
+ * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
21
+ *
22
+ * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
23
+ */
24
+ export declare function asLevelStage(num: number): LevelStage;
25
+ /**
26
+ * Helper function to safely cast an enum to a `number`. (This is better than using the `as`
27
+ * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
28
+ *
29
+ * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
30
+ */
31
+ export declare function asNumber(num: number): number;
32
+ /**
33
+ * Helper function to safely cast a `number` to a `PillColor`. (This is better than using the `as`
34
+ * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
35
+ *
36
+ * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
37
+ */
38
+ export declare function asPillColor(num: number): PillColor;
39
+ /**
40
+ * Helper function to safely cast a `number` to a `PillEffect`. (This is better than using the `as`
41
+ * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
42
+ *
43
+ * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
44
+ */
45
+ export declare function asPillEffect(num: number): PillEffect;
46
+ /**
47
+ * Helper function to safely cast a `number` to a `PlayerType`. (This is better than using the `as`
48
+ * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
49
+ *
50
+ * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
51
+ */
52
+ export declare function asPlayerType(num: number): PlayerType;
53
+ /**
54
+ * Helper function to safely cast an enum to a `string`. (This is better than using the `as`
55
+ * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
56
+ *
57
+ * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
58
+ */
59
+ export declare function asString(str: string): string;
60
+ /**
61
+ * Helper function to safely cast a `number` to a `TrinketType`. (This is better than using the `as`
62
+ * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
63
+ *
64
+ * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
65
+ */
66
+ export declare function asTrinketType(num: number): TrinketType;
3
67
  export declare function isBoolean(variable: unknown): variable is boolean;
4
68
  export declare function isFunction(variable: unknown): variable is Function;
5
69
  export declare function isNumber(variable: unknown): variable is number;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/functions/types.ts"],"names":[],"mappings":";;AAAA,wBAAgB,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,OAAO,CAEhE;AAGD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,QAAQ,CAElE;AAED,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,MAAM,CAE9D;AAED,+EAA+E;AAC/E,wBAAgB,WAAW,CACzB,QAAQ,EAAE,OAAO,GAChB,QAAQ,IAAI,OAAO,GAAG,MAAM,GAAG,MAAM,CAOvC;AAED,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,MAAM,CAE9D;AAED,wBAAgB,OAAO,CACrB,QAAQ,EAAE,OAAO,GAChB,QAAQ,IAAI,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAExC;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,WAAW,CAErE"}
1
+ {"version":3,"file":"types.d.ts","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,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,MAAM,CAE9D;AAED,wBAAgB,OAAO,CACrB,QAAQ,EAAE,OAAO,GAChB,QAAQ,IAAI,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAExC;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,WAAW,CAErE"}
@@ -1,4 +1,67 @@
1
1
  local ____exports = {}
2
+ --- Helper function to safely cast a `number` to a `Card`. (This is better than using the `as`
3
+ -- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
4
+ --
5
+ -- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
6
+ function ____exports.asCard(self, num)
7
+ return num
8
+ end
9
+ --- Helper function to safely cast a `number` to a `CollectibleType`. (This is better than using the
10
+ -- `as` TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
11
+ --
12
+ -- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
13
+ function ____exports.asCollectibleType(self, num)
14
+ return num
15
+ end
16
+ --- Helper function to safely cast a `number` to a `LevelStage`. (This is better than using the `as`
17
+ -- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
18
+ --
19
+ -- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
20
+ function ____exports.asLevelStage(self, num)
21
+ return num
22
+ end
23
+ --- Helper function to safely cast an enum to a `number`. (This is better than using the `as`
24
+ -- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
25
+ --
26
+ -- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
27
+ function ____exports.asNumber(self, num)
28
+ return num
29
+ end
30
+ --- Helper function to safely cast a `number` to a `PillColor`. (This is better than using the `as`
31
+ -- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
32
+ --
33
+ -- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
34
+ function ____exports.asPillColor(self, num)
35
+ return num
36
+ end
37
+ --- Helper function to safely cast a `number` to a `PillEffect`. (This is better than using the `as`
38
+ -- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
39
+ --
40
+ -- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
41
+ function ____exports.asPillEffect(self, num)
42
+ return num
43
+ end
44
+ --- Helper function to safely cast a `number` to a `PlayerType`. (This is better than using the `as`
45
+ -- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
46
+ --
47
+ -- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
48
+ function ____exports.asPlayerType(self, num)
49
+ return num
50
+ end
51
+ --- Helper function to safely cast an enum to a `string`. (This is better than using the `as`
52
+ -- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
53
+ --
54
+ -- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
55
+ function ____exports.asString(self, str)
56
+ return str
57
+ end
58
+ --- Helper function to safely cast a `number` to a `TrinketType`. (This is better than using the `as`
59
+ -- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
60
+ --
61
+ -- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
62
+ function ____exports.asTrinketType(self, num)
63
+ return num
64
+ end
2
65
  function ____exports.isBoolean(self, variable)
3
66
  return type(variable) == "boolean"
4
67
  end
@@ -1 +1 @@
1
- {"version":3,"file":"vector.d.ts","sourceRoot":"","sources":["../../src/functions/vector.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AASzD,oBAAY,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACvD,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;CAC1C,CAAC;AAKF,0DAA0D;AAC1D,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAQjD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAyBlE;AAED;;;;;;;;;GASG;AACH,wBAAgB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GAAG,MAAM,IAAI,MAAM,CAE1D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAWhE;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAEtE;AAED,sEAAsE;AACtE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAG3D;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,UAAQ,GAAG,MAAM,CAIpE"}
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * A collection of the four sprites necessary in order to render a charge bar.
5
5
  *
6
- * Used in the `newChargeBarSprites` and related helper functions.
6
+ * This is used in the `newChargeBarSprites` and related helper functions.
7
7
  */
8
8
  export interface ChargeBarSprites {
9
9
  back: Sprite;
@@ -1,5 +1,10 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
2
  import { CornerType } from "../enums/CornerType";
3
+ /**
4
+ * An interface representing a corner in the room.
5
+ *
6
+ * This is used by the `getRoomShapeCorners` helper function.
7
+ */
3
8
  export interface Corner {
4
9
  readonly type: CornerType;
5
10
  readonly position: Readonly<Vector>;
@@ -1 +1 @@
1
- {"version":3,"file":"Corner.d.ts","sourceRoot":"","sources":["../../src/interfaces/Corner.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CACrC"}
1
+ {"version":3,"file":"Corner.d.ts","sourceRoot":"","sources":["../../src/interfaces/Corner.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD;;;;GAIG;AACH,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CACrC"}
@@ -24,6 +24,9 @@ export declare type CustomStageTSConfig = Readonly<{
24
24
  * Make sure the chosen prefix does not conflict with any other mods. You can find a list of
25
25
  * registered room variant prefixes on the IsaacScript website:
26
26
  * https://isaacscript.github.io/main/custom-stages
27
+ *
28
+ * @minimum 101
29
+ * @maximum 109
27
30
  */
28
31
  roomVariantPrefix: number;
29
32
  /**
@@ -35,6 +38,9 @@ export declare type CustomStageTSConfig = Readonly<{
35
38
  * method.)
36
39
  *
37
40
  * If not specified, `LevelStage.BASEMENT_2` (2) will be used.
41
+ *
42
+ * @minimum 2
43
+ * @maximum 13
38
44
  */
39
45
  baseStage?: number;
40
46
  /**
@@ -43,6 +49,9 @@ export declare type CustomStageTSConfig = Readonly<{
43
49
  * generation algorithm.
44
50
  *
45
51
  * If not specified, `StageType.ORIGINAL` (0) will be used.
52
+ *
53
+ * @minimum 0
54
+ * @maximum 5
46
55
  */
47
56
  baseStageType?: number;
48
57
  /**
@@ -301,9 +310,25 @@ export declare type CustomStageTSConfig = Readonly<{
301
310
  * `versusScreenBackgroundColors.ts`.
302
311
  */
303
312
  backgroundColor?: Readonly<{
313
+ /**
314
+ * @minimum 0
315
+ * @maximum 1
316
+ */
304
317
  r: number;
318
+ /**
319
+ * @minimum 0
320
+ * @maximum 1
321
+ */
305
322
  g: number;
323
+ /**
324
+ * @minimum 0
325
+ * @maximum 1
326
+ */
306
327
  b: number;
328
+ /**
329
+ * @minimum 0
330
+ * @maximum 1
331
+ */
307
332
  a: number;
308
333
  }>;
309
334
  /**
@@ -315,9 +340,25 @@ export declare type CustomStageTSConfig = Readonly<{
315
340
  * `versusScreenDirtSpotColors.ts`.
316
341
  */
317
342
  dirtSpotColor?: Readonly<{
343
+ /**
344
+ * @minimum 0
345
+ * @maximum 1
346
+ */
318
347
  r: number;
348
+ /**
349
+ * @minimum 0
350
+ * @maximum 1
351
+ */
319
352
  g: number;
353
+ /**
354
+ * @minimum 0
355
+ * @maximum 1
356
+ */
320
357
  b: number;
358
+ /**
359
+ * @minimum 0
360
+ * @maximum 1
361
+ */
321
362
  a: number;
322
363
  }>;
323
364
  }>;
@@ -342,9 +383,25 @@ export declare type CustomStageShadow = Readonly<{
342
383
  * to 75% faded black).
343
384
  */
344
385
  color?: Readonly<{
386
+ /**
387
+ * @minimum 0
388
+ * @maximum 1
389
+ */
345
390
  r: number;
391
+ /**
392
+ * @minimum 0
393
+ * @maximum 1
394
+ */
346
395
  g: number;
396
+ /**
397
+ * @minimum 0
398
+ * @maximum 1
399
+ */
347
400
  b: number;
401
+ /**
402
+ * @minimum 0
403
+ * @maximum 1
404
+ */
348
405
  a: number;
349
406
  }>;
350
407
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"CustomStageLua.d.ts","sourceRoot":"","sources":["../../src/interfaces/CustomStageLua.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,oBAAY,mBAAmB,GAAG,QAAQ,CAAC;IACzC,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;;OAOG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,QAAQ,CAAC;QAC1B;;;;;;;;WAQG;QACH,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;QAE3B;;;;;;;;WAQG;QACH,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;QAE3B;;;;;;;;;;WAUG;QACH,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;QAEzB;;;;;;;;;;;;WAYG;QACH,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;K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