isaacscript-common 1.2.158 → 1.2.161
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/postCustomDoorEnter.d.ts +2 -1
- package/dist/callbacks/postCustomDoorEnter.lua +34 -17
- package/dist/callbacks/roomClearChange.d.ts +1 -0
- package/dist/callbacks/roomClearChange.lua +39 -0
- package/dist/callbacks/subscriptions/roomClearChange.d.ts +1 -0
- package/dist/callbacks/subscriptions/roomClearChange.lua +18 -0
- package/dist/features/isPonyActive.d.ts +2 -2
- package/dist/features/runInNFrames.lua +7 -2
- package/dist/features/saveDataManager/exports.d.ts +7 -5
- package/dist/features/saveDataManager/exports.lua +5 -5
- package/dist/features/saveDataManager/save.lua +0 -3
- package/dist/features/taintedLazarusPlayers.d.ts +13 -0
- package/dist/features/taintedLazarusPlayers.lua +72 -0
- package/dist/functions/trinkets.d.ts +12 -0
- package/dist/functions/trinkets.lua +15 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.lua +5 -0
- package/dist/objects/callbackRegisterFunctions.lua +3 -0
- package/dist/types/AddCallbackParametersCustom.d.ts +4 -0
- package/dist/types/ModCallbacksCustom.d.ts +43 -42
- package/dist/types/ModCallbacksCustom.lua +44 -42
- package/dist/types/private/SaveData.d.ts +0 -1
- package/dist/upgradeMod.lua +6 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
import { ModUpgraded } from "../types/ModUpgraded";
|
|
2
3
|
/**
|
|
3
4
|
* `isaacscript-common` provides custom doors that can be spawned where any wall segment is. If you
|
|
4
5
|
* use this feature, you must first call this initialization function at the beginning of your mod.
|
|
@@ -22,7 +23,7 @@
|
|
|
22
23
|
* initCustomDoor(mod, fooEffectVariant);
|
|
23
24
|
* ```
|
|
24
25
|
*/
|
|
25
|
-
export declare function initCustomDoor(mod:
|
|
26
|
+
export declare function initCustomDoor(mod: ModUpgraded, effectVariant: int): void;
|
|
26
27
|
/**
|
|
27
28
|
* Helper function to spawn a custom door. This is intended to be called from the `MC_POST_NEW_ROOM`
|
|
28
29
|
* callback when the player enters a room that should have a custom door. (You could also call it
|
|
@@ -4,19 +4,23 @@ local Set = ____lualib.Set
|
|
|
4
4
|
local __TS__New = ____lualib.__TS__New
|
|
5
5
|
local Map = ____lualib.Map
|
|
6
6
|
local ____exports = {}
|
|
7
|
-
local hasSubscriptions, postEffectUpdaterCustomEntity, doorChangedState, getAnimationForCustomDoor, postEffectRenderCustomEntity, isPlayerPastDoorThreshold, getPositionOffset, POSITION_OFFSET_MULTIPLIER, v
|
|
7
|
+
local hasSubscriptions, postEffectUpdaterCustomEntity, doorChangedState, getAnimationForCustomDoor, postEffectRenderCustomEntity, isPlayerPastDoorThreshold, roomClearChange, getPositionOffset, POSITION_OFFSET_MULTIPLIER, v
|
|
8
8
|
local ____cachedClasses = require("cachedClasses")
|
|
9
9
|
local game = ____cachedClasses.game
|
|
10
10
|
local ____exports = require("features.saveDataManager.exports")
|
|
11
11
|
local saveDataManager = ____exports.saveDataManager
|
|
12
12
|
local ____doors = require("functions.doors")
|
|
13
13
|
local doorSlotToDirection = ____doors.doorSlotToDirection
|
|
14
|
+
local ____entitySpecific = require("functions.entitySpecific")
|
|
15
|
+
local getEffects = ____entitySpecific.getEffects
|
|
14
16
|
local ____player = require("functions.player")
|
|
15
17
|
local getClosestPlayer = ____player.getClosestPlayer
|
|
16
18
|
local ____utils = require("functions.utils")
|
|
17
19
|
local ensureAllCases = ____utils.ensureAllCases
|
|
18
20
|
local ____vector = require("functions.vector")
|
|
19
21
|
local directionToVector = ____vector.directionToVector
|
|
22
|
+
local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
|
|
23
|
+
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
20
24
|
local ____postCustomDoorEnter = require("callbacks.subscriptions.postCustomDoorEnter")
|
|
21
25
|
local postCustomDoorEnterFire = ____postCustomDoorEnter.postCustomDoorEnterFire
|
|
22
26
|
local postCustomDoorEnterHasSubscriptions = ____postCustomDoorEnter.postCustomDoorEnterHasSubscriptions
|
|
@@ -49,15 +53,15 @@ end
|
|
|
49
53
|
function getAnimationForCustomDoor(self, effect)
|
|
50
54
|
local freshlySpawned = effect.FrameCount == 0
|
|
51
55
|
repeat
|
|
52
|
-
local
|
|
53
|
-
local
|
|
54
|
-
if
|
|
56
|
+
local ____switch12 = effect.State
|
|
57
|
+
local ____cond12 = ____switch12 == DoorState.STATE_OPEN
|
|
58
|
+
if ____cond12 then
|
|
55
59
|
do
|
|
56
60
|
return freshlySpawned and "Opened" or "Open"
|
|
57
61
|
end
|
|
58
62
|
end
|
|
59
|
-
|
|
60
|
-
if
|
|
63
|
+
____cond12 = ____cond12 or ____switch12 == DoorState.STATE_CLOSED
|
|
64
|
+
if ____cond12 then
|
|
61
65
|
do
|
|
62
66
|
return freshlySpawned and "Closed" or "Close"
|
|
63
67
|
end
|
|
@@ -89,33 +93,33 @@ function postEffectRenderCustomEntity(self, effect)
|
|
|
89
93
|
end
|
|
90
94
|
function isPlayerPastDoorThreshold(self, effect, player, direction)
|
|
91
95
|
repeat
|
|
92
|
-
local
|
|
93
|
-
local
|
|
94
|
-
if
|
|
96
|
+
local ____switch20 = direction
|
|
97
|
+
local ____cond20 = ____switch20 == Direction.NO_DIRECTION
|
|
98
|
+
if ____cond20 then
|
|
95
99
|
do
|
|
96
100
|
return false
|
|
97
101
|
end
|
|
98
102
|
end
|
|
99
|
-
|
|
100
|
-
if
|
|
103
|
+
____cond20 = ____cond20 or ____switch20 == Direction.UP
|
|
104
|
+
if ____cond20 then
|
|
101
105
|
do
|
|
102
106
|
return player.Position.Y <= effect.Position.Y
|
|
103
107
|
end
|
|
104
108
|
end
|
|
105
|
-
|
|
106
|
-
if
|
|
109
|
+
____cond20 = ____cond20 or ____switch20 == Direction.RIGHT
|
|
110
|
+
if ____cond20 then
|
|
107
111
|
do
|
|
108
112
|
return player.Position.X >= effect.Position.X
|
|
109
113
|
end
|
|
110
114
|
end
|
|
111
|
-
|
|
112
|
-
if
|
|
115
|
+
____cond20 = ____cond20 or ____switch20 == Direction.DOWN
|
|
116
|
+
if ____cond20 then
|
|
113
117
|
do
|
|
114
118
|
return player.Position.Y >= effect.Position.Y
|
|
115
119
|
end
|
|
116
120
|
end
|
|
117
|
-
|
|
118
|
-
if
|
|
121
|
+
____cond20 = ____cond20 or ____switch20 == Direction.LEFT
|
|
122
|
+
if ____cond20 then
|
|
119
123
|
do
|
|
120
124
|
return player.Position.X <= effect.Position.X
|
|
121
125
|
end
|
|
@@ -127,6 +131,13 @@ function isPlayerPastDoorThreshold(self, effect, player, direction)
|
|
|
127
131
|
end
|
|
128
132
|
until true
|
|
129
133
|
end
|
|
134
|
+
function roomClearChange(self, roomClear, effectVariant)
|
|
135
|
+
local state = roomClear and DoorState.STATE_OPEN or DoorState.STATE_CLOSED
|
|
136
|
+
local customDoors = getEffects(nil, effectVariant)
|
|
137
|
+
for ____, customDoor in ipairs(customDoors) do
|
|
138
|
+
customDoor.State = state
|
|
139
|
+
end
|
|
140
|
+
end
|
|
130
141
|
function getPositionOffset(self, doorSlot)
|
|
131
142
|
local direction = doorSlotToDirection(nil, doorSlot)
|
|
132
143
|
local vector = directionToVector(nil, direction)
|
|
@@ -145,6 +156,12 @@ function ____exports.initCustomDoor(self, mod, effectVariant)
|
|
|
145
156
|
initializedEffectVariants:add(effectVariant)
|
|
146
157
|
mod:AddCallback(ModCallbacks.MC_POST_EFFECT_UPDATE, postEffectUpdaterCustomEntity, effectVariant)
|
|
147
158
|
mod:AddCallback(ModCallbacks.MC_POST_EFFECT_RENDER, postEffectRenderCustomEntity, effectVariant)
|
|
159
|
+
mod:AddCallbackCustom(
|
|
160
|
+
ModCallbacksCustom.MC_ROOM_CLEAR_CHANGE,
|
|
161
|
+
function(____, roomClear)
|
|
162
|
+
roomClearChange(nil, roomClear, effectVariant)
|
|
163
|
+
end
|
|
164
|
+
)
|
|
148
165
|
end
|
|
149
166
|
function ____exports.spawnCustomDoor(self, effectVariant, doorSlot)
|
|
150
167
|
if not initializedEffectVariants:has(effectVariant) then
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____exports = {}
|
|
3
|
+
local hasSubscriptions, postUpdate, postNewRoom, v
|
|
4
|
+
local ____cachedClasses = require("cachedClasses")
|
|
5
|
+
local game = ____cachedClasses.game
|
|
6
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
7
|
+
local saveDataManager = ____exports.saveDataManager
|
|
8
|
+
local ____roomClearChange = require("callbacks.subscriptions.roomClearChange")
|
|
9
|
+
local roomClearChangedFire = ____roomClearChange.roomClearChangedFire
|
|
10
|
+
local roomClearChangedHasSubscriptions = ____roomClearChange.roomClearChangedHasSubscriptions
|
|
11
|
+
function hasSubscriptions(self)
|
|
12
|
+
return roomClearChangedHasSubscriptions(nil)
|
|
13
|
+
end
|
|
14
|
+
function postUpdate(self)
|
|
15
|
+
if not hasSubscriptions(nil) then
|
|
16
|
+
return
|
|
17
|
+
end
|
|
18
|
+
local room = game:GetRoom()
|
|
19
|
+
local roomClear = room:IsClear()
|
|
20
|
+
if roomClear ~= v.room.cleared then
|
|
21
|
+
v.room.cleared = roomClear
|
|
22
|
+
roomClearChangedFire(nil, roomClear)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
function postNewRoom(self)
|
|
26
|
+
if not hasSubscriptions(nil) then
|
|
27
|
+
return
|
|
28
|
+
end
|
|
29
|
+
local room = game:GetRoom()
|
|
30
|
+
local roomClear = room:IsClear()
|
|
31
|
+
v.room.cleared = roomClear
|
|
32
|
+
end
|
|
33
|
+
v = {room = {cleared = false}}
|
|
34
|
+
function ____exports.roomClearChangeCallbackInit(self, mod)
|
|
35
|
+
saveDataManager(nil, "roomClearChange", v, hasSubscriptions)
|
|
36
|
+
mod:AddCallback(ModCallbacks.MC_POST_UPDATE, postUpdate)
|
|
37
|
+
mod:AddCallback(ModCallbacks.MC_POST_NEW_ROOM, postNewRoom)
|
|
38
|
+
end
|
|
39
|
+
return ____exports
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type RoomClearChangeCallbackType = (roomClear: boolean) => void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____lualib = require("lualib_bundle")
|
|
3
|
+
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
4
|
+
local ____exports = {}
|
|
5
|
+
local subscriptions = {}
|
|
6
|
+
function ____exports.roomClearChangedHasSubscriptions(self)
|
|
7
|
+
return #subscriptions > 0
|
|
8
|
+
end
|
|
9
|
+
function ____exports.roomClearChangedRegister(self, callback)
|
|
10
|
+
__TS__ArrayPush(subscriptions, {callback})
|
|
11
|
+
end
|
|
12
|
+
function ____exports.roomClearChangedFire(self, roomClear)
|
|
13
|
+
for ____, ____value in ipairs(subscriptions) do
|
|
14
|
+
local callback = ____value[1]
|
|
15
|
+
callback(nil, roomClear)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
return ____exports
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* Helper function to see if the player is under the effects of A Pony or White Pony charge.
|
|
4
|
+
* Detecting this is difficult, as the temporary effect will disappear upon entering a new room.
|
|
5
5
|
*/
|
|
6
6
|
export declare function isPonyActive(player: EntityPlayer): boolean;
|
|
@@ -40,9 +40,14 @@ function checkExecuteQueuedFunctions(self, frameCount, functionTuples)
|
|
|
40
40
|
end
|
|
41
41
|
end
|
|
42
42
|
local FEATURE_NAME = "run in N frames"
|
|
43
|
-
v = {
|
|
43
|
+
v = {run = {queuedGameFunctionTuples = {}, queuedRenderFunctionTuples = {}}}
|
|
44
44
|
function ____exports.runInNFramesInit(self, mod)
|
|
45
|
-
saveDataManager(
|
|
45
|
+
saveDataManager(
|
|
46
|
+
nil,
|
|
47
|
+
"runInNFrames",
|
|
48
|
+
v,
|
|
49
|
+
function() return false end
|
|
50
|
+
)
|
|
46
51
|
mod:AddCallback(ModCallbacks.MC_POST_UPDATE, postUpdate)
|
|
47
52
|
mod:AddCallback(ModCallbacks.MC_POST_RENDER, postRender)
|
|
48
53
|
end
|
|
@@ -67,13 +67,15 @@ import { SaveData } from "../../types/private/SaveData";
|
|
|
67
67
|
*
|
|
68
68
|
* @param key The name of the file or feature that is submitting data to be managed by the save data
|
|
69
69
|
* manager. The save data manager will throw an error if the key is already registered.
|
|
70
|
-
* @param
|
|
70
|
+
* @param v An object that corresponds to the `SaveData` interface. The object is
|
|
71
71
|
* conventionally called "v" for brevity (which is short for "local variables").
|
|
72
|
-
* @param conditionalFunc An optional function to run upon saving this key to disk.
|
|
73
|
-
*
|
|
74
|
-
*
|
|
72
|
+
* @param conditionalFunc An optional function to run upon saving this key to disk. For example,
|
|
73
|
+
* this allows features to only save data to disk if the feature is enabled. Specify a value of
|
|
74
|
+
* `() => false` to completely disable saving this feature to disk. This is useful if you are using
|
|
75
|
+
* data that is not serializable, or you want to use the save data manager to automatically reset
|
|
76
|
+
* variables on run/level/room, but not clutter the the "save#.dat" file with unnecessary keys.
|
|
75
77
|
*/
|
|
76
|
-
export declare function saveDataManager(key: string,
|
|
78
|
+
export declare function saveDataManager(key: string, v: SaveData, conditionalFunc?: () => boolean): void;
|
|
77
79
|
/**
|
|
78
80
|
* The save data manager will automatically save variables to disk at the appropriate times (i.e.
|
|
79
81
|
* when the run is exited). Use this function to explicitly force the save data manager to write all
|
|
@@ -17,7 +17,7 @@ local ____maps = require("features.saveDataManager.maps")
|
|
|
17
17
|
local saveDataConditionalFuncMap = ____maps.saveDataConditionalFuncMap
|
|
18
18
|
local saveDataDefaultsMap = ____maps.saveDataDefaultsMap
|
|
19
19
|
local saveDataMap = ____maps.saveDataMap
|
|
20
|
-
function ____exports.saveDataManager(self, key,
|
|
20
|
+
function ____exports.saveDataManager(self, key, v, conditionalFunc)
|
|
21
21
|
errorIfFeaturesNotInitialized(nil, SAVE_DATA_MANAGER_FEATURE_NAME)
|
|
22
22
|
local keyType = type(key)
|
|
23
23
|
if keyType ~= "string" then
|
|
@@ -26,12 +26,12 @@ function ____exports.saveDataManager(self, key, saveData, conditionalFunc)
|
|
|
26
26
|
if saveDataMap[key] ~= nil then
|
|
27
27
|
error((("The " .. SAVE_DATA_MANAGER_FEATURE_NAME) .. " is already managing save data for a key of: ") .. key)
|
|
28
28
|
end
|
|
29
|
-
saveDataMap[key] =
|
|
30
|
-
local saveDataKeys = __TS__ObjectKeys(
|
|
29
|
+
saveDataMap[key] = v
|
|
30
|
+
local saveDataKeys = __TS__ObjectKeys(v)
|
|
31
31
|
if #saveDataKeys == 1 and saveDataKeys[1] == "room" then
|
|
32
|
-
|
|
32
|
+
conditionalFunc = function() return false end
|
|
33
33
|
end
|
|
34
|
-
local saveDataTable =
|
|
34
|
+
local saveDataTable = v
|
|
35
35
|
local saveDataTableCopy = deepCopy(nil, saveDataTable, SerializationType.NONE, key)
|
|
36
36
|
local saveDataCopy = saveDataTableCopy
|
|
37
37
|
saveDataDefaultsMap[key] = saveDataCopy
|
|
@@ -17,9 +17,6 @@ function getAllSaveDataToWriteToDisk(self, saveDataMap, saveDataConditionalFuncM
|
|
|
17
17
|
local allSaveData = {}
|
|
18
18
|
for subscriberName, saveData in pairs(saveDataMap) do
|
|
19
19
|
do
|
|
20
|
-
if saveData.dontSave ~= nil then
|
|
21
|
-
goto __continue4
|
|
22
|
-
end
|
|
23
20
|
local conditionalFunc = saveDataConditionalFuncMap:get(subscriberName)
|
|
24
21
|
if conditionalFunc ~= nil then
|
|
25
22
|
local shouldSave = conditionalFunc(nil)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
/**
|
|
3
|
+
* Helper function to get the other version of Tainted Lazarus.
|
|
4
|
+
*
|
|
5
|
+
* - On Tainted Lazarus, returns the player object for Dead Tainted Lazarus.
|
|
6
|
+
* - On Dead Tainted Lazarus, returns the player object for Tainted Lazarus.
|
|
7
|
+
* - Returns undefined if player object retrieval failed for any reason.
|
|
8
|
+
*
|
|
9
|
+
* If you call the `EntityPlayer.Exists` method on the returned object, it will return false.
|
|
10
|
+
* However, you can still call the other methods like you normally would (e.g.
|
|
11
|
+
* `EntityPlayer.AddCollectible`).
|
|
12
|
+
*/
|
|
13
|
+
export declare function getTaintedLazarusSubPlayer(player: EntityPlayer): EntityPlayer | undefined;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____lualib = require("lualib_bundle")
|
|
3
|
+
local Map = ____lualib.Map
|
|
4
|
+
local __TS__New = ____lualib.__TS__New
|
|
5
|
+
local __TS__ArrayPush = ____lualib.__TS__ArrayPush
|
|
6
|
+
local __TS__ArrayShift = ____lualib.__TS__ArrayShift
|
|
7
|
+
local ____exports = {}
|
|
8
|
+
local postPlayerInit, checkDequeue, v
|
|
9
|
+
local ____featuresInitialized = require("featuresInitialized")
|
|
10
|
+
local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
|
|
11
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
12
|
+
local saveDataManager = ____exports.saveDataManager
|
|
13
|
+
function postPlayerInit(self, player)
|
|
14
|
+
local entityPtr = EntityPtr(player)
|
|
15
|
+
local character = player:GetPlayerType()
|
|
16
|
+
if character == PlayerType.PLAYER_LAZARUS_B then
|
|
17
|
+
__TS__ArrayPush(v.run.queuedTaintedLazarus, entityPtr)
|
|
18
|
+
elseif character == PlayerType.PLAYER_LAZARUS2_B then
|
|
19
|
+
__TS__ArrayPush(v.run.queuedDeadTaintedLazarus, entityPtr)
|
|
20
|
+
else
|
|
21
|
+
return
|
|
22
|
+
end
|
|
23
|
+
checkDequeue(nil)
|
|
24
|
+
end
|
|
25
|
+
function checkDequeue(self)
|
|
26
|
+
if #v.run.queuedTaintedLazarus == 0 or #v.run.queuedDeadTaintedLazarus == 0 then
|
|
27
|
+
return
|
|
28
|
+
end
|
|
29
|
+
local taintedLazarusPtr = __TS__ArrayShift(v.run.queuedTaintedLazarus)
|
|
30
|
+
local deadTaintedLazarusPtr = __TS__ArrayShift(v.run.queuedDeadTaintedLazarus)
|
|
31
|
+
if taintedLazarusPtr == nil or deadTaintedLazarusPtr == nil then
|
|
32
|
+
return
|
|
33
|
+
end
|
|
34
|
+
local taintedLazarus = taintedLazarusPtr.Ref
|
|
35
|
+
local deadTaintedLazarus = deadTaintedLazarusPtr.Ref
|
|
36
|
+
if taintedLazarus == nil or deadTaintedLazarus == nil then
|
|
37
|
+
return
|
|
38
|
+
end
|
|
39
|
+
local taintedLazarusPtrHash = GetPtrHash(taintedLazarus)
|
|
40
|
+
local deadTaintedLazarusPtrHash = GetPtrHash(deadTaintedLazarus)
|
|
41
|
+
v.run.subPlayerMap:set(taintedLazarusPtrHash, deadTaintedLazarusPtr)
|
|
42
|
+
v.run.subPlayerMap:set(deadTaintedLazarusPtrHash, taintedLazarusPtr)
|
|
43
|
+
end
|
|
44
|
+
local FEATURE_NAME = "Tainted Lazarus entity finder"
|
|
45
|
+
v = {run = {
|
|
46
|
+
queuedTaintedLazarus = {},
|
|
47
|
+
queuedDeadTaintedLazarus = {},
|
|
48
|
+
subPlayerMap = __TS__New(Map)
|
|
49
|
+
}}
|
|
50
|
+
function ____exports.taintedLazarusPlayersInit(self, mod)
|
|
51
|
+
saveDataManager(
|
|
52
|
+
nil,
|
|
53
|
+
"taintedLazarusPlayers",
|
|
54
|
+
v,
|
|
55
|
+
function() return false end
|
|
56
|
+
)
|
|
57
|
+
mod:AddCallback(ModCallbacks.MC_POST_PLAYER_INIT, postPlayerInit)
|
|
58
|
+
end
|
|
59
|
+
function ____exports.getTaintedLazarusSubPlayer(self, player)
|
|
60
|
+
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
61
|
+
local ptrHash = GetPtrHash(player)
|
|
62
|
+
local entityPtr = v.run.subPlayerMap:get(ptrHash)
|
|
63
|
+
if entityPtr == nil then
|
|
64
|
+
return nil
|
|
65
|
+
end
|
|
66
|
+
local entity = entityPtr.Ref
|
|
67
|
+
if entity == nil then
|
|
68
|
+
return nil
|
|
69
|
+
end
|
|
70
|
+
return entity:ToPlayer()
|
|
71
|
+
end
|
|
72
|
+
return ____exports
|
|
@@ -45,6 +45,18 @@ export declare function getTrinketName(trinketType: TrinketType | int): string;
|
|
|
45
45
|
*/
|
|
46
46
|
export declare function hasOpenTrinketSlot(player: EntityPlayer): boolean;
|
|
47
47
|
export declare function isGoldenTrinket(trinketType: TrinketType | int): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Helper function to change the sprite of a trinket entity.
|
|
50
|
+
*
|
|
51
|
+
* For more information about removing the trinket sprite, see the documentation for the
|
|
52
|
+
* "clearSprite" helper function.
|
|
53
|
+
*
|
|
54
|
+
* @param trinket The trinket whose sprite you want to modify.
|
|
55
|
+
* @param pngPath Equal to either the spritesheet path to load (e.g.
|
|
56
|
+
* "gfx/items/collectibles/collectibles_001_thesadonion.png") or undefined. If undefined, the sprite
|
|
57
|
+
* will be removed, making it appear like the collectible has already been taken by the player.
|
|
58
|
+
*/
|
|
59
|
+
export declare function setTrinketSprite(trinket: EntityPickup, pngPath: string | undefined): void;
|
|
48
60
|
/**
|
|
49
61
|
* Helper function to smelt a trinket. Before smelting, this function will automatically remove the
|
|
50
62
|
* trinkets that the player is holding, if any, and then give them back after the new trinket is
|
|
@@ -16,11 +16,14 @@ local ____pickups = require("functions.pickups")
|
|
|
16
16
|
local getPickups = ____pickups.getPickups
|
|
17
17
|
local ____player = require("functions.player")
|
|
18
18
|
local useActiveItemTemp = ____player.useActiveItemTemp
|
|
19
|
+
local ____sprite = require("functions.sprite")
|
|
20
|
+
local clearSprite = ____sprite.clearSprite
|
|
19
21
|
local ____trinketGive = require("functions.trinketGive")
|
|
20
22
|
local giveTrinketsBack = ____trinketGive.giveTrinketsBack
|
|
21
23
|
local temporarilyRemoveTrinkets = ____trinketGive.temporarilyRemoveTrinkets
|
|
22
24
|
local ____utils = require("functions.utils")
|
|
23
25
|
local ____repeat = ____utils["repeat"]
|
|
26
|
+
local TRINKET_SPRITE_LAYER = 0
|
|
24
27
|
function ____exports.getMaxTrinketType(self)
|
|
25
28
|
return itemConfig:GetTrinkets().Size - 1
|
|
26
29
|
end
|
|
@@ -78,6 +81,18 @@ end
|
|
|
78
81
|
function ____exports.isGoldenTrinket(self, trinketType)
|
|
79
82
|
return trinketType > TRINKET_GOLDEN_FLAG
|
|
80
83
|
end
|
|
84
|
+
function ____exports.setTrinketSprite(self, trinket, pngPath)
|
|
85
|
+
if trinket.Variant ~= PickupVariant.PICKUP_TRINKET then
|
|
86
|
+
error("You cannot set a trinket sprite for pickups of variant: " .. tostring(trinket.Variant))
|
|
87
|
+
end
|
|
88
|
+
local sprite = trinket:GetSprite()
|
|
89
|
+
if pngPath == nil then
|
|
90
|
+
clearSprite(nil, sprite, TRINKET_SPRITE_LAYER)
|
|
91
|
+
else
|
|
92
|
+
sprite:ReplaceSpritesheet(TRINKET_SPRITE_LAYER, pngPath)
|
|
93
|
+
sprite:LoadGraphics()
|
|
94
|
+
end
|
|
95
|
+
end
|
|
81
96
|
function ____exports.smeltTrinket(self, player, trinketType, numTrinkets)
|
|
82
97
|
if numTrinkets == nil then
|
|
83
98
|
numTrinkets = 1
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export { preventCollectibleRotate } from "./features/preventCollectibleRotate";
|
|
|
14
14
|
export { runInNGameFrames, runInNRenderFrames, runNextGameFrame, runNextRenderFrame, } from "./features/runInNFrames";
|
|
15
15
|
export * from "./features/saveDataManager/exports";
|
|
16
16
|
export { hasSirenStolenFamiliar, setFamiliarNoSirenSteal, } from "./features/sirenHelpers";
|
|
17
|
+
export { getTaintedLazarusSubPlayer } from "./features/taintedLazarusPlayers";
|
|
17
18
|
export * from "./functions/array";
|
|
18
19
|
export * from "./functions/bitwise";
|
|
19
20
|
export * from "./functions/cards";
|
package/dist/index.lua
CHANGED
|
@@ -126,6 +126,11 @@ do
|
|
|
126
126
|
____exports.hasSirenStolenFamiliar = hasSirenStolenFamiliar
|
|
127
127
|
____exports.setFamiliarNoSirenSteal = setFamiliarNoSirenSteal
|
|
128
128
|
end
|
|
129
|
+
do
|
|
130
|
+
local ____taintedLazarusPlayers = require("features.taintedLazarusPlayers")
|
|
131
|
+
local getTaintedLazarusSubPlayer = ____taintedLazarusPlayers.getTaintedLazarusSubPlayer
|
|
132
|
+
____exports.getTaintedLazarusSubPlayer = getTaintedLazarusSubPlayer
|
|
133
|
+
end
|
|
129
134
|
do
|
|
130
135
|
local ____export = require("functions.array")
|
|
131
136
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -102,6 +102,8 @@ local ____preItemPickup = require("callbacks.subscriptions.preItemPickup")
|
|
|
102
102
|
local preItemPickupRegister = ____preItemPickup.preItemPickupRegister
|
|
103
103
|
local ____preNewLevel = require("callbacks.subscriptions.preNewLevel")
|
|
104
104
|
local preNewLevelRegister = ____preNewLevel.preNewLevelRegister
|
|
105
|
+
local ____roomClearChange = require("callbacks.subscriptions.roomClearChange")
|
|
106
|
+
local roomClearChangedRegister = ____roomClearChange.roomClearChangedRegister
|
|
105
107
|
local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
|
|
106
108
|
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
107
109
|
____exports.CALLBACK_REGISTER_FUNCTIONS = {
|
|
@@ -114,6 +116,7 @@ ____exports.CALLBACK_REGISTER_FUNCTIONS = {
|
|
|
114
116
|
[ModCallbacksCustom.MC_POST_PLAYER_RENDER_REORDERED] = postPlayerRenderReorderedRegister,
|
|
115
117
|
[ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY] = postNewRoomEarlyRegister,
|
|
116
118
|
[ModCallbacksCustom.MC_PRE_NEW_LEVEL] = preNewLevelRegister,
|
|
119
|
+
[ModCallbacksCustom.MC_ROOM_CLEAR_CHANGE] = roomClearChangedRegister,
|
|
117
120
|
[ModCallbacksCustom.MC_POST_PLAYER_INIT_LATE] = postPlayerInitLateRegister,
|
|
118
121
|
[ModCallbacksCustom.MC_POST_TEAR_INIT_LATE] = postTearInitLateRegister,
|
|
119
122
|
[ModCallbacksCustom.MC_POST_TEAR_INIT_VERY_LATE] = postTearInitVeryLateRegister,
|
|
@@ -50,6 +50,7 @@ import { PreBerserkDeathCallbackType } from "../callbacks/subscriptions/preBerse
|
|
|
50
50
|
import { PreCustomReviveCallbackType } from "../callbacks/subscriptions/preCustomRevive";
|
|
51
51
|
import { PreItemPickupCallbackType } from "../callbacks/subscriptions/preItemPickup";
|
|
52
52
|
import { PreNewLevelCallbackType } from "../callbacks/subscriptions/preNewLevel";
|
|
53
|
+
import { RoomClearChangeCallbackType } from "../callbacks/subscriptions/roomClearChange";
|
|
53
54
|
import { ModCallbacksCustom } from "./ModCallbacksCustom";
|
|
54
55
|
export interface AddCallbackParametersCustom {
|
|
55
56
|
[ModCallbacksCustom.MC_POST_GAME_STARTED_REORDERED]: [
|
|
@@ -81,6 +82,9 @@ export interface AddCallbackParametersCustom {
|
|
|
81
82
|
callback: PostNewRoomEarlyCallbackType
|
|
82
83
|
];
|
|
83
84
|
[ModCallbacksCustom.MC_PRE_NEW_LEVEL]: [callback: PreNewLevelCallbackType];
|
|
85
|
+
[ModCallbacksCustom.MC_ROOM_CLEAR_CHANGE]: [
|
|
86
|
+
callback: RoomClearChangeCallbackType
|
|
87
|
+
];
|
|
84
88
|
[ModCallbacksCustom.MC_POST_PLAYER_INIT_LATE]: [
|
|
85
89
|
callback: PostPlayerInitLateCallbackType,
|
|
86
90
|
playerVariant?: PlayerVariant
|
|
@@ -15,46 +15,47 @@ export declare enum ModCallbacksCustom {
|
|
|
15
15
|
MC_POST_PLAYER_RENDER_REORDERED = 6,
|
|
16
16
|
MC_POST_NEW_ROOM_EARLY = 7,
|
|
17
17
|
MC_PRE_NEW_LEVEL = 8,
|
|
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
18
|
+
MC_ROOM_CLEAR_CHANGE = 9,
|
|
19
|
+
MC_POST_PLAYER_INIT_LATE = 10,
|
|
20
|
+
MC_POST_TEAR_INIT_LATE = 11,
|
|
21
|
+
MC_POST_TEAR_INIT_VERY_LATE = 12,
|
|
22
|
+
MC_POST_FAMILIAR_INIT_LATE = 13,
|
|
23
|
+
MC_POST_BOMB_INIT_LATE = 14,
|
|
24
|
+
MC_POST_PICKUP_INIT_LATE = 15,
|
|
25
|
+
MC_POST_LASER_INIT_LATE = 16,
|
|
26
|
+
MC_POST_KNIFE_INIT_LATE = 17,
|
|
27
|
+
MC_POST_PROJECTILE_INIT_LATE = 18,
|
|
28
|
+
MC_POST_NPC_INIT_LATE = 19,
|
|
29
|
+
MC_POST_EFFECT_INIT_LATE = 20,
|
|
30
|
+
MC_POST_PICKUP_COLLECT = 21,
|
|
31
|
+
MC_PRE_ITEM_PICKUP = 22,
|
|
32
|
+
MC_POST_ITEM_PICKUP = 23,
|
|
33
|
+
MC_POST_PLAYER_CHANGE_TYPE = 24,
|
|
34
|
+
MC_POST_PLAYER_CHANGE_HEALTH = 25,
|
|
35
|
+
MC_POST_PLAYER_FATAL_DAMAGE = 26,
|
|
36
|
+
MC_PRE_BERSERK_DEATH = 27,
|
|
37
|
+
MC_PRE_CUSTOM_REVIVE = 28,
|
|
38
|
+
MC_POST_CUSTOM_REVIVE = 29,
|
|
39
|
+
MC_POST_FLIP = 30,
|
|
40
|
+
MC_POST_FIRST_FLIP = 31,
|
|
41
|
+
MC_POST_ESAU_JR = 32,
|
|
42
|
+
MC_POST_FIRST_ESAU_JR = 33,
|
|
43
|
+
MC_POST_TRANSFORMATION = 34,
|
|
44
|
+
MC_POST_PURCHASE = 35,
|
|
45
|
+
MC_POST_SACRIFICE = 36,
|
|
46
|
+
MC_POST_CURSED_TELEPORT = 37,
|
|
47
|
+
MC_POST_TRINKET_BREAK = 38,
|
|
48
|
+
MC_POST_SLOT_INIT = 39,
|
|
49
|
+
MC_POST_SLOT_UPDATE = 40,
|
|
50
|
+
MC_POST_SLOT_RENDER = 41,
|
|
51
|
+
MC_POST_SLOT_ANIMATION_CHANGED = 42,
|
|
52
|
+
MC_POST_SLOT_DESTROYED = 43,
|
|
53
|
+
MC_POST_GRID_ENTITY_INIT = 44,
|
|
54
|
+
MC_POST_GRID_ENTITY_UPDATE = 45,
|
|
55
|
+
MC_POST_GRID_ENTITY_REMOVE = 46,
|
|
56
|
+
MC_POST_GRID_ENTITY_STATE_CHANGE = 47,
|
|
57
|
+
MC_POST_GRID_ENTITY_BROKEN = 48,
|
|
58
|
+
MC_POST_GRID_ENTITY_COLLISION = 49,
|
|
59
|
+
MC_POST_BONE_SWING = 50,
|
|
60
|
+
MC_POST_CUSTOM_DOOR_ENTER = 51
|
|
60
61
|
}
|
|
@@ -19,88 +19,90 @@ ____exports.ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY = 7
|
|
|
19
19
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY] = "MC_POST_NEW_ROOM_EARLY"
|
|
20
20
|
____exports.ModCallbacksCustom.MC_PRE_NEW_LEVEL = 8
|
|
21
21
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_PRE_NEW_LEVEL] = "MC_PRE_NEW_LEVEL"
|
|
22
|
-
____exports.ModCallbacksCustom.
|
|
22
|
+
____exports.ModCallbacksCustom.MC_ROOM_CLEAR_CHANGE = 9
|
|
23
|
+
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_ROOM_CLEAR_CHANGE] = "MC_ROOM_CLEAR_CHANGE"
|
|
24
|
+
____exports.ModCallbacksCustom.MC_POST_PLAYER_INIT_LATE = 10
|
|
23
25
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PLAYER_INIT_LATE] = "MC_POST_PLAYER_INIT_LATE"
|
|
24
|
-
____exports.ModCallbacksCustom.MC_POST_TEAR_INIT_LATE =
|
|
26
|
+
____exports.ModCallbacksCustom.MC_POST_TEAR_INIT_LATE = 11
|
|
25
27
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_TEAR_INIT_LATE] = "MC_POST_TEAR_INIT_LATE"
|
|
26
|
-
____exports.ModCallbacksCustom.MC_POST_TEAR_INIT_VERY_LATE =
|
|
28
|
+
____exports.ModCallbacksCustom.MC_POST_TEAR_INIT_VERY_LATE = 12
|
|
27
29
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_TEAR_INIT_VERY_LATE] = "MC_POST_TEAR_INIT_VERY_LATE"
|
|
28
|
-
____exports.ModCallbacksCustom.MC_POST_FAMILIAR_INIT_LATE =
|
|
30
|
+
____exports.ModCallbacksCustom.MC_POST_FAMILIAR_INIT_LATE = 13
|
|
29
31
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_FAMILIAR_INIT_LATE] = "MC_POST_FAMILIAR_INIT_LATE"
|
|
30
|
-
____exports.ModCallbacksCustom.MC_POST_BOMB_INIT_LATE =
|
|
32
|
+
____exports.ModCallbacksCustom.MC_POST_BOMB_INIT_LATE = 14
|
|
31
33
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_BOMB_INIT_LATE] = "MC_POST_BOMB_INIT_LATE"
|
|
32
|
-
____exports.ModCallbacksCustom.MC_POST_PICKUP_INIT_LATE =
|
|
34
|
+
____exports.ModCallbacksCustom.MC_POST_PICKUP_INIT_LATE = 15
|
|
33
35
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PICKUP_INIT_LATE] = "MC_POST_PICKUP_INIT_LATE"
|
|
34
|
-
____exports.ModCallbacksCustom.MC_POST_LASER_INIT_LATE =
|
|
36
|
+
____exports.ModCallbacksCustom.MC_POST_LASER_INIT_LATE = 16
|
|
35
37
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_LASER_INIT_LATE] = "MC_POST_LASER_INIT_LATE"
|
|
36
|
-
____exports.ModCallbacksCustom.MC_POST_KNIFE_INIT_LATE =
|
|
38
|
+
____exports.ModCallbacksCustom.MC_POST_KNIFE_INIT_LATE = 17
|
|
37
39
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_KNIFE_INIT_LATE] = "MC_POST_KNIFE_INIT_LATE"
|
|
38
|
-
____exports.ModCallbacksCustom.MC_POST_PROJECTILE_INIT_LATE =
|
|
40
|
+
____exports.ModCallbacksCustom.MC_POST_PROJECTILE_INIT_LATE = 18
|
|
39
41
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PROJECTILE_INIT_LATE] = "MC_POST_PROJECTILE_INIT_LATE"
|
|
40
|
-
____exports.ModCallbacksCustom.MC_POST_NPC_INIT_LATE =
|
|
42
|
+
____exports.ModCallbacksCustom.MC_POST_NPC_INIT_LATE = 19
|
|
41
43
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_NPC_INIT_LATE] = "MC_POST_NPC_INIT_LATE"
|
|
42
|
-
____exports.ModCallbacksCustom.MC_POST_EFFECT_INIT_LATE =
|
|
44
|
+
____exports.ModCallbacksCustom.MC_POST_EFFECT_INIT_LATE = 20
|
|
43
45
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_EFFECT_INIT_LATE] = "MC_POST_EFFECT_INIT_LATE"
|
|
44
|
-
____exports.ModCallbacksCustom.MC_POST_PICKUP_COLLECT =
|
|
46
|
+
____exports.ModCallbacksCustom.MC_POST_PICKUP_COLLECT = 21
|
|
45
47
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PICKUP_COLLECT] = "MC_POST_PICKUP_COLLECT"
|
|
46
|
-
____exports.ModCallbacksCustom.MC_PRE_ITEM_PICKUP =
|
|
48
|
+
____exports.ModCallbacksCustom.MC_PRE_ITEM_PICKUP = 22
|
|
47
49
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_PRE_ITEM_PICKUP] = "MC_PRE_ITEM_PICKUP"
|
|
48
|
-
____exports.ModCallbacksCustom.MC_POST_ITEM_PICKUP =
|
|
50
|
+
____exports.ModCallbacksCustom.MC_POST_ITEM_PICKUP = 23
|
|
49
51
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_ITEM_PICKUP] = "MC_POST_ITEM_PICKUP"
|
|
50
|
-
____exports.ModCallbacksCustom.MC_POST_PLAYER_CHANGE_TYPE =
|
|
52
|
+
____exports.ModCallbacksCustom.MC_POST_PLAYER_CHANGE_TYPE = 24
|
|
51
53
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PLAYER_CHANGE_TYPE] = "MC_POST_PLAYER_CHANGE_TYPE"
|
|
52
|
-
____exports.ModCallbacksCustom.MC_POST_PLAYER_CHANGE_HEALTH =
|
|
54
|
+
____exports.ModCallbacksCustom.MC_POST_PLAYER_CHANGE_HEALTH = 25
|
|
53
55
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PLAYER_CHANGE_HEALTH] = "MC_POST_PLAYER_CHANGE_HEALTH"
|
|
54
|
-
____exports.ModCallbacksCustom.MC_POST_PLAYER_FATAL_DAMAGE =
|
|
56
|
+
____exports.ModCallbacksCustom.MC_POST_PLAYER_FATAL_DAMAGE = 26
|
|
55
57
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PLAYER_FATAL_DAMAGE] = "MC_POST_PLAYER_FATAL_DAMAGE"
|
|
56
|
-
____exports.ModCallbacksCustom.MC_PRE_BERSERK_DEATH =
|
|
58
|
+
____exports.ModCallbacksCustom.MC_PRE_BERSERK_DEATH = 27
|
|
57
59
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_PRE_BERSERK_DEATH] = "MC_PRE_BERSERK_DEATH"
|
|
58
|
-
____exports.ModCallbacksCustom.MC_PRE_CUSTOM_REVIVE =
|
|
60
|
+
____exports.ModCallbacksCustom.MC_PRE_CUSTOM_REVIVE = 28
|
|
59
61
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_PRE_CUSTOM_REVIVE] = "MC_PRE_CUSTOM_REVIVE"
|
|
60
|
-
____exports.ModCallbacksCustom.MC_POST_CUSTOM_REVIVE =
|
|
62
|
+
____exports.ModCallbacksCustom.MC_POST_CUSTOM_REVIVE = 29
|
|
61
63
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_CUSTOM_REVIVE] = "MC_POST_CUSTOM_REVIVE"
|
|
62
|
-
____exports.ModCallbacksCustom.MC_POST_FLIP =
|
|
64
|
+
____exports.ModCallbacksCustom.MC_POST_FLIP = 30
|
|
63
65
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_FLIP] = "MC_POST_FLIP"
|
|
64
|
-
____exports.ModCallbacksCustom.MC_POST_FIRST_FLIP =
|
|
66
|
+
____exports.ModCallbacksCustom.MC_POST_FIRST_FLIP = 31
|
|
65
67
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_FIRST_FLIP] = "MC_POST_FIRST_FLIP"
|
|
66
|
-
____exports.ModCallbacksCustom.MC_POST_ESAU_JR =
|
|
68
|
+
____exports.ModCallbacksCustom.MC_POST_ESAU_JR = 32
|
|
67
69
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_ESAU_JR] = "MC_POST_ESAU_JR"
|
|
68
|
-
____exports.ModCallbacksCustom.MC_POST_FIRST_ESAU_JR =
|
|
70
|
+
____exports.ModCallbacksCustom.MC_POST_FIRST_ESAU_JR = 33
|
|
69
71
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_FIRST_ESAU_JR] = "MC_POST_FIRST_ESAU_JR"
|
|
70
|
-
____exports.ModCallbacksCustom.MC_POST_TRANSFORMATION =
|
|
72
|
+
____exports.ModCallbacksCustom.MC_POST_TRANSFORMATION = 34
|
|
71
73
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_TRANSFORMATION] = "MC_POST_TRANSFORMATION"
|
|
72
|
-
____exports.ModCallbacksCustom.MC_POST_PURCHASE =
|
|
74
|
+
____exports.ModCallbacksCustom.MC_POST_PURCHASE = 35
|
|
73
75
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PURCHASE] = "MC_POST_PURCHASE"
|
|
74
|
-
____exports.ModCallbacksCustom.MC_POST_SACRIFICE =
|
|
76
|
+
____exports.ModCallbacksCustom.MC_POST_SACRIFICE = 36
|
|
75
77
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_SACRIFICE] = "MC_POST_SACRIFICE"
|
|
76
|
-
____exports.ModCallbacksCustom.MC_POST_CURSED_TELEPORT =
|
|
78
|
+
____exports.ModCallbacksCustom.MC_POST_CURSED_TELEPORT = 37
|
|
77
79
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_CURSED_TELEPORT] = "MC_POST_CURSED_TELEPORT"
|
|
78
|
-
____exports.ModCallbacksCustom.MC_POST_TRINKET_BREAK =
|
|
80
|
+
____exports.ModCallbacksCustom.MC_POST_TRINKET_BREAK = 38
|
|
79
81
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_TRINKET_BREAK] = "MC_POST_TRINKET_BREAK"
|
|
80
|
-
____exports.ModCallbacksCustom.MC_POST_SLOT_INIT =
|
|
82
|
+
____exports.ModCallbacksCustom.MC_POST_SLOT_INIT = 39
|
|
81
83
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_SLOT_INIT] = "MC_POST_SLOT_INIT"
|
|
82
|
-
____exports.ModCallbacksCustom.MC_POST_SLOT_UPDATE =
|
|
84
|
+
____exports.ModCallbacksCustom.MC_POST_SLOT_UPDATE = 40
|
|
83
85
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_SLOT_UPDATE] = "MC_POST_SLOT_UPDATE"
|
|
84
|
-
____exports.ModCallbacksCustom.MC_POST_SLOT_RENDER =
|
|
86
|
+
____exports.ModCallbacksCustom.MC_POST_SLOT_RENDER = 41
|
|
85
87
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_SLOT_RENDER] = "MC_POST_SLOT_RENDER"
|
|
86
|
-
____exports.ModCallbacksCustom.MC_POST_SLOT_ANIMATION_CHANGED =
|
|
88
|
+
____exports.ModCallbacksCustom.MC_POST_SLOT_ANIMATION_CHANGED = 42
|
|
87
89
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_SLOT_ANIMATION_CHANGED] = "MC_POST_SLOT_ANIMATION_CHANGED"
|
|
88
|
-
____exports.ModCallbacksCustom.MC_POST_SLOT_DESTROYED =
|
|
90
|
+
____exports.ModCallbacksCustom.MC_POST_SLOT_DESTROYED = 43
|
|
89
91
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_SLOT_DESTROYED] = "MC_POST_SLOT_DESTROYED"
|
|
90
|
-
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_INIT =
|
|
92
|
+
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_INIT = 44
|
|
91
93
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_INIT] = "MC_POST_GRID_ENTITY_INIT"
|
|
92
|
-
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_UPDATE =
|
|
94
|
+
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_UPDATE = 45
|
|
93
95
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_UPDATE] = "MC_POST_GRID_ENTITY_UPDATE"
|
|
94
|
-
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_REMOVE =
|
|
96
|
+
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_REMOVE = 46
|
|
95
97
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_REMOVE] = "MC_POST_GRID_ENTITY_REMOVE"
|
|
96
|
-
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_STATE_CHANGE =
|
|
98
|
+
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_STATE_CHANGE = 47
|
|
97
99
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_STATE_CHANGE] = "MC_POST_GRID_ENTITY_STATE_CHANGE"
|
|
98
|
-
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_BROKEN =
|
|
100
|
+
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_BROKEN = 48
|
|
99
101
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_BROKEN] = "MC_POST_GRID_ENTITY_BROKEN"
|
|
100
|
-
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_COLLISION =
|
|
102
|
+
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_COLLISION = 49
|
|
101
103
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_COLLISION] = "MC_POST_GRID_ENTITY_COLLISION"
|
|
102
|
-
____exports.ModCallbacksCustom.MC_POST_BONE_SWING =
|
|
104
|
+
____exports.ModCallbacksCustom.MC_POST_BONE_SWING = 50
|
|
103
105
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_BONE_SWING] = "MC_POST_BONE_SWING"
|
|
104
|
-
____exports.ModCallbacksCustom.MC_POST_CUSTOM_DOOR_ENTER =
|
|
106
|
+
____exports.ModCallbacksCustom.MC_POST_CUSTOM_DOOR_ENTER = 51
|
|
105
107
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_CUSTOM_DOOR_ENTER] = "MC_POST_CUSTOM_DOOR_ENTER"
|
|
106
108
|
return ____exports
|
package/dist/upgradeMod.lua
CHANGED
|
@@ -73,6 +73,8 @@ local ____preNewLevel = require("callbacks.preNewLevel")
|
|
|
73
73
|
local preNewLevelCallbackInit = ____preNewLevel.preNewLevelCallbackInit
|
|
74
74
|
local ____reorderedCallbacks = require("callbacks.reorderedCallbacks")
|
|
75
75
|
local reorderedCallbacksInit = ____reorderedCallbacks.reorderedCallbacksInit
|
|
76
|
+
local ____roomClearChange = require("callbacks.roomClearChange")
|
|
77
|
+
local roomClearChangeCallbackInit = ____roomClearChange.roomClearChangeCallbackInit
|
|
76
78
|
local ____deployJSONRoom = require("features.deployJSONRoom")
|
|
77
79
|
local deployJSONRoomInit = ____deployJSONRoom.deployJSONRoomInit
|
|
78
80
|
local ____disableInputs = require("features.disableInputs")
|
|
@@ -95,6 +97,8 @@ local ____main = require("features.saveDataManager.main")
|
|
|
95
97
|
local saveDataManagerInit = ____main.saveDataManagerInit
|
|
96
98
|
local ____sirenHelpers = require("features.sirenHelpers")
|
|
97
99
|
local sirenHelpersInit = ____sirenHelpers.sirenHelpersInit
|
|
100
|
+
local ____taintedLazarusPlayers = require("features.taintedLazarusPlayers")
|
|
101
|
+
local taintedLazarusPlayersInit = ____taintedLazarusPlayers.taintedLazarusPlayersInit
|
|
98
102
|
local ____featuresInitialized = require("featuresInitialized")
|
|
99
103
|
local areFeaturesInitialized = ____featuresInitialized.areFeaturesInitialized
|
|
100
104
|
local setFeaturesInitialized = ____featuresInitialized.setFeaturesInitialized
|
|
@@ -105,6 +109,7 @@ local ModUpgraded = ____ModUpgraded.ModUpgraded
|
|
|
105
109
|
function initCustomCallbacks(self, mod)
|
|
106
110
|
reorderedCallbacksInit(nil, mod)
|
|
107
111
|
preNewLevelCallbackInit(nil, mod)
|
|
112
|
+
roomClearChangeCallbackInit(nil, mod)
|
|
108
113
|
postPlayerReorderedCallbacksInit(nil, mod)
|
|
109
114
|
postPlayerInitLateCallbackInit(nil, mod)
|
|
110
115
|
postTearInitLateCallbackInit(nil, mod)
|
|
@@ -149,6 +154,7 @@ function initFeatures(self, mod)
|
|
|
149
154
|
sirenHelpersInit(nil, mod)
|
|
150
155
|
isPonyActiveInit(nil, mod)
|
|
151
156
|
playerInventoryInit(nil, mod)
|
|
157
|
+
taintedLazarusPlayersInit(nil, mod)
|
|
152
158
|
end
|
|
153
159
|
function ____exports.upgradeMod(self, modVanilla, verbose)
|
|
154
160
|
if verbose == nil then
|