isaacscript-common 1.0.517 → 1.0.521
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/callbacks/preNewLevel.d.ts +2 -0
- package/dist/callbacks/preNewLevel.lua +38 -0
- package/dist/callbacks/subscriptions/PreNewLevel.d.ts +4 -0
- package/dist/callbacks/subscriptions/PreNewLevel.lua +18 -0
- package/dist/functions/array.lua +3 -0
- package/dist/functions/stage.d.ts +9 -0
- package/dist/functions/stage.lua +54 -0
- package/dist/patchErrorFunctions.lua +20 -10
- package/dist/types/CallbackParametersCustom.d.ts +2 -0
- package/dist/types/ModCallbacksCustom.d.ts +34 -33
- package/dist/types/ModCallbacksCustom.lua +35 -33
- package/dist/types/ModUpgraded.lua +8 -0
- package/dist/upgradeMod.lua +3 -0
- package/package.json +2 -2
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____exports = {}
|
|
3
|
+
local hasSubscriptions, postPlayerRender, firedOnStage
|
|
4
|
+
local ____sprite = require("functions.sprite")
|
|
5
|
+
local getFinalFrameOfAnimation = ____sprite.getFinalFrameOfAnimation
|
|
6
|
+
local ____stage = require("functions.stage")
|
|
7
|
+
local getEffectiveStage = ____stage.getEffectiveStage
|
|
8
|
+
local ____PreNewLevel = require("callbacks.subscriptions.PreNewLevel")
|
|
9
|
+
local preNewLevelFire = ____PreNewLevel.preNewLevelFire
|
|
10
|
+
local preNewLevelHasSubscriptions = ____PreNewLevel.preNewLevelHasSubscriptions
|
|
11
|
+
function hasSubscriptions(self)
|
|
12
|
+
return preNewLevelHasSubscriptions(nil)
|
|
13
|
+
end
|
|
14
|
+
function postPlayerRender(self, player)
|
|
15
|
+
if not hasSubscriptions(nil) then
|
|
16
|
+
return
|
|
17
|
+
end
|
|
18
|
+
local effectiveStage = getEffectiveStage(nil)
|
|
19
|
+
if effectiveStage == firedOnStage then
|
|
20
|
+
return
|
|
21
|
+
end
|
|
22
|
+
local sprite = player:GetSprite()
|
|
23
|
+
local animation = sprite:GetAnimation()
|
|
24
|
+
if (animation ~= "Trapdoor") and (animation ~= "LightTravel") then
|
|
25
|
+
return
|
|
26
|
+
end
|
|
27
|
+
local frame = sprite:GetFrame()
|
|
28
|
+
local finalFrame = getFinalFrameOfAnimation(nil, sprite)
|
|
29
|
+
if frame == finalFrame then
|
|
30
|
+
firedOnStage = effectiveStage
|
|
31
|
+
preNewLevelFire(nil)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
firedOnStage = nil
|
|
35
|
+
function ____exports.preNewLevelCallbackInit(self, mod)
|
|
36
|
+
mod:AddCallback(ModCallbacks.MC_POST_PLAYER_RENDER, postPlayerRender)
|
|
37
|
+
end
|
|
38
|
+
return ____exports
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
require("lualib_bundle");
|
|
3
|
+
local ____exports = {}
|
|
4
|
+
local subscriptions = {}
|
|
5
|
+
function ____exports.preNewLevelHasSubscriptions(self)
|
|
6
|
+
return #subscriptions > 0
|
|
7
|
+
end
|
|
8
|
+
function ____exports.preNewLevelRegister(self, callback)
|
|
9
|
+
__TS__ArrayPush(subscriptions, {callback})
|
|
10
|
+
end
|
|
11
|
+
function ____exports.preNewLevelFire(self)
|
|
12
|
+
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
+
local callback
|
|
14
|
+
callback = ____value[1]
|
|
15
|
+
callback(nil)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
return ____exports
|
package/dist/functions/array.lua
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
2
|
export declare function getEffectiveStage(): int;
|
|
3
|
+
/** Helper function to directly warp to a specific stage using the "stage" console command. */
|
|
4
|
+
export declare function goToStage(stage: LevelStage, stageType: StageType): void;
|
|
3
5
|
export declare function onCathedral(): boolean;
|
|
4
6
|
export declare function onChest(): boolean;
|
|
5
7
|
export declare function onDarkRoom(): boolean;
|
|
@@ -14,3 +16,10 @@ export declare function onDarkRoom(): boolean;
|
|
|
14
16
|
export declare function onFinalFloor(): boolean;
|
|
15
17
|
export declare function onRepentanceStage(): boolean;
|
|
16
18
|
export declare function onSheol(): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Helper function to convert a numerical `StageType` into the letter suffix supplied to the "stage"
|
|
21
|
+
* console command. For example, `StageType.STAGETYPE_REPENTANCE` is the stage type for Downpour,
|
|
22
|
+
* and the console command to go to Downpour is "stage 1c", so this function converts
|
|
23
|
+
* `StageType.STAGETYPE_REPENTANCE` to "c".
|
|
24
|
+
*/
|
|
25
|
+
export declare function stageTypeToLetter(stageType: StageType): string;
|
package/dist/functions/stage.lua
CHANGED
|
@@ -1,11 +1,60 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
local ____exports = {}
|
|
3
|
+
local ____util = require("functions.util")
|
|
4
|
+
local ensureAllCases = ____util.ensureAllCases
|
|
3
5
|
function ____exports.onRepentanceStage(self)
|
|
4
6
|
local game = Game()
|
|
5
7
|
local level = game:GetLevel()
|
|
6
8
|
local stageType = level:GetStageType()
|
|
7
9
|
return (stageType == StageType.STAGETYPE_REPENTANCE) or (stageType == StageType.STAGETYPE_REPENTANCE_B)
|
|
8
10
|
end
|
|
11
|
+
function ____exports.stageTypeToLetter(self, stageType)
|
|
12
|
+
repeat
|
|
13
|
+
local ____switch12 = stageType
|
|
14
|
+
local ____cond12 = ____switch12 == StageType.STAGETYPE_ORIGINAL
|
|
15
|
+
if ____cond12 then
|
|
16
|
+
do
|
|
17
|
+
return ""
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
____cond12 = ____cond12 or (____switch12 == StageType.STAGETYPE_WOTL)
|
|
21
|
+
if ____cond12 then
|
|
22
|
+
do
|
|
23
|
+
return "a"
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
____cond12 = ____cond12 or (____switch12 == StageType.STAGETYPE_AFTERBIRTH)
|
|
27
|
+
if ____cond12 then
|
|
28
|
+
do
|
|
29
|
+
return "b"
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
____cond12 = ____cond12 or (____switch12 == StageType.STAGETYPE_GREEDMODE)
|
|
33
|
+
if ____cond12 then
|
|
34
|
+
do
|
|
35
|
+
return ""
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
____cond12 = ____cond12 or (____switch12 == StageType.STAGETYPE_REPENTANCE)
|
|
39
|
+
if ____cond12 then
|
|
40
|
+
do
|
|
41
|
+
return "c"
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
____cond12 = ____cond12 or (____switch12 == StageType.STAGETYPE_REPENTANCE_B)
|
|
45
|
+
if ____cond12 then
|
|
46
|
+
do
|
|
47
|
+
return "d"
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
do
|
|
51
|
+
do
|
|
52
|
+
ensureAllCases(nil, stageType)
|
|
53
|
+
return ""
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
until true
|
|
57
|
+
end
|
|
9
58
|
function ____exports.getEffectiveStage(self)
|
|
10
59
|
local game = Game()
|
|
11
60
|
local level = game:GetLevel()
|
|
@@ -15,6 +64,11 @@ function ____exports.getEffectiveStage(self)
|
|
|
15
64
|
end
|
|
16
65
|
return stage
|
|
17
66
|
end
|
|
67
|
+
function ____exports.goToStage(self, stage, stageType)
|
|
68
|
+
local stageTypeLetterSuffix = ____exports.stageTypeToLetter(nil, stageType)
|
|
69
|
+
local command = ("stage " .. tostring(stage)) .. stageTypeLetterSuffix
|
|
70
|
+
Isaac.ExecuteCommand(command)
|
|
71
|
+
end
|
|
18
72
|
function ____exports.onCathedral(self)
|
|
19
73
|
local game = Game()
|
|
20
74
|
local level = game:GetLevel()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
|
-
local errorWithTraceback, slimTracebackOutput, vanillaError
|
|
4
|
+
local errorWithTraceback, slimTracebackOutput, removeAnyLineThatContains, LINE_SEPARATOR, USELESS_TRACEBACK_MESSAGES, vanillaError
|
|
5
5
|
local ____debug = require("functions.debug")
|
|
6
6
|
local getTraceback = ____debug.getTraceback
|
|
7
7
|
local ____util = require("functions.util")
|
|
@@ -16,20 +16,30 @@ function errorWithTraceback(message, level)
|
|
|
16
16
|
local tracebackOutput = getTraceback(nil)
|
|
17
17
|
local slimmedTracebackOutput = slimTracebackOutput(nil, tracebackOutput)
|
|
18
18
|
Isaac.DebugString(slimmedTracebackOutput)
|
|
19
|
-
vanillaError(message, level + 1)
|
|
19
|
+
return vanillaError(message, level + 1)
|
|
20
20
|
end
|
|
21
21
|
function slimTracebackOutput(self, tracebackOutput)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if __TS__StringIncludes(lines[2], "in upvalue 'getTraceback'") then
|
|
25
|
-
__TS__ArraySplice(lines, 1, 1)
|
|
22
|
+
for ____, msg in ipairs(USELESS_TRACEBACK_MESSAGES) do
|
|
23
|
+
tracebackOutput = removeAnyLineThatContains(nil, tracebackOutput, msg)
|
|
26
24
|
end
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
return tracebackOutput
|
|
26
|
+
end
|
|
27
|
+
function removeAnyLineThatContains(self, msg, containsMsg)
|
|
28
|
+
local lines = __TS__StringSplit(msg, LINE_SEPARATOR)
|
|
29
|
+
do
|
|
30
|
+
local i = 0
|
|
31
|
+
while i < #lines do
|
|
32
|
+
local line = lines[i + 1]
|
|
33
|
+
if __TS__StringIncludes(line, containsMsg) then
|
|
34
|
+
__TS__ArraySplice(lines, i, 1)
|
|
35
|
+
end
|
|
36
|
+
i = i + 1
|
|
37
|
+
end
|
|
29
38
|
end
|
|
30
|
-
|
|
31
|
-
return slimmedTracebackOutput
|
|
39
|
+
return table.concat(lines, LINE_SEPARATOR or ",")
|
|
32
40
|
end
|
|
41
|
+
LINE_SEPARATOR = "\n"
|
|
42
|
+
USELESS_TRACEBACK_MESSAGES = {"in upvalue 'getTraceback'", "in function 'sandboxGetTraceback'", "in function 'error'"}
|
|
33
43
|
function ____exports.patchErrorFunction(self)
|
|
34
44
|
if not isLuaDebugEnabled(nil) then
|
|
35
45
|
return
|
|
@@ -39,6 +39,7 @@ import { PostTearInitLateCallbackType } from "../callbacks/subscriptions/postTea
|
|
|
39
39
|
import { PostTransformationCallbackType } from "../callbacks/subscriptions/postTransformation";
|
|
40
40
|
import { PreCustomReviveCallbackType } from "../callbacks/subscriptions/preCustomRevive";
|
|
41
41
|
import { PreItemPickupCallbackType } from "../callbacks/subscriptions/preItemPickup";
|
|
42
|
+
import { PreNewLevelCallbackType } from "../callbacks/subscriptions/PreNewLevel";
|
|
42
43
|
import { ModCallbacksCustom } from "./ModCallbacksCustom";
|
|
43
44
|
export interface CallbackParametersCustom {
|
|
44
45
|
[ModCallbacksCustom.MC_POST_GAME_STARTED_REORDERED]: [
|
|
@@ -65,6 +66,7 @@ export interface CallbackParametersCustom {
|
|
|
65
66
|
[ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY]: [
|
|
66
67
|
callback: PostNewRoomEarlyCallbackType
|
|
67
68
|
];
|
|
69
|
+
[ModCallbacksCustom.MC_PRE_NEW_LEVEL]: [callback: PreNewLevelCallbackType];
|
|
68
70
|
[ModCallbacksCustom.MC_POST_PLAYER_INIT_LATE]: [
|
|
69
71
|
callback: PostPlayerInitLateCallbackType,
|
|
70
72
|
playerVariant?: PlayerVariant
|
|
@@ -15,37 +15,38 @@ export declare enum ModCallbacksCustom {
|
|
|
15
15
|
MC_POST_PLAYER_UPDATE_REORDERED = 4,
|
|
16
16
|
MC_POST_PLAYER_RENDER_REORDERED = 5,
|
|
17
17
|
MC_POST_NEW_ROOM_EARLY = 6,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
18
|
+
MC_PRE_NEW_LEVEL = 7,
|
|
19
|
+
MC_POST_PLAYER_INIT_LATE = 8,
|
|
20
|
+
MC_POST_TEAR_INIT_LATE = 9,
|
|
21
|
+
MC_POST_FAMILIAR_INIT_LATE = 10,
|
|
22
|
+
MC_POST_BOMB_INIT_LATE = 11,
|
|
23
|
+
MC_POST_PICKUP_INIT_LATE = 12,
|
|
24
|
+
MC_POST_LASER_INIT_LATE = 13,
|
|
25
|
+
MC_POST_KNIFE_INIT_LATE = 14,
|
|
26
|
+
MC_POST_PROJECTILE_INIT_LATE = 15,
|
|
27
|
+
MC_POST_NPC_INIT_LATE = 16,
|
|
28
|
+
MC_POST_EFFECT_INIT_LATE = 17,
|
|
29
|
+
MC_POST_PICKUP_COLLECT = 18,
|
|
30
|
+
MC_PRE_ITEM_PICKUP = 19,
|
|
31
|
+
MC_POST_ITEM_PICKUP = 20,
|
|
32
|
+
MC_POST_PLAYER_CHANGE_TYPE = 21,
|
|
33
|
+
MC_POST_PLAYER_CHANGE_HEALTH = 22,
|
|
34
|
+
MC_POST_PLAYER_FATAL_DAMAGE = 23,
|
|
35
|
+
MC_PRE_CUSTOM_REVIVE = 24,
|
|
36
|
+
MC_POST_CUSTOM_REVIVE = 25,
|
|
37
|
+
MC_POST_FLIP = 26,
|
|
38
|
+
MC_POST_FIRST_FLIP = 27,
|
|
39
|
+
MC_POST_ESAU_JR = 28,
|
|
40
|
+
MC_POST_FIRST_ESAU_JR = 29,
|
|
41
|
+
MC_POST_TRANSFORMATION = 30,
|
|
42
|
+
MC_POST_PURCHASE = 31,
|
|
43
|
+
MC_POST_SACRIFICE = 32,
|
|
44
|
+
MC_POST_CURSED_TELEPORT = 33,
|
|
45
|
+
MC_POST_SLOT_INIT = 34,
|
|
46
|
+
MC_POST_SLOT_UPDATE = 35,
|
|
47
|
+
MC_POST_SLOT_RENDER = 36,
|
|
48
|
+
MC_POST_SLOT_DESTROYED = 37,
|
|
49
|
+
MC_POST_GRID_ENTITY_INIT = 38,
|
|
50
|
+
MC_POST_GRID_ENTITY_UPDATE = 39,
|
|
51
|
+
MC_POST_GRID_ENTITY_REMOVE = 40
|
|
51
52
|
}
|
|
@@ -15,70 +15,72 @@ ____exports.ModCallbacksCustom.MC_POST_PLAYER_RENDER_REORDERED = 5
|
|
|
15
15
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PLAYER_RENDER_REORDERED] = "MC_POST_PLAYER_RENDER_REORDERED"
|
|
16
16
|
____exports.ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY = 6
|
|
17
17
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY] = "MC_POST_NEW_ROOM_EARLY"
|
|
18
|
-
____exports.ModCallbacksCustom.
|
|
18
|
+
____exports.ModCallbacksCustom.MC_PRE_NEW_LEVEL = 7
|
|
19
|
+
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_PRE_NEW_LEVEL] = "MC_PRE_NEW_LEVEL"
|
|
20
|
+
____exports.ModCallbacksCustom.MC_POST_PLAYER_INIT_LATE = 8
|
|
19
21
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PLAYER_INIT_LATE] = "MC_POST_PLAYER_INIT_LATE"
|
|
20
|
-
____exports.ModCallbacksCustom.MC_POST_TEAR_INIT_LATE =
|
|
22
|
+
____exports.ModCallbacksCustom.MC_POST_TEAR_INIT_LATE = 9
|
|
21
23
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_TEAR_INIT_LATE] = "MC_POST_TEAR_INIT_LATE"
|
|
22
|
-
____exports.ModCallbacksCustom.MC_POST_FAMILIAR_INIT_LATE =
|
|
24
|
+
____exports.ModCallbacksCustom.MC_POST_FAMILIAR_INIT_LATE = 10
|
|
23
25
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_FAMILIAR_INIT_LATE] = "MC_POST_FAMILIAR_INIT_LATE"
|
|
24
|
-
____exports.ModCallbacksCustom.MC_POST_BOMB_INIT_LATE =
|
|
26
|
+
____exports.ModCallbacksCustom.MC_POST_BOMB_INIT_LATE = 11
|
|
25
27
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_BOMB_INIT_LATE] = "MC_POST_BOMB_INIT_LATE"
|
|
26
|
-
____exports.ModCallbacksCustom.MC_POST_PICKUP_INIT_LATE =
|
|
28
|
+
____exports.ModCallbacksCustom.MC_POST_PICKUP_INIT_LATE = 12
|
|
27
29
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PICKUP_INIT_LATE] = "MC_POST_PICKUP_INIT_LATE"
|
|
28
|
-
____exports.ModCallbacksCustom.MC_POST_LASER_INIT_LATE =
|
|
30
|
+
____exports.ModCallbacksCustom.MC_POST_LASER_INIT_LATE = 13
|
|
29
31
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_LASER_INIT_LATE] = "MC_POST_LASER_INIT_LATE"
|
|
30
|
-
____exports.ModCallbacksCustom.MC_POST_KNIFE_INIT_LATE =
|
|
32
|
+
____exports.ModCallbacksCustom.MC_POST_KNIFE_INIT_LATE = 14
|
|
31
33
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_KNIFE_INIT_LATE] = "MC_POST_KNIFE_INIT_LATE"
|
|
32
|
-
____exports.ModCallbacksCustom.MC_POST_PROJECTILE_INIT_LATE =
|
|
34
|
+
____exports.ModCallbacksCustom.MC_POST_PROJECTILE_INIT_LATE = 15
|
|
33
35
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PROJECTILE_INIT_LATE] = "MC_POST_PROJECTILE_INIT_LATE"
|
|
34
|
-
____exports.ModCallbacksCustom.MC_POST_NPC_INIT_LATE =
|
|
36
|
+
____exports.ModCallbacksCustom.MC_POST_NPC_INIT_LATE = 16
|
|
35
37
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_NPC_INIT_LATE] = "MC_POST_NPC_INIT_LATE"
|
|
36
|
-
____exports.ModCallbacksCustom.MC_POST_EFFECT_INIT_LATE =
|
|
38
|
+
____exports.ModCallbacksCustom.MC_POST_EFFECT_INIT_LATE = 17
|
|
37
39
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_EFFECT_INIT_LATE] = "MC_POST_EFFECT_INIT_LATE"
|
|
38
|
-
____exports.ModCallbacksCustom.MC_POST_PICKUP_COLLECT =
|
|
40
|
+
____exports.ModCallbacksCustom.MC_POST_PICKUP_COLLECT = 18
|
|
39
41
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PICKUP_COLLECT] = "MC_POST_PICKUP_COLLECT"
|
|
40
|
-
____exports.ModCallbacksCustom.MC_PRE_ITEM_PICKUP =
|
|
42
|
+
____exports.ModCallbacksCustom.MC_PRE_ITEM_PICKUP = 19
|
|
41
43
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_PRE_ITEM_PICKUP] = "MC_PRE_ITEM_PICKUP"
|
|
42
|
-
____exports.ModCallbacksCustom.MC_POST_ITEM_PICKUP =
|
|
44
|
+
____exports.ModCallbacksCustom.MC_POST_ITEM_PICKUP = 20
|
|
43
45
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_ITEM_PICKUP] = "MC_POST_ITEM_PICKUP"
|
|
44
|
-
____exports.ModCallbacksCustom.MC_POST_PLAYER_CHANGE_TYPE =
|
|
46
|
+
____exports.ModCallbacksCustom.MC_POST_PLAYER_CHANGE_TYPE = 21
|
|
45
47
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PLAYER_CHANGE_TYPE] = "MC_POST_PLAYER_CHANGE_TYPE"
|
|
46
|
-
____exports.ModCallbacksCustom.MC_POST_PLAYER_CHANGE_HEALTH =
|
|
48
|
+
____exports.ModCallbacksCustom.MC_POST_PLAYER_CHANGE_HEALTH = 22
|
|
47
49
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PLAYER_CHANGE_HEALTH] = "MC_POST_PLAYER_CHANGE_HEALTH"
|
|
48
|
-
____exports.ModCallbacksCustom.MC_POST_PLAYER_FATAL_DAMAGE =
|
|
50
|
+
____exports.ModCallbacksCustom.MC_POST_PLAYER_FATAL_DAMAGE = 23
|
|
49
51
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PLAYER_FATAL_DAMAGE] = "MC_POST_PLAYER_FATAL_DAMAGE"
|
|
50
|
-
____exports.ModCallbacksCustom.MC_PRE_CUSTOM_REVIVE =
|
|
52
|
+
____exports.ModCallbacksCustom.MC_PRE_CUSTOM_REVIVE = 24
|
|
51
53
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_PRE_CUSTOM_REVIVE] = "MC_PRE_CUSTOM_REVIVE"
|
|
52
|
-
____exports.ModCallbacksCustom.MC_POST_CUSTOM_REVIVE =
|
|
54
|
+
____exports.ModCallbacksCustom.MC_POST_CUSTOM_REVIVE = 25
|
|
53
55
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_CUSTOM_REVIVE] = "MC_POST_CUSTOM_REVIVE"
|
|
54
|
-
____exports.ModCallbacksCustom.MC_POST_FLIP =
|
|
56
|
+
____exports.ModCallbacksCustom.MC_POST_FLIP = 26
|
|
55
57
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_FLIP] = "MC_POST_FLIP"
|
|
56
|
-
____exports.ModCallbacksCustom.MC_POST_FIRST_FLIP =
|
|
58
|
+
____exports.ModCallbacksCustom.MC_POST_FIRST_FLIP = 27
|
|
57
59
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_FIRST_FLIP] = "MC_POST_FIRST_FLIP"
|
|
58
|
-
____exports.ModCallbacksCustom.MC_POST_ESAU_JR =
|
|
60
|
+
____exports.ModCallbacksCustom.MC_POST_ESAU_JR = 28
|
|
59
61
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_ESAU_JR] = "MC_POST_ESAU_JR"
|
|
60
|
-
____exports.ModCallbacksCustom.MC_POST_FIRST_ESAU_JR =
|
|
62
|
+
____exports.ModCallbacksCustom.MC_POST_FIRST_ESAU_JR = 29
|
|
61
63
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_FIRST_ESAU_JR] = "MC_POST_FIRST_ESAU_JR"
|
|
62
|
-
____exports.ModCallbacksCustom.MC_POST_TRANSFORMATION =
|
|
64
|
+
____exports.ModCallbacksCustom.MC_POST_TRANSFORMATION = 30
|
|
63
65
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_TRANSFORMATION] = "MC_POST_TRANSFORMATION"
|
|
64
|
-
____exports.ModCallbacksCustom.MC_POST_PURCHASE =
|
|
66
|
+
____exports.ModCallbacksCustom.MC_POST_PURCHASE = 31
|
|
65
67
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PURCHASE] = "MC_POST_PURCHASE"
|
|
66
|
-
____exports.ModCallbacksCustom.MC_POST_SACRIFICE =
|
|
68
|
+
____exports.ModCallbacksCustom.MC_POST_SACRIFICE = 32
|
|
67
69
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_SACRIFICE] = "MC_POST_SACRIFICE"
|
|
68
|
-
____exports.ModCallbacksCustom.MC_POST_CURSED_TELEPORT =
|
|
70
|
+
____exports.ModCallbacksCustom.MC_POST_CURSED_TELEPORT = 33
|
|
69
71
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_CURSED_TELEPORT] = "MC_POST_CURSED_TELEPORT"
|
|
70
|
-
____exports.ModCallbacksCustom.MC_POST_SLOT_INIT =
|
|
72
|
+
____exports.ModCallbacksCustom.MC_POST_SLOT_INIT = 34
|
|
71
73
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_SLOT_INIT] = "MC_POST_SLOT_INIT"
|
|
72
|
-
____exports.ModCallbacksCustom.MC_POST_SLOT_UPDATE =
|
|
74
|
+
____exports.ModCallbacksCustom.MC_POST_SLOT_UPDATE = 35
|
|
73
75
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_SLOT_UPDATE] = "MC_POST_SLOT_UPDATE"
|
|
74
|
-
____exports.ModCallbacksCustom.MC_POST_SLOT_RENDER =
|
|
76
|
+
____exports.ModCallbacksCustom.MC_POST_SLOT_RENDER = 36
|
|
75
77
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_SLOT_RENDER] = "MC_POST_SLOT_RENDER"
|
|
76
|
-
____exports.ModCallbacksCustom.MC_POST_SLOT_DESTROYED =
|
|
78
|
+
____exports.ModCallbacksCustom.MC_POST_SLOT_DESTROYED = 37
|
|
77
79
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_SLOT_DESTROYED] = "MC_POST_SLOT_DESTROYED"
|
|
78
|
-
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_INIT =
|
|
80
|
+
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_INIT = 38
|
|
79
81
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_INIT] = "MC_POST_GRID_ENTITY_INIT"
|
|
80
|
-
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_UPDATE =
|
|
82
|
+
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_UPDATE = 39
|
|
81
83
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_UPDATE] = "MC_POST_GRID_ENTITY_UPDATE"
|
|
82
|
-
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_REMOVE =
|
|
84
|
+
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_REMOVE = 40
|
|
83
85
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_REMOVE] = "MC_POST_GRID_ENTITY_REMOVE"
|
|
84
86
|
return ____exports
|
|
@@ -82,6 +82,8 @@ local ____preCustomRevive = require("callbacks.subscriptions.preCustomRevive")
|
|
|
82
82
|
local preCustomReviveRegister = ____preCustomRevive.preCustomReviveRegister
|
|
83
83
|
local ____preItemPickup = require("callbacks.subscriptions.preItemPickup")
|
|
84
84
|
local preItemPickupRegister = ____preItemPickup.preItemPickupRegister
|
|
85
|
+
local ____PreNewLevel = require("callbacks.subscriptions.PreNewLevel")
|
|
86
|
+
local preNewLevelRegister = ____PreNewLevel.preNewLevelRegister
|
|
85
87
|
local ____log = require("functions.log")
|
|
86
88
|
local getDebugPrependString = ____log.getDebugPrependString
|
|
87
89
|
local ____util = require("functions.util")
|
|
@@ -147,6 +149,12 @@ function getCallbackRegisterFunction(self, callbackID)
|
|
|
147
149
|
return postNewRoomEarlyRegister
|
|
148
150
|
end
|
|
149
151
|
end
|
|
152
|
+
____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_PRE_NEW_LEVEL)
|
|
153
|
+
if ____cond17 then
|
|
154
|
+
do
|
|
155
|
+
return preNewLevelRegister
|
|
156
|
+
end
|
|
157
|
+
end
|
|
150
158
|
____cond17 = ____cond17 or (____switch17 == ModCallbacksCustom.MC_POST_PLAYER_INIT_LATE)
|
|
151
159
|
if ____cond17 then
|
|
152
160
|
do
|
package/dist/upgradeMod.lua
CHANGED
|
@@ -56,6 +56,8 @@ local ____postTearInitLate = require("callbacks.postTearInitLate")
|
|
|
56
56
|
local postTearInitLateCallbackInit = ____postTearInitLate.postTearInitLateCallbackInit
|
|
57
57
|
local ____postTransformation = require("callbacks.postTransformation")
|
|
58
58
|
local postTransformationCallbackInit = ____postTransformation.postTransformationCallbackInit
|
|
59
|
+
local ____preNewLevel = require("callbacks.preNewLevel")
|
|
60
|
+
local preNewLevelCallbackInit = ____preNewLevel.preNewLevelCallbackInit
|
|
59
61
|
local ____reorderedCallbacks = require("callbacks.reorderedCallbacks")
|
|
60
62
|
local reorderedCallbacksInit = ____reorderedCallbacks.reorderedCallbacksInit
|
|
61
63
|
local ____deployJSONRoom = require("features.deployJSONRoom")
|
|
@@ -85,6 +87,7 @@ local ____ModUpgraded = require("types.ModUpgraded")
|
|
|
85
87
|
local ModUpgraded = ____ModUpgraded.ModUpgraded
|
|
86
88
|
function initCustomCallbacks(self, mod)
|
|
87
89
|
reorderedCallbacksInit(nil, mod)
|
|
90
|
+
preNewLevelCallbackInit(nil, mod)
|
|
88
91
|
postPlayerReorderedCallbacksInit(nil, mod)
|
|
89
92
|
postPlayerInitLateCallbackInit(nil, mod)
|
|
90
93
|
postTearInitLateCallbackInit(nil, mod)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.521",
|
|
4
4
|
"description": "Helper functions for IsaacScript mods",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"isaac",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dist/**/*.d.ts"
|
|
26
26
|
],
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"isaac-typescript-definitions": "^1.0.
|
|
28
|
+
"isaac-typescript-definitions": "^1.0.296",
|
|
29
29
|
"isaacscript-lint": "^1.0.71",
|
|
30
30
|
"typedoc": "^0.22.10",
|
|
31
31
|
"typescript": "4.4.4",
|