isaacscript-common 1.0.506 → 1.0.510
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/debug.d.ts +5 -0
- package/dist/functions/debug.lua +15 -0
- package/dist/functions/log.d.ts +0 -5
- package/dist/functions/log.lua +0 -12
- package/dist/functions/random.lua +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.lua +8 -0
- package/package.json +5 -5
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____exports = {}
|
|
3
|
+
function ____exports.traceback(self)
|
|
4
|
+
if debug ~= nil then
|
|
5
|
+
local tracebackMsg = debug.traceback()
|
|
6
|
+
Isaac.DebugString(tracebackMsg)
|
|
7
|
+
return
|
|
8
|
+
end
|
|
9
|
+
if sandboxTraceback ~= nil then
|
|
10
|
+
sandboxTraceback()
|
|
11
|
+
return
|
|
12
|
+
end
|
|
13
|
+
Isaac.DebugString("Error: Cannot perform a traceback since --luadebug is not enabled.")
|
|
14
|
+
end
|
|
15
|
+
return ____exports
|
package/dist/functions/log.d.ts
CHANGED
|
@@ -41,8 +41,3 @@ export declare function logVector(this: void, vector: Vector): void;
|
|
|
41
41
|
* This is useful for printing out variables from the in-game debug console.
|
|
42
42
|
*/
|
|
43
43
|
export declare function setLogFunctionsGlobal(): void;
|
|
44
|
-
/**
|
|
45
|
-
* Helper function to print a stack trace to the "log.txt" file, similar to JavaScript's
|
|
46
|
-
* `console.trace()` function. This will only work if the `--luadebug` launch option is enabled.
|
|
47
|
-
*/
|
|
48
|
-
export declare function traceback(): void;
|
package/dist/functions/log.lua
CHANGED
|
@@ -126,16 +126,4 @@ function ____exports.setLogFunctionsGlobal(self)
|
|
|
126
126
|
globals.logSet = ____exports.logSet
|
|
127
127
|
globals.logVector = ____exports.logVector
|
|
128
128
|
end
|
|
129
|
-
function ____exports.traceback(self)
|
|
130
|
-
if debug ~= nil then
|
|
131
|
-
local tracebackMsg = debug.traceback()
|
|
132
|
-
Isaac.DebugString(tracebackMsg)
|
|
133
|
-
return
|
|
134
|
-
end
|
|
135
|
-
if sandboxTraceback ~= nil then
|
|
136
|
-
sandboxTraceback()
|
|
137
|
-
return
|
|
138
|
-
end
|
|
139
|
-
Isaac.DebugString("Error: Cannot perform a traceback since --luadebug is not enabled.")
|
|
140
|
-
end
|
|
141
129
|
return ____exports
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
local ____exports = {}
|
|
3
3
|
local RECOMMENDED_SHIFT_IDX
|
|
4
|
+
local ____debug = require("functions.debug")
|
|
5
|
+
local traceback = ____debug.traceback
|
|
4
6
|
function ____exports.initRNG(self, seed)
|
|
5
7
|
if seed == nil then
|
|
6
8
|
seed = Random()
|
|
7
9
|
end
|
|
8
10
|
if seed == 0 then
|
|
11
|
+
traceback(nil)
|
|
9
12
|
error("You cannot initialize an RNG object with a seed of 0, or the game will crash.")
|
|
10
13
|
end
|
|
11
14
|
local rng = RNG()
|
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export * from "./functions/charge";
|
|
|
15
15
|
export * from "./functions/collectibles";
|
|
16
16
|
export * from "./functions/collectibleSet";
|
|
17
17
|
export * from "./functions/color";
|
|
18
|
+
export * from "./functions/debug";
|
|
18
19
|
export { deepCopy } from "./functions/deepCopy";
|
|
19
20
|
export { deepCopyTests } from "./functions/deepCopyTests";
|
|
20
21
|
export * from "./functions/doors";
|
package/dist/index.lua
CHANGED
|
@@ -132,6 +132,14 @@ do
|
|
|
132
132
|
end
|
|
133
133
|
end
|
|
134
134
|
end
|
|
135
|
+
do
|
|
136
|
+
local ____export = require("functions.debug")
|
|
137
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
138
|
+
if ____exportKey ~= "default" then
|
|
139
|
+
____exports[____exportKey] = ____exportValue
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
end
|
|
135
143
|
do
|
|
136
144
|
local ____deepCopy = require("functions.deepCopy")
|
|
137
145
|
local deepCopy = ____deepCopy.deepCopy
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.510",
|
|
4
4
|
"description": "Helper functions for IsaacScript mods",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"isaac",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"dist/**/*.d.ts"
|
|
26
26
|
],
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"isaac-typescript-definitions": "^1.0.
|
|
29
|
-
"isaacscript-lint": "^1.0.
|
|
28
|
+
"isaac-typescript-definitions": "^1.0.293",
|
|
29
|
+
"isaacscript-lint": "^1.0.71",
|
|
30
30
|
"typedoc": "^0.22.10",
|
|
31
|
-
"typescript": "4.
|
|
32
|
-
"typescript-to-lua": "
|
|
31
|
+
"typescript": "4.4.4",
|
|
32
|
+
"typescript-to-lua": "1.1.1"
|
|
33
33
|
}
|
|
34
34
|
}
|