isaacscript-common 1.0.448 → 1.0.449
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.
package/dist/functions/util.d.ts
CHANGED
|
@@ -63,6 +63,12 @@ export declare function isGreedMode(): boolean;
|
|
|
63
63
|
* the game will not switch to a different seed.
|
|
64
64
|
*/
|
|
65
65
|
export declare function onSetSeed(): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Helper function to print something to the in-game console. Use this instead of invoking
|
|
68
|
+
* `Isaac.ConsoleOutput()` directly because it will automatically insert a newline at the end of the
|
|
69
|
+
* message (which `Isaac.ConsoleOutput()` does not do by default).
|
|
70
|
+
*/
|
|
71
|
+
export declare function printConsole(msg: string): void;
|
|
66
72
|
/**
|
|
67
73
|
* In a Map, you can use the `clear` method to delete every element. However, in a LuaTable, the
|
|
68
74
|
* `clear` method does not exist. Use this helper function as a drop-in replacement for this.
|
package/dist/functions/util.lua
CHANGED
|
@@ -58,6 +58,9 @@ function ____exports.onSetSeed(self)
|
|
|
58
58
|
local challenge = Isaac.GetChallenge()
|
|
59
59
|
return (challenge == Challenge.CHALLENGE_NULL) and customRun
|
|
60
60
|
end
|
|
61
|
+
function ____exports.printConsole(self, msg)
|
|
62
|
+
Isaac.ConsoleOutput(msg .. "\n")
|
|
63
|
+
end
|
|
61
64
|
function ____exports.tableClear(self, ____table)
|
|
62
65
|
for key in pairs(____table) do
|
|
63
66
|
____table[key] = nil
|