isaacscript-common 6.22.4 → 7.1.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 (207) hide show
  1. package/dist/callbacks/postPlayerChangeHealth.lua +8 -1
  2. package/dist/callbacks/postPlayerChangeStat.d.ts +3 -0
  3. package/dist/callbacks/postPlayerChangeStat.d.ts.map +1 -0
  4. package/dist/callbacks/postPlayerChangeStat.lua +59 -0
  5. package/dist/callbacks/subscriptions/postPlayerChangeHealth.d.ts +2 -2
  6. package/dist/callbacks/subscriptions/postPlayerChangeHealth.d.ts.map +1 -1
  7. package/dist/callbacks/subscriptions/postPlayerChangeHealth.lua +9 -2
  8. package/dist/callbacks/subscriptions/postPlayerChangeStat.d.ts +12 -0
  9. package/dist/callbacks/subscriptions/postPlayerChangeStat.d.ts.map +1 -0
  10. package/dist/callbacks/subscriptions/postPlayerChangeStat.lua +35 -0
  11. package/dist/classes/DefaultMap.d.ts +3 -3
  12. package/dist/classes/DefaultMap.d.ts.map +1 -1
  13. package/dist/classes/DefaultMap.lua +37 -0
  14. package/dist/core/constants.d.ts +1 -1
  15. package/dist/core/constants.d.ts.map +1 -1
  16. package/dist/core/constants.lua +1 -1
  17. package/dist/enums/ModCallbackCustom.d.ts +70 -39
  18. package/dist/enums/ModCallbackCustom.d.ts.map +1 -1
  19. package/dist/enums/ModCallbackCustom.lua +37 -35
  20. package/dist/enums/StatType.d.ts +30 -0
  21. package/dist/enums/StatType.d.ts.map +1 -0
  22. package/dist/enums/StatType.lua +30 -0
  23. package/dist/enums/index.d.ts +1 -0
  24. package/dist/enums/index.d.ts.map +1 -1
  25. package/dist/enums/index.lua +8 -0
  26. package/dist/enums/private/CopyableIsaacAPIClassType.d.ts +5 -1
  27. package/dist/enums/private/CopyableIsaacAPIClassType.d.ts.map +1 -1
  28. package/dist/enums/private/CopyableIsaacAPIClassType.lua +3 -1
  29. package/dist/enums/private/SerializationBrand.d.ts +1 -0
  30. package/dist/enums/private/SerializationBrand.d.ts.map +1 -1
  31. package/dist/enums/private/SerializationBrand.lua +1 -0
  32. package/dist/features/customStage/versusScreen.lua +2 -2
  33. package/dist/features/disableInputs.d.ts +1 -1
  34. package/dist/features/disableInputs.d.ts.map +1 -1
  35. package/dist/features/runInNFrames.lua +1 -6
  36. package/dist/features/runNextRoom.lua +1 -6
  37. package/dist/features/saveDataManager/exports.d.ts +13 -8
  38. package/dist/features/saveDataManager/exports.d.ts.map +1 -1
  39. package/dist/features/saveDataManager/exports.lua +12 -7
  40. package/dist/features/saveDataManager/maps.d.ts +2 -2
  41. package/dist/features/saveDataManager/maps.d.ts.map +1 -1
  42. package/dist/features/saveDataManager/merge.d.ts +1 -0
  43. package/dist/features/saveDataManager/merge.d.ts.map +1 -1
  44. package/dist/features/saveDataManager/merge.lua +1 -0
  45. package/dist/features/taintedLazarusPlayers.lua +1 -6
  46. package/dist/functions/bitSet128.d.ts +25 -0
  47. package/dist/functions/bitSet128.d.ts.map +1 -0
  48. package/dist/functions/bitSet128.lua +71 -0
  49. package/dist/functions/collectibles.d.ts +2 -2
  50. package/dist/functions/collectibles.lua +2 -2
  51. package/dist/functions/color.d.ts +1 -1
  52. package/dist/functions/color.d.ts.map +1 -1
  53. package/dist/functions/color.lua +2 -2
  54. package/dist/functions/deepCopy.d.ts +1 -0
  55. package/dist/functions/deepCopy.d.ts.map +1 -1
  56. package/dist/functions/deepCopy.lua +2 -1
  57. package/dist/functions/familiars.d.ts +4 -4
  58. package/dist/functions/familiars.lua +4 -4
  59. package/dist/functions/flag.d.ts +1 -1
  60. package/dist/functions/flag.lua +1 -1
  61. package/dist/functions/index.d.ts +2 -0
  62. package/dist/functions/index.d.ts.map +1 -1
  63. package/dist/functions/index.lua +16 -0
  64. package/dist/functions/isaacAPIClass.d.ts +1 -1
  65. package/dist/functions/isaacAPIClass.d.ts.map +1 -1
  66. package/dist/functions/jsonRoom.lua +4 -4
  67. package/dist/functions/kColor.d.ts +1 -1
  68. package/dist/functions/kColor.d.ts.map +1 -1
  69. package/dist/functions/kColor.lua +2 -2
  70. package/dist/functions/log.lua +1 -1
  71. package/dist/functions/npcs.d.ts +2 -2
  72. package/dist/functions/npcs.lua +2 -2
  73. package/dist/functions/playerIndex.d.ts +1 -1
  74. package/dist/functions/playerIndex.lua +1 -1
  75. package/dist/functions/playerStats.d.ts +6 -0
  76. package/dist/functions/playerStats.d.ts.map +1 -0
  77. package/dist/functions/playerStats.lua +22 -0
  78. package/dist/functions/players.d.ts +1 -1
  79. package/dist/functions/players.lua +1 -1
  80. package/dist/functions/rng.d.ts +1 -1
  81. package/dist/functions/rng.d.ts.map +1 -1
  82. package/dist/functions/rng.lua +2 -2
  83. package/dist/functions/roomTransition.d.ts +1 -1
  84. package/dist/functions/roomTransition.lua +1 -1
  85. package/dist/functions/rooms.d.ts +1 -1
  86. package/dist/functions/rooms.lua +1 -1
  87. package/dist/functions/sprites.d.ts +3 -3
  88. package/dist/functions/sprites.lua +3 -3
  89. package/dist/functions/tears.d.ts +5 -4
  90. package/dist/functions/tears.d.ts.map +1 -1
  91. package/dist/functions/tears.lua +5 -4
  92. package/dist/functions/utils.d.ts +4 -1
  93. package/dist/functions/utils.d.ts.map +1 -1
  94. package/dist/functions/utils.lua +4 -1
  95. package/dist/functions/vector.d.ts +1 -1
  96. package/dist/functions/vector.d.ts.map +1 -1
  97. package/dist/functions/vector.lua +2 -2
  98. package/dist/initCustomCallbacks.d.ts.map +1 -1
  99. package/dist/initCustomCallbacks.lua +3 -0
  100. package/dist/interfaces/SaveData.d.ts +44 -8
  101. package/dist/interfaces/SaveData.d.ts.map +1 -1
  102. package/dist/interfaces/SaveData.lua +66 -0
  103. package/dist/interfaces/StatTypeType.d.ts +18 -0
  104. package/dist/interfaces/StatTypeType.d.ts.map +1 -0
  105. package/dist/interfaces/StatTypeType.lua +4 -0
  106. package/dist/interfaces/index.d.ts +1 -0
  107. package/dist/interfaces/index.d.ts.map +1 -1
  108. package/dist/interfaces/private/AddCallbackParameterCustom.d.ts +2 -0
  109. package/dist/interfaces/private/AddCallbackParameterCustom.d.ts.map +1 -1
  110. package/dist/objects/callbackRegisterFunctions.d.ts.map +1 -1
  111. package/dist/objects/callbackRegisterFunctions.lua +3 -0
  112. package/dist/objects/isaacAPIClassTypeToBrand.d.ts.map +1 -1
  113. package/dist/objects/isaacAPIClassTypeToBrand.lua +7 -1
  114. package/dist/objects/isaacAPIClassTypeToFunctions.d.ts.map +1 -1
  115. package/dist/objects/isaacAPIClassTypeToFunctions.lua +12 -1
  116. package/dist/types/index.d.ts +0 -1
  117. package/dist/types/index.d.ts.map +1 -1
  118. package/package.json +2 -2
  119. package/src/callbacks/postPlayerChangeHealth.ts +7 -1
  120. package/src/callbacks/postPlayerChangeStat.ts +68 -0
  121. package/src/callbacks/subscriptions/postPlayerChangeHealth.ts +5 -1
  122. package/src/callbacks/subscriptions/postPlayerChangeStat.ts +55 -0
  123. package/src/classes/DefaultMap.ts +36 -7
  124. package/src/core/constants.ts +1 -1
  125. package/src/enums/ModCallbackCustom.ts +36 -4
  126. package/src/enums/StatType.ts +47 -0
  127. package/src/enums/index.ts +1 -0
  128. package/src/enums/indexTypeDoc.ts +1 -0
  129. package/src/enums/private/CopyableIsaacAPIClassType.ts +5 -1
  130. package/src/enums/private/SerializationBrand.ts +1 -0
  131. package/src/features/customStage/versusScreen.ts +2 -2
  132. package/src/features/disableInputs.ts +3 -9
  133. package/src/features/runInNFrames.ts +1 -1
  134. package/src/features/runNextRoom.ts +1 -1
  135. package/src/features/saveDataManager/exports.ts +28 -10
  136. package/src/features/saveDataManager/merge.ts +1 -0
  137. package/src/features/saveDataManager/save.ts +2 -1
  138. package/src/features/taintedLazarusPlayers.ts +2 -2
  139. package/src/functions/bitSet128.ts +96 -0
  140. package/src/functions/collectibles.ts +2 -2
  141. package/src/functions/color.ts +3 -2
  142. package/src/functions/deepCopy.ts +2 -1
  143. package/src/functions/entities.ts +2 -2
  144. package/src/functions/familiars.ts +4 -4
  145. package/src/functions/flag.ts +1 -1
  146. package/src/functions/index.ts +2 -0
  147. package/src/functions/indexTypeDoc.ts +2 -0
  148. package/src/functions/isaacAPIClass.ts +0 -1
  149. package/src/functions/jsonRoom.ts +4 -4
  150. package/src/functions/kColor.ts +2 -2
  151. package/src/functions/log.ts +1 -1
  152. package/src/functions/npcs.ts +2 -2
  153. package/src/functions/playerIndex.ts +1 -1
  154. package/src/functions/playerStats.ts +26 -0
  155. package/src/functions/players.ts +1 -1
  156. package/src/functions/rng.ts +2 -2
  157. package/src/functions/roomTransition.ts +1 -1
  158. package/src/functions/rooms.ts +1 -1
  159. package/src/functions/sprites.ts +3 -3
  160. package/src/functions/tears.ts +5 -4
  161. package/src/functions/utils.ts +5 -1
  162. package/src/functions/vector.ts +2 -2
  163. package/src/initCustomCallbacks.ts +2 -0
  164. package/src/interfaces/SaveData.ts +256 -8
  165. package/src/interfaces/StatTypeType.ts +18 -0
  166. package/src/interfaces/index.ts +1 -0
  167. package/src/interfaces/indexTypeDoc.ts +1 -0
  168. package/src/interfaces/private/AddCallbackParameterCustom.ts +2 -0
  169. package/src/objects/callbackRegisterFunctions.ts +2 -0
  170. package/src/objects/isaacAPIClassTypeToBrand.ts +1 -0
  171. package/src/objects/isaacAPIClassTypeToFunctions.ts +12 -0
  172. package/src/types/index.ts +0 -1
  173. package/src/types/indexTypeDoc.ts +0 -1
  174. package/dist/classes/indexTypeDoc.d.ts +0 -3
  175. package/dist/classes/indexTypeDoc.d.ts.map +0 -1
  176. package/dist/classes/indexTypeDoc.lua +0 -4
  177. package/dist/core/indexTypeDoc.d.ts +0 -5
  178. package/dist/core/indexTypeDoc.d.ts.map +0 -1
  179. package/dist/core/indexTypeDoc.lua +0 -6
  180. package/dist/enums/indexTypeDoc.d.ts +0 -9
  181. package/dist/enums/indexTypeDoc.d.ts.map +0 -1
  182. package/dist/enums/indexTypeDoc.lua +0 -10
  183. package/dist/features/indexTypeDoc.d.ts +0 -30
  184. package/dist/features/indexTypeDoc.d.ts.map +0 -1
  185. package/dist/features/indexTypeDoc.lua +0 -31
  186. package/dist/functions/indexTypeDoc.d.ts +0 -99
  187. package/dist/functions/indexTypeDoc.d.ts.map +0 -1
  188. package/dist/functions/indexTypeDoc.lua +0 -100
  189. package/dist/indexTypeDoc.d.ts +0 -10
  190. package/dist/indexTypeDoc.d.ts.map +0 -1
  191. package/dist/indexTypeDoc.lua +0 -11
  192. package/dist/interfaces/indexTypeDoc.d.ts +0 -11
  193. package/dist/interfaces/indexTypeDoc.d.ts.map +0 -1
  194. package/dist/interfaces/indexTypeDoc.lua +0 -2
  195. package/dist/maps/indexTypeDoc.d.ts +0 -5
  196. package/dist/maps/indexTypeDoc.d.ts.map +0 -1
  197. package/dist/maps/indexTypeDoc.lua +0 -6
  198. package/dist/objects/indexTypeDoc.d.ts +0 -2
  199. package/dist/objects/indexTypeDoc.d.ts.map +0 -1
  200. package/dist/objects/indexTypeDoc.lua +0 -3
  201. package/dist/types/IsaacAPIClass.d.ts +0 -5
  202. package/dist/types/IsaacAPIClass.d.ts.map +0 -1
  203. package/dist/types/IsaacAPIClass.lua +0 -2
  204. package/dist/types/indexTypeDoc.d.ts +0 -12
  205. package/dist/types/indexTypeDoc.d.ts.map +0 -1
  206. package/dist/types/indexTypeDoc.lua +0 -3
  207. package/src/types/IsaacAPIClass.ts +0 -3
@@ -1 +1 @@
1
- {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../src/functions/color.ts"],"names":[],"mappings":";;;;AAOA,oBAAY,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACtD,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;CACzC,CAAC;AAKF,wBAAgB,WAAW,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAG,OAAO,CAEjE;AAED,yDAAyD;AACzD,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAgB7C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB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 +17,11 @@ local getNumbersFromTable = ____table.getNumbersFromTable
17
17
  local tableHasKeys = ____table.tableHasKeys
18
18
  local ____types = require("functions.types")
19
19
  local isTable = ____types.isTable
20
- --- Helper function to check if something is an instantiated Color object.
20
+ --- Helper function to check if something is an instantiated `Color` object.
21
21
  function ____exports.isColor(self, object)
22
22
  return isIsaacAPIClassOfType(nil, object, OBJECT_NAME)
23
23
  end
24
+ OBJECT_NAME = "Color"
24
25
  local KEYS = {
25
26
  "R",
26
27
  "G",
@@ -30,7 +31,6 @@ local KEYS = {
30
31
  "GO",
31
32
  "BO"
32
33
  }
33
- OBJECT_NAME = "Color"
34
34
  function ____exports.colorEquals(self, color1, color2)
35
35
  return isaacAPIClassEquals(nil, color1, color2, KEYS)
36
36
  end
@@ -11,6 +11,7 @@ import { SerializationType } from "../enums/SerializationType";
11
11
  * - TSTL `Set`
12
12
  * - TSTL classes
13
13
  * - `DefaultMap`
14
+ * - Isaac `BitSet128` objects
14
15
  * - Isaac `Color` objects
15
16
  * - Isaac `KColor` objects
16
17
  * - Isaac `RNG` objects
@@ -1 +1 @@
1
- {"version":3,"file":"deepCopy.d.ts","sourceRoot":"","sources":["../../src/functions/deepCopy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AA6B/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,OAAO,EACd,iBAAiB,oBAAyB,EAC1C,oBAAoB,SAAK,EACzB,SAAS,UAAQ,GAChB,OAAO,CAkDT"}
1
+ {"version":3,"file":"deepCopy.d.ts","sourceRoot":"","sources":["../../src/functions/deepCopy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AA6B/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,OAAO,EACd,iBAAiB,oBAAyB,EAC1C,oBAAoB,SAAK,EACzB,SAAS,UAAQ,GAChB,OAAO,CAkDT"}
@@ -56,6 +56,7 @@ local twoDimensionalSort = ____utils.twoDimensionalSort
56
56
  -- - TSTL `Set`
57
57
  -- - TSTL classes
58
58
  -- - `DefaultMap`
59
+ -- - Isaac `BitSet128` objects
59
60
  -- - Isaac `Color` objects
60
61
  -- - Isaac `KColor` objects
61
62
  -- - Isaac `RNG` objects
@@ -210,7 +211,7 @@ function deepCopyDefaultMap(self, defaultMap, serializationType, traversalDescri
210
211
  local constructorArg = ____isDefaultMap_result_0
211
212
  if serializationType == SerializationType.SERIALIZE and not isPrimitive(nil, constructorArg) then
212
213
  if insideMap then
213
- error("Failed to deep copy a DefaultMap because it was instantiated with a factory function and was also inside of another map. You cannot use a nested DefaultMap in this way because factory functions are not serializable. (In other words, there is no way to copy the function that you are using for the DefaultMap into the \"save#.dat\" file.) Instead, refactor your data structure so that the DefaultMap is not nested.")
214
+ error("Failed to deep copy a DefaultMap because it was instantiated with a factory function and was also inside of an array, map, or set. For more information, see: https://isaacscript.github.io/main/gotchas#failed-to-deep-copy-a-defaultmap")
214
215
  else
215
216
  return deepCopyMap(
216
217
  nil,
@@ -7,8 +7,8 @@ import { CollectibleType, FamiliarVariant } from "isaac-typescript-definitions";
7
7
  * specify an incorrect RNG object. (The vanilla method is bugged in that it does not increment the
8
8
  * RNG object; see the documentation of the method for more details.)
9
9
  *
10
- * This function is meant to be called in the EvaluateCache callback (when the cache flag is equal
11
- * to `CacheFlag.FAMILIARS`).
10
+ * This function is meant to be called in the `EVALUATE_CACHE` callback (when the cache flag is
11
+ * equal to `CacheFlag.FAMILIARS`).
12
12
  *
13
13
  * Note that this function is only meant to be used in special circumstances where the familiar
14
14
  * count is completely custom and does not correspond to the amount of collectibles. For the general
@@ -36,8 +36,8 @@ export declare function checkFamiliar(player: EntityPlayer, collectibleType: Col
36
36
  * Use this helper function instead of invoking the `EntityPlayer.CheckFamiliar` method directly so
37
37
  * that the target count is handled automatically.
38
38
  *
39
- * This function is meant to be called in the EvaluateCache callback (when the cache flag is equal
40
- * to `CacheFlag.FAMILIARS`).
39
+ * This function is meant to be called in the `EVALUATE_CACHE` callback (when the cache flag is
40
+ * equal to `CacheFlag.FAMILIARS`).
41
41
  *
42
42
  * Use this function when the amount of familiars should be equal to the amount of associated
43
43
  * collectibles that the player has (plus any extras from having used Box of Friends or Monster
@@ -14,8 +14,8 @@ local getFamiliars = ____entitiesSpecific.getFamiliars
14
14
  -- specify an incorrect RNG object. (The vanilla method is bugged in that it does not increment the
15
15
  -- RNG object; see the documentation of the method for more details.)
16
16
  --
17
- -- This function is meant to be called in the EvaluateCache callback (when the cache flag is equal
18
- -- to `CacheFlag.FAMILIARS`).
17
+ -- This function is meant to be called in the `EVALUATE_CACHE` callback (when the cache flag is
18
+ -- equal to `CacheFlag.FAMILIARS`).
19
19
  --
20
20
  -- Note that this function is only meant to be used in special circumstances where the familiar
21
21
  -- count is completely custom and does not correspond to the amount of collectibles. For the general
@@ -50,8 +50,8 @@ end
50
50
  -- Use this helper function instead of invoking the `EntityPlayer.CheckFamiliar` method directly so
51
51
  -- that the target count is handled automatically.
52
52
  --
53
- -- This function is meant to be called in the EvaluateCache callback (when the cache flag is equal
54
- -- to `CacheFlag.FAMILIARS`).
53
+ -- This function is meant to be called in the `EVALUATE_CACHE` callback (when the cache flag is
54
+ -- equal to `CacheFlag.FAMILIARS`).
55
55
  --
56
56
  -- Use this function when the amount of familiars should be equal to the amount of associated
57
57
  -- collectibles that the player has (plus any extras from having used Box of Friends or Monster
@@ -29,7 +29,7 @@ export declare function addFlag<T extends BitFlag | BitFlag128>(flags: T | BitFl
29
29
  * Helper function for casting a flag enum value to a `BitFlags` object.
30
30
  *
31
31
  * This is useful because the compiler will prevent you from assigning a specific flag to a
32
- * `BitFlags` property. (It does this to ensure type safety, since `BitFlags` can represent a zero
32
+ * `BitFlags` field. (It does this to ensure type safety, since `BitFlags` can represent a zero
33
33
  * value or a composition of N flags.)
34
34
  *
35
35
  * For example:
@@ -35,7 +35,7 @@ end
35
35
  --- Helper function for casting a flag enum value to a `BitFlags` object.
36
36
  --
37
37
  -- This is useful because the compiler will prevent you from assigning a specific flag to a
38
- -- `BitFlags` property. (It does this to ensure type safety, since `BitFlags` can represent a zero
38
+ -- `BitFlags` field. (It does this to ensure type safety, since `BitFlags` can represent a zero
39
39
  -- value or a composition of N flags.)
40
40
  --
41
41
  -- For example:
@@ -1,6 +1,7 @@
1
1
  export * from "./ambush";
2
2
  export * from "./array";
3
3
  export * from "./benchmark";
4
+ export * from "./bitSet128";
4
5
  export * from "./bitwise";
5
6
  export * from "./bombs";
6
7
  export * from "./bosses";
@@ -61,6 +62,7 @@ export * from "./playerDataStructures";
61
62
  export * from "./playerHealth";
62
63
  export * from "./playerIndex";
63
64
  export * from "./players";
65
+ export * from "./playerStats";
64
66
  export * from "./pocketItems";
65
67
  export * from "./positionVelocity";
66
68
  export * from "./pressurePlate";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CA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BAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,MAAM,CAAC;AACrB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
@@ -23,6 +23,14 @@ do
23
23
  end
24
24
  end
25
25
  end
26
+ do
27
+ local ____export = require("functions.bitSet128")
28
+ for ____exportKey, ____exportValue in pairs(____export) do
29
+ if ____exportKey ~= "default" then
30
+ ____exports[____exportKey] = ____exportValue
31
+ end
32
+ end
33
+ end
26
34
  do
27
35
  local ____export = require("functions.bitwise")
28
36
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -503,6 +511,14 @@ do
503
511
  end
504
512
  end
505
513
  end
514
+ do
515
+ local ____export = require("functions.playerStats")
516
+ for ____exportKey, ____exportValue in pairs(____export) do
517
+ if ____exportKey ~= "default" then
518
+ ____exports[____exportKey] = ____exportValue
519
+ end
520
+ end
521
+ end
506
522
  do
507
523
  local ____export = require("functions.pocketItems")
508
524
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -17,7 +17,7 @@
17
17
  /// <reference types="isaac-typescript-definitions" />
18
18
  /// <reference types="isaac-typescript-definitions" />
19
19
  /// <reference types="isaac-typescript-definitions" />
20
- import { IsaacAPIClass } from "../types/IsaacAPIClass";
20
+ /// <reference types="isaac-typescript-definitions" />
21
21
  /**
22
22
  * Helper function to get the name of a class from the Isaac API. This is contained within the
23
23
  * "__type" metatable key.
@@ -1 +1 @@
1
- {"version":3,"file":"isaacAPIClass.d.ts","sourceRoot":"","sources":["../../src/functions/isaacAPIClass.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAIvD;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAkBxE;AAED,uEAAuE;AACvE,wBAAgB,MAAM,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,UAAU,CAEhE;AAED,2EAA2E;AAC3E,wBAAgB,MAAM,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,cAAc,CAEpE;AAED,yEAAyE;AACzE,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,YAAY,CAEpE;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,MAAM,CAE9D;AAED,yEAAyE;AACzE,wBAAgB,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,cAAc,CAExE;AAED,uEAAuE;AACvE,wBAAgB,YAAY,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,UAAU,CAEtE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,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OAAO,CAKT"}
@@ -52,7 +52,7 @@ function ____exports.getJSONRoomDoorSlotFlags(self, jsonRoom)
52
52
  local roomShapeString = jsonRoom["$"].shape
53
53
  local roomShapeNumber = tonumber(roomShapeString)
54
54
  if roomShapeNumber == nil then
55
- error("Failed to parse the \"shape\" property of a JSON room: " .. roomShapeString)
55
+ error("Failed to parse the \"shape\" field of a JSON room: " .. roomShapeString)
56
56
  end
57
57
  local roomShape = roomShapeNumber
58
58
  local doorSlotFlags = DoorSlotFlagZero
@@ -60,7 +60,7 @@ function ____exports.getJSONRoomDoorSlotFlags(self, jsonRoom)
60
60
  do
61
61
  local existsString = door["$"].exists
62
62
  if existsString ~= "True" and existsString ~= "False" then
63
- error("Failed to parse the \"exists\" property of a JSON room door: " .. existsString)
63
+ error("Failed to parse the \"exists\" field of a JSON room door: " .. existsString)
64
64
  end
65
65
  if existsString == "False" then
66
66
  goto __continue4
@@ -68,12 +68,12 @@ function ____exports.getJSONRoomDoorSlotFlags(self, jsonRoom)
68
68
  local xString = door["$"].x
69
69
  local x = tonumber(xString)
70
70
  if x == nil then
71
- error("Failed to parse the \"x\" property of a JSON room door: " .. xString)
71
+ error("Failed to parse the \"x\" field of a JSON room door: " .. xString)
72
72
  end
73
73
  local yString = door["$"].y
74
74
  local y = tonumber(yString)
75
75
  if y == nil then
76
- error("Failed to parse the \"y\" property of a JSON room door: " .. yString)
76
+ error("Failed to parse the \"y\" field of a JSON room door: " .. yString)
77
77
  end
78
78
  local doorSlot = getRoomShapeDoorSlot(nil, roomShape, x, y)
79
79
  if doorSlot == nil then
@@ -20,7 +20,7 @@ export declare function deserializeKColor(kColor: SerializedKColor): KColor;
20
20
  * @param alpha Optional. The alpha value to use. Default is 1.
21
21
  */
22
22
  export declare function getRandomKColor(seedOrRNG?: Seed | RNG, alpha?: number): KColor;
23
- /** Helper function to check if something is an instantiated KColor object. */
23
+ /** Helper function to check if something is an instantiated `KColor` object. */
24
24
  export declare function isKColor(object: unknown): object is KColor;
25
25
  /**
26
26
  * Used to determine is the given table is a serialized `KColor` object created by the save data
@@ -1 +1 @@
1
- {"version":3,"file":"kColor.d.ts","sourceRoot":"","sources":["../../src/functions/kColor.ts"],"names":[],"mappings":";;;;AAOA,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,CAmClE;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,KAAK,SAAI,GACR,MAAM,CAQR;AAED,8EAA8E;AAC9E,wBAAgB,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,MAAM,CAE1D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,OAAO,GACd,MAAM,IAAI,gBAAgB,CAQ5B;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAEtE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAWhE"}
1
+ {"version":3,"file":"kColor.d.ts","sourceRoot":"","sources":["../../src/functions/kColor.ts"],"names":[],"mappings":";;;;AAOA,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,CAmClE;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,KAAK,SAAI,GACR,MAAM,CAQR;AAED,gFAAgF;AAChF,wBAAgB,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,MAAM,CAE1D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,OAAO,GACd,MAAM,IAAI,gBAAgB,CAQ5B;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAEtE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAWhE"}
@@ -17,12 +17,12 @@ local getNumbersFromTable = ____table.getNumbersFromTable
17
17
  local tableHasKeys = ____table.tableHasKeys
18
18
  local ____types = require("functions.types")
19
19
  local isTable = ____types.isTable
20
- --- Helper function to check if something is an instantiated KColor object.
20
+ --- Helper function to check if something is an instantiated `KColor` object.
21
21
  function ____exports.isKColor(self, object)
22
22
  return isIsaacAPIClassOfType(nil, object, OBJECT_NAME)
23
23
  end
24
- local KEYS = {"Red", "Green", "Blue", "Alpha"}
25
24
  OBJECT_NAME = "KColor"
25
+ local KEYS = {"Red", "Green", "Blue", "Alpha"}
26
26
  --- Helper function to copy a `KColor` Isaac API class.
27
27
  function ____exports.copyKColor(self, kColor)
28
28
  if not ____exports.isKColor(nil, kColor) then
@@ -369,7 +369,7 @@ end
369
369
  --- Helper function to enumerate all of the properties of a "userdata" object (i.e. an object from
370
370
  -- the Isaac API).
371
371
  function ____exports.logUserdata(userdata)
372
- if isUserdata(nil, userdata) then
372
+ if not isUserdata(nil, userdata) then
373
373
  ____exports.log("Userdata: [not userdata]")
374
374
  return
375
375
  end
@@ -24,8 +24,8 @@ export declare function isAliveExceptionNPC(npc: EntityNPC): boolean;
24
24
  * that is spawned when the boss does the multi-stomp attack.
25
25
  *
26
26
  * When this attack occurs, four extra copies of Daddy Long Legs will be spawned with the same
27
- * entity type, variant, and sub-type. The `Entity.Parent` property will be undefined in this case,
28
- * so the way to tell them apart is to check for a non-undefined `Entity.SpawnerEntity` property.
27
+ * entity type, variant, and sub-type. The `Entity.Parent` field will be undefined in this case, so
28
+ * the way to tell them apart is to check for a non-undefined `Entity.SpawnerEntity` field.
29
29
  */
30
30
  export declare function isDaddyLongLegsChildStompEntity(npc: EntityNPC): boolean;
31
31
  /**
@@ -50,8 +50,8 @@ end
50
50
  -- that is spawned when the boss does the multi-stomp attack.
51
51
  --
52
52
  -- When this attack occurs, four extra copies of Daddy Long Legs will be spawned with the same
53
- -- entity type, variant, and sub-type. The `Entity.Parent` property will be undefined in this case,
54
- -- so the way to tell them apart is to check for a non-undefined `Entity.SpawnerEntity` property.
53
+ -- entity type, variant, and sub-type. The `Entity.Parent` field will be undefined in this case, so
54
+ -- the way to tell them apart is to check for a non-undefined `Entity.SpawnerEntity` field.
55
55
  function ____exports.isDaddyLongLegsChildStompEntity(self, npc)
56
56
  return npc.Type == EntityType.DADDY_LONG_LEGS and npc.SpawnerEntity ~= nil
57
57
  end
@@ -78,7 +78,7 @@ export declare function getPlayers(performCharacterExclusions?: boolean): Entity
78
78
  export declare function getSubPlayerParent(subPlayer: EntitySubPlayer): EntityPlayer | undefined;
79
79
  /**
80
80
  * Helper function to detect if a particular player is a "child" player, meaning that they have a
81
- * non-undefined `EntityPlayer.Parent` property. (For example, the Strawman Keeper.)
81
+ * non-undefined `EntityPlayer.Parent` field. (For example, the Strawman Keeper.)
82
82
  */
83
83
  export declare function isChildPlayer(player: EntityPlayer): boolean;
84
84
  //# sourceMappingURL=playerIndex.d.ts.map
@@ -125,7 +125,7 @@ function ____exports.getSubPlayerParent(self, subPlayer)
125
125
  )
126
126
  end
127
127
  --- Helper function to detect if a particular player is a "child" player, meaning that they have a
128
- -- non-undefined `EntityPlayer.Parent` property. (For example, the Strawman Keeper.)
128
+ -- non-undefined `EntityPlayer.Parent` field. (For example, the Strawman Keeper.)
129
129
  function ____exports.isChildPlayer(self, player)
130
130
  return player.Parent ~= nil
131
131
  end
@@ -0,0 +1,6 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ import { StatType } from "../enums/StatType";
3
+ import { StatTypeType } from "../interfaces/StatTypeType";
4
+ /** Helper function to get the stat for a player corresponding to the `StatType`. */
5
+ export declare function getPlayerStat<T extends StatType>(player: EntityPlayer, statType: T): StatTypeType[T];
6
+ //# sourceMappingURL=playerStats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playerStats.d.ts","sourceRoot":"","sources":["../../src/functions/playerStats.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,oFAAoF;AACpF,wBAAgB,aAAa,CAAC,CAAC,SAAS,QAAQ,EAC9C,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,CAAC,GACV,YAAY,CAAC,CAAC,CAAC,CAkBjB"}
@@ -0,0 +1,22 @@
1
+ local ____exports = {}
2
+ local ____StatType = require("enums.StatType")
3
+ local StatType = ____StatType.StatType
4
+ --- Helper function to get the stat for a player corresponding to the `StatType`.
5
+ function ____exports.getPlayerStat(self, player, statType)
6
+ return ({
7
+ [StatType.DAMAGE] = player.Damage,
8
+ [StatType.FIRE_DELAY] = player.MaxFireDelay,
9
+ [StatType.SHOT_SPEED] = player.ShotSpeed,
10
+ [StatType.TEAR_HEIGHT] = player.TearHeight,
11
+ [StatType.TEAR_RANGE] = player.TearRange,
12
+ [StatType.TEAR_FALLING_ACCELERATION] = player.TearFallingAcceleration,
13
+ [StatType.TEAR_FALLING_SPEED] = player.TearFallingSpeed,
14
+ [StatType.MOVE_SPEED] = player.MoveSpeed,
15
+ [StatType.TEAR_FLAG] = player.TearFlags,
16
+ [StatType.TEAR_COLOR] = player.TearColor,
17
+ [StatType.FLYING] = player.CanFly,
18
+ [StatType.LUCK] = player.Luck,
19
+ [StatType.SIZE] = player.SizeMulti
20
+ })[statType]
21
+ end
22
+ return ____exports
@@ -3,7 +3,7 @@ import { HealthType } from "../enums/HealthType";
3
3
  export declare function addCollectibleCostume(player: EntityPlayer, collectibleType: CollectibleType): void;
4
4
  /**
5
5
  * Helper function to add a stat to a player based on the `CacheFlag` provided. Call this function
6
- * from the EvaluateCache callback.
6
+ * from the `EVALUATE_CACHE` callback.
7
7
  *
8
8
  * Note that for `CacheFlag.FIRE_DELAY`, the "amount" argument will be interpreted as the tear stat
9
9
  * to add (and not the amount to mutate `EntityPlayer.MaxFireDelay` by).
@@ -142,7 +142,7 @@ function ____exports.addCollectibleCostume(self, player, collectibleType)
142
142
  player:AddCostume(itemConfigItem, false)
143
143
  end
144
144
  --- Helper function to add a stat to a player based on the `CacheFlag` provided. Call this function
145
- -- from the EvaluateCache callback.
145
+ -- from the `EVALUATE_CACHE` callback.
146
146
  --
147
147
  -- Note that for `CacheFlag.FIRE_DELAY`, the "amount" argument will be interpreted as the tear stat
148
148
  -- to add (and not the amount to mutate `EntityPlayer.MaxFireDelay` by).
@@ -17,7 +17,7 @@ export declare function deserializeRNG(rng: SerializedRNG): RNG;
17
17
  * the game.
18
18
  */
19
19
  export declare function getRandomSeed(): Seed;
20
- /** Helper function to check if something is an instantiated RNG object. */
20
+ /** Helper function to check if something is an instantiated `RNG` object. */
21
21
  export declare function isRNG(object: unknown): object is RNG;
22
22
  /**
23
23
  * Used to determine is the given table is a serialized `RNG` object created by the save data
@@ -1 +1 @@
1
- {"version":3,"file":"rng.d.ts","sourceRoot":"","sources":["../../src/functions/rng.ts"],"names":[],"mappings":";;;AAMA,oBAAY,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACpD,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;CACvC,CAAC;AAYF,wDAAwD;AACxD,wBAAgB,OAAO,CAAC,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AAgB,aAAa,IAAI,IAAI,CAIpC;AAED,6EAA6E;AAC7E,wBAAgB,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,GAAG,CAEpD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,aAAa,CAMxE;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,IAAI,OAAkB,GAAG,GAAG,CAIlD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAEvD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,aAAa,CAYpD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAoBjE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAK1D;AAED,4FAA4F;AAC5F,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CASlD"}
@@ -22,7 +22,7 @@ function ____exports.getRandomSeed(self)
22
22
  local safeRandomNumber = randomNumber == 0 and 1 or randomNumber
23
23
  return safeRandomNumber
24
24
  end
25
- --- Helper function to check if something is an instantiated RNG object.
25
+ --- Helper function to check if something is an instantiated `RNG` object.
26
26
  function ____exports.isRNG(self, object)
27
27
  return isIsaacAPIClassOfType(nil, object, OBJECT_NAME)
28
28
  end
@@ -45,8 +45,8 @@ function ____exports.setSeed(self, rng, seed)
45
45
  rng:SetSeed(seed, RECOMMENDED_SHIFT_IDX)
46
46
  end
47
47
  RECOMMENDED_SHIFT_IDX = 35
48
- local KEYS = {"seed"}
49
48
  OBJECT_NAME = "RNG"
49
+ local KEYS = {"seed"}
50
50
  --- Helper function to copy an `RNG` Isaac API class.
51
51
  function ____exports.copyRNG(self, rng)
52
52
  if not ____exports.isRNG(nil, rng) then
@@ -12,7 +12,7 @@ export declare function reloadRoom(): void;
12
12
  * arguments.
13
13
  *
14
14
  * Use this function instead of invoking the `Game.StartRoomTransition` method directly so that:
15
- * - you do not forget to set `Level.LeaveDoor` property
15
+ * - you do not forget to set the `Level.LeaveDoor` field
16
16
  * - to prevent crashing on invalid room grid indexes
17
17
  * - to automatically handle Curse of the Maze
18
18
  *
@@ -18,7 +18,7 @@ local getRoomGridIndex = ____roomData.getRoomGridIndex
18
18
  -- arguments.
19
19
  --
20
20
  -- Use this function instead of invoking the `Game.StartRoomTransition` method directly so that:
21
- -- - you do not forget to set `Level.LeaveDoor` property
21
+ -- - you do not forget to set the `Level.LeaveDoor` field
22
22
  -- - to prevent crashing on invalid room grid indexes
23
23
  -- - to automatically handle Curse of the Maze
24
24
  --
@@ -2,7 +2,7 @@ import { BackdropType, BossID, Dimension, ItemPoolType, MinibossID, RoomType } f
2
2
  /**
3
3
  * Helper function for quickly switching to a new room without playing a particular animation. Use
4
4
  * this helper function over invoking the `Game.ChangeRoom` method directly to ensure that you do
5
- * not forget to set the `LeaveDoor` property and to prevent crashing on invalid room grid indexes.
5
+ * not forget to set the `LeaveDoor` field and to prevent crashing on invalid room grid indexes.
6
6
  */
7
7
  export declare function changeRoom(roomGridIndex: int): void;
8
8
  /**
@@ -133,7 +133,7 @@ function ____exports.getRoomsOutsideGrid(self)
133
133
  end
134
134
  --- Helper function for quickly switching to a new room without playing a particular animation. Use
135
135
  -- this helper function over invoking the `Game.ChangeRoom` method directly to ensure that you do
136
- -- not forget to set the `LeaveDoor` property and to prevent crashing on invalid room grid indexes.
136
+ -- not forget to set the `LeaveDoor` field and to prevent crashing on invalid room grid indexes.
137
137
  function ____exports.changeRoom(self, roomGridIndex)
138
138
  local level = game:GetLevel()
139
139
  local roomData = getRoomData(nil, roomGridIndex)
@@ -21,9 +21,9 @@ export declare function clearSprite(sprite: Sprite, ...layerIDs: int[]): void;
21
21
  *
22
22
  * Note that this function is bugged with the Stop Watch or the Broken Watch, since using the
23
23
  * `Sprite.SetFrame` method will reset the internal accumulator used to slow down the playback speed
24
- * of the animation. (The `PlaybackSpeed` property of the sprite is not used.) Thus, it is only safe
25
- * to use this function on animations that are not slowed down by Stop Watch or Broken Watch, such
26
- * as player animations.
24
+ * of the animation. (The `PlaybackSpeed` field of the sprite is not used.) Thus, it is only safe to
25
+ * use this function on animations that are not slowed down by Stop Watch or Broken Watch, such as
26
+ * player animations.
27
27
  */
28
28
  export declare function getLastFrameOfAnimation(sprite: Sprite, animation?: string): int;
29
29
  /**
@@ -39,9 +39,9 @@ end
39
39
  --
40
40
  -- Note that this function is bugged with the Stop Watch or the Broken Watch, since using the
41
41
  -- `Sprite.SetFrame` method will reset the internal accumulator used to slow down the playback speed
42
- -- of the animation. (The `PlaybackSpeed` property of the sprite is not used.) Thus, it is only safe
43
- -- to use this function on animations that are not slowed down by Stop Watch or Broken Watch, such
44
- -- as player animations.
42
+ -- of the animation. (The `PlaybackSpeed` field of the sprite is not used.) Thus, it is only safe to
43
+ -- use this function on animations that are not slowed down by Stop Watch or Broken Watch, such as
44
+ -- player animations.
45
45
  function ____exports.getLastFrameOfAnimation(self, sprite, animation)
46
46
  local currentAnimation = sprite:GetAnimation()
47
47
  local currentFrame = sprite:GetFrame()
@@ -1,13 +1,14 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
2
  /// <reference types="isaac-typescript-definitions" />
3
3
  /**
4
- * - Converts the specified amount of tears stat into MaxFireDelay and adds it to the player.
5
- * - This function should only be used inside the EvaluateCache callback.
4
+ * - Converts the specified amount of tears stat into the format of `EntityPlayer.MaxFireDelay` and
5
+ * adds it to the player.
6
+ * - This function should only be used inside the `EVALUATE_CACHE` callback.
6
7
  * - In this context, the "tears stat" represents what is shown on the in-game stat UI.
7
8
  */
8
9
  export declare function addTearsStat(player: EntityPlayer, tearsStat: float): void;
9
10
  /**
10
- * - The `EntityPlayer` object stores a player's tear rate in the `MaxFireDelay` attribute. This is
11
+ * - The `EntityPlayer` object stores a player's tear rate in the `MaxFireDelay` field. This is
11
12
  * equivalent to how many tears the player can shoot per frame.
12
13
  * - If you already have a "tears" stat and you want to convert it back to MaxFireDelay, then use
13
14
  * this function.
@@ -15,7 +16,7 @@ export declare function addTearsStat(player: EntityPlayer, tearsStat: float): vo
15
16
  */
16
17
  export declare function getFireDelay(tearsStat: float): float;
17
18
  /**
18
- * - The `EntityPlayer` object stores a player's tear rate in the `MaxFireDelay` attribute. This is
19
+ * - The `EntityPlayer` object stores a player's tear rate in the `MaxFireDelay` field. This is
19
20
  * equivalent to how many tears the player can shoot per frame.
20
21
  * - If you want to convert this to the "tears" stat that is shown on the in-game stat UI, then use
21
22
  * this function.
@@ -1 +1 @@
1
- {"version":3,"file":"tears.d.ts","sourceRoot":"","sources":["../../src/functions/tears.ts"],"names":[],"mappings":";;AAAA;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,GAAG,IAAI,CAKzE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,KAAK,GAAG,KAAK,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,KAAK,GAAG,KAAK,CAEpD"}
1
+ {"version":3,"file":"tears.d.ts","sourceRoot":"","sources":["../../src/functions/tears.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,GAAG,IAAI,CAKzE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,KAAK,GAAG,KAAK,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,KAAK,GAAG,KAAK,CAEpD"}
@@ -1,5 +1,5 @@
1
1
  local ____exports = {}
2
- --- - The `EntityPlayer` object stores a player's tear rate in the `MaxFireDelay` attribute. This is
2
+ --- - The `EntityPlayer` object stores a player's tear rate in the `MaxFireDelay` field. This is
3
3
  -- equivalent to how many tears the player can shoot per frame.
4
4
  -- - If you already have a "tears" stat and you want to convert it back to MaxFireDelay, then use
5
5
  -- this function.
@@ -7,15 +7,16 @@ local ____exports = {}
7
7
  function ____exports.getFireDelay(self, tearsStat)
8
8
  return math.max(30 / tearsStat - 1, -0.9999)
9
9
  end
10
- --- - The `EntityPlayer` object stores a player's tear rate in the `MaxFireDelay` attribute. This is
10
+ --- - The `EntityPlayer` object stores a player's tear rate in the `MaxFireDelay` field. This is
11
11
  -- equivalent to how many tears the player can shoot per frame.
12
12
  -- - If you want to convert this to the "tears" stat that is shown on the in-game stat UI, then use
13
13
  -- this function.
14
14
  function ____exports.getTearsStat(self, fireDelay)
15
15
  return 30 / (fireDelay + 1)
16
16
  end
17
- --- - Converts the specified amount of tears stat into MaxFireDelay and adds it to the player.
18
- -- - This function should only be used inside the EvaluateCache callback.
17
+ --- - Converts the specified amount of tears stat into the format of `EntityPlayer.MaxFireDelay` and
18
+ -- adds it to the player.
19
+ -- - This function should only be used inside the `EVALUATE_CACHE` callback.
19
20
  -- - In this context, the "tears stat" represents what is shown on the in-game stat UI.
20
21
  function ____exports.addTearsStat(self, player, tearsStat)
21
22
  local existingTearsStat = ____exports.getTearsStat(nil, player.MaxFireDelay)
@@ -85,9 +85,12 @@ export declare function repeat(n: int, func: (i: int) => void): void;
85
85
  * When you see this function, it simply means that the programmer intends to add in more code to
86
86
  * this spot later.
87
87
  *
88
+ * This function is variadic, meaning that you can pass as many arguments as you want. (This is
89
+ * useful as a means to prevent lint warnings.)
90
+ *
88
91
  * This function does not actually do anything. (It is an "empty" function.)
89
92
  */
90
- export declare function todo(): void;
93
+ export declare function todo(...args: unknown[]): void;
91
94
  /**
92
95
  * Helper function to sort a two-dimensional array by the first element.
93
96
  *
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/functions/utils.ts"],"names":[],"mappings":";;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,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAYhE"}
@@ -158,8 +158,11 @@ end
158
158
  -- When you see this function, it simply means that the programmer intends to add in more code to
159
159
  -- this spot later.
160
160
  --
161
+ -- This function is variadic, meaning that you can pass as many arguments as you want. (This is
162
+ -- useful as a means to prevent lint warnings.)
163
+ --
161
164
  -- This function does not actually do anything. (It is an "empty" function.)
162
- function ____exports.todo(self)
165
+ function ____exports.todo(self, ...)
163
166
  end
164
167
  --- Helper function to sort a two-dimensional array by the first element.
165
168
  --
@@ -26,7 +26,7 @@ export declare function getRandomVector(seedOrRNG?: Seed | RNG): Vector;
26
26
  * manager and/or the `deepCopy` function.
27
27
  */
28
28
  export declare function isSerializedVector(object: unknown): object is SerializedVector;
29
- /** Helper function to check if something is an instantiated Vector object. */
29
+ /** Helper function to check if something is an instantiated `Vector` object. */
30
30
  export declare function isVector(object: unknown): object is Vector;
31
31
  /**
32
32
  * Helper function to convert a `Vector` object to a `SerializedVector` object. (This is used by the