isaacscript-common 9.0.1 → 9.1.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.
- package/dist/functions/debug.d.ts +25 -0
- package/dist/functions/debug.d.ts.map +1 -1
- package/dist/functions/debug.lua +50 -0
- package/dist/functions/log.d.ts +2 -7
- package/dist/functions/log.d.ts.map +1 -1
- package/dist/functions/log.lua +9 -31
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.lua +0 -8
- package/package.json +1 -1
- package/src/functions/debug.ts +49 -0
- package/src/functions/log.ts +15 -35
- package/src/index.ts +0 -1
- package/dist/functions/dev.d.ts +0 -20
- package/dist/functions/dev.d.ts.map +0 -1
- package/dist/functions/dev.lua +0 -34
- package/src/functions/dev.ts +0 -31
|
@@ -1,3 +1,22 @@
|
|
|
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;
|
|
1
20
|
/**
|
|
2
21
|
* Helper function to get a stack trace.
|
|
3
22
|
*
|
|
@@ -17,6 +36,12 @@ export declare function getTraceback(): string;
|
|
|
17
36
|
* is enabled or not.
|
|
18
37
|
*/
|
|
19
38
|
export declare function isLuaDebugEnabled(): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Converts every `isaacscript-common` function that begins with "log" to a global function.
|
|
41
|
+
*
|
|
42
|
+
* This is useful when printing out variables from the in-game debug console.
|
|
43
|
+
*/
|
|
44
|
+
export declare function setLogFunctionsGlobal(): void;
|
|
20
45
|
/**
|
|
21
46
|
* Helper function to print a stack trace to the "log.txt" file, similar to JavaScript's
|
|
22
47
|
* `console.trace` function.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../src/functions/debug.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../src/functions/debug.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AASrD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAMxD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAYrC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAI3C;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAU5C;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAGhC"}
|
package/dist/functions/debug.lua
CHANGED
|
@@ -1,6 +1,56 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__ObjectEntries = ____lualib.__TS__ObjectEntries
|
|
1
3
|
local ____exports = {}
|
|
4
|
+
local ____exports = require("features.extraConsoleCommands.exports")
|
|
5
|
+
local enableExtraConsoleCommands = ____exports.enableExtraConsoleCommands
|
|
6
|
+
local ____fadeInRemover = require("features.fadeInRemover")
|
|
7
|
+
local removeFadeIn = ____fadeInRemover.removeFadeIn
|
|
8
|
+
local ____fastReset = require("features.fastReset")
|
|
9
|
+
local enableFastReset = ____fastReset.enableFastReset
|
|
10
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
11
|
+
local saveDataManagerSetGlobal = ____exports.saveDataManagerSetGlobal
|
|
12
|
+
local logExports = require("functions.log")
|
|
2
13
|
local ____log = require("functions.log")
|
|
3
14
|
local log = ____log.log
|
|
15
|
+
local logEntitiesExports = require("functions.logEntities")
|
|
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
|
+
function ____exports.setLogFunctionsGlobal(self)
|
|
20
|
+
local globals = _G
|
|
21
|
+
for ____, ____value in ipairs(__TS__ObjectEntries(logExports)) do
|
|
22
|
+
local logFuncName = ____value[1]
|
|
23
|
+
local logFunc = ____value[2]
|
|
24
|
+
globals[logFuncName] = logFunc
|
|
25
|
+
end
|
|
26
|
+
for ____, ____value in ipairs(__TS__ObjectEntries(logEntitiesExports)) do
|
|
27
|
+
local logFuncName = ____value[1]
|
|
28
|
+
local logFunc = ____value[2]
|
|
29
|
+
globals[logFuncName] = logFunc
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
--- Helper function to enable some IsaacScript features that are useful when developing a mod. They
|
|
33
|
+
-- should not be enabled when your mod goes to production (i.e. when it is uploaded to the Steam
|
|
34
|
+
-- Workshop).
|
|
35
|
+
--
|
|
36
|
+
-- The list of development features that are enabled are as follows:
|
|
37
|
+
--
|
|
38
|
+
-- - `saveDataManagerSetGlobal` - Sets your local variables registered with the save data manager as
|
|
39
|
+
-- global variables so you can access them from the in-game console.
|
|
40
|
+
-- - `setLogFunctionsGlobal` - Sets the various log functions global so that you can access them
|
|
41
|
+
-- from the in-game console.
|
|
42
|
+
-- - `enableExtraConsoleCommands` - Enables many extra in-game console commands that make warping
|
|
43
|
+
-- around easier (like e.g. `angel` to warp to the Angel Room).
|
|
44
|
+
-- - `enableFastReset` - Makes it so that the r key resets the game instantaneously.
|
|
45
|
+
-- - `removeFadeIn` - Removes the slow fade in that occurs at the beginning of the run, so that you
|
|
46
|
+
-- can immediately start playing or testing.
|
|
47
|
+
function ____exports.enableDevFeatures(self, mod)
|
|
48
|
+
saveDataManagerSetGlobal(nil)
|
|
49
|
+
____exports.setLogFunctionsGlobal(nil)
|
|
50
|
+
enableExtraConsoleCommands(nil, mod)
|
|
51
|
+
enableFastReset(nil)
|
|
52
|
+
removeFadeIn(nil)
|
|
53
|
+
end
|
|
4
54
|
--- Helper function to get a stack trace.
|
|
5
55
|
--
|
|
6
56
|
-- This will only work if the `--luadebug` launch option is enabled or the Racing+ sandbox is
|
package/dist/functions/log.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="typescript-to-lua/language-extensions" />
|
|
2
|
-
import { DamageFlag, EntityFlag, ProjectileFlag, TearFlag, UseFlag } from "isaac-typescript-definitions";
|
|
2
|
+
import { CollectibleType, DamageFlag, EntityFlag, ProjectileFlag, TearFlag, UseFlag } from "isaac-typescript-definitions";
|
|
3
3
|
/**
|
|
4
4
|
* Helper function to prefix the name of the function and the line number before a debug message.
|
|
5
5
|
*/
|
|
@@ -12,6 +12,7 @@ export declare function getDebugPrependString(msg: string, numParentFunctions?:
|
|
|
12
12
|
*/
|
|
13
13
|
export declare function log(this: void, msg: string): void;
|
|
14
14
|
export declare function logArray<T>(this: void, array: T[] | readonly T[]): void;
|
|
15
|
+
export declare function logCollectibleTypes(this: void, collectibleTypes: CollectibleType[]): void;
|
|
15
16
|
export declare function logColor(this: void, color: Color): void;
|
|
16
17
|
/** Helper function for printing out every damage flag that is turned on. Useful when debugging. */
|
|
17
18
|
export declare function logDamageFlags(this: void, flags: DamageFlag | BitFlags<DamageFlag>): void;
|
|
@@ -76,10 +77,4 @@ export declare function logUseFlags(this: void, flags: UseFlag | BitFlags<UseFla
|
|
|
76
77
|
*/
|
|
77
78
|
export declare function logUserdata(this: void, userdata: unknown): void;
|
|
78
79
|
export declare function logVector(this: void, vector: Vector, round?: boolean): void;
|
|
79
|
-
/**
|
|
80
|
-
* Converts every `isaacscript-common` function that begins with "log" to a global function.
|
|
81
|
-
*
|
|
82
|
-
* This is useful when printing out variables from the in-game debug console.
|
|
83
|
-
*/
|
|
84
|
-
export declare function setLogFunctionsGlobal(): void;
|
|
85
80
|
//# sourceMappingURL=log.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/functions/log.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,UAAU,EAKV,cAAc,EAGd,QAAQ,EACR,OAAO,EACR,MAAM,8BAA8B,CAAC;AAkBtC;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,EAKX,kBAAkB,SAAI,GACrB,MAAM,CAiBR;AAED;;;;;GAKG;AACH,wBAAgB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAGjD;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,SAAS,CAAC,EAAE,GAAG,IAAI,CAGvE;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAIvD;AAED,mGAAmG;AACnG,wBAAgB,cAAc,CAC5B,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC,GACvC,IAAI,CAEN;AAED,mGAAmG;AACnG,wBAAgB,cAAc,CAC5B,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC,GACvC,IAAI,CAEN;AAED,wBAA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AE,CAAC,CAAC,EACpB,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GACnB,IAAI,CA0BN;AAED,iGAAiG;AACjG,wBAAgB,YAAY,CAC1B,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,GACnC,IAAI,CAEN;AAED,gGAAgG;AAChG,wBAAgB,WAAW,CACzB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,GACjC,IAAI,CAEN;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,CAsB/D;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,UAAQ,GAAG,IAAI,CAGzE"}
|
package/dist/functions/log.lua
CHANGED
|
@@ -108,6 +108,15 @@ function ____exports.logArray(array)
|
|
|
108
108
|
local arrayString = arrayToString(nil, array)
|
|
109
109
|
____exports.log("Array: " .. arrayString)
|
|
110
110
|
end
|
|
111
|
+
function ____exports.logCollectibleTypes(collectibleTypes)
|
|
112
|
+
____exports.log("Collectibles:")
|
|
113
|
+
local i = 1
|
|
114
|
+
for ____, collectibleType in ipairs(collectibleTypes) do
|
|
115
|
+
local collectibleName = getCollectibleName(nil, collectibleType)
|
|
116
|
+
____exports.log(((((tostring(i) .. ") ") .. collectibleName) .. " (") .. tostring(collectibleType)) .. ")")
|
|
117
|
+
i = i + 1
|
|
118
|
+
end
|
|
119
|
+
end
|
|
111
120
|
function ____exports.logColor(color)
|
|
112
121
|
____exports.log((((((((((((("Color: R" .. tostring(color.R)) .. ", G") .. tostring(color.G)) .. ", B") .. tostring(color.B)) .. ", A") .. tostring(color.A)) .. ", RO") .. tostring(color.RO)) .. ", BO") .. tostring(color.BO)) .. ", GO") .. tostring(color.GO))
|
|
113
122
|
end
|
|
@@ -393,35 +402,4 @@ function ____exports.logVector(vector, round)
|
|
|
393
402
|
local vectorString = vectorToString(nil, vector, round)
|
|
394
403
|
____exports.log("Vector: " .. vectorString)
|
|
395
404
|
end
|
|
396
|
-
--- Converts every `isaacscript-common` function that begins with "log" to a global function.
|
|
397
|
-
--
|
|
398
|
-
-- This is useful when printing out variables from the in-game debug console.
|
|
399
|
-
function ____exports.setLogFunctionsGlobal(self)
|
|
400
|
-
local globals = _G
|
|
401
|
-
globals.log = ____exports.log
|
|
402
|
-
globals.logArray = ____exports.logArray
|
|
403
|
-
globals.logColor = ____exports.logColor
|
|
404
|
-
globals.logDamageFlags = ____exports.logDamageFlags
|
|
405
|
-
globals.logEntityID = ____exports.logEntityID
|
|
406
|
-
globals.logEntityFlags = ____exports.logEntityFlags
|
|
407
|
-
globals.logError = ____exports.logError
|
|
408
|
-
globals.logFlags = ____exports.logFlags
|
|
409
|
-
globals.logGameStateFlags = ____exports.logGameStateFlags
|
|
410
|
-
globals.logKColor = ____exports.logKColor
|
|
411
|
-
globals.logLevelStateFlags = ____exports.logLevelStateFlags
|
|
412
|
-
globals.logMap = ____exports.logMap
|
|
413
|
-
globals.logPlayerEffects = ____exports.logPlayerEffects
|
|
414
|
-
globals.logPlayerHealth = ____exports.logPlayerHealth
|
|
415
|
-
globals.logProjectileFlags = ____exports.logProjectileFlags
|
|
416
|
-
globals.logRoom = ____exports.logRoom
|
|
417
|
-
globals.logSeedEffects = ____exports.logSeedEffects
|
|
418
|
-
globals.logSet = ____exports.logSet
|
|
419
|
-
globals.logSounds = ____exports.logSounds
|
|
420
|
-
globals.logTable = ____exports.logTable
|
|
421
|
-
globals.logTableDifferences = ____exports.logTableDifferences
|
|
422
|
-
globals.logTearFlags = ____exports.logTearFlags
|
|
423
|
-
globals.logUseFlags = ____exports.logUseFlags
|
|
424
|
-
globals.logUserdata = ____exports.logUserdata
|
|
425
|
-
globals.logVector = ____exports.logVector
|
|
426
|
-
end
|
|
427
405
|
return ____exports
|
package/dist/index.d.ts
CHANGED
|
@@ -6489,6 +6489,8 @@ export declare function logAllGridEntities(this: void, includeWalls: boolean, gr
|
|
|
6489
6489
|
|
|
6490
6490
|
export declare function logArray<T>(this: void, array: T[] | readonly T[]): void;
|
|
6491
6491
|
|
|
6492
|
+
export declare function logCollectibleTypes(this: void, collectibleTypes: CollectibleType[]): void;
|
|
6493
|
+
|
|
6492
6494
|
export declare function logColor(this: void, color: Color): void;
|
|
6493
6495
|
|
|
6494
6496
|
/** Helper function for printing out every damage flag that is turned on. Useful when debugging. */
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,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,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,sCAAsC,CAAC;AACrD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yCAAyC,C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7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,mBAAmB,CAAC"}
|
package/dist/index.lua
CHANGED
|
@@ -551,14 +551,6 @@ do
|
|
|
551
551
|
end
|
|
552
552
|
end
|
|
553
553
|
end
|
|
554
|
-
do
|
|
555
|
-
local ____export = require("functions.dev")
|
|
556
|
-
for ____exportKey, ____exportValue in pairs(____export) do
|
|
557
|
-
if ____exportKey ~= "default" then
|
|
558
|
-
____exports[____exportKey] = ____exportValue
|
|
559
|
-
end
|
|
560
|
-
end
|
|
561
|
-
end
|
|
562
554
|
do
|
|
563
555
|
local ____export = require("functions.dimensions")
|
|
564
556
|
for ____exportKey, ____exportValue in pairs(____export) do
|
package/package.json
CHANGED
package/src/functions/debug.ts
CHANGED
|
@@ -1,4 +1,36 @@
|
|
|
1
|
+
import { ModUpgraded } from "../classes/ModUpgraded";
|
|
2
|
+
import { enableExtraConsoleCommands } from "../features/extraConsoleCommands/exports";
|
|
3
|
+
import { removeFadeIn } from "../features/fadeInRemover";
|
|
4
|
+
import { enableFastReset } from "../features/fastReset";
|
|
5
|
+
import { saveDataManagerSetGlobal } from "../features/saveDataManager/exports";
|
|
6
|
+
import * as logExports from "./log";
|
|
1
7
|
import { log } from "./log";
|
|
8
|
+
import * as logEntitiesExports from "./logEntities";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Helper function to enable some IsaacScript features that are useful when developing a mod. They
|
|
12
|
+
* should not be enabled when your mod goes to production (i.e. when it is uploaded to the Steam
|
|
13
|
+
* Workshop).
|
|
14
|
+
*
|
|
15
|
+
* The list of development features that are enabled are as follows:
|
|
16
|
+
*
|
|
17
|
+
* - `saveDataManagerSetGlobal` - Sets your local variables registered with the save data manager as
|
|
18
|
+
* global variables so you can access them from the in-game console.
|
|
19
|
+
* - `setLogFunctionsGlobal` - Sets the various log functions global so that you can access them
|
|
20
|
+
* from the in-game console.
|
|
21
|
+
* - `enableExtraConsoleCommands` - Enables many extra in-game console commands that make warping
|
|
22
|
+
* around easier (like e.g. `angel` to warp to the Angel Room).
|
|
23
|
+
* - `enableFastReset` - Makes it so that the r key resets the game instantaneously.
|
|
24
|
+
* - `removeFadeIn` - Removes the slow fade in that occurs at the beginning of the run, so that you
|
|
25
|
+
* can immediately start playing or testing.
|
|
26
|
+
*/
|
|
27
|
+
export function enableDevFeatures(mod: ModUpgraded): void {
|
|
28
|
+
saveDataManagerSetGlobal();
|
|
29
|
+
setLogFunctionsGlobal();
|
|
30
|
+
enableExtraConsoleCommands(mod);
|
|
31
|
+
enableFastReset();
|
|
32
|
+
removeFadeIn();
|
|
33
|
+
}
|
|
2
34
|
|
|
3
35
|
/**
|
|
4
36
|
* Helper function to get a stack trace.
|
|
@@ -37,6 +69,23 @@ export function isLuaDebugEnabled(): boolean {
|
|
|
37
69
|
return _G.package !== undefined;
|
|
38
70
|
}
|
|
39
71
|
|
|
72
|
+
/**
|
|
73
|
+
* Converts every `isaacscript-common` function that begins with "log" to a global function.
|
|
74
|
+
*
|
|
75
|
+
* This is useful when printing out variables from the in-game debug console.
|
|
76
|
+
*/
|
|
77
|
+
export function setLogFunctionsGlobal(): void {
|
|
78
|
+
const globals = _G as Record<string, unknown>;
|
|
79
|
+
|
|
80
|
+
for (const [logFuncName, logFunc] of Object.entries(logExports)) {
|
|
81
|
+
globals[logFuncName] = logFunc;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
for (const [logFuncName, logFunc] of Object.entries(logEntitiesExports)) {
|
|
85
|
+
globals[logFuncName] = logFunc;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
40
89
|
/**
|
|
41
90
|
* Helper function to print a stack trace to the "log.txt" file, similar to JavaScript's
|
|
42
91
|
* `console.trace` function.
|
package/src/functions/log.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
CollectibleType,
|
|
2
3
|
DamageFlag,
|
|
3
4
|
EntityFlag,
|
|
4
5
|
GameStateFlag,
|
|
@@ -73,6 +74,20 @@ export function logArray<T>(this: void, array: T[] | readonly T[]): void {
|
|
|
73
74
|
log(`Array: ${arrayString}`);
|
|
74
75
|
}
|
|
75
76
|
|
|
77
|
+
export function logCollectibleTypes(
|
|
78
|
+
this: void,
|
|
79
|
+
collectibleTypes: CollectibleType[],
|
|
80
|
+
): void {
|
|
81
|
+
log("Collectibles:");
|
|
82
|
+
|
|
83
|
+
let i = 1;
|
|
84
|
+
for (const collectibleType of collectibleTypes) {
|
|
85
|
+
const collectibleName = getCollectibleName(collectibleType);
|
|
86
|
+
log(`${i}) ${collectibleName} (${collectibleType})`);
|
|
87
|
+
i++;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
76
91
|
export function logColor(this: void, color: Color): void {
|
|
77
92
|
log(
|
|
78
93
|
`Color: R${color.R}, G${color.G}, B${color.B}, A${color.A}, RO${color.RO}, BO${color.BO}, GO${color.GO}`,
|
|
@@ -482,38 +497,3 @@ export function logVector(this: void, vector: Vector, round = false): void {
|
|
|
482
497
|
const vectorString = vectorToString(vector, round);
|
|
483
498
|
log(`Vector: ${vectorString}`);
|
|
484
499
|
}
|
|
485
|
-
|
|
486
|
-
/**
|
|
487
|
-
* Converts every `isaacscript-common` function that begins with "log" to a global function.
|
|
488
|
-
*
|
|
489
|
-
* This is useful when printing out variables from the in-game debug console.
|
|
490
|
-
*/
|
|
491
|
-
export function setLogFunctionsGlobal(): void {
|
|
492
|
-
const globals = _G as Record<string, unknown>;
|
|
493
|
-
|
|
494
|
-
globals["log"] = log;
|
|
495
|
-
globals["logArray"] = logArray;
|
|
496
|
-
globals["logColor"] = logColor;
|
|
497
|
-
globals["logDamageFlags"] = logDamageFlags;
|
|
498
|
-
globals["logEntityID"] = logEntityID;
|
|
499
|
-
globals["logEntityFlags"] = logEntityFlags;
|
|
500
|
-
globals["logError"] = logError;
|
|
501
|
-
globals["logFlags"] = logFlags;
|
|
502
|
-
globals["logGameStateFlags"] = logGameStateFlags;
|
|
503
|
-
globals["logKColor"] = logKColor;
|
|
504
|
-
globals["logLevelStateFlags"] = logLevelStateFlags;
|
|
505
|
-
globals["logMap"] = logMap;
|
|
506
|
-
globals["logPlayerEffects"] = logPlayerEffects;
|
|
507
|
-
globals["logPlayerHealth"] = logPlayerHealth;
|
|
508
|
-
globals["logProjectileFlags"] = logProjectileFlags;
|
|
509
|
-
globals["logRoom"] = logRoom;
|
|
510
|
-
globals["logSeedEffects"] = logSeedEffects;
|
|
511
|
-
globals["logSet"] = logSet;
|
|
512
|
-
globals["logSounds"] = logSounds;
|
|
513
|
-
globals["logTable"] = logTable;
|
|
514
|
-
globals["logTableDifferences"] = logTableDifferences;
|
|
515
|
-
globals["logTearFlags"] = logTearFlags;
|
|
516
|
-
globals["logUseFlags"] = logUseFlags;
|
|
517
|
-
globals["logUserdata"] = logUserdata;
|
|
518
|
-
globals["logVector"] = logVector;
|
|
519
|
-
}
|
package/src/index.ts
CHANGED
|
@@ -67,7 +67,6 @@ export * from "./functions/curses";
|
|
|
67
67
|
export * from "./functions/debug";
|
|
68
68
|
export * from "./functions/deepCopy";
|
|
69
69
|
export * from "./functions/deepCopyTests";
|
|
70
|
-
export * from "./functions/dev";
|
|
71
70
|
export * from "./functions/dimensions";
|
|
72
71
|
export * from "./functions/direction";
|
|
73
72
|
export * from "./functions/doors";
|
package/dist/functions/dev.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,CAMxD"}
|
package/dist/functions/dev.lua
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
local ____exports = {}
|
|
2
|
-
local ____exports = require("features.extraConsoleCommands.exports")
|
|
3
|
-
local enableExtraConsoleCommands = ____exports.enableExtraConsoleCommands
|
|
4
|
-
local ____fadeInRemover = require("features.fadeInRemover")
|
|
5
|
-
local removeFadeIn = ____fadeInRemover.removeFadeIn
|
|
6
|
-
local ____fastReset = require("features.fastReset")
|
|
7
|
-
local enableFastReset = ____fastReset.enableFastReset
|
|
8
|
-
local ____exports = require("features.saveDataManager.exports")
|
|
9
|
-
local saveDataManagerSetGlobal = ____exports.saveDataManagerSetGlobal
|
|
10
|
-
local ____log = require("functions.log")
|
|
11
|
-
local setLogFunctionsGlobal = ____log.setLogFunctionsGlobal
|
|
12
|
-
--- Helper function to enable some IsaacScript features that are useful when developing a mod. They
|
|
13
|
-
-- should not be enabled when your mod goes to production (i.e. when it is uploaded to the Steam
|
|
14
|
-
-- Workshop).
|
|
15
|
-
--
|
|
16
|
-
-- The list of development features that are enabled are as follows:
|
|
17
|
-
--
|
|
18
|
-
-- - `saveDataManagerSetGlobal` - Sets your local variables registered with the save data manager as
|
|
19
|
-
-- global variables so you can access them from the in-game console.
|
|
20
|
-
-- - `setLogFunctionsGlobal` - Sets the various log functions global so that you can access them
|
|
21
|
-
-- from the in-game console.
|
|
22
|
-
-- - `enableExtraConsoleCommands` - Enables many extra in-game console commands that make warping
|
|
23
|
-
-- around easier (like e.g. `angel` to warp to the Angel Room).
|
|
24
|
-
-- - `enableFastReset` - Makes it so that the r key resets the game instantaneously.
|
|
25
|
-
-- - `removeFadeIn` - Removes the slow fade in that occurs at the beginning of the run, so that you
|
|
26
|
-
-- can immediately start playing or testing.
|
|
27
|
-
function ____exports.enableDevFeatures(self, mod)
|
|
28
|
-
saveDataManagerSetGlobal(nil)
|
|
29
|
-
setLogFunctionsGlobal(nil)
|
|
30
|
-
enableExtraConsoleCommands(nil, mod)
|
|
31
|
-
enableFastReset(nil)
|
|
32
|
-
removeFadeIn(nil)
|
|
33
|
-
end
|
|
34
|
-
return ____exports
|
package/src/functions/dev.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ModUpgraded } from "../classes/ModUpgraded";
|
|
2
|
-
import { enableExtraConsoleCommands } from "../features/extraConsoleCommands/exports";
|
|
3
|
-
import { removeFadeIn } from "../features/fadeInRemover";
|
|
4
|
-
import { enableFastReset } from "../features/fastReset";
|
|
5
|
-
import { saveDataManagerSetGlobal } from "../features/saveDataManager/exports";
|
|
6
|
-
import { setLogFunctionsGlobal } from "./log";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Helper function to enable some IsaacScript features that are useful when developing a mod. They
|
|
10
|
-
* should not be enabled when your mod goes to production (i.e. when it is uploaded to the Steam
|
|
11
|
-
* Workshop).
|
|
12
|
-
*
|
|
13
|
-
* The list of development features that are enabled are as follows:
|
|
14
|
-
*
|
|
15
|
-
* - `saveDataManagerSetGlobal` - Sets your local variables registered with the save data manager as
|
|
16
|
-
* global variables so you can access them from the in-game console.
|
|
17
|
-
* - `setLogFunctionsGlobal` - Sets the various log functions global so that you can access them
|
|
18
|
-
* from the in-game console.
|
|
19
|
-
* - `enableExtraConsoleCommands` - Enables many extra in-game console commands that make warping
|
|
20
|
-
* around easier (like e.g. `angel` to warp to the Angel Room).
|
|
21
|
-
* - `enableFastReset` - Makes it so that the r key resets the game instantaneously.
|
|
22
|
-
* - `removeFadeIn` - Removes the slow fade in that occurs at the beginning of the run, so that you
|
|
23
|
-
* can immediately start playing or testing.
|
|
24
|
-
*/
|
|
25
|
-
export function enableDevFeatures(mod: ModUpgraded): void {
|
|
26
|
-
saveDataManagerSetGlobal();
|
|
27
|
-
setLogFunctionsGlobal();
|
|
28
|
-
enableExtraConsoleCommands(mod);
|
|
29
|
-
enableFastReset();
|
|
30
|
-
removeFadeIn();
|
|
31
|
-
}
|