isaacscript-common 21.4.0 → 21.5.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 (72) hide show
  1. package/dist/index.d.ts +186 -3766
  2. package/dist/isaacscript-common.lua +1055 -973
  3. package/dist/src/classes/ModFeature.d.ts +2 -2
  4. package/dist/src/classes/ModFeature.d.ts.map +1 -1
  5. package/dist/src/classes/{ModUpgradedBase.d.ts → ModUpgraded.d.ts} +20 -32
  6. package/dist/src/classes/ModUpgraded.d.ts.map +1 -0
  7. package/dist/src/classes/{ModUpgradedBase.lua → ModUpgraded.lua} +30 -29
  8. package/dist/src/classes/features/other/DebugDisplay.lua +2 -2
  9. package/dist/src/classes/features/other/ExtraConsoleCommands.lua +2 -2
  10. package/dist/src/classes/features/other/extraConsoleCommands/commands.d.ts.map +1 -1
  11. package/dist/src/classes/features/other/extraConsoleCommands/commands.lua +2 -1
  12. package/dist/src/classes/private/CustomCallback.d.ts +3 -1
  13. package/dist/src/classes/private/CustomCallback.d.ts.map +1 -1
  14. package/dist/src/classes/private/CustomCallback.lua +12 -4
  15. package/dist/src/core/upgradeMod.d.ts +0 -42
  16. package/dist/src/core/upgradeMod.d.ts.map +1 -1
  17. package/dist/src/core/upgradeMod.lua +46 -21
  18. package/dist/src/features.lua +2 -2
  19. package/dist/src/functions/console.d.ts +8 -0
  20. package/dist/src/functions/console.d.ts.map +1 -0
  21. package/dist/src/functions/console.lua +14 -0
  22. package/dist/src/functions/deepCopy.d.ts.map +1 -1
  23. package/dist/src/functions/deepCopy.lua +3 -2
  24. package/dist/src/functions/enums.d.ts +28 -0
  25. package/dist/src/functions/enums.d.ts.map +1 -1
  26. package/dist/src/functions/enums.lua +27 -0
  27. package/dist/src/functions/globals.lua +3 -3
  28. package/dist/src/functions/log.d.ts +5 -0
  29. package/dist/src/functions/log.d.ts.map +1 -1
  30. package/dist/src/functions/log.lua +6 -0
  31. package/dist/src/functions/mergeTests.lua +2 -2
  32. package/dist/src/functions/modFeatures.d.ts +1 -1
  33. package/dist/src/functions/modFeatures.d.ts.map +1 -1
  34. package/dist/src/functions/sort.d.ts +38 -0
  35. package/dist/src/functions/sort.d.ts.map +1 -0
  36. package/dist/src/functions/sort.lua +95 -0
  37. package/dist/src/functions/utils.d.ts +0 -54
  38. package/dist/src/functions/utils.d.ts.map +1 -1
  39. package/dist/src/functions/utils.lua +0 -91
  40. package/dist/src/index.d.ts +3 -2
  41. package/dist/src/index.d.ts.map +1 -1
  42. package/dist/src/index.lua +17 -1
  43. package/dist/src/interfaces/private/AddCallbackParametersCustom.lua +2 -2
  44. package/dist/src/interfaces/private/ModUpgradedInterface.d.ts +4 -2
  45. package/dist/src/interfaces/private/ModUpgradedInterface.d.ts.map +1 -1
  46. package/dist/src/types/{ModUpgraded.d.ts → private/ModUpgradedWithFeatures.d.ts} +13 -9
  47. package/dist/src/types/private/ModUpgradedWithFeatures.d.ts.map +1 -0
  48. package/dist/src/types/{ModUpgraded.lua → private/ModUpgradedWithFeatures.lua} +0 -0
  49. package/package.json +1 -1
  50. package/src/classes/ModFeature.ts +5 -5
  51. package/src/classes/{ModUpgradedBase.ts → ModUpgraded.ts} +33 -37
  52. package/src/classes/features/other/DebugDisplay.ts +1 -1
  53. package/src/classes/features/other/ExtraConsoleCommands.ts +1 -1
  54. package/src/classes/features/other/extraConsoleCommands/commands.ts +2 -1
  55. package/src/classes/private/CustomCallback.ts +17 -7
  56. package/src/core/upgradeMod.ts +55 -29
  57. package/src/features.ts +1 -1
  58. package/src/functions/console.ts +15 -0
  59. package/src/functions/deepCopy.ts +3 -2
  60. package/src/functions/enums.ts +33 -0
  61. package/src/functions/globals.ts +2 -2
  62. package/src/functions/log.ts +9 -0
  63. package/src/functions/mergeTests.ts +1 -1
  64. package/src/functions/modFeatures.ts +1 -1
  65. package/src/functions/sort.ts +128 -0
  66. package/src/functions/utils.ts +0 -124
  67. package/src/index.ts +3 -2
  68. package/src/interfaces/private/AddCallbackParametersCustom.ts +1 -1
  69. package/src/interfaces/private/ModUpgradedInterface.ts +4 -2
  70. package/src/types/{ModUpgraded.ts → private/ModUpgradedWithFeatures.ts} +13 -9
  71. package/dist/src/classes/ModUpgradedBase.d.ts.map +0 -1
  72. package/dist/src/types/ModUpgraded.d.ts.map +0 -1
@@ -28,6 +28,8 @@ local isCopyableIsaacAPIClass = ____serialization.isCopyableIsaacAPIClass
28
28
  local isSerializationBrand = ____serialization.isSerializationBrand
29
29
  local isSerializedIsaacAPIClass = ____serialization.isSerializedIsaacAPIClass
30
30
  local serializeIsaacAPIClass = ____serialization.serializeIsaacAPIClass
31
+ local ____sort = require("src.functions.sort")
32
+ local sortTwoDimensionalArray = ____sort.sortTwoDimensionalArray
31
33
  local ____tstlClass = require("src.functions.tstlClass")
32
34
  local getTSTLClassName = ____tstlClass.getTSTLClassName
33
35
  local isDefaultMap = ____tstlClass.isDefaultMap
@@ -40,7 +42,6 @@ local isNumber = ____types.isNumber
40
42
  local isPrimitive = ____types.isPrimitive
41
43
  local ____utils = require("src.functions.utils")
42
44
  local getTraversalDescription = ____utils.getTraversalDescription
43
- local twoDimensionalSort = ____utils.twoDimensionalSort
44
45
  --- `deepCopy` is a semi-generic deep cloner. It will recursively copy all of the values so that none
45
46
  -- of the nested references remain.
46
47
  --
@@ -507,7 +508,7 @@ function getCopiedEntries(self, object, serializationType, traversalDescription,
507
508
  end
508
509
  end
509
510
  if SAVE_DATA_MANAGER_DEBUG then
510
- __TS__ArraySort(entries, twoDimensionalSort)
511
+ __TS__ArraySort(entries, sortTwoDimensionalArray)
511
512
  end
512
513
  local convertStringKeysToNumbers = serializationType == SerializationType.DESERIALIZE and __TS__ArraySome(
513
514
  entries,
@@ -93,4 +93,32 @@ export declare function validateCustomEnum(transpiledEnumName: string, transpile
93
93
  * This is useful to automate checking large enums for typos.
94
94
  */
95
95
  export declare function validateEnumContiguous<T>(transpiledEnumName: string, transpiledEnum: T): void;
96
+ /**
97
+ * Helper function to validate that an interface contains all of the keys of an enum. You must
98
+ * specify both generic parameters in order for this to work properly (i.e. the interface and then
99
+ * the enum).
100
+ *
101
+ * For example:
102
+ *
103
+ * ```ts
104
+ * enum MyEnum {
105
+ * Value1,
106
+ * Value2,
107
+ * Value3,
108
+ * }
109
+ *
110
+ * interface MyEnumToType {
111
+ * [MyEnum.Value1]: boolean;
112
+ * [MyEnum.Value2]: number;
113
+ * [MyEnum.Value3]: string;
114
+ * }
115
+ *
116
+ * validateInterfaceMatchesEnum<MyEnumToType, MyEnum>();
117
+ * ```
118
+ *
119
+ * This function is only meant to be used with interfaces (i.e. types that will not exist at
120
+ * run-time). If you are generating an object that will contain all of the keys of an enum, use the
121
+ * `satisfies` operator with the `Record` type instead.
122
+ */
123
+ export declare function validateInterfaceMatchesEnum<T extends Record<Enum, unknown>, Enum extends string | number>(): void;
96
124
  //# sourceMappingURL=enums.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/functions/enums.ts"],"names":[],"mappings":";;;AAKA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAC9B,cAAc,EAAE,CAAC,GAChB,KAAK,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAmBzC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,GAAG,MAAM,EAAE,CAG1D;AAED,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,GAAG,GAAG,CAGvD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAGrE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,cAA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C,CAAC,EAAE,cAAc,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAWjE;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,cAAc,EAAE,CAAC,EACjB,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,UAAU,GAAE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAM,GAC7D,CAAC,CAAC,MAAM,CAAC,CAAC,CAGZ;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAChC,kBAAkB,EAAE,MAAM,EAC1B,cAAc,EAAE,OAAO,GACtB,IAAI,CAQN;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EACtC,kBAAkB,EAAE,MAAM,EAC1B,cAAc,EAAE,CAAC,GAChB,IAAI,CAsBN;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,4BAA4B,CAE1C,CAAC,SAAS,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,EAC/B,IAAI,SAAS,MAAM,GAAG,MAAM,KACzB,IAAI,CAAG"}
@@ -174,4 +174,31 @@ function ____exports.validateEnumContiguous(self, transpiledEnumName, transpiled
174
174
  end
175
175
  end
176
176
  end
177
+ --- Helper function to validate that an interface contains all of the keys of an enum. You must
178
+ -- specify both generic parameters in order for this to work properly (i.e. the interface and then
179
+ -- the enum).
180
+ --
181
+ -- For example:
182
+ --
183
+ -- ```ts
184
+ -- enum MyEnum {
185
+ -- Value1,
186
+ -- Value2,
187
+ -- Value3,
188
+ -- }
189
+ --
190
+ -- interface MyEnumToType {
191
+ -- [MyEnum.Value1]: boolean;
192
+ -- [MyEnum.Value2]: number;
193
+ -- [MyEnum.Value3]: string;
194
+ -- }
195
+ --
196
+ -- validateInterfaceMatchesEnum<MyEnumToType, MyEnum>();
197
+ -- ```
198
+ --
199
+ -- This function is only meant to be used with interfaces (i.e. types that will not exist at
200
+ -- run-time). If you are generating an object that will contain all of the keys of an enum, use the
201
+ -- `satisfies` operator with the `Record` type instead.
202
+ function ____exports.validateInterfaceMatchesEnum(self)
203
+ end
177
204
  return ____exports
@@ -20,8 +20,8 @@ local logMiscExports = require("src.functions.logMisc")
20
20
  local ____set = require("src.functions.set")
21
21
  local addSetsToSet = ____set.addSetsToSet
22
22
  local copySet = ____set.copySet
23
- local ____utils = require("src.functions.utils")
24
- local twoDimensionalSort = ____utils.twoDimensionalSort
23
+ local ____sort = require("src.functions.sort")
24
+ local sortTwoDimensionalArray = ____sort.sortTwoDimensionalArray
25
25
  function isRacingPlusSandboxEnabled(self)
26
26
  return SandboxGetParentFunctionDescription ~= nil
27
27
  end
@@ -223,7 +223,7 @@ function ____exports.getNewGlobals(self)
223
223
  newGlobals[#newGlobals + 1] = keyValueTuple
224
224
  end
225
225
  end
226
- __TS__ArraySort(newGlobals, twoDimensionalSort)
226
+ __TS__ArraySort(newGlobals, sortTwoDimensionalArray)
227
227
  return newGlobals
228
228
  end
229
229
  function ____exports.logNewGlobals(self)
@@ -27,4 +27,9 @@ export declare function getParentFunctionDescription(this: void, levels?: number
27
27
  * line number, as shown in the above example. Default is true.
28
28
  */
29
29
  export declare function log(this: void, msg: string, includeParentFunction?: boolean): void;
30
+ /**
31
+ * Helper function to log a message to the "log.txt" file and to print it to the screen at the same
32
+ * time.
33
+ */
34
+ export declare function logAndPrint(msg: string): void;
30
35
  //# sourceMappingURL=log.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/functions/log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,IAAI,EAKV,MAAM,SAAI,GACT,MAAM,GAAG,SAAS,CAiBpB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,GAAG,CACjB,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,MAAM,EACX,qBAAqB,UAAO,GAC3B,IAAI,CASN"}
1
+ {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/functions/log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,IAAI,EAKV,MAAM,SAAI,GACT,MAAM,GAAG,SAAS,CAiBpB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,GAAG,CACjB,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,MAAM,EACX,qBAAqB,UAAO,GAC3B,IAAI,CASN;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAG7C"}
@@ -51,4 +51,10 @@ function ____exports.log(msg, includeParentFunction)
51
51
  local debugMsg = parentFunctionDescription == nil and msg or (parentFunctionDescription .. " - ") .. msg
52
52
  Isaac.DebugString(debugMsg)
53
53
  end
54
+ --- Helper function to log a message to the "log.txt" file and to print it to the screen at the same
55
+ -- time.
56
+ function ____exports.logAndPrint(self, msg)
57
+ ____exports.log(msg)
58
+ print(msg)
59
+ end
54
60
  return ____exports
@@ -9,6 +9,8 @@ local ____SerializationType = require("src.enums.SerializationType")
9
9
  local SerializationType = ____SerializationType.SerializationType
10
10
  local ____deepCopy = require("src.functions.deepCopy")
11
11
  local deepCopy = ____deepCopy.deepCopy
12
+ local ____log = require("src.functions.log")
13
+ local logAndPrint = ____log.logAndPrint
12
14
  local ____merge = require("src.functions.merge")
13
15
  local merge = ____merge.merge
14
16
  local ____rng = require("src.functions.rng")
@@ -16,8 +18,6 @@ local isRNG = ____rng.isRNG
16
18
  local newRNG = ____rng.newRNG
17
19
  local ____serialization = require("src.functions.serialization")
18
20
  local isSerializedIsaacAPIClass = ____serialization.isSerializedIsaacAPIClass
19
- local ____utils = require("src.functions.utils")
20
- local logAndPrint = ____utils.logAndPrint
21
21
  local ____vector = require("src.functions.vector")
22
22
  local isVector = ____vector.isVector
23
23
  local serializeVector = ____vector.serializeVector
@@ -1,5 +1,5 @@
1
1
  import { ModFeature } from "../classes/ModFeature";
2
- import { ModUpgraded } from "../types/ModUpgraded";
2
+ import { ModUpgraded } from "../classes/ModUpgraded";
3
3
  /**
4
4
  * Helper function to instantiate an array of mod features all at once. Use this function if your
5
5
  * mod uses the pattern of expressing mod features as `ModFeature` classes.
@@ -1 +1 @@
1
- {"version":3,"file":"modFeatures.d.ts","sourceRoot":"","sources":["../../../src/functions/modFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,aAAa,CAAC,OAAO,UAAU,CAAC,EACxE,GAAG,EAAE,WAAW,EAChB,WAAW,EAAE,CAAC,GACb;KAAG,GAAG,IAAI,MAAM,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CAAE,CAY5C"}
1
+ {"version":3,"file":"modFeatures.d.ts","sourceRoot":"","sources":["../../../src/functions/modFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,aAAa,CAAC,OAAO,UAAU,CAAC,EACxE,GAAG,EAAE,WAAW,EAChB,WAAW,EAAE,CAAC,GACb;KAAG,GAAG,IAAI,MAAM,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CAAE,CAY5C"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Helper function to sort an array of objects by one of the object keys.
3
+ *
4
+ * For example:
5
+ *
6
+ * ```ts
7
+ * const myArray = [
8
+ * {
9
+ * name: "alice",
10
+ * age: 30,
11
+ * },
12
+ * {
13
+ * name: "bob",
14
+ * age: 20,
15
+ * },
16
+ * ];
17
+ * myArray.sort(sortObjectArrayByKey("age"));
18
+ * ```
19
+ */
20
+ export declare function sortObjectArrayByKey(key: string): (a: unknown, b: unknown) => -1 | 0 | 1;
21
+ /**
22
+ * Helper function to sort a two-dimensional array by the first element.
23
+ *
24
+ * For example:
25
+ *
26
+ * ```ts
27
+ * const myArray = [[1, 2], [2, 3], [3, 4]];
28
+ * myArray.sort(twoDimensionalSort);
29
+ * ```
30
+ *
31
+ * This function also properly handles when the array elements are strings or numbers (instead of
32
+ * another array).
33
+ *
34
+ * From:
35
+ * https://stackoverflow.com/questions/16096872/how-to-sort-2-dimensional-array-by-column-value
36
+ */
37
+ export declare function sortTwoDimensionalArray<T>(a: T[], b: T[]): -1 | 0 | 1;
38
+ //# sourceMappingURL=sort.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../../../src/functions/sort.ts"],"names":[],"mappings":"AAsBA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,OACnC,OAAO,KAAK,OAAO,KAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAkB5C;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAiDrE"}
@@ -0,0 +1,95 @@
1
+ local ____exports = {}
2
+ local ____types = require("src.functions.types")
3
+ local isNumber = ____types.isNumber
4
+ local isString = ____types.isString
5
+ local isTable = ____types.isTable
6
+ local function sortNormal(self, a, b)
7
+ if not isNumber(nil, a) and not isString(nil, a) then
8
+ error("Failed to sort since the first value was not a number or string.")
9
+ end
10
+ if not isNumber(nil, b) and not isString(nil, b) then
11
+ error("Failed to sort since the second value was not a number or string.")
12
+ end
13
+ if a < b then
14
+ return -1
15
+ end
16
+ if a > b then
17
+ return 1
18
+ end
19
+ return 0
20
+ end
21
+ --- Helper function to sort an array of objects by one of the object keys.
22
+ --
23
+ -- For example:
24
+ --
25
+ -- ```ts
26
+ -- const myArray = [
27
+ -- {
28
+ -- name: "alice",
29
+ -- age: 30,
30
+ -- },
31
+ -- {
32
+ -- name: "bob",
33
+ -- age: 20,
34
+ -- },
35
+ -- ];
36
+ -- myArray.sort(sortObjectArrayByKey("age"));
37
+ -- ```
38
+ function ____exports.sortObjectArrayByKey(self, key)
39
+ return function(____, a, b)
40
+ if not isTable(nil, a) then
41
+ error(("Failed to sort an object by the key of \"" .. key) .. "\" since the first element was not a table.")
42
+ end
43
+ if not isTable(nil, b) then
44
+ error(("Failed to sort an object by the key of \"" .. key) .. "\" since the second element was not a table.")
45
+ end
46
+ local aValue = a[key]
47
+ local bValue = b[key]
48
+ return sortNormal(nil, aValue, bValue)
49
+ end
50
+ end
51
+ --- Helper function to sort a two-dimensional array by the first element.
52
+ --
53
+ -- For example:
54
+ --
55
+ -- ```ts
56
+ -- const myArray = [[1, 2], [2, 3], [3, 4]];
57
+ -- myArray.sort(twoDimensionalSort);
58
+ -- ```
59
+ --
60
+ -- This function also properly handles when the array elements are strings or numbers (instead of
61
+ -- another array).
62
+ --
63
+ -- From:
64
+ -- https://stackoverflow.com/questions/16096872/how-to-sort-2-dimensional-array-by-column-value
65
+ function ____exports.sortTwoDimensionalArray(self, a, b)
66
+ local aType = type(a)
67
+ local bType = type(b)
68
+ if aType ~= bType then
69
+ error(((((((("Failed to two-dimensional sort since the two elements were disparate types: " .. tostring(a)) .. " & ") .. tostring(b)) .. " (") .. aType) .. " & ") .. bType) .. ")")
70
+ end
71
+ if aType == "string" or aType == "number" then
72
+ return sortNormal(nil, a, b)
73
+ end
74
+ if aType ~= "table" then
75
+ error("Failed to two-dimensional sort since the first element was not a string, number, or table.")
76
+ end
77
+ if bType ~= "table" then
78
+ error("Failed to two-dimensional sort since the second element was not a string, number, or table.")
79
+ end
80
+ local firstElement1 = a[1]
81
+ local firstElement2 = b[1]
82
+ if firstElement1 == nil or firstElement1 == nil then
83
+ error("Failed to two-dimensional sort since the first element of the first array was undefined.")
84
+ end
85
+ if firstElement2 == nil or firstElement2 == nil then
86
+ error("Failed to two-dimensional sort since the first element of the second array was undefined.")
87
+ end
88
+ local elementType1 = type(firstElement1)
89
+ local elementType2 = type(firstElement2)
90
+ if elementType1 ~= elementType2 then
91
+ error(((((((("Failed to two-dimensional sort since the first element of each array were disparate types: " .. tostring(firstElement1)) .. " & ") .. tostring(firstElement2)) .. " (") .. elementType1) .. " & ") .. elementType2) .. ")")
92
+ end
93
+ return sortNormal(nil, firstElement1, firstElement2)
94
+ end
95
+ return ____exports
@@ -51,18 +51,6 @@ export declare function inRange(num: int, start: int, end: int): boolean;
51
51
  * This function is typically used to early return from a render function if it returns true.
52
52
  */
53
53
  export declare function isReflectionRender(): boolean;
54
- /**
55
- * Helper function to see if a particular command is a vanilla console command. This is useful
56
- * because the `EXECUTE_CMD` callback will not fire for any vanilla commands.
57
- */
58
- export declare function isVanillaConsoleCommand(commandName: string): boolean;
59
- /**
60
- * Helper function to log a message to the "log.txt" file and to print it to the screen at the same
61
- * time.
62
- */
63
- export declare function logAndPrint(msg: string): void;
64
- /** Helper function to print whether something was enabled or disabled to the in-game console. */
65
- export declare function printEnabled(enabled: boolean, description: string): void;
66
54
  /**
67
55
  * Helper function to repeat code N times. This is faster to type and cleaner than using a for loop.
68
56
  *
@@ -98,46 +86,4 @@ export declare function repeat(n: int, func: (i: int) => void): void;
98
86
  * This function does not actually do anything. (It is an "empty" function.)
99
87
  */
100
88
  export declare function todo(...args: unknown[]): void;
101
- /**
102
- * Helper function to sort a two-dimensional array by the first element.
103
- *
104
- * For example:
105
- *
106
- * ```ts
107
- * const myArray = [[1, 2], [2, 3], [3, 4]];
108
- * myArray.sort(twoDimensionalSort);
109
- * ```
110
- *
111
- * From:
112
- * https://stackoverflow.com/questions/16096872/how-to-sort-2-dimensional-array-by-column-value
113
- */
114
- export declare function twoDimensionalSort<T>(array1: T[], array2: T[]): -1 | 0 | 1;
115
- /**
116
- * Helper function to validate that an interface contains all of the keys of an enum. You must
117
- * specify both generic parameters in order for this to work properly (i.e. the interface and then
118
- * the enum).
119
- *
120
- * For example:
121
- *
122
- * ```ts
123
- * enum MyEnum {
124
- * Value1,
125
- * Value2,
126
- * Value3,
127
- * }
128
- *
129
- * interface MyEnumToType {
130
- * [MyEnum.Value1]: boolean;
131
- * [MyEnum.Value2]: number;
132
- * [MyEnum.Value3]: string;
133
- * }
134
- *
135
- * validateInterfaceMatchesEnum<MyEnumToType, MyEnum>();
136
- * ```
137
- *
138
- * This function is only meant to be used with interfaces (i.e. types that will not exist at
139
- * run-time). If you are generating an object that will contain all of the keys of an enum, use the
140
- * `satisfies` operator with the `Record` type instead.
141
- */
142
- export declare function validateInterfaceMatchesEnum<T extends Record<Enum, unknown>, Enum extends string | number>(): void;
143
89
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/functions/utils.ts"],"names":[],"mappings":";AAKA;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,SAAS,SAAI,GAAG,GAAG,EAAE,CAWlE;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,OAAO,EACZ,oBAAoB,EAAE,MAAM,GAC3B,MAAM,CAQR;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,SAAS,SAAI,GAAG,GAAG,EAAE,CAOlE;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE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AG,EAAE,OAAO,EACZ,oBAAoB,EAAE,MAAM,GAC3B,MAAM,CAQR;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,SAAS,SAAI,GAAG,GAAG,EAAE,CAOlE;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAE/D;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAI5C;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,CAI3D;AAED;;;;;;;;;;;;GAYG;AAEH,wBAAgB,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAG"}
@@ -3,10 +3,6 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
3
3
  local RenderMode = ____isaac_2Dtypescript_2Ddefinitions.RenderMode
4
4
  local ____cachedClasses = require("src.core.cachedClasses")
5
5
  local game = ____cachedClasses.game
6
- local ____consoleCommandsSet = require("src.sets.consoleCommandsSet")
7
- local CONSOLE_COMMANDS_SET = ____consoleCommandsSet.CONSOLE_COMMANDS_SET
8
- local ____log = require("src.functions.log")
9
- local log = ____log.log
10
6
  --- Helper function to return an array of integers with the specified range, inclusive on the lower
11
7
  -- end and exclusive on the high end. (The "e" stands for exclusive.)
12
8
  --
@@ -86,22 +82,6 @@ function ____exports.isReflectionRender(self)
86
82
  local renderMode = room:GetRenderMode()
87
83
  return renderMode == RenderMode.WATER_REFLECT
88
84
  end
89
- --- Helper function to see if a particular command is a vanilla console command. This is useful
90
- -- because the `EXECUTE_CMD` callback will not fire for any vanilla commands.
91
- function ____exports.isVanillaConsoleCommand(self, commandName)
92
- return CONSOLE_COMMANDS_SET:has(commandName)
93
- end
94
- --- Helper function to log a message to the "log.txt" file and to print it to the screen at the same
95
- -- time.
96
- function ____exports.logAndPrint(self, msg)
97
- log(msg)
98
- print(msg)
99
- end
100
- --- Helper function to print whether something was enabled or disabled to the in-game console.
101
- function ____exports.printEnabled(self, enabled, description)
102
- local enabledText = enabled and "Enabled" or "Disabled"
103
- print(((enabledText .. " ") .. description) .. ".")
104
- end
105
85
  --- Helper function to repeat code N times. This is faster to type and cleaner than using a for loop.
106
86
  --
107
87
  -- For example:
@@ -142,75 +122,4 @@ end
142
122
  -- This function does not actually do anything. (It is an "empty" function.)
143
123
  function ____exports.todo(self, ...)
144
124
  end
145
- --- Helper function to sort a two-dimensional array by the first element.
146
- --
147
- -- For example:
148
- --
149
- -- ```ts
150
- -- const myArray = [[1, 2], [2, 3], [3, 4]];
151
- -- myArray.sort(twoDimensionalSort);
152
- -- ```
153
- --
154
- -- From:
155
- -- https://stackoverflow.com/questions/16096872/how-to-sort-2-dimensional-array-by-column-value
156
- function ____exports.twoDimensionalSort(self, array1, array2)
157
- local type1 = type(array1)
158
- local type2 = type(array2)
159
- if type1 ~= type2 then
160
- error(((((((("Failed to two-dimensional sort since the two elements were disparate types: " .. tostring(array1)) .. " & ") .. tostring(array2)) .. " (") .. type1) .. " & ") .. type2) .. ")")
161
- end
162
- if type1 == "string" or type1 == "number" then
163
- if array1 == array2 then
164
- return 0
165
- end
166
- return array1 < array2 and -1 or 1
167
- end
168
- if type1 ~= "table" then
169
- error("Failed to two-dimensional sort since the elements were not a string, number, or table.")
170
- end
171
- local firstElement1 = array1[1]
172
- local firstElement2 = array2[1]
173
- if firstElement1 == nil or firstElement1 == nil then
174
- error("Failed to two-dimensional sort since the first element of the first array was undefined.")
175
- end
176
- if firstElement2 == nil or firstElement2 == nil then
177
- error("Failed to two-dimensional sort since the first element of the second array was undefined.")
178
- end
179
- local elementType1 = type(firstElement1)
180
- local elementType2 = type(firstElement2)
181
- if elementType1 ~= elementType2 then
182
- error(((((((("Failed to two-dimensional sort since the first element of each array were disparate types: " .. tostring(firstElement1)) .. " & ") .. tostring(firstElement2)) .. " (") .. elementType1) .. " & ") .. elementType2) .. ")")
183
- end
184
- if firstElement1 == firstElement2 then
185
- return 0
186
- end
187
- return firstElement1 < firstElement2 and -1 or 1
188
- end
189
- --- Helper function to validate that an interface contains all of the keys of an enum. You must
190
- -- specify both generic parameters in order for this to work properly (i.e. the interface and then
191
- -- the enum).
192
- --
193
- -- For example:
194
- --
195
- -- ```ts
196
- -- enum MyEnum {
197
- -- Value1,
198
- -- Value2,
199
- -- Value3,
200
- -- }
201
- --
202
- -- interface MyEnumToType {
203
- -- [MyEnum.Value1]: boolean;
204
- -- [MyEnum.Value2]: number;
205
- -- [MyEnum.Value3]: string;
206
- -- }
207
- --
208
- -- validateInterfaceMatchesEnum<MyEnumToType, MyEnum>();
209
- -- ```
210
- --
211
- -- This function is only meant to be used with interfaces (i.e. types that will not exist at
212
- -- run-time). If you are generating an object that will contain all of the keys of an enum, use the
213
- -- `satisfies` operator with the `Record` type instead.
214
- function ____exports.validateInterfaceMatchesEnum(self)
215
- end
216
125
  return ____exports
@@ -1,6 +1,6 @@
1
1
  export * from "./classes/DefaultMap";
2
2
  export * from "./classes/ModFeature";
3
- export * from "./classes/ModUpgradedBase";
3
+ export * from "./classes/ModUpgraded";
4
4
  export * from "./core/cachedClasses";
5
5
  export * from "./core/constants";
6
6
  export * from "./core/constantsFirstLast";
@@ -35,6 +35,7 @@ export * from "./functions/chargeBar";
35
35
  export * from "./functions/collectibles";
36
36
  export * from "./functions/collectibleTag";
37
37
  export * from "./functions/color";
38
+ export * from "./functions/console";
38
39
  export * from "./functions/curses";
39
40
  export * from "./functions/debugFunctions";
40
41
  export * from "./functions/decorators";
@@ -106,6 +107,7 @@ export * from "./functions/seeds";
106
107
  export * from "./functions/serialization";
107
108
  export * from "./functions/set";
108
109
  export * from "./functions/slots";
110
+ export * from "./functions/sort";
109
111
  export * from "./functions/sound";
110
112
  export * from "./functions/spawnCollectible";
111
113
  export * from "./functions/sprites";
@@ -156,7 +158,6 @@ export * from "./types/GridEntityID";
156
158
  export * from "./types/HasFunction";
157
159
  export * from "./types/Immutable";
158
160
  export * from "./types/LowercaseKeys";
159
- export * from "./types/ModUpgraded";
160
161
  export * from "./types/PickingUpItem";
161
162
  export * from "./types/PickupIndex";
162
163
  export * from "./types/PlayerIndex";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AAC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end
18
18
  do
19
- local ____export = require("src.classes.ModUpgradedBase")
19
+ local ____export = require("src.classes.ModUpgraded")
20
20
  for ____exportKey, ____exportValue in pairs(____export) do
21
21
  if ____exportKey ~= "default" then
22
22
  ____exports[____exportKey] = ____exportValue
@@ -295,6 +295,14 @@ do
295
295
  end
296
296
  end
297
297
  end
298
+ do
299
+ local ____export = require("src.functions.console")
300
+ for ____exportKey, ____exportValue in pairs(____export) do
301
+ if ____exportKey ~= "default" then
302
+ ____exports[____exportKey] = ____exportValue
303
+ end
304
+ end
305
+ end
298
306
  do
299
307
  local ____export = require("src.functions.curses")
300
308
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -863,6 +871,14 @@ do
863
871
  end
864
872
  end
865
873
  end
874
+ do
875
+ local ____export = require("src.functions.sort")
876
+ for ____exportKey, ____exportValue in pairs(____export) do
877
+ if ____exportKey ~= "default" then
878
+ ____exports[____exportKey] = ____exportValue
879
+ end
880
+ end
881
+ end
866
882
  do
867
883
  local ____export = require("src.functions.sound")
868
884
  for ____exportKey, ____exportValue in pairs(____export) do
@@ -1,7 +1,7 @@
1
1
  local ____exports = {}
2
2
  local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
3
3
  local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
4
- local ____utils = require("src.functions.utils")
5
- local validateInterfaceMatchesEnum = ____utils.validateInterfaceMatchesEnum
4
+ local ____enums = require("src.functions.enums")
5
+ local validateInterfaceMatchesEnum = ____enums.validateInterfaceMatchesEnum
6
6
  validateInterfaceMatchesEnum(nil)
7
7
  return ____exports
@@ -1,9 +1,11 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
2
  import { Feature } from "../../classes/private/Feature";
3
3
  /**
4
- * An interface that represents the `ModUpgradedBase` class.
4
+ * An interface that represents the `ModUpgraded` class.
5
5
  *
6
- * These methods are private on the real `ModUpgradedBase` class, so the instantiated class must be
6
+ * This is used to prevent circular dependencies.
7
+ *
8
+ * These methods are private on the real `ModUpgraded` class, so the instantiated class must be
7
9
  * unsafely type-asserted.
8
10
  */
9
11
  export interface ModUpgradedInterface extends Mod {
@@ -1 +1 @@
1
- {"version":3,"file":"ModUpgradedInterface.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/private/ModUpgradedInterface.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAExD;;;;;GAKG;AACH,MAAM,WAAW,oBAAqB,SAAQ,GAAG;IAC/C,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACpC,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;CACvC"}
1
+ {"version":3,"file":"ModUpgradedInterface.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/private/ModUpgradedInterface.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAExD;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAqB,SAAQ,GAAG;IAC/C,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACpC,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;CACvC"}