isaacscript-common 13.3.2 → 13.3.3

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 (35) hide show
  1. package/dist/index.d.ts +18 -10
  2. package/dist/isaacscript-common.lua +3884 -3858
  3. package/dist/src/classes/ModUpgraded.lua +2 -2
  4. package/dist/src/core/upgradeMod.d.ts +2 -1
  5. package/dist/src/core/upgradeMod.d.ts.map +1 -1
  6. package/dist/src/core/upgradeMod.lua +2 -1
  7. package/dist/src/functions/benchmark.d.ts +0 -12
  8. package/dist/src/functions/benchmark.d.ts.map +1 -1
  9. package/dist/src/functions/benchmark.lua +0 -19
  10. package/dist/src/functions/debugFunctions.d.ts +18 -24
  11. package/dist/src/functions/debugFunctions.d.ts.map +1 -1
  12. package/dist/src/functions/debugFunctions.lua +53 -73
  13. package/dist/src/functions/dev.d.ts +20 -0
  14. package/dist/src/functions/dev.d.ts.map +1 -0
  15. package/dist/src/functions/dev.lua +36 -0
  16. package/dist/src/functions/globals.d.ts +7 -0
  17. package/dist/src/functions/globals.d.ts.map +1 -1
  18. package/dist/src/functions/globals.lua +24 -0
  19. package/dist/src/functions/gridEntitiesSpecific.d.ts.map +1 -1
  20. package/dist/src/functions/gridEntitiesSpecific.lua +6 -12
  21. package/dist/src/index.d.ts +1 -0
  22. package/dist/src/index.d.ts.map +1 -1
  23. package/dist/src/index.lua +8 -0
  24. package/dist/src/indexLua.d.ts +1 -0
  25. package/dist/src/indexLua.d.ts.map +1 -1
  26. package/dist/src/indexLua.lua +8 -0
  27. package/package.json +1 -1
  28. package/src/classes/ModUpgraded.ts +1 -1
  29. package/src/core/upgradeMod.ts +2 -1
  30. package/src/functions/benchmark.ts +0 -23
  31. package/src/functions/debugFunctions.ts +38 -55
  32. package/src/functions/dev.ts +32 -0
  33. package/src/functions/globals.ts +27 -1
  34. package/src/functions/gridEntitiesSpecific.ts +6 -18
  35. package/src/index.ts +1 -0
package/dist/index.d.ts CHANGED
@@ -5203,17 +5203,24 @@ export declare function getTearsStat(fireDelay: float): float;
5203
5203
  export declare function getTeleporters(variant?: number): GridEntity[];
5204
5204
 
5205
5205
  /**
5206
- * Helper function to get the current time in seconds for benchmarking / profiling purposes.
5206
+ * Helper function to get the current time for benchmarking / profiling purposes.
5207
5207
  *
5208
- * - If the "--luadebug" flag is enabled, then this function will use the `socket.gettime` method,
5209
- * which returns the epoch timestamp in seconds (e.g. "1640320492.5779"). This is preferable over
5210
- * the `Isaac.GetTime` method, since it has one extra decimal point of precision.
5211
- * - If the "--luadebug" flag is disabled, then this function will use the `Isaac.GetTime` method,
5212
- * which returns the number of seconds since the computer's operating system was started (e.g.
5213
- * "739454.963"). (The milliseconds return value of `Isaac.GetTime` is converted to seconds to
5214
- * align with the return value of `socket.gettime`.)
5208
+ * The return value will either be in seconds or milliseconds, depending on if the "--luadebug" flag
5209
+ * is turned on or not.
5210
+ *
5211
+ * If the "--luadebug" flag is present, then this function will use the `socket.gettime` method,
5212
+ * which returns the epoch timestamp in seconds (e.g. "1640320492.5779"). This is preferable over
5213
+ * the more conventional `Isaac.GetTime` method, since it has one extra decimal point of precision.
5214
+ *
5215
+ * If the "--luadebug" flag is not present, then this function will use the `Isaac.GetTime` method,
5216
+ * which returns the number of milliseconds since the computer's operating system was started (e.g.
5217
+ * "739454963").
5218
+ *
5219
+ * @param useSocketIfAvailable Optional. Whether to use the `socket.gettime` method, if available.
5220
+ * Default is true. If set to false, the `Isaac.GetTime()` method will
5221
+ * always be used.
5215
5222
  */
5216
- export declare function getTime(): float;
5223
+ export declare function getTime(useSocketIfAvailable?: boolean): float;
5217
5224
 
5218
5225
  /** Helper function to get all of the `GridEntityTNT` in the room. */
5219
5226
  export declare function getTNT(variant?: number): GridEntityTNT[];
@@ -12267,7 +12274,8 @@ export declare function unsetHotkey(keyboard: Keyboard): void;
12267
12274
  * @param debug Optional. Whether to log additional output when a callback is fired. Default is
12268
12275
  * false.
12269
12276
  * @param timeThreshold Optional. If provided, will only log callbacks that take longer than the
12270
- * specified number of seconds.
12277
+ * specified number of seconds (if the "--luadebug" launch flag is turned on)
12278
+ * or milliseconds (if the "--luadebug" launch flag is turned off).
12271
12279
  * @returns The upgraded mod object.
12272
12280
  */
12273
12281
  export declare function upgradeMod(modVanilla: Mod, debug?: boolean, timeThreshold?: float): ModUpgraded;