isaacscript-common 13.3.2 → 13.3.4

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 (47) hide show
  1. package/dist/index.d.ts +28 -16
  2. package/dist/isaacscript-common.lua +4123 -4064
  3. package/dist/src/classes/CustomCallback.d.ts +8 -0
  4. package/dist/src/classes/CustomCallback.d.ts.map +1 -0
  5. package/dist/src/classes/CustomCallback.lua +28 -0
  6. package/dist/src/classes/ModUpgraded.d.ts +10 -6
  7. package/dist/src/classes/ModUpgraded.d.ts.map +1 -1
  8. package/dist/src/classes/ModUpgraded.lua +6 -4
  9. package/dist/src/core/upgradeMod.d.ts +2 -1
  10. package/dist/src/core/upgradeMod.d.ts.map +1 -1
  11. package/dist/src/core/upgradeMod.lua +2 -1
  12. package/dist/src/functions/benchmark.d.ts +0 -12
  13. package/dist/src/functions/benchmark.d.ts.map +1 -1
  14. package/dist/src/functions/benchmark.lua +0 -19
  15. package/dist/src/functions/debugFunctions.d.ts +18 -24
  16. package/dist/src/functions/debugFunctions.d.ts.map +1 -1
  17. package/dist/src/functions/debugFunctions.lua +53 -73
  18. package/dist/src/functions/dev.d.ts +20 -0
  19. package/dist/src/functions/dev.d.ts.map +1 -0
  20. package/dist/src/functions/dev.lua +36 -0
  21. package/dist/src/functions/globals.d.ts +7 -0
  22. package/dist/src/functions/globals.d.ts.map +1 -1
  23. package/dist/src/functions/globals.lua +24 -0
  24. package/dist/src/functions/gridEntitiesSpecific.d.ts.map +1 -1
  25. package/dist/src/functions/gridEntitiesSpecific.lua +6 -12
  26. package/dist/src/index.d.ts +1 -0
  27. package/dist/src/index.d.ts.map +1 -1
  28. package/dist/src/index.lua +8 -0
  29. package/dist/src/interfaces/private/AddCallbackParameterCustom.d.ts +1 -1
  30. package/dist/src/interfaces/private/AddCallbackParameterCustom.d.ts.map +1 -1
  31. package/dist/src/objects/callbackRegisterFunctions.d.ts +2 -2
  32. package/dist/src/objects/callbackRegisterFunctions.d.ts.map +1 -1
  33. package/package.json +2 -2
  34. package/src/classes/CustomCallback.ts +23 -0
  35. package/src/classes/ModUpgraded.ts +17 -7
  36. package/src/core/upgradeMod.ts +2 -1
  37. package/src/functions/benchmark.ts +0 -23
  38. package/src/functions/debugFunctions.ts +38 -55
  39. package/src/functions/dev.ts +32 -0
  40. package/src/functions/globals.ts +27 -1
  41. package/src/functions/gridEntitiesSpecific.ts +6 -18
  42. package/src/index.ts +1 -0
  43. package/src/interfaces/private/AddCallbackParameterCustom.ts +2 -2
  44. package/src/objects/callbackRegisterFunctions.ts +2 -2
  45. package/dist/src/indexLua.d.ts +0 -185
  46. package/dist/src/indexLua.d.ts.map +0 -1
  47. package/dist/src/indexLua.lua +0 -1314
@@ -0,0 +1,8 @@
1
+ export declare class CustomCallback<AddParams extends [], FireParams extends []> {
2
+ subscriptions: AddParams[];
3
+ hasSubscriptions(): boolean;
4
+ add(...args: AddParams): void;
5
+ remove(callback: AddParams[0]): void;
6
+ fire(...args: FireParams): void;
7
+ }
8
+ //# sourceMappingURL=CustomCallback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomCallback.d.ts","sourceRoot":"","sources":["../../../src/classes/CustomCallback.ts"],"names":[],"mappings":"AAEA,qBAAa,cAAc,CAAC,SAAS,SAAS,EAAE,EAAE,UAAU,SAAS,EAAE;IACrE,aAAa,EAAE,SAAS,EAAE,CAAM;IAEhC,gBAAgB,IAAI,OAAO;IAI3B,GAAG,CAAC,GAAG,IAAI,EAAE,SAAS,GAAG,IAAI;IAI7B,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI;IAQpC,IAAI,CAAC,GAAG,IAAI,EAAE,UAAU,GAAG,IAAI;CAChC"}
@@ -0,0 +1,28 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local __TS__Class = ____lualib.__TS__Class
3
+ local __TS__ArrayFind = ____lualib.__TS__ArrayFind
4
+ local ____exports = {}
5
+ ____exports.CustomCallback = __TS__Class()
6
+ local CustomCallback = ____exports.CustomCallback
7
+ CustomCallback.name = "CustomCallback"
8
+ function CustomCallback.prototype.____constructor(self)
9
+ self.subscriptions = {}
10
+ end
11
+ function CustomCallback.prototype.hasSubscriptions(self)
12
+ return #self.subscriptions > 0
13
+ end
14
+ function CustomCallback.prototype.add(self, ...)
15
+ local args = {...}
16
+ local ____self_subscriptions_0 = self.subscriptions
17
+ ____self_subscriptions_0[#____self_subscriptions_0 + 1] = args
18
+ end
19
+ function CustomCallback.prototype.remove(self, callback)
20
+ local subscriptionIndexMatchingCallback = __TS__ArrayFind(
21
+ self.subscriptions,
22
+ function(____, subscription)
23
+ end
24
+ )
25
+ end
26
+ function CustomCallback.prototype.fire(self, ...)
27
+ end
28
+ return ____exports
@@ -1,11 +1,10 @@
1
1
  import { ModCallback } from "isaac-typescript-definitions";
2
2
  import { ModCallbackCustom } from "../enums/ModCallbackCustom";
3
- import { AddCallbackParameterCustom } from "../interfaces/private/AddCallbackParameterCustom";
3
+ import { AddCallbackParametersCustom } from "../interfaces/private/AddCallbackParameterCustom";
4
4
  /**
5
5
  * `isaacscript-common` has many custom callbacks that you can use in your mods. Instead of
6
6
  * hijacking the vanilla `Mod` object, we provide a `ModUpgraded` object for you to use, which
7
- * extends the base class and adds a new method of `AddCallbackCustom`. (There is no corresponding
8
- * `RemoveCallbackCustom`.)
7
+ * extends the base class and adds a new method of `AddCallbackCustom`.
9
8
  *
10
9
  * To upgrade your mod, use the `upgradeMod` helper function.
11
10
  */
@@ -20,16 +19,21 @@ export declare class ModUpgraded implements Mod {
20
19
  Debug: boolean;
21
20
  TimeThreshold: float | undefined;
22
21
  constructor(mod: Mod, debug: boolean, timeThreshold?: float);
23
- AddCallback<T extends ModCallback>(modCallback: T, ...args: AddCallbackParameter[T]): void;
22
+ AddCallback<T extends ModCallback>(modCallback: T, ...args: AddCallbackParameters[T]): void;
24
23
  HasData(): boolean;
25
24
  LoadData(): string;
26
25
  /**
27
26
  * This method does not care about the tertiary argument. Regardless of the conditions of how you
28
27
  * registered the callback, it will be removed.
29
28
  */
30
- RemoveCallback<T extends ModCallback>(modCallback: T, callback: AddCallbackParameter[T][0]): void;
29
+ RemoveCallback<T extends ModCallback>(modCallback: T, callback: AddCallbackParameters[T][0]): void;
31
30
  RemoveData(): void;
32
31
  SaveData(data: string): void;
33
- AddCallbackCustom<T extends ModCallbackCustom>(modCallbackCustom: T, ...args: AddCallbackParameterCustom[T]): void;
32
+ AddCallbackCustom<T extends ModCallbackCustom>(modCallbackCustom: T, ...args: AddCallbackParametersCustom[T]): void;
33
+ /**
34
+ * This method does not care about the tertiary argument. Regardless of the conditions of how you
35
+ * registered the callback, it will be removed.
36
+ */
37
+ RemoveCallbackCustom<T extends ModCallbackCustom>(modCallback: T, callback: AddCallbackParametersCustom[T][0]): void;
34
38
  }
35
39
  //# sourceMappingURL=ModUpgraded.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModUpgraded.d.ts","sourceRoot":"","sources":["../../../src/classes/ModUpgraded.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAG9F;;;;;;;GAOG;AACH,qBAAa,WAAY,YAAW,GAAG;IAKrC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAMb,4FAA4F;IAC5F,GAAG,EAAE,GAAG,CAAC;IAET,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,EAAE,KAAK,GAAG,SAAS,CAAC;gBAErB,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,CAAC,EAAE,KAAK;IAW3D,WAAW,CAAC,CAAC,SAAS,WAAW,EAC/B,WAAW,EAAE,CAAC,EACd,GAAG,IAAI,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAC/B,IAAI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,CAAC,CAAC,CAAC,CAAC,CAAC,GACpC,IAAI;IAIP,UAAU,IAAI,IAAI;IAIlB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAS5B,iBAAiB,CAAC,CAAC,SAAS,iBAAiB,EAC3C,iBAAiB,EAAE,CAAC,EACpB,GAAG,IAAI,EAAE,2BAA2B,CAAC,CAAC,CAAC,GACtC,IAAI;IAMP;;;OAGG;IACH,oBAAoB,CAAC,CAAC,SAAS,iBAAiB,EAC9C,WAAW,EAAE,CAAC,EACd,QAAQ,EAAE,2BAA2B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAC1C,IAAI;CAGR"}
@@ -4,16 +4,15 @@ local __TS__Spread = ____lualib.__TS__Spread
4
4
  local ____exports = {}
5
5
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
6
6
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
7
- local ____benchmark = require("src.functions.benchmark")
8
- local getTime = ____benchmark.getTime
7
+ local ____debugFunctions = require("src.functions.debugFunctions")
8
+ local getTime = ____debugFunctions.getTime
9
9
  local ____log = require("src.functions.log")
10
10
  local getParentFunctionDescription = ____log.getParentFunctionDescription
11
11
  local ____callbackRegisterFunctions = require("src.objects.callbackRegisterFunctions")
12
12
  local CALLBACK_REGISTER_FUNCTIONS = ____callbackRegisterFunctions.CALLBACK_REGISTER_FUNCTIONS
13
13
  --- `isaacscript-common` has many custom callbacks that you can use in your mods. Instead of
14
14
  -- hijacking the vanilla `Mod` object, we provide a `ModUpgraded` object for you to use, which
15
- -- extends the base class and adds a new method of `AddCallbackCustom`. (There is no corresponding
16
- -- `RemoveCallbackCustom`.)
15
+ -- extends the base class and adds a new method of `AddCallbackCustom`.
17
16
  --
18
17
  -- To upgrade your mod, use the `upgradeMod` helper function.
19
18
  ____exports.ModUpgraded = __TS__Class()
@@ -73,4 +72,7 @@ function ModUpgraded.prototype.AddCallbackCustom(self, modCallbackCustom, ...)
73
72
  local callbackRegisterFunction = CALLBACK_REGISTER_FUNCTIONS[modCallbackCustom]
74
73
  callbackRegisterFunction(nil, ...)
75
74
  end
75
+ function ModUpgraded.prototype.RemoveCallbackCustom(self, modCallback, callback)
76
+ print(self, modCallback, callback)
77
+ end
76
78
  return ____exports
@@ -22,7 +22,8 @@ import { ModUpgraded } from "../classes/ModUpgraded";
22
22
  * @param debug Optional. Whether to log additional output when a callback is fired. Default is
23
23
  * false.
24
24
  * @param timeThreshold Optional. If provided, will only log callbacks that take longer than the
25
- * specified number of seconds.
25
+ * specified number of seconds (if the "--luadebug" launch flag is turned on)
26
+ * or milliseconds (if the "--luadebug" launch flag is turned off).
26
27
  * @returns The upgraded mod object.
27
28
  */
28
29
  export declare function upgradeMod(modVanilla: Mod, debug?: boolean, timeThreshold?: float): ModUpgraded;
@@ -1 +1 @@
1
- {"version":3,"file":"upgradeMod.d.ts","sourceRoot":"","sources":["../../../src/core/upgradeMod.ts"],"names":[],"mappings":";;AACA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAWrD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,UAAU,CACxB,UAAU,EAAE,GAAG,EACf,KAAK,UAAQ,EACb,aAAa,CAAC,EAAE,KAAK,GACpB,WAAW,CAwBb"}
1
+ {"version":3,"file":"upgradeMod.d.ts","sourceRoot":"","sources":["../../../src/core/upgradeMod.ts"],"names":[],"mappings":";;AACA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAWrD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,UAAU,CACxB,UAAU,EAAE,GAAG,EACf,KAAK,UAAQ,EACb,aAAa,CAAC,EAAE,KAAK,GACpB,WAAW,CAwBb"}
@@ -38,7 +38,8 @@ local loadShaderCrashFix = ____shaderCrashFix.loadShaderCrashFix
38
38
  -- @param debug Optional. Whether to log additional output when a callback is fired. Default is
39
39
  -- false.
40
40
  -- @param timeThreshold Optional. If provided, will only log callbacks that take longer than the
41
- -- specified number of seconds.
41
+ -- specified number of seconds (if the "--luadebug" launch flag is turned on)
42
+ -- or milliseconds (if the "--luadebug" launch flag is turned off).
42
43
  -- @returns The upgraded mod object.
43
44
  function ____exports.upgradeMod(self, modVanilla, ____debug, timeThreshold)
44
45
  if ____debug == nil then
@@ -13,16 +13,4 @@
13
13
  * be printed to the log.)
14
14
  */
15
15
  export declare function benchmark(numTrials: int, ...functions: Array<() => void>): int[];
16
- /**
17
- * Helper function to get the current time in seconds for benchmarking / profiling purposes.
18
- *
19
- * - If the "--luadebug" flag is enabled, then this function will use the `socket.gettime` method,
20
- * which returns the epoch timestamp in seconds (e.g. "1640320492.5779"). This is preferable over
21
- * the `Isaac.GetTime` method, since it has one extra decimal point of precision.
22
- * - If the "--luadebug" flag is disabled, then this function will use the `Isaac.GetTime` method,
23
- * which returns the number of seconds since the computer's operating system was started (e.g.
24
- * "739454.963"). (The milliseconds return value of `Isaac.GetTime` is converted to seconds to
25
- * align with the return value of `socket.gettime`.)
26
- */
27
- export declare function getTime(): float;
28
16
  //# sourceMappingURL=benchmark.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"benchmark.d.ts","sourceRoot":"","sources":["../../../src/functions/benchmark.ts"],"names":[],"mappings":";AAGA;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CACvB,SAAS,EAAE,GAAG,EACd,GAAG,SAAS,EAAE,KAAK,CAAC,MAAM,IAAI,CAAC,GAC9B,GAAG,EAAE,CAsBP;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,IAAI,KAAK,CAS/B"}
1
+ {"version":3,"file":"benchmark.d.ts","sourceRoot":"","sources":["../../../src/functions/benchmark.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CACvB,SAAS,EAAE,GAAG,EACd,GAAG,SAAS,EAAE,KAAK,CAAC,MAAM,IAAI,CAAC,GAC9B,GAAG,EAAE,CAsBP"}
@@ -1,8 +1,6 @@
1
1
  local ____lualib = require("lualib_bundle")
2
2
  local __TS__ArrayForEach = ____lualib.__TS__ArrayForEach
3
3
  local ____exports = {}
4
- local ____constants = require("src.core.constants")
5
- local SECOND_IN_MILLISECONDS = ____constants.SECOND_IN_MILLISECONDS
6
4
  local ____log = require("src.functions.log")
7
5
  local log = ____log.log
8
6
  --- Helper function to benchmark the performance of a function.
@@ -48,21 +46,4 @@ function ____exports.benchmark(self, numTrials, ...)
48
46
  )
49
47
  return averages
50
48
  end
51
- --- Helper function to get the current time in seconds for benchmarking / profiling purposes.
52
- --
53
- -- - If the "--luadebug" flag is enabled, then this function will use the `socket.gettime` method,
54
- -- which returns the epoch timestamp in seconds (e.g. "1640320492.5779"). This is preferable over
55
- -- the `Isaac.GetTime` method, since it has one extra decimal point of precision.
56
- -- - If the "--luadebug" flag is disabled, then this function will use the `Isaac.GetTime` method,
57
- -- which returns the number of seconds since the computer's operating system was started (e.g.
58
- -- "739454.963"). (The milliseconds return value of `Isaac.GetTime` is converted to seconds to
59
- -- align with the return value of `socket.gettime`.)
60
- function ____exports.getTime(self)
61
- local ok, requiredSocket = pcall(require, "socket")
62
- if ok then
63
- local socket = requiredSocket
64
- return socket.gettime()
65
- end
66
- return Isaac.GetTime() / SECOND_IN_MILLISECONDS
67
- end
68
49
  return ____exports
@@ -1,22 +1,23 @@
1
- import { ModUpgraded } from "../classes/ModUpgraded";
1
+ /// <reference types="isaac-typescript-definitions" />
2
2
  /**
3
- * Helper function to enable some IsaacScript features that are useful when developing a mod. They
4
- * should not be enabled when your mod goes to production (i.e. when it is uploaded to the Steam
5
- * Workshop).
6
- *
7
- * The list of development features that are enabled are as follows:
8
- *
9
- * - `saveDataManagerSetGlobal` - Sets your local variables registered with the save data manager as
10
- * global variables so you can access them from the in-game console.
11
- * - `setLogFunctionsGlobal` - Sets the various log functions global so that you can access them
12
- * from the in-game console.
13
- * - `enableExtraConsoleCommands` - Enables many extra in-game console commands that make warping
14
- * around easier (like e.g. `angel` to warp to the Angel Room).
15
- * - `enableFastReset` - Makes it so that the r key resets the game instantaneously.
16
- * - `removeFadeIn` - Removes the slow fade in that occurs at the beginning of the run, so that you
17
- * can immediately start playing or testing.
3
+ * Helper function to get the current time for benchmarking / profiling purposes.
4
+ *
5
+ * The return value will either be in seconds or milliseconds, depending on if the "--luadebug" flag
6
+ * is turned on or not.
7
+ *
8
+ * If the "--luadebug" flag is present, then this function will use the `socket.gettime` method,
9
+ * which returns the epoch timestamp in seconds (e.g. "1640320492.5779"). This is preferable over
10
+ * the more conventional `Isaac.GetTime` method, since it has one extra decimal point of precision.
11
+ *
12
+ * If the "--luadebug" flag is not present, then this function will use the `Isaac.GetTime` method,
13
+ * which returns the number of milliseconds since the computer's operating system was started (e.g.
14
+ * "739454963").
15
+ *
16
+ * @param useSocketIfAvailable Optional. Whether to use the `socket.gettime` method, if available.
17
+ * Default is true. If set to false, the `Isaac.GetTime()` method will
18
+ * always be used.
18
19
  */
19
- export declare function enableDevFeatures(mod: ModUpgraded): void;
20
+ export declare function getTime(useSocketIfAvailable?: boolean): float;
20
21
  /**
21
22
  * Helper function to get a stack trace.
22
23
  *
@@ -40,13 +41,6 @@ export declare function getTraceback(): string;
40
41
  * presence of the `sandboxGetTraceback` function.
41
42
  */
42
43
  export declare function isLuaDebugEnabled(): boolean;
43
- /**
44
- * Converts every `isaacscript-common` function that begins with "log" to a global function.
45
- *
46
- * This is useful when printing out variables from the in-game debug console.
47
- */
48
- export declare function setLogFunctionsGlobal(): void;
49
- export declare function setTracebackFunctionsGlobal(): void;
50
44
  /**
51
45
  * Helper function to print a stack trace to the "log.txt" file, similar to JavaScript's
52
46
  * `console.trace` function.
@@ -1 +1 @@
1
- {"version":3,"file":"debugFunctions.d.ts","sourceRoot":"","sources":["../../../src/functions/debugFunctions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAUrD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAOxD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAYrC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAI3C;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAS5C;AAED,wBAAgB,2BAA2B,IAAI,IAAI,CAKlD;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAGhC"}
1
+ {"version":3,"file":"debugFunctions.d.ts","sourceRoot":"","sources":["../../../src/functions/debugFunctions.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,OAAO,CAAC,oBAAoB,UAAO,GAAG,KAAK,CAmB1D;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAarC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAI3C;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAGhC"}
@@ -1,49 +1,68 @@
1
- local ____lualib = require("lualib_bundle")
2
- local __TS__ObjectEntries = ____lualib.__TS__ObjectEntries
3
1
  local ____exports = {}
4
- local ____exports = require("src.features.extraConsoleCommands.exports")
5
- local enableExtraConsoleCommands = ____exports.enableExtraConsoleCommands
6
- local ____fadeInRemover = require("src.features.fadeInRemover")
7
- local removeFadeIn = ____fadeInRemover.removeFadeIn
8
- local ____fastReset = require("src.features.fastReset")
9
- local enableFastReset = ____fastReset.enableFastReset
10
- local ____exports = require("src.features.saveDataManager.exports")
11
- local saveDataManagerSetGlobal = ____exports.saveDataManagerSetGlobal
12
- local logExports = require("src.functions.log")
13
2
  local ____log = require("src.functions.log")
14
3
  local log = ____log.log
15
- local logEntitiesExports = require("src.functions.logEntities")
16
- local logMiscExports = require("src.functions.logMisc")
4
+ --- Players can boot the game with an launch option called "--luadebug", which will enable additional
5
+ -- functionality that is considered to be unsafe. For more information about this flag, see the
6
+ -- wiki: https://bindingofisaacrebirth.fandom.com/wiki/Launch_Options
7
+ --
8
+ -- When this flag is enabled, the global environment will be slightly different. The differences are
9
+ -- documented here: https://wofsauge.github.io/IsaacDocs/rep/Globals.html
10
+ --
11
+ -- This function uses the `package` global variable as a proxy to determine if the "--luadebug" flag
12
+ -- is enabled or not.
13
+ --
14
+ -- Note that this function will return false if the Racing+ sandbox is enabled, even if the
15
+ -- "--luadebug" flag is really turned on. If checking for this case is needed, check for the
16
+ -- presence of the `sandboxGetTraceback` function.
17
+ function ____exports.isLuaDebugEnabled(self)
18
+ return _G.package ~= nil
19
+ end
20
+ --- Helper function to get the current time for benchmarking / profiling purposes.
21
+ --
22
+ -- The return value will either be in seconds or milliseconds, depending on if the "--luadebug" flag
23
+ -- is turned on or not.
24
+ --
25
+ -- If the "--luadebug" flag is present, then this function will use the `socket.gettime` method,
26
+ -- which returns the epoch timestamp in seconds (e.g. "1640320492.5779"). This is preferable over
27
+ -- the more conventional `Isaac.GetTime` method, since it has one extra decimal point of precision.
28
+ --
29
+ -- If the "--luadebug" flag is not present, then this function will use the `Isaac.GetTime` method,
30
+ -- which returns the number of milliseconds since the computer's operating system was started (e.g.
31
+ -- "739454963").
32
+ --
33
+ -- @param useSocketIfAvailable Optional. Whether to use the `socket.gettime` method, if available.
34
+ -- Default is true. If set to false, the `Isaac.GetTime()` method will
35
+ -- always be used.
36
+ function ____exports.getTime(self, useSocketIfAvailable)
37
+ if useSocketIfAvailable == nil then
38
+ useSocketIfAvailable = true
39
+ end
40
+ if useSocketIfAvailable then
41
+ if SandboxGetTime ~= nil then
42
+ return SandboxGetTime()
43
+ end
44
+ if ____exports.isLuaDebugEnabled(nil) then
45
+ local ok, requiredSocket = pcall(require, "socket")
46
+ if ok then
47
+ local socket = requiredSocket
48
+ return socket.gettime()
49
+ end
50
+ end
51
+ end
52
+ return Isaac.GetTime()
53
+ end
17
54
  --- Helper function to get a stack trace.
18
55
  --
19
56
  -- This will only work if the `--luadebug` launch option is enabled or the Racing+ sandbox is
20
57
  -- enabled.
21
58
  function ____exports.getTraceback(self)
22
- if debug ~= nil then
23
- return debug.traceback()
24
- end
25
59
  if SandboxGetTraceback ~= nil then
26
60
  return SandboxGetTraceback()
27
61
  end
28
- return "stack traceback:\n(the \"--luadebug\" flag is not enabled)"
29
- end
30
- --- Converts every `isaacscript-common` function that begins with "log" to a global function.
31
- --
32
- -- This is useful when printing out variables from the in-game debug console.
33
- function ____exports.setLogFunctionsGlobal(self)
34
- local globals = _G
35
- for ____, exports in ipairs({logExports, logMiscExports, logEntitiesExports}) do
36
- for ____, ____value in ipairs(__TS__ObjectEntries(exports)) do
37
- local logFuncName = ____value[1]
38
- local logFunc = ____value[2]
39
- globals[logFuncName] = logFunc
40
- end
62
+ if debug ~= nil then
63
+ return debug.traceback()
41
64
  end
42
- end
43
- function ____exports.setTracebackFunctionsGlobal(self)
44
- local globals = _G
45
- globals.getTraceback = ____exports.getTraceback
46
- globals.traceback = ____exports.traceback
65
+ return "stack traceback:\n(the \"--luadebug\" flag is not enabled)"
47
66
  end
48
67
  --- Helper function to print a stack trace to the "log.txt" file, similar to JavaScript's
49
68
  -- `console.trace` function.
@@ -54,43 +73,4 @@ function ____exports.traceback(self)
54
73
  local tracebackOutput = ____exports.getTraceback(nil)
55
74
  log(nil, tracebackOutput)
56
75
  end
57
- --- Helper function to enable some IsaacScript features that are useful when developing a mod. They
58
- -- should not be enabled when your mod goes to production (i.e. when it is uploaded to the Steam
59
- -- Workshop).
60
- --
61
- -- The list of development features that are enabled are as follows:
62
- --
63
- -- - `saveDataManagerSetGlobal` - Sets your local variables registered with the save data manager as
64
- -- global variables so you can access them from the in-game console.
65
- -- - `setLogFunctionsGlobal` - Sets the various log functions global so that you can access them
66
- -- from the in-game console.
67
- -- - `enableExtraConsoleCommands` - Enables many extra in-game console commands that make warping
68
- -- around easier (like e.g. `angel` to warp to the Angel Room).
69
- -- - `enableFastReset` - Makes it so that the r key resets the game instantaneously.
70
- -- - `removeFadeIn` - Removes the slow fade in that occurs at the beginning of the run, so that you
71
- -- can immediately start playing or testing.
72
- function ____exports.enableDevFeatures(self, mod)
73
- saveDataManagerSetGlobal(nil)
74
- ____exports.setLogFunctionsGlobal(nil)
75
- ____exports.setTracebackFunctionsGlobal(nil)
76
- enableExtraConsoleCommands(nil, mod)
77
- enableFastReset(nil)
78
- removeFadeIn(nil)
79
- end
80
- --- Players can boot the game with an launch option called "--luadebug", which will enable additional
81
- -- functionality that is considered to be unsafe. For more information about this flag, see the
82
- -- wiki: https://bindingofisaacrebirth.fandom.com/wiki/Launch_Options
83
- --
84
- -- When this flag is enabled, the global environment will be slightly different. The differences are
85
- -- documented here: https://wofsauge.github.io/IsaacDocs/rep/Globals.html
86
- --
87
- -- This function uses the `package` global variable as a proxy to determine if the "--luadebug" flag
88
- -- is enabled or not.
89
- --
90
- -- Note that this function will return false if the Racing+ sandbox is enabled, even if the
91
- -- "--luadebug" flag is really turned on. If checking for this case is needed, check for the
92
- -- presence of the `sandboxGetTraceback` function.
93
- function ____exports.isLuaDebugEnabled(self)
94
- return _G.package ~= nil
95
- end
96
76
  return ____exports
@@ -0,0 +1,20 @@
1
+ import { ModUpgraded } from "../classes/ModUpgraded";
2
+ /**
3
+ * Helper function to enable some IsaacScript features that are useful when developing a mod. They
4
+ * should not be enabled when your mod goes to production (i.e. when it is uploaded to the Steam
5
+ * Workshop).
6
+ *
7
+ * The list of development features that are enabled are as follows:
8
+ *
9
+ * - `saveDataManagerSetGlobal` - Sets your local variables registered with the save data manager as
10
+ * global variables so you can access them from the in-game console.
11
+ * - `setLogFunctionsGlobal` - Sets the various log functions global so that you can access them
12
+ * from the in-game console.
13
+ * - `enableExtraConsoleCommands` - Enables many extra in-game console commands that make warping
14
+ * around easier (like e.g. `angel` to warp to the Angel Room).
15
+ * - `enableFastReset` - Makes it so that the r key resets the game instantaneously.
16
+ * - `removeFadeIn` - Removes the slow fade in that occurs at the beginning of the run, so that you
17
+ * can immediately start playing or testing.
18
+ */
19
+ export declare function enableDevFeatures(mod: ModUpgraded): void;
20
+ //# sourceMappingURL=dev.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../src/functions/dev.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAOrD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAOxD"}
@@ -0,0 +1,36 @@
1
+ local ____exports = {}
2
+ local ____exports = require("src.features.extraConsoleCommands.exports")
3
+ local enableExtraConsoleCommands = ____exports.enableExtraConsoleCommands
4
+ local ____fadeInRemover = require("src.features.fadeInRemover")
5
+ local removeFadeIn = ____fadeInRemover.removeFadeIn
6
+ local ____fastReset = require("src.features.fastReset")
7
+ local enableFastReset = ____fastReset.enableFastReset
8
+ local ____exports = require("src.features.saveDataManager.exports")
9
+ local saveDataManagerSetGlobal = ____exports.saveDataManagerSetGlobal
10
+ local ____globals = require("src.functions.globals")
11
+ local setLogFunctionsGlobal = ____globals.setLogFunctionsGlobal
12
+ local setTracebackFunctionsGlobal = ____globals.setTracebackFunctionsGlobal
13
+ --- Helper function to enable some IsaacScript features that are useful when developing a mod. They
14
+ -- should not be enabled when your mod goes to production (i.e. when it is uploaded to the Steam
15
+ -- Workshop).
16
+ --
17
+ -- The list of development features that are enabled are as follows:
18
+ --
19
+ -- - `saveDataManagerSetGlobal` - Sets your local variables registered with the save data manager as
20
+ -- global variables so you can access them from the in-game console.
21
+ -- - `setLogFunctionsGlobal` - Sets the various log functions global so that you can access them
22
+ -- from the in-game console.
23
+ -- - `enableExtraConsoleCommands` - Enables many extra in-game console commands that make warping
24
+ -- around easier (like e.g. `angel` to warp to the Angel Room).
25
+ -- - `enableFastReset` - Makes it so that the r key resets the game instantaneously.
26
+ -- - `removeFadeIn` - Removes the slow fade in that occurs at the beginning of the run, so that you
27
+ -- can immediately start playing or testing.
28
+ function ____exports.enableDevFeatures(self, mod)
29
+ saveDataManagerSetGlobal(nil)
30
+ setLogFunctionsGlobal(nil)
31
+ setTracebackFunctionsGlobal(nil)
32
+ enableExtraConsoleCommands(nil, mod)
33
+ enableFastReset(nil)
34
+ removeFadeIn(nil)
35
+ end
36
+ return ____exports
@@ -12,4 +12,11 @@ export declare function getDefaultGlobals(): ReadonlySet<string>;
12
12
  */
13
13
  export declare function getNewGlobals(): ReadonlyArray<[AnyNotNil, unknown]>;
14
14
  export declare function logNewGlobals(): void;
15
+ /**
16
+ * Converts every `isaacscript-common` function that begins with "log" to a global function.
17
+ *
18
+ * This is useful when printing out variables from the in-game debug console.
19
+ */
20
+ export declare function setLogFunctionsGlobal(): void;
21
+ export declare function setTracebackFunctionsGlobal(): void;
15
22
  //# sourceMappingURL=globals.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../../../src/functions/globals.ts"],"names":[],"mappings":";AA0LA;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,WAAW,CAAC,MAAM,CAAC,CAYvD;AAMD;;;GAGG;AACH,wBAAgB,aAAa,IAAI,aAAa,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAcnE;AAED,wBAAgB,aAAa,IAAI,IAAI,CAWpC"}
1
+ {"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../../../src/functions/globals.ts"],"names":[],"mappings":";AA6LA;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,WAAW,CAAC,MAAM,CAAC,CAYvD;AAMD;;;GAGG;AACH,wBAAgB,aAAa,IAAI,aAAa,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAcnE;AAED,wBAAgB,aAAa,IAAI,IAAI,CAWpC;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAS5C;AAED,wBAAgB,2BAA2B,IAAI,IAAI,CAKlD"}
@@ -3,12 +3,18 @@ local Set = ____lualib.Set
3
3
  local __TS__New = ____lualib.__TS__New
4
4
  local __TS__ArraySort = ____lualib.__TS__ArraySort
5
5
  local __TS__ArrayForEach = ____lualib.__TS__ArrayForEach
6
+ local __TS__ObjectEntries = ____lualib.__TS__ObjectEntries
6
7
  local ____exports = {}
7
8
  local isRacingPlusSandboxEnabled
8
9
  local ____debugFunctions = require("src.functions.debugFunctions")
10
+ local getTraceback = ____debugFunctions.getTraceback
9
11
  local isLuaDebugEnabled = ____debugFunctions.isLuaDebugEnabled
12
+ local traceback = ____debugFunctions.traceback
13
+ local logExports = require("src.functions.log")
10
14
  local ____log = require("src.functions.log")
11
15
  local log = ____log.log
16
+ local logEntitiesExports = require("src.functions.logEntities")
17
+ local logMiscExports = require("src.functions.logMisc")
12
18
  local ____set = require("src.functions.set")
13
19
  local addSetsToSet = ____set.addSetsToSet
14
20
  local copySet = ____set.copySet
@@ -234,4 +240,22 @@ function ____exports.logNewGlobals(self)
234
240
  end
235
241
  )
236
242
  end
243
+ --- Converts every `isaacscript-common` function that begins with "log" to a global function.
244
+ --
245
+ -- This is useful when printing out variables from the in-game debug console.
246
+ function ____exports.setLogFunctionsGlobal(self)
247
+ local globals = _G
248
+ for ____, exports in ipairs({logExports, logMiscExports, logEntitiesExports}) do
249
+ for ____, ____value in ipairs(__TS__ObjectEntries(exports)) do
250
+ local logFuncName = ____value[1]
251
+ local logFunc = ____value[2]
252
+ globals[logFuncName] = logFunc
253
+ end
254
+ end
255
+ end
256
+ function ____exports.setTracebackFunctionsGlobal(self)
257
+ local globals = _G
258
+ globals.getTraceback = getTraceback
259
+ globals.traceback = traceback
260
+ end
237
261
  return ____exports
@@ -1 +1 @@
1
- {"version":3,"file":"gridEntitiesSpecific.d.ts","sourceRoot":"","sources":["../../../src/functions/gridEntitiesSpecific.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,WAAW,EAEX,UAAU,EACV,qBAAqB,EACrB,o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,EAAE,GAAG,GAAG,MAAM,GAChC,gBAAgB,GAAG,SAAS,CAgB9B;AAED,4DAA4D;AAC5D,wBAAgB,QAAQ,CACtB,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,aAAa,GAAG,SAAS,CAE3B;AAED,oFAAoF;AACpF,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,GAAG,EACZ,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,aAAa,GAAG,SAAS,CAgB3B;AAED,mEAAmE;AACnE,wBAAgB,eAAe,CAC7B,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAExB;AAED,2FAA2F;AAC3F,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,GAAG,EACZ,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAMxB;AAED,iEAAiE;AACjE,wBAAgB,aAAa,CAC3B,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAKxB;AAED,yFAAyF;AACzF,wBAAgB,wBAAwB,CACtC,eAAe,EAAE,eAAe,EAChC,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAMxB"}
1
+ {"version":3,"file":"gridEntitiesSpecific.d.ts","sourceRoot":"","sources":["../../../src/functions/gridEntitiesSpecific.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,WAAW,EAEX,UAAU,EACV,qBAAqB,EACrB,oBAAoB,EACpB,WAAW,EACX,eAAe,EAChB,MAAM,8BAA8B,CAAC;AAStC;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,iBAAiB,GAAE,iBAAsB,GACxC,UAAU,EAAE,CAMd;AAKD;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,UAAU,GAAE,UAAe,GAAG,aAAa,EAAE,CAapE;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CACtB,WAAW,GAAE,qBAA0B,GACt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AED,mEAAmE;AACnE,wBAAgB,eAAe,CAC7B,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAExB;AAED,2FAA2F;AAC3F,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,GAAG,EACZ,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAMxB;AAED,iEAAiE;AACjE,wBAAgB,aAAa,CAC3B,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAKxB;AAED,yFAAyF;AACzF,wBAAgB,wBAAwB,CACtC,eAAe,EAAE,eAAe,EAChC,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAMxB"}
@@ -128,9 +128,8 @@ function ____exports.getPits(self, pitVariant)
128
128
  if pitVariant == nil then
129
129
  pitVariant = -1
130
130
  end
131
- local gridEntities = getGridEntities(nil)
132
131
  local pits = {}
133
- for ____, gridEntity in ipairs(gridEntities) do
132
+ for ____, gridEntity in ipairs(getGridEntities(nil)) do
134
133
  local pit = gridEntity:ToPit()
135
134
  if pit ~= nil then
136
135
  local gridEntityVariant = pit:GetVariant()
@@ -149,9 +148,8 @@ function ____exports.getPoops(self, poopVariant)
149
148
  if poopVariant == nil then
150
149
  poopVariant = -1
151
150
  end
152
- local gridEntities = getGridEntities(nil)
153
151
  local poops = {}
154
- for ____, gridEntity in ipairs(gridEntities) do
152
+ for ____, gridEntity in ipairs(getGridEntities(nil)) do
155
153
  local poop = gridEntity:ToPoop()
156
154
  if poop ~= nil then
157
155
  local gridEntityVariant = poop:GetVariant()
@@ -170,9 +168,8 @@ function ____exports.getPressurePlates(self, pressurePlateVariant)
170
168
  if pressurePlateVariant == nil then
171
169
  pressurePlateVariant = -1
172
170
  end
173
- local gridEntities = getGridEntities(nil)
174
171
  local pressurePlates = {}
175
- for ____, gridEntity in ipairs(gridEntities) do
172
+ for ____, gridEntity in ipairs(getGridEntities(nil)) do
176
173
  local pressurePlate = gridEntity:ToPressurePlate()
177
174
  if pressurePlate ~= nil then
178
175
  local gridEntityVariant = pressurePlate:GetVariant()
@@ -193,9 +190,8 @@ function ____exports.getRocks(self, variant)
193
190
  if variant == nil then
194
191
  variant = -1
195
192
  end
196
- local gridEntities = getGridEntities(nil)
197
193
  local rocks = {}
198
- for ____, gridEntity in ipairs(gridEntities) do
194
+ for ____, gridEntity in ipairs(getGridEntities(nil)) do
199
195
  local rock = gridEntity:ToRock()
200
196
  if rock ~= nil then
201
197
  local gridEntityVariant = rock:GetVariant()
@@ -211,9 +207,8 @@ function ____exports.getSpikes(self, variant)
211
207
  if variant == nil then
212
208
  variant = -1
213
209
  end
214
- local gridEntities = getGridEntities(nil)
215
210
  local spikes = {}
216
- for ____, gridEntity in ipairs(gridEntities) do
211
+ for ____, gridEntity in ipairs(getGridEntities(nil)) do
217
212
  local spike = gridEntity:ToSpikes()
218
213
  if spike ~= nil then
219
214
  local gridEntityVariant = spike:GetVariant()
@@ -229,9 +224,8 @@ function ____exports.getTNT(self, variant)
229
224
  if variant == nil then
230
225
  variant = -1
231
226
  end
232
- local gridEntities = getGridEntities(nil)
233
227
  local tntArray = {}
234
- for ____, gridEntity in ipairs(gridEntities) do
228
+ for ____, gridEntity in ipairs(getGridEntities(nil)) do
235
229
  local tnt = gridEntity:ToTNT()
236
230
  if tnt ~= nil then
237
231
  local gridEntityVariant = tnt:GetVariant()
@@ -68,6 +68,7 @@ export * from "./functions/curses";
68
68
  export * from "./functions/debugFunctions";
69
69
  export * from "./functions/deepCopy";
70
70
  export * from "./functions/deepCopyTests";
71
+ export * from "./functions/dev";
71
72
  export * from "./functions/dimensions";
72
73
  export * from "./functions/direction";
73
74
  export * from "./functions/doors";