isaacscript-common 55.1.0 → 55.1.1
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/isaacscript-common.lua +2572 -2572
- package/dist/src/classes/callbacks/PostNewRoomEarly.lua +2 -2
- package/dist/src/classes/features/callbackLogic/CustomRevive.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/CustomRevive.lua +1 -2
- package/dist/src/classes/features/other/CustomStages.lua +2 -2
- package/dist/src/classes/features/other/ExtraConsoleCommands.lua +2 -2
- package/dist/src/classes/features/other/Pause.lua +2 -2
- package/dist/src/classes/features/other/TaintedLazarusPlayers.lua +2 -2
- package/dist/src/classes/features/other/saveDataManager/loadFromDisk.d.ts.map +1 -1
- package/dist/src/classes/features/other/saveDataManager/loadFromDisk.lua +1 -2
- package/dist/src/classes/features/other/saveDataManager/restoreDefaults.lua +2 -2
- package/dist/src/functions/hex.lua +2 -2
- package/dist/src/functions/jsonHelpers.lua +2 -2
- package/dist/src/functions/log.d.ts +7 -0
- package/dist/src/functions/log.d.ts.map +1 -1
- package/dist/src/functions/log.lua +8 -0
- package/dist/src/functions/logMisc.d.ts +0 -7
- package/dist/src/functions/logMisc.d.ts.map +1 -1
- package/dist/src/functions/logMisc.lua +0 -9
- package/dist/src/functions/rng.d.ts.map +1 -1
- package/dist/src/functions/rng.lua +4 -1
- package/package.json +1 -1
- package/src/classes/callbacks/PostNewRoomEarly.ts +1 -1
- package/src/classes/features/callbackLogic/CustomRevive.ts +1 -2
- package/src/classes/features/other/CustomStages.ts +1 -1
- package/src/classes/features/other/ExtraConsoleCommands.ts +1 -1
- package/src/classes/features/other/Pause.ts +1 -1
- package/src/classes/features/other/TaintedLazarusPlayers.ts +1 -1
- package/src/classes/features/other/saveDataManager/loadFromDisk.ts +1 -2
- package/src/classes/features/other/saveDataManager/restoreDefaults.ts +1 -1
- package/src/functions/hex.ts +1 -1
- package/src/functions/jsonHelpers.ts +1 -1
- package/src/functions/log.ts +11 -0
- package/src/functions/logMisc.ts +1 -12
- package/src/functions/rng.ts +4 -2
|
@@ -10,8 +10,8 @@ local game = ____cachedClasses.game
|
|
|
10
10
|
local ____gridEntities = require("src.functions.gridEntities")
|
|
11
11
|
local getTopLeftWallGridIndex = ____gridEntities.getTopLeftWallGridIndex
|
|
12
12
|
local spawnGridEntity = ____gridEntities.spawnGridEntity
|
|
13
|
-
local
|
|
14
|
-
local logError =
|
|
13
|
+
local ____log = require("src.functions.log")
|
|
14
|
+
local logError = ____log.logError
|
|
15
15
|
local ____shouldFire = require("src.shouldFire")
|
|
16
16
|
local shouldFireRoom = ____shouldFire.shouldFireRoom
|
|
17
17
|
local ____CustomCallback = require("src.classes.private.CustomCallback")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomRevive.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/CustomRevive.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CustomRevive.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/CustomRevive.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAI1D,aAAK,iBAAiB;IACpB,QAAQ,IAAA;IAER;;;OAGG;IACH,2BAA2B,IAAA;IAE3B,0BAA0B,IAAA;CAC3B;AAUD,qBAAa,YAAa,SAAQ,OAAO;IACvB,CAAC;;;;;;MAAK;IAEtB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkB;IAClD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAmB;IACpD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;gBAG1C,eAAe,EAAE,eAAe,EAChC,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,YAAY;IAkC5B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAQzB;IAIF,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAMpC;IAGF,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAOnC;IAGF,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAIzC;IAEF,OAAO,CAAC,4BAA4B;IA0CpC,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAKpC;IAGF,OAAO,CAAC,QAAQ,CAAC,eAAe,CAE9B;IAEF;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAmC1B,OAAO,CAAC,eAAe;CASxB"}
|
|
@@ -18,8 +18,7 @@ local ____external = require("src.functions.external")
|
|
|
18
18
|
local removeCollectibleFromItemTracker = ____external.removeCollectibleFromItemTracker
|
|
19
19
|
local ____log = require("src.functions.log")
|
|
20
20
|
local log = ____log.log
|
|
21
|
-
local
|
|
22
|
-
local logError = ____logMisc.logError
|
|
21
|
+
local logError = ____log.logError
|
|
23
22
|
local ____playerIndex = require("src.functions.playerIndex")
|
|
24
23
|
local getPlayerFromIndex = ____playerIndex.getPlayerFromIndex
|
|
25
24
|
local getPlayerIndex = ____playerIndex.getPlayerIndex
|
|
@@ -34,8 +34,8 @@ local getDoorSlotsForRoomShape = ____doors.getDoorSlotsForRoomShape
|
|
|
34
34
|
local ____flag = require("src.functions.flag")
|
|
35
35
|
local hasFlag = ____flag.hasFlag
|
|
36
36
|
local removeFlag = ____flag.removeFlag
|
|
37
|
-
local
|
|
38
|
-
local logError =
|
|
37
|
+
local ____log = require("src.functions.log")
|
|
38
|
+
local logError = ____log.logError
|
|
39
39
|
local ____rng = require("src.functions.rng")
|
|
40
40
|
local newRNG = ____rng.newRNG
|
|
41
41
|
local ____rockAlt = require("src.functions.rockAlt")
|
|
@@ -21,8 +21,8 @@ local isVanillaConsoleCommand = ____console.isVanillaConsoleCommand
|
|
|
21
21
|
local ____flag = require("src.functions.flag")
|
|
22
22
|
local addFlag = ____flag.addFlag
|
|
23
23
|
local bitFlags = ____flag.bitFlags
|
|
24
|
-
local
|
|
25
|
-
local logError =
|
|
24
|
+
local ____log = require("src.functions.log")
|
|
25
|
+
local logError = ____log.logError
|
|
26
26
|
local ____string = require("src.functions.string")
|
|
27
27
|
local getMapPartialMatch = ____string.getMapPartialMatch
|
|
28
28
|
local ____utils = require("src.functions.utils")
|
|
@@ -24,8 +24,8 @@ local removeAllProjectiles = ____entitiesSpecific.removeAllProjectiles
|
|
|
24
24
|
local removeAllTears = ____entitiesSpecific.removeAllTears
|
|
25
25
|
local ____isaacAPIClass = require("src.functions.isaacAPIClass")
|
|
26
26
|
local isTear = ____isaacAPIClass.isTear
|
|
27
|
-
local
|
|
28
|
-
local logError =
|
|
27
|
+
local ____log = require("src.functions.log")
|
|
28
|
+
local logError = ____log.logError
|
|
29
29
|
local ____playerCollectibles = require("src.functions.playerCollectibles")
|
|
30
30
|
local useActiveItemTemp = ____playerCollectibles.useActiveItemTemp
|
|
31
31
|
local ____playerIndex = require("src.functions.playerIndex")
|
|
@@ -10,8 +10,8 @@ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
|
10
10
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
11
11
|
local ____decorators = require("src.decorators")
|
|
12
12
|
local Exported = ____decorators.Exported
|
|
13
|
-
local
|
|
14
|
-
local logError =
|
|
13
|
+
local ____log = require("src.functions.log")
|
|
14
|
+
local logError = ____log.logError
|
|
15
15
|
local ____Feature = require("src.classes.private.Feature")
|
|
16
16
|
local Feature = ____Feature.Feature
|
|
17
17
|
local v = {run = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadFromDisk.d.ts","sourceRoot":"","sources":["../../../../../../src/classes/features/other/saveDataManager/loadFromDisk.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"loadFromDisk.d.ts","sourceRoot":"","sources":["../../../../../../src/classes/features/other/saveDataManager/loadFromDisk.ts"],"names":[],"mappings":";;AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAK3D,wBAAgB,YAAY,CAC1B,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,EACrC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,GAC1C,IAAI,CAwDN"}
|
|
@@ -6,8 +6,7 @@ local ____jsonHelpers = require("src.functions.jsonHelpers")
|
|
|
6
6
|
local jsonDecode = ____jsonHelpers.jsonDecode
|
|
7
7
|
local ____log = require("src.functions.log")
|
|
8
8
|
local log = ____log.log
|
|
9
|
-
local
|
|
10
|
-
local logError = ____logMisc.logError
|
|
9
|
+
local logError = ____log.logError
|
|
11
10
|
local ____merge = require("src.functions.merge")
|
|
12
11
|
local merge = ____merge.merge
|
|
13
12
|
local ____table = require("src.functions.table")
|
|
@@ -9,8 +9,8 @@ local ____SerializationType = require("src.enums.SerializationType")
|
|
|
9
9
|
local SerializationType = ____SerializationType.SerializationType
|
|
10
10
|
local ____deepCopy = require("src.functions.deepCopy")
|
|
11
11
|
local deepCopy = ____deepCopy.deepCopy
|
|
12
|
-
local
|
|
13
|
-
local logError =
|
|
12
|
+
local ____log = require("src.functions.log")
|
|
13
|
+
local logError = ____log.logError
|
|
14
14
|
local ____table = require("src.functions.table")
|
|
15
15
|
local clearTable = ____table.clearTable
|
|
16
16
|
local iterateTableInOrder = ____table.iterateTableInOrder
|
|
@@ -2,8 +2,8 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local __TS__StringReplace = ____lualib.__TS__StringReplace
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local hexToRGB, HEX_STRING_LENGTH
|
|
5
|
-
local
|
|
6
|
-
local logError =
|
|
5
|
+
local ____log = require("src.functions.log")
|
|
6
|
+
local logError = ____log.logError
|
|
7
7
|
function hexToRGB(self, hexString)
|
|
8
8
|
hexString = __TS__StringReplace(hexString, "#", "")
|
|
9
9
|
if #hexString ~= HEX_STRING_LENGTH then
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
2
|
local jsonLua = require("src.lib.jsonLua")
|
|
3
|
-
local
|
|
4
|
-
local logError =
|
|
3
|
+
local ____log = require("src.functions.log")
|
|
4
|
+
local logError = ____log.logError
|
|
5
5
|
local function tryDecode(jsonString)
|
|
6
6
|
return jsonLua.decode(jsonString)
|
|
7
7
|
end
|
|
@@ -32,4 +32,11 @@ export declare function log(this: void, msg: string | number, includeParentFunct
|
|
|
32
32
|
* time.
|
|
33
33
|
*/
|
|
34
34
|
export declare function logAndPrint(msg: string): void;
|
|
35
|
+
/**
|
|
36
|
+
* Helper function to log an error message and also print it to the console for better visibility.
|
|
37
|
+
*
|
|
38
|
+
* This is useful in situations where using the `error` function would be dangerous (since it
|
|
39
|
+
* prevents all of the subsequent code in the callback from running).
|
|
40
|
+
*/
|
|
41
|
+
export declare function logError(this: void, msg: string): void;
|
|
35
42
|
//# sourceMappingURL=log.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/functions/log.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,IAAI,EAKV,MAAM,SAAI,GACT,MAAM,GAAG,SAAS,CAiBpB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,GAAG,CACjB,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,MAAM,GAAG,MAAM,EACpB,qBAAqB,UAAO,GAC3B,IAAI,CAaN;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAG7C"}
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/functions/log.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,IAAI,EAKV,MAAM,SAAI,GACT,MAAM,GAAG,SAAS,CAiBpB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,GAAG,CACjB,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,MAAM,GAAG,MAAM,EACpB,qBAAqB,UAAO,GAC3B,IAAI,CAaN;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAG7C;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAGtD"}
|
|
@@ -62,4 +62,12 @@ function ____exports.logAndPrint(self, msg)
|
|
|
62
62
|
____exports.log(msg)
|
|
63
63
|
print(msg)
|
|
64
64
|
end
|
|
65
|
+
--- Helper function to log an error message and also print it to the console for better visibility.
|
|
66
|
+
--
|
|
67
|
+
-- This is useful in situations where using the `error` function would be dangerous (since it
|
|
68
|
+
-- prevents all of the subsequent code in the callback from running).
|
|
69
|
+
function ____exports.logError(msg)
|
|
70
|
+
local errorMsg = "Error: " .. msg
|
|
71
|
+
____exports.logAndPrint(nil, errorMsg)
|
|
72
|
+
end
|
|
65
73
|
return ____exports
|
|
@@ -29,13 +29,6 @@ export declare function logDisplayFlags(this: void, displayFlags: DisplayFlag |
|
|
|
29
29
|
/** Helper function to log every entity flag that is turned on. Useful when debugging. */
|
|
30
30
|
export declare function logEntityFlags(this: void, entityFlags: EntityFlag | BitFlags<EntityFlag>): void;
|
|
31
31
|
export declare function logEntityID(this: void, entity: Entity): void;
|
|
32
|
-
/**
|
|
33
|
-
* Helper function to log an error message and also print it to the console for better visibility.
|
|
34
|
-
*
|
|
35
|
-
* This is useful in situations where using the `error` function would be dangerous (since it
|
|
36
|
-
* prevents all of the subsequent code in the callback from running).
|
|
37
|
-
*/
|
|
38
|
-
export declare function logError(this: void, msg: string): void;
|
|
39
32
|
/** Helper function for logging every flag that is turned on. Useful when debugging. */
|
|
40
33
|
export declare function logFlags<T extends BitFlag | BitFlag128>(this: void, flags: T | BitFlags<T>, flagEnum: Record<string, T>, description?: string): void;
|
|
41
34
|
/** Helper function for logging every game state flag that is turned on. Useful when debugging. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logMisc.d.ts","sourceRoot":"","sources":["../../../src/functions/logMisc.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EACL,UAAU,EACV,WAAW,EACX,UAAU,EAMV,cAAc,EAGd,QAAQ,EACR,OAAO,EACR,MAAM,8BAA8B,CAAC;AAoBtC;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EACxB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,CAAC,EAAE,GAAG,SAAS,CAAC,EAAE,EACzB,IAAI,CAAC,EAAE,MAAM,GACZ,IAAI,CAaN;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,IAAI,EACV,gBAAgB,EAAE,eAAe,EAAE,EACnC,IAAI,CAAC,EAAE,MAAM,GACZ,IAAI,CAaN;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAQtE;AAED,yFAAyF;AACzF,wBAAgB,cAAc,CAC5B,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC,GAC7C,IAAI,CAEN;AAED,0FAA0F;AAC1F,wBAAgB,eAAe,CAC7B,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,WAAW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AAED,gGAAgG;AAChG,wBAAgB,WAAW,CACzB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,GACpC,IAAI,CAEN;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,CAoB/D;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,MAAM,EACb,KAAK,UAAQ,GACZ,IAAI,CAON"}
|
|
@@ -44,7 +44,6 @@ local ____isaacAPIClass = require("src.functions.isaacAPIClass")
|
|
|
44
44
|
local getIsaacAPIClassName = ____isaacAPIClass.getIsaacAPIClassName
|
|
45
45
|
local ____log = require("src.functions.log")
|
|
46
46
|
local log = ____log.log
|
|
47
|
-
local logAndPrint = ____log.logAndPrint
|
|
48
47
|
local ____playerHealth = require("src.functions.playerHealth")
|
|
49
48
|
local getPlayerHealth = ____playerHealth.getPlayerHealth
|
|
50
49
|
local ____players = require("src.functions.players")
|
|
@@ -149,14 +148,6 @@ function ____exports.logEntityID(entity)
|
|
|
149
148
|
local entityID = getEntityID(nil, entity)
|
|
150
149
|
log("Logging entity: " .. entityID)
|
|
151
150
|
end
|
|
152
|
-
--- Helper function to log an error message and also print it to the console for better visibility.
|
|
153
|
-
--
|
|
154
|
-
-- This is useful in situations where using the `error` function would be dangerous (since it
|
|
155
|
-
-- prevents all of the subsequent code in the callback from running).
|
|
156
|
-
function ____exports.logError(msg)
|
|
157
|
-
local errorMsg = "Error: " .. msg
|
|
158
|
-
logAndPrint(nil, errorMsg)
|
|
159
|
-
end
|
|
160
151
|
--- Helper function for logging every game state flag that is turned on. Useful when debugging.
|
|
161
152
|
function ____exports.logGameStateFlags()
|
|
162
153
|
log("Logging game state flags:")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rng.d.ts","sourceRoot":"","sources":["../../../src/functions/rng.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"rng.d.ts","sourceRoot":"","sources":["../../../src/functions/rng.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAS9E,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACpD,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC,GAAG,CAAC;CAChD,CAAC;AAYF,wDAAwD;AACxD,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CASrC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,GAAG,CAetD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAIpC;AAED,6EAA6E;AAC7E,wBAAgB,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,GAAG,CAEpD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,aAAa,CAMxE;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,IAAI,OAAkB,GAAG,GAAG,CAIlD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAEvD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,aAAa,CAYpD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAoBjE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAK1D;AAED,4FAA4F;AAC5F,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAWlD"}
|
|
@@ -9,6 +9,8 @@ local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
|
9
9
|
local ____isaacAPIClass = require("src.functions.isaacAPIClass")
|
|
10
10
|
local isaacAPIClassEquals = ____isaacAPIClass.isaacAPIClassEquals
|
|
11
11
|
local isIsaacAPIClassOfType = ____isaacAPIClass.isIsaacAPIClassOfType
|
|
12
|
+
local ____log = require("src.functions.log")
|
|
13
|
+
local logError = ____log.logError
|
|
12
14
|
local ____table = require("src.functions.table")
|
|
13
15
|
local getNumbersFromTable = ____table.getNumbersFromTable
|
|
14
16
|
local tableHasKeys = ____table.tableHasKeys
|
|
@@ -42,7 +44,8 @@ end
|
|
|
42
44
|
--- Helper function to set a seed to an RNG object using Blade's recommended shift index.
|
|
43
45
|
function ____exports.setSeed(self, rng, seed)
|
|
44
46
|
if seed == 0 then
|
|
45
|
-
|
|
47
|
+
seed = ____exports.getRandomSeed(nil)
|
|
48
|
+
logError("Failed to set a RNG object to a seed of 0. Using a random value instead.")
|
|
46
49
|
end
|
|
47
50
|
rng:SetSeed(seed, RECOMMENDED_SHIFT_IDX)
|
|
48
51
|
end
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getTopLeftWallGridIndex,
|
|
7
7
|
spawnGridEntity,
|
|
8
8
|
} from "../../functions/gridEntities";
|
|
9
|
-
import { logError } from "../../functions/
|
|
9
|
+
import { logError } from "../../functions/log";
|
|
10
10
|
import { shouldFireRoom } from "../../shouldFire";
|
|
11
11
|
import { CustomCallback } from "../private/CustomCallback";
|
|
12
12
|
|
|
@@ -9,8 +9,7 @@ import { sfxManager } from "../../../core/cachedClasses";
|
|
|
9
9
|
import { ISCFeature } from "../../../enums/ISCFeature";
|
|
10
10
|
import { ModCallbackCustom } from "../../../enums/ModCallbackCustom";
|
|
11
11
|
import { removeCollectibleFromItemTracker } from "../../../functions/external";
|
|
12
|
-
import { log } from "../../../functions/log";
|
|
13
|
-
import { logError } from "../../../functions/logMisc";
|
|
12
|
+
import { log, logError } from "../../../functions/log";
|
|
14
13
|
import {
|
|
15
14
|
getPlayerFromIndex,
|
|
16
15
|
getPlayerIndex,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
getDoorSlotsForRoomShape,
|
|
21
21
|
} from "../../../functions/doors";
|
|
22
22
|
import { hasFlag, removeFlag } from "../../../functions/flag";
|
|
23
|
-
import { logError } from "../../../functions/
|
|
23
|
+
import { logError } from "../../../functions/log";
|
|
24
24
|
import { newRNG } from "../../../functions/rng";
|
|
25
25
|
import { removeUrnRewards } from "../../../functions/rockAlt";
|
|
26
26
|
import {
|
|
@@ -10,7 +10,7 @@ import { Exported } from "../../../decorators";
|
|
|
10
10
|
import { ModCallbackCustom } from "../../../enums/ModCallbackCustom";
|
|
11
11
|
import { isVanillaConsoleCommand } from "../../../functions/console";
|
|
12
12
|
import { addFlag, bitFlags } from "../../../functions/flag";
|
|
13
|
-
import { logError } from "../../../functions/
|
|
13
|
+
import { logError } from "../../../functions/log";
|
|
14
14
|
import { getMapPartialMatch } from "../../../functions/string";
|
|
15
15
|
import { assertDefined } from "../../../functions/utils";
|
|
16
16
|
import { Feature } from "../../private/Feature";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
removeAllTears,
|
|
14
14
|
} from "../../../functions/entitiesSpecific";
|
|
15
15
|
import { isTear } from "../../../functions/isaacAPIClass";
|
|
16
|
-
import { logError } from "../../../functions/
|
|
16
|
+
import { logError } from "../../../functions/log";
|
|
17
17
|
import { useActiveItemTemp } from "../../../functions/playerCollectibles";
|
|
18
18
|
import { getAllPlayers } from "../../../functions/playerIndex";
|
|
19
19
|
import { getTSTLClassName } from "../../../functions/tstlClass";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ModCallback, PlayerType } from "isaac-typescript-definitions";
|
|
2
2
|
import { Exported } from "../../../decorators";
|
|
3
|
-
import { logError } from "../../../functions/
|
|
3
|
+
import { logError } from "../../../functions/log";
|
|
4
4
|
import { Feature } from "../../private/Feature";
|
|
5
5
|
|
|
6
6
|
const v = {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsonDecode } from "../../../../functions/jsonHelpers";
|
|
2
|
-
import { log } from "../../../../functions/log";
|
|
3
|
-
import { logError } from "../../../../functions/logMisc";
|
|
2
|
+
import { log, logError } from "../../../../functions/log";
|
|
4
3
|
import { merge } from "../../../../functions/merge";
|
|
5
4
|
import { iterateTableInOrder } from "../../../../functions/table";
|
|
6
5
|
import { isString, isTable } from "../../../../functions/types";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { SaveDataKey } from "../../../../enums/SaveDataKey";
|
|
5
5
|
import { SerializationType } from "../../../../enums/SerializationType";
|
|
6
6
|
import { deepCopy } from "../../../../functions/deepCopy";
|
|
7
|
-
import { logError } from "../../../../functions/
|
|
7
|
+
import { logError } from "../../../../functions/log";
|
|
8
8
|
import { clearTable, iterateTableInOrder } from "../../../../functions/table";
|
|
9
9
|
import type { SaveData } from "../../../../interfaces/SaveData";
|
|
10
10
|
import { ReadonlySet } from "../../../../types/ReadonlySet";
|
package/src/functions/hex.ts
CHANGED
package/src/functions/log.ts
CHANGED
|
@@ -80,3 +80,14 @@ export function logAndPrint(msg: string): void {
|
|
|
80
80
|
log(msg);
|
|
81
81
|
print(msg);
|
|
82
82
|
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Helper function to log an error message and also print it to the console for better visibility.
|
|
86
|
+
*
|
|
87
|
+
* This is useful in situations where using the `error` function would be dangerous (since it
|
|
88
|
+
* prevents all of the subsequent code in the callback from running).
|
|
89
|
+
*/
|
|
90
|
+
export function logError(this: void, msg: string): void {
|
|
91
|
+
const errorMsg = `Error: ${msg}`;
|
|
92
|
+
logAndPrint(errorMsg);
|
|
93
|
+
}
|
package/src/functions/logMisc.ts
CHANGED
|
@@ -22,7 +22,7 @@ import { getEntityID } from "./entities";
|
|
|
22
22
|
import { getEnumEntries } from "./enums";
|
|
23
23
|
import { hasFlag } from "./flag";
|
|
24
24
|
import { getIsaacAPIClassName } from "./isaacAPIClass";
|
|
25
|
-
import { log
|
|
25
|
+
import { log } from "./log";
|
|
26
26
|
import { getPlayerHealth } from "./playerHealth";
|
|
27
27
|
import { getEffectsList, getPlayerName } from "./players";
|
|
28
28
|
import { getRoomData, getRoomGridIndex, getRoomListIndex } from "./roomData";
|
|
@@ -128,17 +128,6 @@ export function logEntityID(this: void, entity: Entity): void {
|
|
|
128
128
|
log(`Logging entity: ${entityID}`);
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
/**
|
|
132
|
-
* Helper function to log an error message and also print it to the console for better visibility.
|
|
133
|
-
*
|
|
134
|
-
* This is useful in situations where using the `error` function would be dangerous (since it
|
|
135
|
-
* prevents all of the subsequent code in the callback from running).
|
|
136
|
-
*/
|
|
137
|
-
export function logError(this: void, msg: string): void {
|
|
138
|
-
const errorMsg = `Error: ${msg}`;
|
|
139
|
-
logAndPrint(errorMsg);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
131
|
/** Helper function for logging every flag that is turned on. Useful when debugging. */
|
|
143
132
|
export function logFlags<T extends BitFlag | BitFlag128>(
|
|
144
133
|
this: void,
|
package/src/functions/rng.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { CopyableIsaacAPIClassType } from "isaac-typescript-definitions";
|
|
|
2
2
|
import { game } from "../core/cachedClasses";
|
|
3
3
|
import { SerializationBrand } from "../enums/private/SerializationBrand";
|
|
4
4
|
import { isaacAPIClassEquals, isIsaacAPIClassOfType } from "./isaacAPIClass";
|
|
5
|
+
import { logError } from "./log";
|
|
5
6
|
import { getNumbersFromTable, tableHasKeys } from "./table";
|
|
6
7
|
import { isTable } from "./types";
|
|
7
8
|
import { assertDefined } from "./utils";
|
|
@@ -155,8 +156,9 @@ export function setAllRNGToStartSeed(object: unknown): void {
|
|
|
155
156
|
/** Helper function to set a seed to an RNG object using Blade's recommended shift index. */
|
|
156
157
|
export function setSeed(rng: RNG, seed: Seed): void {
|
|
157
158
|
if (seed === 0) {
|
|
158
|
-
|
|
159
|
-
|
|
159
|
+
seed = getRandomSeed();
|
|
160
|
+
logError(
|
|
161
|
+
"Failed to set a RNG object to a seed of 0. Using a random value instead.",
|
|
160
162
|
);
|
|
161
163
|
}
|
|
162
164
|
|