isaacscript-common 6.9.0 → 6.10.2

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 (119) hide show
  1. package/dist/features/customStage/customStageGridEntities.lua +2 -2
  2. package/dist/features/customStage/exports.d.ts.map +1 -1
  3. package/dist/features/customStage/exports.lua +5 -4
  4. package/dist/features/customStage/init.d.ts.map +1 -1
  5. package/dist/features/customStage/init.lua +12 -3
  6. package/dist/features/customStage/streakText.d.ts +4 -2
  7. package/dist/features/customStage/streakText.d.ts.map +1 -1
  8. package/dist/features/customStage/streakText.lua +216 -15
  9. package/dist/features/customStage/v.d.ts +4 -2
  10. package/dist/features/customStage/v.d.ts.map +1 -1
  11. package/dist/features/customStage/v.lua +9 -1
  12. package/dist/features/customStage/versusScreen.d.ts +1 -1
  13. package/dist/features/customStage/versusScreen.d.ts.map +1 -1
  14. package/dist/features/customStage/versusScreen.lua +2 -5
  15. package/dist/features/extraConsoleCommands/init.lua +1 -0
  16. package/dist/features/extraConsoleCommands/listCommands.d.ts +8 -0
  17. package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
  18. package/dist/features/extraConsoleCommands/listCommands.lua +13 -0
  19. package/dist/features/saveDataManager/exports.d.ts.map +1 -1
  20. package/dist/features/saveDataManager/exports.lua +2 -4
  21. package/dist/features/saveDataManager/load.d.ts +1 -1
  22. package/dist/features/saveDataManager/load.d.ts.map +1 -1
  23. package/dist/features/saveDataManager/main.d.ts.map +1 -1
  24. package/dist/features/saveDataManager/main.lua +0 -1
  25. package/dist/features/saveDataManager/maps.d.ts +3 -3
  26. package/dist/features/saveDataManager/maps.d.ts.map +1 -1
  27. package/dist/features/saveDataManager/maps.lua +1 -4
  28. package/dist/features/saveDataManager/merge.d.ts +2 -2
  29. package/dist/features/saveDataManager/merge.d.ts.map +1 -1
  30. package/dist/features/saveDataManager/merge.lua +3 -3
  31. package/dist/features/saveDataManager/save.d.ts +1 -1
  32. package/dist/features/saveDataManager/save.d.ts.map +1 -1
  33. package/dist/features/saveDataManager/save.lua +1 -2
  34. package/dist/features/saveDataManager/{serializationBrand.d.ts → serializationBrands.d.ts} +1 -1
  35. package/dist/features/saveDataManager/serializationBrands.d.ts.map +1 -0
  36. package/dist/features/saveDataManager/{serializationBrand.lua → serializationBrands.lua} +0 -0
  37. package/dist/functions/array.d.ts.map +1 -1
  38. package/dist/functions/color.d.ts +1 -1
  39. package/dist/functions/color.d.ts.map +1 -1
  40. package/dist/functions/deepCopy.d.ts +1 -1
  41. package/dist/functions/deepCopy.lua +73 -37
  42. package/dist/functions/deepCopyTests.d.ts.map +1 -1
  43. package/dist/functions/deepCopyTests.lua +85 -18
  44. package/dist/functions/entities.d.ts +1 -1
  45. package/dist/functions/entities.d.ts.map +1 -1
  46. package/dist/functions/input.d.ts.map +1 -1
  47. package/dist/functions/input.lua +8 -10
  48. package/dist/functions/jsonHelpers.d.ts +1 -1
  49. package/dist/functions/jsonHelpers.d.ts.map +1 -1
  50. package/dist/functions/kColor.d.ts +1 -1
  51. package/dist/functions/kColor.d.ts.map +1 -1
  52. package/dist/functions/log.d.ts +1 -1
  53. package/dist/functions/log.d.ts.map +1 -1
  54. package/dist/functions/log.lua +3 -1
  55. package/dist/functions/mergeTests.d.ts +2 -2
  56. package/dist/functions/mergeTests.lua +2 -6
  57. package/dist/functions/playerIndex.d.ts +1 -1
  58. package/dist/functions/playerIndex.lua +1 -1
  59. package/dist/functions/rng.d.ts +1 -1
  60. package/dist/functions/rng.d.ts.map +1 -1
  61. package/dist/functions/table.d.ts +9 -9
  62. package/dist/functions/table.d.ts.map +1 -1
  63. package/dist/functions/table.lua +23 -21
  64. package/dist/functions/types.d.ts +1 -1
  65. package/dist/functions/types.d.ts.map +1 -1
  66. package/dist/functions/vector.d.ts +1 -1
  67. package/dist/functions/vector.d.ts.map +1 -1
  68. package/dist/interfaces/SaveData.d.ts +1 -1
  69. package/dist/interfaces/private/TSTLClassMetatable.d.ts +1 -1
  70. package/dist/interfaces/private/TSTLClassMetatable.d.ts.map +1 -1
  71. package/dist/lualib_bundle.lua +38 -7
  72. package/dist/types/PlayerIndex.d.ts +3 -2
  73. package/dist/types/PlayerIndex.d.ts.map +1 -1
  74. package/dist/types/private/IsaacAPIClass.d.ts +1 -1
  75. package/dist/types/private/IsaacAPIClass.d.ts.map +1 -1
  76. package/dist/types/private/SerializedIsaacAPIClass.d.ts +1 -1
  77. package/dist/types/private/SerializedIsaacAPIClass.d.ts.map +1 -1
  78. package/dist/types/private/TSTLClass.d.ts +1 -1
  79. package/dist/types/private/TSTLClass.d.ts.map +1 -1
  80. package/package.json +2 -2
  81. package/src/features/customStage/customStageGridEntities.ts +4 -4
  82. package/src/features/customStage/exports.ts +5 -3
  83. package/src/features/customStage/init.ts +19 -7
  84. package/src/features/customStage/streakText.ts +284 -19
  85. package/src/features/customStage/v.ts +6 -1
  86. package/src/features/customStage/versusScreen.ts +2 -5
  87. package/src/features/extraConsoleCommands/init.ts +1 -0
  88. package/src/features/extraConsoleCommands/listCommands.ts +14 -0
  89. package/src/features/saveDataManager/exports.ts +3 -8
  90. package/src/features/saveDataManager/load.ts +2 -3
  91. package/src/features/saveDataManager/main.ts +4 -5
  92. package/src/features/saveDataManager/maps.ts +3 -3
  93. package/src/features/saveDataManager/merge.ts +11 -11
  94. package/src/features/saveDataManager/save.ts +6 -6
  95. package/src/features/saveDataManager/{serializationBrand.ts → serializationBrands.ts} +0 -0
  96. package/src/functions/array.ts +2 -4
  97. package/src/functions/color.ts +3 -3
  98. package/src/functions/deepCopy.ts +95 -41
  99. package/src/functions/deepCopyTests.ts +161 -28
  100. package/src/functions/entities.ts +7 -7
  101. package/src/functions/input.ts +7 -8
  102. package/src/functions/isaacAPIClass.ts +3 -3
  103. package/src/functions/jsonHelpers.ts +3 -3
  104. package/src/functions/kColor.ts +3 -3
  105. package/src/functions/log.ts +7 -4
  106. package/src/functions/mergeTests.ts +24 -32
  107. package/src/functions/playerIndex.ts +1 -1
  108. package/src/functions/rng.ts +3 -3
  109. package/src/functions/table.ts +25 -23
  110. package/src/functions/tstlClass.ts +1 -1
  111. package/src/functions/types.ts +3 -1
  112. package/src/functions/vector.ts +3 -3
  113. package/src/interfaces/SaveData.ts +1 -1
  114. package/src/interfaces/private/TSTLClassMetatable.ts +1 -1
  115. package/src/types/PlayerIndex.ts +3 -2
  116. package/src/types/private/IsaacAPIClass.ts +1 -1
  117. package/src/types/private/SerializedIsaacAPIClass.ts +1 -1
  118. package/src/types/private/TSTLClass.ts +1 -1
  119. package/dist/features/saveDataManager/serializationBrand.d.ts.map +0 -1
@@ -8,14 +8,12 @@ local ButtonAction = ____isaac_2Dtypescript_2Ddefinitions.ButtonAction
8
8
  local Controller = ____isaac_2Dtypescript_2Ddefinitions.Controller
9
9
  local ControllerIndex = ____isaac_2Dtypescript_2Ddefinitions.ControllerIndex
10
10
  local Keyboard = ____isaac_2Dtypescript_2Ddefinitions.Keyboard
11
- local ____constants = require("constants")
12
- local MAX_NUM_INPUTS = ____constants.MAX_NUM_INPUTS
11
+ local ____enums = require("functions.enums")
12
+ local getEnumValues = ____enums.getEnumValues
13
13
  local ____set = require("functions.set")
14
14
  local copySet = ____set.copySet
15
15
  local ____string = require("functions.string")
16
16
  local trimPrefix = ____string.trimPrefix
17
- local ____utils = require("functions.utils")
18
- local erange = ____utils.erange
19
17
  local MODIFIER_KEYS = {
20
18
  Keyboard.LEFT_SHIFT,
21
19
  Keyboard.LEFT_CONTROL,
@@ -46,19 +44,19 @@ function ____exports.getShootActions(self)
46
44
  end
47
45
  --- Iterates over all inputs to determine if a particular button is pressed (i.e. held down).
48
46
  function ____exports.isActionPressedOnAnyInput(self, buttonAction)
49
- local validInputs = erange(nil, MAX_NUM_INPUTS)
47
+ local controllerIndexes = getEnumValues(nil, ControllerIndex)
50
48
  return __TS__ArraySome(
51
- validInputs,
52
- function(____, input) return Input.IsActionPressed(buttonAction, input) end
49
+ controllerIndexes,
50
+ function(____, controllerIndex) return Input.IsActionPressed(buttonAction, controllerIndex) end
53
51
  )
54
52
  end
55
53
  --- Iterates over all inputs to determine if a particular button is triggered (i.e. held down and
56
54
  -- then released).
57
55
  function ____exports.isActionTriggeredOnAnyInput(self, buttonAction)
58
- local validInputs = erange(nil, MAX_NUM_INPUTS)
56
+ local controllerIndexes = getEnumValues(nil, ControllerIndex)
59
57
  return __TS__ArraySome(
60
- validInputs,
61
- function(____, input) return Input.IsActionTriggered(buttonAction, input) end
58
+ controllerIndexes,
59
+ function(____, controllerIndex) return Input.IsActionTriggered(buttonAction, controllerIndex) end
62
60
  )
63
61
  end
64
62
  --- Helper function to see if a particular keyboard key is being pressed down by the player.
@@ -7,7 +7,7 @@
7
7
  * continue in cases where users have no current save data or have manually removed their existing
8
8
  * save data.)
9
9
  */
10
- export declare function jsonDecode(jsonString: string): LuaTable<AnyNotNil, unknown>;
10
+ export declare function jsonDecode(jsonString: string): LuaMap<AnyNotNil, unknown>;
11
11
  /**
12
12
  * Converts a Lua table to a JSON string.
13
13
  *
@@ -1 +1 @@
1
- {"version":3,"file":"jsonHelpers.d.ts","sourceRoot":"","sources":["../../src/functions/jsonHelpers.ts"],"names":[],"mappings":";AAWA;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC,CAS3E;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,CAOpD"}
1
+ {"version":3,"file":"jsonHelpers.d.ts","sourceRoot":"","sources":["../../src/functions/jsonHelpers.ts"],"names":[],"mappings":";AAWA;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CASzE;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,CAOpD"}
@@ -1,7 +1,7 @@
1
1
  /// <reference types="typescript-to-lua/language-extensions" />
2
2
  /// <reference types="isaac-typescript-definitions" />
3
3
  import { SerializationType } from "../enums/SerializationType";
4
- declare type SerializedKColor = LuaTable<string, unknown> & {
4
+ declare type SerializedKColor = LuaMap<string, unknown> & {
5
5
  readonly __serializedKColorBrand: symbol;
6
6
  };
7
7
  interface CopyKColorReturn {
@@ -1 +1 @@
1
- {"version":3,"file":"kColor.d.ts","sourceRoot":"","sources":["../../src/functions/kColor.ts"],"names":[],"mappings":";;AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAK/D,aAAK,gBAAgB,GAAG,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAClD,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;CAC1C,CAAC;AAEF,UAAU,gBAAgB;IACxB,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACjC,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAChD,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CACzC;AAKD;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,CAAC,SAAS,MAAM,GAAG,gBAAgB,EACnC,CAAC,SAAS,iBAAiB,EAC3B,MAAM,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;AACxD,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,gBAAgB,EAC5D,MAAM,EAAE,CAAC,GACR,gBAAgB,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;AAoE5C,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"}
1
+ {"version":3,"file":"kColor.d.ts","sourceRoot":"","sources":["../../src/functions/kColor.ts"],"names":[],"mappings":";;AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAK/D,aAAK,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAChD,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;CAC1C,CAAC;AAEF,UAAU,gBAAgB;IACxB,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACjC,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAChD,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CACzC;AAKD;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,CAAC,SAAS,MAAM,GAAG,gBAAgB,EACnC,CAAC,SAAS,iBAAiB,EAC3B,MAAM,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;AACxD,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,gBAAgB,EAC5D,MAAM,EAAE,CAAC,GACR,gBAAgB,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;AAoE5C,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"}
@@ -79,7 +79,7 @@ export declare function logTable(this: void, luaTable: unknown, parentTables?: n
79
79
  * Helper function to print out the differences between the entries of two tables. Note that this
80
80
  * will only do a shallow comparison.
81
81
  */
82
- export declare function logTableDifferences<K, V>(this: void, table1: LuaTable<K, V>, table2: LuaTable<K, V>): void;
82
+ export declare function logTableDifferences<K, V>(this: void, table1: LuaMap<K, V>, table2: LuaMap<K, V>): void;
83
83
  /** Helper function for printing out every tear flag that is turned on. Useful when debugging. */
84
84
  export declare function logTearFlags(this: void, flags: TearFlag | BitFlags<TearFlag>): void;
85
85
  /** Helper function for printing out every use flag that is turned on. Useful when debugging. */
@@ -1 +1 @@
1
- {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/functions/log.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAEV,UAAU,EACV,UAAU,EAEV,cAAc,EAGd,cAAc,EAGd,QAAQ,EACR,OAAO,EACR,MAAM,8BAA8B,CAAC;AA+BtC;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,EAKX,kBAAkB,SAAI,GACrB,MAAM,CAiBR;AAED;;;;;GAKG;AACH,wBAAgB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAGjD;AAED,8FAA8F;AAC9F,wBAAgB,cAAc,CAC5B,IAAI,EAAE,IAAI,EACV,wBAAwB,EAAE,OAAO,EACjC,gBAAgB,CAAC,EAAE,UAAU,GAC5B,IAAI,CAuCN;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,OAAO,EACrB,oBAAoB,CAAC,EAAE,cAAc,GACpC,IAAI,CA6CN;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,SAAS,CAAC,EAAE,GAAG,IAAI,CAGvE;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAIvD;AAED,mGAAmG;AACnG,wBAAgB,cAAc,CAC5B,IAAI,EAAE,IAAI,EACV,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ACtC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EACpB,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GACnB,IAAI,CA0BN;AAED,iGAAiG;AACjG,wBAAgB,YAAY,CAC1B,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,GACnC,IAAI,CAEN;AAED,gGAAgG;AAChG,wBAAgB,WAAW,CACzB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,GACjC,IAAI,CAEN;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,CAsB/D;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,UAAQ,GAAG,IAAI,CAGzE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAkC5C"}
@@ -517,6 +517,7 @@ function ____exports.logTable(luaTable, parentTables)
517
517
  end)(nil)
518
518
  return
519
519
  end
520
+ local numElements = 0
520
521
  iterateTableInOrder(
521
522
  nil,
522
523
  luaTable,
@@ -529,10 +530,11 @@ function ____exports.logTable(luaTable, parentTables)
529
530
  ____exports.logTable(value, parentTables + 1)
530
531
  end
531
532
  end
533
+ numElements = numElements + 1
532
534
  end
533
535
  );
534
536
  (function()
535
- ____exports.log((indentation .. "The size of the table was: ") .. tostring(#luaTable))
537
+ ____exports.log((indentation .. "The size of the table was: ") .. tostring(numElements))
536
538
  end)(nil)
537
539
  end
538
540
  --- Helper function to print out the differences between the entries of two tables. Note that this
@@ -1,6 +1,6 @@
1
1
  /**
2
- * Run the suite of tests that prove that the "merge" helper function works properly. (This function
3
- * is not exported but is used internally in the save data manager.)
2
+ * Run the suite of tests that prove that the "merge" function works properly. (This function is not
3
+ * exported but is used internally in the save data manager.)
4
4
  *
5
5
  * This function is only useful if you are troubleshooting the save data manager.
6
6
  */
@@ -149,7 +149,6 @@ function oldTableHasFilledDefaultMap(self)
149
149
  end
150
150
  end
151
151
  function oldTableHasVector(self)
152
- log("Starting test: oldTableHasVector")
153
152
  local key = "foo"
154
153
  local x = 50
155
154
  local y = 60
@@ -173,7 +172,6 @@ function oldTableHasVector(self)
173
172
  end
174
173
  end
175
174
  function oldTableHasVectorSerialized(self)
176
- log("Starting test: oldTableHasVectorSerialized")
177
175
  local key = "foo"
178
176
  local x = 50
179
177
  local y = 60
@@ -198,7 +196,6 @@ function oldTableHasVectorSerialized(self)
198
196
  end
199
197
  end
200
198
  function oldTableHasRNG(self)
201
- log("Starting test: oldTableHasRNG")
202
199
  local key = "foo"
203
200
  local seed = 50
204
201
  local newValue = newRNG(nil, seed)
@@ -219,7 +216,6 @@ function oldTableHasRNG(self)
219
216
  end
220
217
  end
221
218
  function oldTableHasRNGSerialized(self)
222
- log("Starting test: oldTableHasRNGSerialized")
223
219
  local key = "foo"
224
220
  local seed = 50
225
221
  local newValue = newRNG(nil, seed)
@@ -240,8 +236,8 @@ function oldTableHasRNGSerialized(self)
240
236
  error("The old table's seed not match: " .. tostring(seed))
241
237
  end
242
238
  end
243
- --- Run the suite of tests that prove that the "merge" helper function works properly. (This function
244
- -- is not exported but is used internally in the save data manager.)
239
+ --- Run the suite of tests that prove that the "merge" function works properly. (This function is not
240
+ -- exported but is used internally in the save data manager.)
245
241
  --
246
242
  -- This function is only useful if you are troubleshooting the save data manager.
247
243
  function ____exports.runMergeTests(self)
@@ -40,7 +40,7 @@ export declare function getPlayerFromIndex(playerIndex: PlayerIndex): EntityPlay
40
40
  * this is not desired, pass true for the `differentiateForgottenAndSoul` argument, and the RNG of
41
41
  * Spoon Bender (3) will be used for The Soul.
42
42
  *
43
- * Also note that this index doesn't work in the `POST_PLAYER_INIT` function for players 2 through
43
+ * Also note that this index does not work in the `POST_PLAYER_INIT` function for players 2 through
44
44
  * 4. With that said, in almost all cases, you should be lazy-initializing your data structures in
45
45
  * other callbacks, so this should not be an issue.
46
46
  */
@@ -56,7 +56,7 @@ end
56
56
  -- this is not desired, pass true for the `differentiateForgottenAndSoul` argument, and the RNG of
57
57
  -- Spoon Bender (3) will be used for The Soul.
58
58
  --
59
- -- Also note that this index doesn't work in the `POST_PLAYER_INIT` function for players 2 through
59
+ -- Also note that this index does not work in the `POST_PLAYER_INIT` function for players 2 through
60
60
  -- 4. With that said, in almost all cases, you should be lazy-initializing your data structures in
61
61
  -- other callbacks, so this should not be an issue.
62
62
  function ____exports.getPlayerIndex(self, player, differentiateForgottenAndSoul)
@@ -2,7 +2,7 @@
2
2
  /// <reference types="isaac-typescript-definitions" />
3
3
  /// <reference types="isaac-typescript-definitions" />
4
4
  import { SerializationType } from "../enums/SerializationType";
5
- declare type SerializedRNG = LuaTable<string, unknown> & {
5
+ declare type SerializedRNG = LuaMap<string, unknown> & {
6
6
  readonly __serializedRNGBrand: symbol;
7
7
  };
8
8
  interface CopyRNGReturn {
@@ -1 +1 @@
1
- {"version":3,"file":"rng.d.ts","sourceRoot":"","sources":["../../src/functions/rng.ts"],"names":[],"mappings":";;;AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAK/D,aAAK,aAAa,GAAG,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAC/C,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;CACvC,CAAC;AAEF,UAAU,aAAa;IACrB,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC;IAC9B,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,aAAa,CAAC;IAC7C,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,GAAG,CAAC;CACtC;AAYD;;;;;;GAMG;AACH,wBAAgB,OAAO,CACrB,CAAC,SAAS,GAAG,GAAG,aAAa,EAC7B,CAAC,SAAS,iBAAiB,EA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,iBAAiB,CAAC,SAAS,CAAC,EAAE,aAAa,CAAC;IAC7C,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,GAAG,CAAC;CACtC;AAYD;;;;;;GAMG;AACH,wBAAgB,OAAO,CACrB,CAAC,SAAS,GAAG,GAAG,aAAa,EAC7B,CAAC,SAAS,iBAAiB,EAC3B,GAAG,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;AAClD,wBAAgB,OAAO,CAAC,CAAC,SAAS,GAAG,GAAG,aAAa,EACnD,GAAG,EAAE,CAAC,GACL,aAAa,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;AAiDzC;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAIpC;AAED,2EAA2E;AAC3E,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,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"}
@@ -1,32 +1,32 @@
1
1
  /// <reference types="typescript-to-lua/language-extensions" />
2
2
  /**
3
- * In a Map, you can use the `clear` method to delete every element. However, in a LuaTable, the
3
+ * In a `Map`, you can use the `clear` method to delete every element. However, in a `LuaMap`, the
4
4
  * `clear` method does not exist. Use this helper function as a drop-in replacement for this.
5
5
  */
6
- export declare function clearTable(luaTable: LuaTable): void;
6
+ export declare function clearTable(luaMap: LuaMap): void;
7
7
  /** Helper function to copy specific values from a object to a table. */
8
- export declare function copyValuesToTable(object: unknown, keys: string[], luaTable: LuaTable<string, unknown>): void;
8
+ export declare function copyValuesToTable(object: unknown, keys: string[], luaMap: LuaMap<string, unknown>): void;
9
9
  /**
10
10
  * Helper function to safely get boolean values from a Lua table. Will throw an error if the
11
11
  * specific value does not exist on the table.
12
12
  *
13
13
  * This function is variadic, meaning that you can specify N arguments to get N values.
14
14
  */
15
- export declare function getBooleansFromTable(luaTable: LuaTable<string, unknown>, objectName: string, ...keys: string[]): boolean[];
15
+ export declare function getBooleansFromTable(luaMap: LuaMap<string, unknown>, objectName: string, ...keys: string[]): boolean[];
16
16
  /**
17
17
  * Helper function to safely get number values from a Lua table. Will throw an error if the specific
18
18
  * value does not exist on the table or if it cannot be converted to a number.
19
19
  *
20
20
  * This function is variadic, meaning that you can specify N arguments to get N values.
21
21
  */
22
- export declare function getNumbersFromTable(luaTable: LuaTable<string, unknown>, objectName: string, ...keys: string[]): number[];
22
+ export declare function getNumbersFromTable(luaMap: LuaMap<string, unknown>, objectName: string, ...keys: string[]): number[];
23
23
  /**
24
24
  * Helper function to safely get string values from a Lua table. Will throw an error if the specific
25
25
  * value does not exist on the table.
26
26
  *
27
27
  * This function is variadic, meaning that you can specify N arguments to get N values.
28
28
  */
29
- export declare function getStringsFromTable(luaTable: LuaTable<string, unknown>, objectName: string, ...keys: string[]): string[];
29
+ export declare function getStringsFromTable(luaMap: LuaMap<string, unknown>, objectName: string, ...keys: string[]): string[];
30
30
  /**
31
31
  * Helper function to iterate over a table deterministically. This is useful because by default, the
32
32
  * `pairs` function will return the keys of a Lua table in a random order.
@@ -36,18 +36,18 @@ export declare function getStringsFromTable(luaTable: LuaTable<string, unknown>,
36
36
  * This function will only work on tables that have number keys or string keys. It will throw a
37
37
  * run-time error if it encounters a key of another type.
38
38
  *
39
- * @param luaTable The table to iterate over.
39
+ * @param luaMap The table to iterate over.
40
40
  * @param func The function to run for each iteration.
41
41
  * @param inOrder Optional. Whether to iterate in order. True by default. You can dynamically set to
42
42
  * false in situations where iterating randomly would not matter and you need the
43
43
  * extra performance.
44
44
  */
45
- export declare function iterateTableInOrder<K, V>(luaTable: LuaTable<K, V>, func: (key: K, value: V) => void, inOrder?: boolean): void;
45
+ export declare function iterateTableInOrder<K, V>(luaMap: LuaMap<K, V>, func: (key: K, value: V) => void, inOrder?: boolean): void;
46
46
  /**
47
47
  * Helper function to check if a Lua table has all of the provided keys.
48
48
  *
49
49
  * This function is variadic, meaning that you can specify as many arguments as you want to check
50
50
  * for.
51
51
  */
52
- export declare function tableHasKeys(luaTable: LuaTable<AnyNotNil, unknown>, ...keys: string[]): boolean;
52
+ export declare function tableHasKeys(luaMap: LuaMap<AnyNotNil, unknown>, ...keys: string[]): boolean;
53
53
  //# sourceMappingURL=table.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/functions/table.ts"],"names":[],"mappings":";AAEA;;;GAGG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAInD;AAED,wEAAwE;AACxE,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,MAAM,EAAE,EACd,QAAQ,EAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,GAClC,IAAI,CAON;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,UAAU,EAAE,MAAM,EAClB,GAAG,IAAI,EAAE,MAAM,EAAE,GAChB,OAAO,EAAE,CAoBX;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,QAAQ,CAAC,MAA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AM,EAAE,OAAO,CAAC,EAC/B,UAAU,EAAE,MAAM,EAClB,GAAG,IAAI,EAAE,MAAM,EAAE,GAChB,MAAM,EAAE,CA4BV;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,UAAU,EAAE,MAAM,EAClB,GAAG,IAAI,EAAE,MAAM,EAAE,GAChB,MAAM,EAAE,CAmBV;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,CAAC,EACtC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EACpB,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,IAAI,EAChC,OAAO,UAAO,GACb,IAAI,CA6BN;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,EAClC,GAAG,IAAI,EAAE,MAAM,EAAE,GAChB,OAAO,CAET"}
@@ -8,30 +8,30 @@ local ____types = require("functions.types")
8
8
  local isBoolean = ____types.isBoolean
9
9
  local isNumber = ____types.isNumber
10
10
  local isString = ____types.isString
11
- --- In a Map, you can use the `clear` method to delete every element. However, in a LuaTable, the
11
+ --- In a `Map`, you can use the `clear` method to delete every element. However, in a `LuaMap`, the
12
12
  -- `clear` method does not exist. Use this helper function as a drop-in replacement for this.
13
- function ____exports.clearTable(self, luaTable)
14
- for key in pairs(luaTable) do
15
- luaTable[key] = nil
13
+ function ____exports.clearTable(self, luaMap)
14
+ for key in pairs(luaMap) do
15
+ luaMap[key] = nil
16
16
  end
17
17
  end
18
18
  --- Helper function to copy specific values from a object to a table.
19
- function ____exports.copyValuesToTable(self, object, keys, luaTable)
19
+ function ____exports.copyValuesToTable(self, object, keys, luaMap)
20
20
  local otherTable = object
21
21
  for ____, key in ipairs(keys) do
22
22
  local value = otherTable[key]
23
- luaTable[key] = value
23
+ luaMap[key] = value
24
24
  end
25
25
  end
26
26
  --- Helper function to safely get boolean values from a Lua table. Will throw an error if the
27
27
  -- specific value does not exist on the table.
28
28
  --
29
29
  -- This function is variadic, meaning that you can specify N arguments to get N values.
30
- function ____exports.getBooleansFromTable(self, luaTable, objectName, ...)
30
+ function ____exports.getBooleansFromTable(self, luaMap, objectName, ...)
31
31
  local keys = {...}
32
32
  local booleans = {}
33
33
  for ____, key in ipairs(keys) do
34
- local value = luaTable[key]
34
+ local value = luaMap[key]
35
35
  if value == nil then
36
36
  error(((("Failed to find a value for \"" .. key) .. "\" in a table representing a \"") .. objectName) .. "\" object.")
37
37
  end
@@ -47,11 +47,11 @@ end
47
47
  -- value does not exist on the table or if it cannot be converted to a number.
48
48
  --
49
49
  -- This function is variadic, meaning that you can specify N arguments to get N values.
50
- function ____exports.getNumbersFromTable(self, luaTable, objectName, ...)
50
+ function ____exports.getNumbersFromTable(self, luaMap, objectName, ...)
51
51
  local keys = {...}
52
52
  local numbers = {}
53
53
  for ____, key in ipairs(keys) do
54
- local value = luaTable[key]
54
+ local value = luaMap[key]
55
55
  if value == nil then
56
56
  error(((("Failed to find a value for \"" .. key) .. "\" in a table representing a \"") .. objectName) .. "\" object.")
57
57
  end
@@ -73,11 +73,11 @@ end
73
73
  -- value does not exist on the table.
74
74
  --
75
75
  -- This function is variadic, meaning that you can specify N arguments to get N values.
76
- function ____exports.getStringsFromTable(self, luaTable, objectName, ...)
76
+ function ____exports.getStringsFromTable(self, luaMap, objectName, ...)
77
77
  local keys = {...}
78
78
  local strings = {}
79
79
  for ____, key in ipairs(keys) do
80
- local value = luaTable[key]
80
+ local value = luaMap[key]
81
81
  if value == nil then
82
82
  error(((("Failed to find a value for \"" .. key) .. "\" in a table representing a \"") .. objectName) .. "\" object.")
83
83
  end
@@ -98,22 +98,22 @@ end
98
98
  -- This function will only work on tables that have number keys or string keys. It will throw a
99
99
  -- run-time error if it encounters a key of another type.
100
100
  --
101
- -- @param luaTable The table to iterate over.
101
+ -- @param luaMap The table to iterate over.
102
102
  -- @param func The function to run for each iteration.
103
103
  -- @param inOrder Optional. Whether to iterate in order. True by default. You can dynamically set to
104
104
  -- false in situations where iterating randomly would not matter and you need the
105
105
  -- extra performance.
106
- function ____exports.iterateTableInOrder(self, luaTable, func, inOrder)
106
+ function ____exports.iterateTableInOrder(self, luaMap, func, inOrder)
107
107
  if inOrder == nil then
108
108
  inOrder = true
109
109
  end
110
110
  if not inOrder then
111
- for key, value in pairs(luaTable) do
111
+ for key, value in pairs(luaMap) do
112
112
  func(nil, key, value)
113
113
  end
114
114
  return
115
115
  end
116
- local keys = __TS__ObjectKeys(luaTable)
116
+ local keys = __TS__ObjectKeys(luaMap)
117
117
  local hasAllNumberKeys = __TS__ArrayEvery(
118
118
  keys,
119
119
  function(____, key) return isNumber(nil, key) end
@@ -123,7 +123,7 @@ function ____exports.iterateTableInOrder(self, luaTable, func, inOrder)
123
123
  function(____, key) return isString(nil, key) end
124
124
  )
125
125
  if not hasAllNumberKeys and not hasAllStringKeys then
126
- for key, value in pairs(luaTable) do
126
+ for key, value in pairs(luaMap) do
127
127
  func(nil, key, value)
128
128
  end
129
129
  return
@@ -131,19 +131,21 @@ function ____exports.iterateTableInOrder(self, luaTable, func, inOrder)
131
131
  __TS__ArraySort(keys)
132
132
  for ____, key in ipairs(keys) do
133
133
  local keyIndex = key
134
- local value = luaTable[keyIndex]
135
- func(nil, keyIndex, value)
134
+ local value = luaMap[keyIndex]
135
+ if value ~= nil then
136
+ func(nil, keyIndex, value)
137
+ end
136
138
  end
137
139
  end
138
140
  --- Helper function to check if a Lua table has all of the provided keys.
139
141
  --
140
142
  -- This function is variadic, meaning that you can specify as many arguments as you want to check
141
143
  -- for.
142
- function ____exports.tableHasKeys(self, luaTable, ...)
144
+ function ____exports.tableHasKeys(self, luaMap, ...)
143
145
  local keys = {...}
144
146
  return __TS__ArrayEvery(
145
147
  keys,
146
- function(____, key) return luaTable[key] ~= nil end
148
+ function(____, key) return luaMap[key] ~= nil end
147
149
  )
148
150
  end
149
151
  return ____exports
@@ -6,6 +6,6 @@ export declare function isNumber(variable: unknown): variable is number;
6
6
  /** Helper function to detect if a variable is a boolean, number, or string. */
7
7
  export declare function isPrimitive(variable: unknown): variable is boolean | number | string;
8
8
  export declare function isString(variable: unknown): variable is string;
9
- export declare function isTable(variable: unknown): variable is LuaTable;
9
+ export declare function isTable(variable: unknown): variable is LuaMap<AnyNotNil, unknown>;
10
10
  export declare function isUserdata(variable: unknown): variable is LuaUserdata;
11
11
  //# sourceMappingURL=types.d.ts.map
@@ -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,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,QAAQ,CAE/D;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,WAAW,CAErE"}
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,7 +1,7 @@
1
1
  /// <reference types="typescript-to-lua/language-extensions" />
2
2
  import { Direction } from "isaac-typescript-definitions";
3
3
  import { SerializationType } from "../enums/SerializationType";
4
- declare type SerializedVector = LuaTable<string, unknown> & {
4
+ declare type SerializedVector = LuaMap<string, unknown> & {
5
5
  readonly __serializedVectorBrand: symbol;
6
6
  };
7
7
  interface CopyVectorReturn {
@@ -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;AAEzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAM/D,aAAK,gBAAgB,GAAG,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAClD,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;CAC1C,CAAC;AAEF,UAAU,gBAAgB;IACxB,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACjC,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAChD,CAAC,iBAAiB,CAAC,WAAW,CAAC,E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ChD,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CACzC;AAKD;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,CAAC,SAAS,MAAM,GAAG,gBAAgB,EACnC,CAAC,SAAS,iBAAiB,EAC3B,MAAM,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;AACxD,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,gBAAgB,EAC5D,MAAM,EAAE,CAAC,GACR,gBAAgB,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;AA0D5C;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,OAAO,GACd,MAAM,IAAI,gBAAgB,CAM5B;AAED,8EAA8E;AAC9E,wBAAgB,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,MAAM,CAE1D;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"}
@@ -15,7 +15,7 @@
15
15
  * - `Set`
16
16
  * - serializable Isaac API classes (such as `Color`)
17
17
  * - TSTL classes (i.e. classes that you made yourself)
18
- * - sub-objects or a `LuaTable` that contains the above values
18
+ * - sub-objects or a `LuaMap` that contains the above values
19
19
  *
20
20
  * (Unfortunately, it is not possible to create a recursive type definition that matches these
21
21
  * properties. This means that the TypeScript compiler will not be able to validate that you are
@@ -7,7 +7,7 @@ export interface TSTLClassMetatable {
7
7
  __index: unknown;
8
8
  constructor: {
9
9
  name: string;
10
- prototype: LuaMetatable<LuaTable<AnyNotNil, unknown>>;
10
+ prototype: LuaMetatable<LuaMap<AnyNotNil, unknown>>;
11
11
  };
12
12
  }
13
13
  //# sourceMappingURL=TSTLClassMetatable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TSTLClassMetatable.d.ts","sourceRoot":"","sources":["../../../src/interfaces/private/TSTLClassMetatable.ts"],"names":[],"mappings":";;;;AAAA,MAAM,WAAW,kBAAkB;IACjC,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,YAAY,CAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;KACvD,CAAC;CACH"}
1
+ {"version":3,"file":"TSTLClassMetatable.d.ts","sourceRoot":"","sources":["../../../src/interfaces/private/TSTLClassMetatable.ts"],"names":[],"mappings":";;;;AAAA,MAAM,WAAW,kBAAkB;IACjC,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;KACrD,CAAC;CACH"}
@@ -345,7 +345,11 @@ end
345
345
 
346
346
  local function __TS__ArraySlice(self, first, last)
347
347
  local len = #self
348
- first = first or 0
348
+ local ____first_0 = first
349
+ if ____first_0 == nil then
350
+ ____first_0 = 0
351
+ end
352
+ first = ____first_0
349
353
  if first < 0 then
350
354
  first = len + first
351
355
  if first < 0 then
@@ -356,7 +360,11 @@ local function __TS__ArraySlice(self, first, last)
356
360
  first = len
357
361
  end
358
362
  end
359
- last = last or len
363
+ local ____last_1 = last
364
+ if ____last_1 == nil then
365
+ ____last_1 = len
366
+ end
367
+ last = ____last_1
360
368
  if last < 0 then
361
369
  last = len + last
362
370
  if last < 0 then
@@ -412,7 +420,11 @@ local function __TS__ArraySplice(self, ...)
412
420
  elseif actualArgumentCount == 1 then
413
421
  actualDeleteCount = len - start
414
422
  else
415
- actualDeleteCount = deleteCount or 0
423
+ local ____deleteCount_0 = deleteCount
424
+ if ____deleteCount_0 == nil then
425
+ ____deleteCount_0 = 0
426
+ end
427
+ actualDeleteCount = ____deleteCount_0
416
428
  if actualDeleteCount < 0 then
417
429
  actualDeleteCount = 0
418
430
  end
@@ -1175,7 +1187,14 @@ do
1175
1187
  local args = {...}
1176
1188
  local argsLength = select("#", ...)
1177
1189
  return {
1178
- ____coroutine = coroutine.create(function() return fn((unpack or table.unpack)(args, 1, argsLength)) end),
1190
+ ____coroutine = coroutine.create(function()
1191
+ local ____fn_1 = fn
1192
+ local ____unpack_0 = unpack
1193
+ if ____unpack_0 == nil then
1194
+ ____unpack_0 = table.unpack
1195
+ end
1196
+ return ____fn_1(____unpack_0(args, 1, argsLength))
1197
+ end),
1179
1198
  [Symbol.iterator] = generatorIterator,
1180
1199
  next = generatorNext
1181
1200
  }
@@ -1553,7 +1572,11 @@ local function __TS__ParseFloat(numberString)
1553
1572
  return ____temp_0
1554
1573
  end
1555
1574
  local number = tonumber(string.match(numberString, "^%s*(-?%d+%.?%d*)"))
1556
- return number or 0 / 0
1575
+ local ____number_1 = number
1576
+ if ____number_1 == nil then
1577
+ ____number_1 = 0 / 0
1578
+ end
1579
+ return ____number_1
1557
1580
  end
1558
1581
 
1559
1582
  local function __TS__StringSubstr(self, from, length)
@@ -1947,7 +1970,11 @@ local function __TS__SparseArrayPush(sparseArray, ...)
1947
1970
  end
1948
1971
 
1949
1972
  local function __TS__SparseArraySpread(sparseArray)
1950
- local _unpack = unpack or table.unpack
1973
+ local ____unpack_0 = unpack
1974
+ if ____unpack_0 == nil then
1975
+ ____unpack_0 = table.unpack
1976
+ end
1977
+ local _unpack = ____unpack_0
1951
1978
  return _unpack(sparseArray, 1, sparseArray.sparseLength)
1952
1979
  end
1953
1980
 
@@ -2127,7 +2154,11 @@ local function __TS__StringCharCodeAt(self, index)
2127
2154
  if index < 0 then
2128
2155
  return 0 / 0
2129
2156
  end
2130
- return string.byte(self, index + 1) or 0 / 0
2157
+ local ____string_byte_result_0 = string.byte(self, index + 1)
2158
+ if ____string_byte_result_0 == nil then
2159
+ ____string_byte_result_0 = 0 / 0
2160
+ end
2161
+ return ____string_byte_result_0
2131
2162
  end
2132
2163
 
2133
2164
  local function __TS__StringEndsWith(self, searchString, endPosition)
@@ -1,7 +1,8 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
2
  /**
3
- * PlayerIndex is a specific type of string; see the documentation for the `getPlayerIndex`
4
- * function. Mods can signify that data structures handle `EntityPlayer` by using this type.
3
+ * PlayerIndex is a specific type of number that represents a unique identifier for a player. Mods
4
+ * can signify that data structures handle `EntityPlayer` by using this type. For more information,
5
+ * see the documentation for the `getPlayerIndex` function.
5
6
  *
6
7
  * For example:
7
8
  *
@@ -1 +1 @@
1
- {"version":3,"file":"PlayerIndex.d.ts","sourceRoot":"","sources":["../../src/types/PlayerIndex.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;AACH,oBAAY,WAAW,GAAG,GAAG,GAAG;IAAE,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"PlayerIndex.d.ts","sourceRoot":"","sources":["../../src/types/PlayerIndex.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;AACH,oBAAY,WAAW,GAAG,GAAG,GAAG;IAAE,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAA;CAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /// <reference types="typescript-to-lua/language-extensions" />
2
- export declare type IsaacAPIClass = LuaTable<string, unknown> & {
2
+ export declare type IsaacAPIClass = LuaMap<string, unknown> & {
3
3
  readonly __isaacAPIClassBrand: symbol;
4
4
  };
5
5
  //# sourceMappingURL=IsaacAPIClass.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IsaacAPIClass.d.ts","sourceRoot":"","sources":["../../../src/types/private/IsaacAPIClass.ts"],"names":[],"mappings":";AAAA,oBAAY,aAAa,GAAG,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACtD,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;CACvC,CAAC"}
1
+ {"version":3,"file":"IsaacAPIClass.d.ts","sourceRoot":"","sources":["../../../src/types/private/IsaacAPIClass.ts"],"names":[],"mappings":";AAAA,oBAAY,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACpD,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;CACvC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /// <reference types="typescript-to-lua/language-extensions" />
2
- export declare type SerializedIsaacAPIClass = LuaTable<string, unknown> & {
2
+ export declare type SerializedIsaacAPIClass = LuaMap<string, unknown> & {
3
3
  readonly __serializedIsaacAPIClassBrand: symbol;
4
4
  };
5
5
  //# sourceMappingURL=SerializedIsaacAPIClass.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SerializedIsaacAPIClass.d.ts","sourceRoot":"","sources":["../../../src/types/private/SerializedIsaacAPIClass.ts"],"names":[],"mappings":";AAAA,oBAAY,uBAAuB,GAAG,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAChE,QAAQ,CAAC,8BAA8B,EAAE,MAAM,CAAC;CACjD,CAAC"}
1
+ {"version":3,"file":"SerializedIsaacAPIClass.d.ts","sourceRoot":"","sources":["../../../src/types/private/SerializedIsaacAPIClass.ts"],"names":[],"mappings":";AAAA,oBAAY,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAC9D,QAAQ,CAAC,8BAA8B,EAAE,MAAM,CAAC;CACjD,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /// <reference types="typescript-to-lua/language-extensions" />
2
- export declare type TSTLClass = LuaTable<AnyNotNil, unknown> & {
2
+ export declare type TSTLClass = LuaMap<AnyNotNil, unknown> & {
3
3
  readonly __tstlClassBrand: symbol;
4
4
  };
5
5
  //# sourceMappingURL=TSTLClass.d.ts.map