isaacscript-common 2.0.33 → 2.2.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 (254) hide show
  1. package/README.md +1 -1
  2. package/callbacks/customRevive.lua +11 -11
  3. package/callbacks/itemPickup.lua +7 -7
  4. package/callbacks/postBombInitLate.lua +2 -2
  5. package/callbacks/postBoneSwing.lua +2 -2
  6. package/callbacks/postCollectibleInitFirst.lua +3 -3
  7. package/callbacks/postCursedTeleport.lua +6 -6
  8. package/callbacks/postCustomDoorEnter.lua +9 -9
  9. package/callbacks/postDoorRender.lua +2 -2
  10. package/callbacks/postDoorUpdate.lua +2 -2
  11. package/callbacks/postEffectInitLate.lua +2 -2
  12. package/callbacks/postEffectStateChanged.lua +3 -3
  13. package/callbacks/postEsauJr.lua +5 -5
  14. package/callbacks/postFamiliarInitLate.lua +2 -2
  15. package/callbacks/postFamiliarStateChanged.lua +3 -3
  16. package/callbacks/postFlip.lua +4 -4
  17. package/callbacks/postGreedModeWave.lua +3 -3
  18. package/callbacks/postGridEntity.lua +7 -7
  19. package/callbacks/postGridEntityCollision.lua +4 -4
  20. package/callbacks/postGridEntityRender.lua +2 -2
  21. package/callbacks/postHolyMantleRemoved.lua +5 -5
  22. package/callbacks/postItemDischarged.lua +7 -7
  23. package/callbacks/postKnifeInitLate.lua +2 -2
  24. package/callbacks/postLaserInitLate.lua +2 -2
  25. package/callbacks/postNPCInitLate.lua +2 -2
  26. package/callbacks/postNPCStateChanged.lua +3 -3
  27. package/callbacks/postNewRoomEarly.lua +4 -4
  28. package/callbacks/postPickupCollect.lua +3 -3
  29. package/callbacks/postPickupInitLate.lua +2 -2
  30. package/callbacks/postPickupStateChanged.lua +3 -3
  31. package/callbacks/postPitRender.lua +2 -2
  32. package/callbacks/postPitUpdate.lua +2 -2
  33. package/callbacks/postPlayerChangeHealth.lua +8 -8
  34. package/callbacks/postPlayerChangeType.lua +5 -5
  35. package/callbacks/postPlayerFatalDamage.lua +6 -6
  36. package/callbacks/postPlayerInitLate.lua +3 -3
  37. package/callbacks/postPlayerReordered.lua +7 -7
  38. package/callbacks/postPoopRender.lua +2 -2
  39. package/callbacks/postPoopUpdate.lua +2 -2
  40. package/callbacks/postPressurePlateRender.lua +2 -2
  41. package/callbacks/postPressurePlateUpdate.lua +2 -2
  42. package/callbacks/postProjectileInitLate.lua +2 -2
  43. package/callbacks/postPurchase.lua +6 -6
  44. package/callbacks/postRockRender.lua +2 -2
  45. package/callbacks/postRockUpdate.lua +2 -2
  46. package/callbacks/postRoomClearChanged.lua +3 -3
  47. package/callbacks/postSacrifice.lua +4 -4
  48. package/callbacks/postSlotInitUpdate.lua +4 -4
  49. package/callbacks/postSlotRender.lua +6 -6
  50. package/callbacks/postSpikesRender.lua +2 -2
  51. package/callbacks/postSpikesUpdate.lua +2 -2
  52. package/callbacks/postTNTRender.lua +2 -2
  53. package/callbacks/postTNTUpdate.lua +2 -2
  54. package/callbacks/postTearInitLate.lua +2 -2
  55. package/callbacks/postTearInitVeryLate.lua +2 -2
  56. package/callbacks/postTransformation.lua +6 -6
  57. package/callbacks/postTrinketBreak.lua +5 -5
  58. package/callbacks/preBerserkDeath.lua +5 -5
  59. package/callbacks/preNewLevel.lua +3 -3
  60. package/callbacks/reorderedCallbacks.lua +4 -4
  61. package/classes/DefaultMap.d.ts +11 -7
  62. package/classes/ModUpgraded.d.ts +8 -2
  63. package/classes/ModUpgraded.lua +1 -1
  64. package/constants.d.ts +5 -5
  65. package/constants.lua +2 -2
  66. package/{constantsMax.d.ts → constantsFirstLast.d.ts} +0 -0
  67. package/{constantsMax.lua → constantsFirstLast.lua} +2 -2
  68. package/enums/HealthType.d.ts +2 -2
  69. package/enums/ModCallbackCustom.d.ts +753 -2
  70. package/features/characterHealthConversion.d.ts +1 -2
  71. package/features/characterHealthConversion.lua +3 -3
  72. package/features/characterStats.lua +3 -3
  73. package/features/debugDisplay/debugDisplay.lua +4 -4
  74. package/features/debugDisplay/exports.d.ts +36 -36
  75. package/features/debugDisplay/exports.lua +2 -2
  76. package/features/debugDisplay/v.lua +2 -2
  77. package/features/deployJSONRoom.d.ts +1 -1
  78. package/features/deployJSONRoom.lua +15 -15
  79. package/features/disableInputs.d.ts +5 -5
  80. package/features/disableInputs.lua +3 -3
  81. package/features/disableSound.d.ts +2 -2
  82. package/features/disableSound.lua +4 -4
  83. package/features/extraConsoleCommands/commandsDisplay.d.ts +18 -18
  84. package/features/extraConsoleCommands/commandsDisplay.lua +1 -1
  85. package/features/extraConsoleCommands/commandsSubroutines.lua +10 -10
  86. package/features/extraConsoleCommands/init.d.ts +3 -2
  87. package/features/extraConsoleCommands/init.lua +83 -83
  88. package/features/extraConsoleCommands/{commands.d.ts → listCommands.d.ts} +17 -17
  89. package/features/extraConsoleCommands/{commands.lua → listCommands.lua} +36 -36
  90. package/features/fadeInRemover.lua +3 -3
  91. package/features/fastReset.lua +4 -4
  92. package/features/forgottenSwitch.lua +2 -2
  93. package/features/getCollectibleItemPoolType.lua +6 -6
  94. package/features/playerInventory.lua +10 -10
  95. package/features/{isPonyActive.d.ts → ponyDetection.d.ts} +0 -0
  96. package/features/{isPonyActive.lua → ponyDetection.lua} +7 -7
  97. package/features/{preventCollectibleRotate.d.ts → preventCollectibleRotation.d.ts} +1 -1
  98. package/features/{preventCollectibleRotate.lua → preventCollectibleRotation.lua} +9 -9
  99. package/features/runInNFrames.lua +3 -3
  100. package/features/saveDataManager/exports.d.ts +15 -12
  101. package/features/saveDataManager/exports.lua +6 -6
  102. package/features/saveDataManager/load.d.ts +1 -1
  103. package/features/saveDataManager/load.lua +4 -4
  104. package/features/saveDataManager/main.d.ts +1 -1
  105. package/features/saveDataManager/main.lua +11 -11
  106. package/features/saveDataManager/maps.d.ts +1 -1
  107. package/features/saveDataManager/merge.lua +10 -10
  108. package/features/saveDataManager/save.d.ts +1 -1
  109. package/features/saveDataManager/save.lua +5 -5
  110. package/features/saveDataManager/serializationBrand.lua +2 -2
  111. package/features/sirenHelpers.lua +3 -3
  112. package/features/taintedLazarusPlayers.lua +2 -2
  113. package/functions/array.lua +3 -3
  114. package/functions/benchmark.lua +1 -1
  115. package/functions/boss.lua +7 -7
  116. package/functions/cacheFlag.lua +1 -1
  117. package/functions/cards.d.ts +1 -1
  118. package/functions/cards.lua +13 -13
  119. package/functions/challenges.lua +1 -1
  120. package/functions/character.lua +9 -9
  121. package/functions/charge.lua +3 -3
  122. package/functions/chargeBar.d.ts +1 -8
  123. package/functions/chargeBar.lua +1 -1
  124. package/functions/collectibleCacheFlag.d.ts +4 -4
  125. package/functions/collectibleCacheFlag.lua +6 -6
  126. package/functions/collectibleSet.lua +5 -5
  127. package/functions/collectibleTag.lua +6 -6
  128. package/functions/collectibles.lua +15 -15
  129. package/functions/color.d.ts +17 -3
  130. package/functions/color.lua +5 -5
  131. package/functions/debug.lua +1 -1
  132. package/functions/deepCopy.lua +13 -13
  133. package/functions/deepCopyTests.lua +6 -6
  134. package/functions/direction.lua +3 -3
  135. package/functions/doors.lua +6 -6
  136. package/functions/eden.lua +5 -5
  137. package/functions/entity.lua +5 -5
  138. package/functions/entitySpecific.d.ts +15 -1
  139. package/functions/entitySpecific.lua +10 -2
  140. package/functions/enums.d.ts +3 -3
  141. package/functions/enums.lua +2 -2
  142. package/functions/familiars.lua +2 -2
  143. package/functions/flying.lua +2 -2
  144. package/functions/globals.lua +3 -3
  145. package/functions/gridEntity.lua +10 -10
  146. package/functions/gridEntitySpecific.lua +2 -2
  147. package/functions/input.lua +4 -4
  148. package/functions/jsonHelpers.lua +1 -1
  149. package/functions/jsonRoom.d.ts +1 -1
  150. package/functions/jsonRoom.lua +4 -4
  151. package/functions/kColor.d.ts +1 -1
  152. package/functions/kColor.lua +5 -5
  153. package/functions/level.lua +3 -3
  154. package/functions/log.lua +15 -15
  155. package/functions/math.lua +1 -1
  156. package/functions/mergeTests.lua +7 -7
  157. package/functions/npc.lua +3 -3
  158. package/functions/pickups.lua +6 -6
  159. package/functions/pills.lua +15 -15
  160. package/functions/player.lua +11 -11
  161. package/functions/playerDataStructures.d.ts +51 -0
  162. package/functions/playerDataStructures.lua +5 -1
  163. package/functions/playerHealth.d.ts +1 -1
  164. package/functions/playerHealth.lua +4 -4
  165. package/functions/playerIndex.lua +1 -1
  166. package/functions/pocketItems.d.ts +1 -1
  167. package/functions/pocketItems.lua +3 -3
  168. package/functions/positionVelocity.lua +6 -6
  169. package/functions/random.lua +1 -1
  170. package/functions/revive.lua +6 -6
  171. package/functions/rng.d.ts +1 -1
  172. package/functions/rng.lua +6 -6
  173. package/functions/roomData.lua +4 -4
  174. package/functions/roomGrid.lua +3 -3
  175. package/functions/roomShape.lua +8 -8
  176. package/functions/rooms.lua +12 -12
  177. package/functions/run.lua +4 -4
  178. package/functions/seeds.lua +2 -2
  179. package/functions/serialization.lua +5 -5
  180. package/functions/set.lua +2 -2
  181. package/functions/sound.lua +2 -2
  182. package/functions/spawnCollectible.lua +10 -10
  183. package/functions/sprite.lua +3 -3
  184. package/functions/stage.lua +2 -2
  185. package/functions/transformations.lua +6 -6
  186. package/functions/trinketCacheFlag.lua +3 -3
  187. package/functions/trinketGive.d.ts +1 -1
  188. package/functions/trinketGive.lua +3 -3
  189. package/functions/trinkets.d.ts +3 -3
  190. package/functions/trinkets.lua +14 -14
  191. package/functions/tstlClass.lua +1 -1
  192. package/functions/ui.lua +3 -3
  193. package/functions/utils.d.ts +2 -2
  194. package/functions/utils.lua +1 -1
  195. package/functions/vector.d.ts +1 -1
  196. package/functions/vector.lua +5 -5
  197. package/index.d.ts +14 -13
  198. package/index.lua +123 -123
  199. package/initCustomCallbacks.lua +58 -58
  200. package/initFeatures.lua +19 -19
  201. package/{types → interfaces}/AddCallbackParameterCustom.d.ts +0 -0
  202. package/{types → interfaces}/AddCallbackParameterCustom.lua +1 -1
  203. package/interfaces/ChargeBarSprites.d.ts +13 -0
  204. package/{types/JSONDoor.lua → interfaces/ChargeBarSprites.lua} +0 -0
  205. package/{types → interfaces}/JSONDoor.d.ts +1 -0
  206. package/{types/JSONEntity.lua → interfaces/JSONDoor.lua} +0 -0
  207. package/{types → interfaces}/JSONEntity.d.ts +1 -0
  208. package/{types/JSONRoom.lua → interfaces/JSONEntity.lua} +0 -0
  209. package/{types → interfaces}/JSONRoom.d.ts +1 -5
  210. package/{types/JSONRooms.lua → interfaces/JSONRoom.lua} +0 -0
  211. package/{types → interfaces}/JSONRooms.d.ts +0 -0
  212. package/{types/JSONSpawn.lua → interfaces/JSONRooms.lua} +0 -0
  213. package/{types → interfaces}/JSONSpawn.d.ts +1 -0
  214. package/{types/PlayerHealth.lua → interfaces/JSONSpawn.lua} +0 -0
  215. package/{types → interfaces}/PlayerHealth.d.ts +1 -0
  216. package/{types/PocketItemDescription.lua → interfaces/PlayerHealth.lua} +0 -0
  217. package/{types → interfaces}/PocketItemDescription.d.ts +1 -0
  218. package/{types/Primitive.lua → interfaces/PocketItemDescription.lua} +0 -0
  219. package/interfaces/SaveData.d.ts +29 -0
  220. package/{types/private → interfaces}/SaveData.lua +0 -0
  221. package/{types → interfaces}/TrinketSituation.d.ts +1 -0
  222. package/{types → interfaces}/TrinketSituation.lua +0 -0
  223. package/{types → interfaces}/private/TSTLClassMetatable.d.ts +0 -0
  224. package/{types → interfaces}/private/TSTLClassMetatable.lua +0 -0
  225. package/maps/cardMap.lua +85 -85
  226. package/maps/characterMap.lua +58 -58
  227. package/maps/defaultPlayerStatMap.lua +1 -1
  228. package/maps/pillEffectMap.lua +39 -39
  229. package/maps/roomTypeMap.lua +12 -12
  230. package/objects/LRoomShapeToRectangles.lua +1 -1
  231. package/objects/callbackRegisterFunctions.d.ts +1 -1
  232. package/objects/callbackRegisterFunctions.lua +76 -76
  233. package/objects/directionToVector.lua +1 -1
  234. package/objects/isaacAPIClassTypeToBrand.lua +2 -2
  235. package/objects/isaacAPIClassTypeToCopyFunction.lua +5 -5
  236. package/objects/roomShapeBounds.lua +1 -1
  237. package/objects/roomShapeLayoutSizes.lua +1 -1
  238. package/objects/roomShapeToDoorSlotsToGridIndexDelta.lua +1 -1
  239. package/objects/roomShapeToTopLeftPosition.lua +1 -1
  240. package/objects/roomTypeNames.lua +1 -1
  241. package/objects/serializedIsaacAPIClassTypeToIdentityFunction.lua +5 -5
  242. package/package.json +2 -2
  243. package/patchErrorFunctions.lua +1 -1
  244. package/types/CollectibleIndex.d.ts +2 -2
  245. package/types/PickingUpItem.d.ts +12 -2
  246. package/types/PickingUpItem.lua +3 -0
  247. package/types/PlayerIndex.d.ts +2 -2
  248. package/types/private/IsaacAPIClass.d.ts +1 -1
  249. package/types/private/SerializedIsaacAPIClass.d.ts +1 -1
  250. package/types/private/TSTLClass.d.ts +1 -1
  251. package/upgradeMod.d.ts +2 -1
  252. package/upgradeMod.lua +7 -7
  253. package/types/Primitive.d.ts +0 -1
  254. package/types/private/SaveData.d.ts +0 -22
package/constants.d.ts CHANGED
@@ -14,7 +14,7 @@ export declare const BOMB_EXPLODE_FRAME = 45;
14
14
  export declare const DEFAULT_ITEM_POOL_TYPE = ItemPoolType.TREASURE;
15
15
  /** This is also the distance that a player spawns from the door that they enter a room from. */
16
16
  export declare const DISTANCE_OF_GRID_TILE = 40;
17
- export declare const DOOR_HITBOX_DISTANCE = 11;
17
+ export declare const DOOR_HITBOX_RADIUS = 11;
18
18
  /**
19
19
  * When Eggies take fatal damage, they go into NpcState.STATE_SUICIDE and spawn 14 Swarm Spiders
20
20
  * while their StateFrame ticks upwards. The 14th spider appears when the StateFrame is at this
@@ -93,12 +93,12 @@ export declare const TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE = 10000;
93
93
  */
94
94
  export declare const UI_HEART_WIDTH = 12;
95
95
  /**
96
- * This is a safer version of the `Vector.One` constant. (Other mods can mutate this vector, so it
97
- * is not safe to use.)
96
+ * This is a safer version of the `Vector.One` constant. (Other mods can mutate this `Vector.One`,
97
+ * so it is not safe to use.)
98
98
  */
99
99
  export declare const VectorOne: Readonly<Vector>;
100
100
  /**
101
- * This is a safer version of the `Vector.Zero` constant. (Other mods can mutate this vector, so it
102
- * is not safe to use.)
101
+ * This is a safer version of the `Vector.Zero` constant. (Other mods can mutate `Vector.Zero`
102
+ * vector, so it is not safe to use.)
103
103
  */
104
104
  export declare const VectorZero: Readonly<Vector>;
package/constants.lua CHANGED
@@ -5,7 +5,7 @@ local ItemPoolType = ____isaac_2Dtypescript_2Ddefinitions.ItemPoolType
5
5
  local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
6
6
  local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
7
7
  local TrinketSlot = ____isaac_2Dtypescript_2Ddefinitions.TrinketSlot
8
- local ____enums = require("packages.isaacscript-common.src.functions.enums")
8
+ local ____enums = require("functions.enums")
9
9
  local getEnumLength = ____enums.getEnumLength
10
10
  local getLastEnumValue = ____enums.getLastEnumValue
11
11
  ____exports.AZAZEL_DEFAULT_BRIMSTONE_DISTANCE = 75.125
@@ -13,7 +13,7 @@ ____exports.BLIND_ITEM_PNG_PATH = "gfx/items/collectibles/questionmark.png"
13
13
  ____exports.BOMB_EXPLODE_FRAME = 45
14
14
  ____exports.DEFAULT_ITEM_POOL_TYPE = ItemPoolType.TREASURE
15
15
  ____exports.DISTANCE_OF_GRID_TILE = 40
16
- ____exports.DOOR_HITBOX_DISTANCE = 11
16
+ ____exports.DOOR_HITBOX_RADIUS = 11
17
17
  ____exports.EGGY_STATE_FRAME_OF_FINAL_SPIDER = 45
18
18
  ____exports.EMPTY_PNG_PATH = "gfx/none.png"
19
19
  ____exports.FIRST_GLITCHED_COLLECTIBLE_TYPE = (1 << 32) - 1
File without changes
@@ -6,9 +6,9 @@ local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
6
6
  local PillEffect = ____isaac_2Dtypescript_2Ddefinitions.PillEffect
7
7
  local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
8
8
  local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
9
- local ____cachedClasses = require("packages.isaacscript-common.src.cachedClasses")
9
+ local ____cachedClasses = require("cachedClasses")
10
10
  local itemConfig = ____cachedClasses.itemConfig
11
- local ____enums = require("packages.isaacscript-common.src.functions.enums")
11
+ local ____enums = require("functions.enums")
12
12
  local getEnumLength = ____enums.getEnumLength
13
13
  local getLastEnumValue = ____enums.getLastEnumValue
14
14
  ____exports.FIRST_COLLECTIBLE_TYPE = CollectibleType.SAD_ONION
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * This represents the type of health that is either given or taken away from a player. Note that we
3
- * cannot use the HeartSubType enum for this purpose this since it has no value for broken hearts or
4
- * max hearts.
3
+ * cannot use the `HeartSubType` enum for this purpose this since it has no value for broken hearts
4
+ * or max hearts.
5
5
  */
6
6
  export declare enum HealthType {
7
7
  RED = 0,