isaacscript-common 1.2.286 → 1.2.289
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/postEffectStateChanged.d.ts +1 -0
- package/dist/callbacks/postEffectStateChanged.lua +35 -0
- package/dist/callbacks/postFamiliarStateChanged.d.ts +1 -0
- package/dist/callbacks/postFamiliarStateChanged.lua +35 -0
- package/dist/callbacks/postNPCStateChanged.d.ts +1 -0
- package/dist/callbacks/postNPCStateChanged.lua +35 -0
- package/dist/callbacks/postPickupStateChanged.d.ts +1 -0
- package/dist/callbacks/postPickupStateChanged.lua +35 -0
- package/dist/callbacks/subscriptions/postEffectStateChanged.d.ts +2 -0
- package/dist/callbacks/subscriptions/postEffectStateChanged.lua +23 -0
- package/dist/callbacks/subscriptions/postFamiliarStateChanged.d.ts +2 -0
- package/dist/callbacks/subscriptions/postFamiliarStateChanged.lua +23 -0
- package/dist/callbacks/subscriptions/postNPCStateChanged.d.ts +2 -0
- package/dist/callbacks/subscriptions/postNPCStateChanged.lua +23 -0
- package/dist/callbacks/subscriptions/postPickupStateChanged.d.ts +2 -0
- package/dist/callbacks/subscriptions/postPickupStateChanged.lua +23 -0
- package/dist/enums/ModCallbacksCustom.d.ts +12 -8
- package/dist/enums/ModCallbacksCustom.lua +16 -8
- package/dist/features/debugDisplay.d.ts +80 -0
- package/dist/features/debugDisplay.lua +230 -0
- package/dist/features/extraConsoleCommands/commands.d.ts +6 -0
- package/dist/features/extraConsoleCommands/commands.lua +18 -118
- package/dist/features/extraConsoleCommands/commandsDisplay.d.ts +99 -0
- package/dist/features/extraConsoleCommands/commandsDisplay.lua +81 -0
- package/dist/features/extraConsoleCommands/commandsSubroutines.d.ts +9 -0
- package/dist/features/extraConsoleCommands/commandsSubroutines.lua +126 -0
- package/dist/features/extraConsoleCommands/init.lua +26 -0
- package/dist/functions/utils.d.ts +12 -1
- package/dist/functions/utils.lua +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.lua +25 -0
- package/dist/objects/callbackRegisterFunctions.lua +12 -0
- package/dist/types/AddCallbackParametersCustom.d.ts +20 -0
- package/dist/upgradeMod.lua +28 -10
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__New = ____lualib.__TS__New
|
|
3
|
+
local ____exports = {}
|
|
4
|
+
local hasSubscriptions, postEffectUpdate, v
|
|
5
|
+
local ____DefaultMap = require("classes.DefaultMap")
|
|
6
|
+
local DefaultMap = ____DefaultMap.DefaultMap
|
|
7
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
8
|
+
local saveDataManager = ____exports.saveDataManager
|
|
9
|
+
local ____postEffectStateChanged = require("callbacks.subscriptions.postEffectStateChanged")
|
|
10
|
+
local postEffectStateChangedFire = ____postEffectStateChanged.postEffectStateChangedFire
|
|
11
|
+
local postEffectStateChangedHasSubscriptions = ____postEffectStateChanged.postEffectStateChangedHasSubscriptions
|
|
12
|
+
function hasSubscriptions(self)
|
|
13
|
+
return postEffectStateChangedHasSubscriptions(nil)
|
|
14
|
+
end
|
|
15
|
+
function postEffectUpdate(self, effect)
|
|
16
|
+
if not hasSubscriptions(nil) then
|
|
17
|
+
return
|
|
18
|
+
end
|
|
19
|
+
local ptrHash = GetPtrHash(effect)
|
|
20
|
+
local previousState = v.run.effectStateMap:getAndSetDefault(ptrHash, effect.State)
|
|
21
|
+
local currentState = effect.State
|
|
22
|
+
v.run.effectStateMap:set(ptrHash, currentState)
|
|
23
|
+
if previousState ~= currentState then
|
|
24
|
+
postEffectStateChangedFire(nil, effect, previousState, currentState)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
v = {run = {effectStateMap = __TS__New(
|
|
28
|
+
DefaultMap,
|
|
29
|
+
function(____, _ptrHash, state) return state end
|
|
30
|
+
)}}
|
|
31
|
+
function ____exports.postEffectStateChangedCallbackInit(self, mod)
|
|
32
|
+
saveDataManager(nil, "postEffectStateChanged", v, hasSubscriptions)
|
|
33
|
+
mod:AddCallback(ModCallbacks.MC_POST_EFFECT_UPDATE, postEffectUpdate)
|
|
34
|
+
end
|
|
35
|
+
return ____exports
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__New = ____lualib.__TS__New
|
|
3
|
+
local ____exports = {}
|
|
4
|
+
local hasSubscriptions, postFamiliarUpdate, v
|
|
5
|
+
local ____DefaultMap = require("classes.DefaultMap")
|
|
6
|
+
local DefaultMap = ____DefaultMap.DefaultMap
|
|
7
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
8
|
+
local saveDataManager = ____exports.saveDataManager
|
|
9
|
+
local ____postFamiliarStateChanged = require("callbacks.subscriptions.postFamiliarStateChanged")
|
|
10
|
+
local postFamiliarStateChangedFire = ____postFamiliarStateChanged.postFamiliarStateChangedFire
|
|
11
|
+
local postFamiliarStateChangedHasSubscriptions = ____postFamiliarStateChanged.postFamiliarStateChangedHasSubscriptions
|
|
12
|
+
function hasSubscriptions(self)
|
|
13
|
+
return postFamiliarStateChangedHasSubscriptions(nil)
|
|
14
|
+
end
|
|
15
|
+
function postFamiliarUpdate(self, familiar)
|
|
16
|
+
if not hasSubscriptions(nil) then
|
|
17
|
+
return
|
|
18
|
+
end
|
|
19
|
+
local ptrHash = GetPtrHash(familiar)
|
|
20
|
+
local previousState = v.run.familiarStateMap:getAndSetDefault(ptrHash, familiar.State)
|
|
21
|
+
local currentState = familiar.State
|
|
22
|
+
v.run.familiarStateMap:set(ptrHash, currentState)
|
|
23
|
+
if previousState ~= currentState then
|
|
24
|
+
postFamiliarStateChangedFire(nil, familiar, previousState, currentState)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
v = {run = {familiarStateMap = __TS__New(
|
|
28
|
+
DefaultMap,
|
|
29
|
+
function(____, _initSeed, state) return state end
|
|
30
|
+
)}}
|
|
31
|
+
function ____exports.postFamiliarStateChangedCallbackInit(self, mod)
|
|
32
|
+
saveDataManager(nil, "postFamiliarStateChanged", v, hasSubscriptions)
|
|
33
|
+
mod:AddCallback(ModCallbacks.MC_FAMILIAR_UPDATE, postFamiliarUpdate)
|
|
34
|
+
end
|
|
35
|
+
return ____exports
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__New = ____lualib.__TS__New
|
|
3
|
+
local ____exports = {}
|
|
4
|
+
local hasSubscriptions, postNPCUpdate, v
|
|
5
|
+
local ____DefaultMap = require("classes.DefaultMap")
|
|
6
|
+
local DefaultMap = ____DefaultMap.DefaultMap
|
|
7
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
8
|
+
local saveDataManager = ____exports.saveDataManager
|
|
9
|
+
local ____postNPCStateChanged = require("callbacks.subscriptions.postNPCStateChanged")
|
|
10
|
+
local postNPCStateChangedFire = ____postNPCStateChanged.postNPCStateChangedFire
|
|
11
|
+
local postNPCStateChangedHasSubscriptions = ____postNPCStateChanged.postNPCStateChangedHasSubscriptions
|
|
12
|
+
function hasSubscriptions(self)
|
|
13
|
+
return postNPCStateChangedHasSubscriptions(nil)
|
|
14
|
+
end
|
|
15
|
+
function postNPCUpdate(self, npc)
|
|
16
|
+
if not hasSubscriptions(nil) then
|
|
17
|
+
return
|
|
18
|
+
end
|
|
19
|
+
local ptrHash = GetPtrHash(npc)
|
|
20
|
+
local previousState = v.run.npcStateMap:getAndSetDefault(ptrHash, npc.State)
|
|
21
|
+
local currentState = npc.State
|
|
22
|
+
v.run.npcStateMap:set(ptrHash, currentState)
|
|
23
|
+
if previousState ~= currentState then
|
|
24
|
+
postNPCStateChangedFire(nil, npc, previousState, currentState)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
v = {run = {npcStateMap = __TS__New(
|
|
28
|
+
DefaultMap,
|
|
29
|
+
function(____, _ptrHash, state) return state end
|
|
30
|
+
)}}
|
|
31
|
+
function ____exports.postNPCStateChangedCallbackInit(self, mod)
|
|
32
|
+
saveDataManager(nil, "postNPCStateChanged", v, hasSubscriptions)
|
|
33
|
+
mod:AddCallback(ModCallbacks.MC_NPC_UPDATE, postNPCUpdate)
|
|
34
|
+
end
|
|
35
|
+
return ____exports
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__New = ____lualib.__TS__New
|
|
3
|
+
local ____exports = {}
|
|
4
|
+
local hasSubscriptions, postPickupUpdate, v
|
|
5
|
+
local ____DefaultMap = require("classes.DefaultMap")
|
|
6
|
+
local DefaultMap = ____DefaultMap.DefaultMap
|
|
7
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
8
|
+
local saveDataManager = ____exports.saveDataManager
|
|
9
|
+
local ____postPickupStateChanged = require("callbacks.subscriptions.postPickupStateChanged")
|
|
10
|
+
local postPickupStateChangedFire = ____postPickupStateChanged.postPickupStateChangedFire
|
|
11
|
+
local postPickupStateChangedHasSubscriptions = ____postPickupStateChanged.postPickupStateChangedHasSubscriptions
|
|
12
|
+
function hasSubscriptions(self)
|
|
13
|
+
return postPickupStateChangedHasSubscriptions(nil)
|
|
14
|
+
end
|
|
15
|
+
function postPickupUpdate(self, pickup)
|
|
16
|
+
if not hasSubscriptions(nil) then
|
|
17
|
+
return
|
|
18
|
+
end
|
|
19
|
+
local ptrHash = GetPtrHash(pickup)
|
|
20
|
+
local previousState = v.run.pickupStateMap:getAndSetDefault(ptrHash, pickup.State)
|
|
21
|
+
local currentState = pickup.State
|
|
22
|
+
v.run.pickupStateMap:set(ptrHash, currentState)
|
|
23
|
+
if previousState ~= currentState then
|
|
24
|
+
postPickupStateChangedFire(nil, pickup, previousState, currentState)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
v = {run = {pickupStateMap = __TS__New(
|
|
28
|
+
DefaultMap,
|
|
29
|
+
function(____, _ptrHash, state) return state end
|
|
30
|
+
)}}
|
|
31
|
+
function ____exports.postPickupStateChangedCallbackInit(self, mod)
|
|
32
|
+
saveDataManager(nil, "postPickupStateChanged", v, hasSubscriptions)
|
|
33
|
+
mod:AddCallback(ModCallbacks.MC_POST_PICKUP_UPDATE, postPickupUpdate)
|
|
34
|
+
end
|
|
35
|
+
return ____exports
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____exports = {}
|
|
3
|
+
local subscriptions = {}
|
|
4
|
+
function ____exports.postEffectStateChangedHasSubscriptions(self)
|
|
5
|
+
return #subscriptions > 0
|
|
6
|
+
end
|
|
7
|
+
function ____exports.postEffectStateChangedRegister(self, callback, effectVariant)
|
|
8
|
+
subscriptions[#subscriptions + 1] = {callback, effectVariant}
|
|
9
|
+
end
|
|
10
|
+
function ____exports.postEffectStateChangedFire(self, effect, previousState, currentState)
|
|
11
|
+
for ____, ____value in ipairs(subscriptions) do
|
|
12
|
+
local callback = ____value[1]
|
|
13
|
+
local effectVariant = ____value[2]
|
|
14
|
+
do
|
|
15
|
+
if effectVariant ~= nil and effectVariant ~= effect.Variant then
|
|
16
|
+
goto __continue5
|
|
17
|
+
end
|
|
18
|
+
callback(nil, effect, previousState, currentState)
|
|
19
|
+
end
|
|
20
|
+
::__continue5::
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
return ____exports
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____exports = {}
|
|
3
|
+
local subscriptions = {}
|
|
4
|
+
function ____exports.postFamiliarStateChangedHasSubscriptions(self)
|
|
5
|
+
return #subscriptions > 0
|
|
6
|
+
end
|
|
7
|
+
function ____exports.postFamiliarStateChangedRegister(self, callback, familiarVariant)
|
|
8
|
+
subscriptions[#subscriptions + 1] = {callback, familiarVariant}
|
|
9
|
+
end
|
|
10
|
+
function ____exports.postFamiliarStateChangedFire(self, familiar, previousState, currentState)
|
|
11
|
+
for ____, ____value in ipairs(subscriptions) do
|
|
12
|
+
local callback = ____value[1]
|
|
13
|
+
local familiarVariant = ____value[2]
|
|
14
|
+
do
|
|
15
|
+
if familiarVariant ~= nil and familiarVariant ~= familiar.Variant then
|
|
16
|
+
goto __continue5
|
|
17
|
+
end
|
|
18
|
+
callback(nil, familiar, previousState, currentState)
|
|
19
|
+
end
|
|
20
|
+
::__continue5::
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
return ____exports
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____exports = {}
|
|
3
|
+
local subscriptions = {}
|
|
4
|
+
function ____exports.postNPCStateChangedHasSubscriptions(self)
|
|
5
|
+
return #subscriptions > 0
|
|
6
|
+
end
|
|
7
|
+
function ____exports.postNPCStateChangedRegister(self, callback, entityType)
|
|
8
|
+
subscriptions[#subscriptions + 1] = {callback, entityType}
|
|
9
|
+
end
|
|
10
|
+
function ____exports.postNPCStateChangedFire(self, npc, previousState, currentState)
|
|
11
|
+
for ____, ____value in ipairs(subscriptions) do
|
|
12
|
+
local callback = ____value[1]
|
|
13
|
+
local entityType = ____value[2]
|
|
14
|
+
do
|
|
15
|
+
if entityType ~= nil and entityType ~= npc.Type then
|
|
16
|
+
goto __continue5
|
|
17
|
+
end
|
|
18
|
+
callback(nil, npc, previousState, currentState)
|
|
19
|
+
end
|
|
20
|
+
::__continue5::
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
return ____exports
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____exports = {}
|
|
3
|
+
local subscriptions = {}
|
|
4
|
+
function ____exports.postPickupStateChangedHasSubscriptions(self)
|
|
5
|
+
return #subscriptions > 0
|
|
6
|
+
end
|
|
7
|
+
function ____exports.postPickupStateChangedRegister(self, callback, pickupVariant)
|
|
8
|
+
subscriptions[#subscriptions + 1] = {callback, pickupVariant}
|
|
9
|
+
end
|
|
10
|
+
function ____exports.postPickupStateChangedFire(self, pickup, previousState, currentState)
|
|
11
|
+
for ____, ____value in ipairs(subscriptions) do
|
|
12
|
+
local callback = ____value[1]
|
|
13
|
+
local pickupVariant = ____value[2]
|
|
14
|
+
do
|
|
15
|
+
if pickupVariant ~= nil and pickupVariant ~= pickup.Variant then
|
|
16
|
+
goto __continue5
|
|
17
|
+
end
|
|
18
|
+
callback(nil, pickup, previousState, currentState)
|
|
19
|
+
end
|
|
20
|
+
::__continue5::
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
return ____exports
|
|
@@ -51,12 +51,16 @@ export declare enum ModCallbacksCustom {
|
|
|
51
51
|
MC_POST_SLOT_RENDER = 42,
|
|
52
52
|
MC_POST_SLOT_ANIMATION_CHANGED = 43,
|
|
53
53
|
MC_POST_SLOT_DESTROYED = 44,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
MC_POST_FAMILIAR_STATE_CHANGED = 45,
|
|
55
|
+
MC_POST_PICKUP_STATE_CHANGED = 46,
|
|
56
|
+
MC_POST_EFFECT_STATE_CHANGED = 47,
|
|
57
|
+
MC_POST_NPC_STATE_CHANGED = 48,
|
|
58
|
+
MC_POST_GRID_ENTITY_INIT = 49,
|
|
59
|
+
MC_POST_GRID_ENTITY_UPDATE = 50,
|
|
60
|
+
MC_POST_GRID_ENTITY_REMOVE = 51,
|
|
61
|
+
MC_POST_GRID_ENTITY_STATE_CHANGE = 52,
|
|
62
|
+
MC_POST_GRID_ENTITY_BROKEN = 53,
|
|
63
|
+
MC_POST_GRID_ENTITY_COLLISION = 54,
|
|
64
|
+
MC_POST_BONE_SWING = 55,
|
|
65
|
+
MC_POST_CUSTOM_DOOR_ENTER = 56
|
|
62
66
|
}
|
|
@@ -91,20 +91,28 @@ ____exports.ModCallbacksCustom.MC_POST_SLOT_ANIMATION_CHANGED = 43
|
|
|
91
91
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_SLOT_ANIMATION_CHANGED] = "MC_POST_SLOT_ANIMATION_CHANGED"
|
|
92
92
|
____exports.ModCallbacksCustom.MC_POST_SLOT_DESTROYED = 44
|
|
93
93
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_SLOT_DESTROYED] = "MC_POST_SLOT_DESTROYED"
|
|
94
|
-
____exports.ModCallbacksCustom.
|
|
94
|
+
____exports.ModCallbacksCustom.MC_POST_FAMILIAR_STATE_CHANGED = 45
|
|
95
|
+
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_FAMILIAR_STATE_CHANGED] = "MC_POST_FAMILIAR_STATE_CHANGED"
|
|
96
|
+
____exports.ModCallbacksCustom.MC_POST_PICKUP_STATE_CHANGED = 46
|
|
97
|
+
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_PICKUP_STATE_CHANGED] = "MC_POST_PICKUP_STATE_CHANGED"
|
|
98
|
+
____exports.ModCallbacksCustom.MC_POST_EFFECT_STATE_CHANGED = 47
|
|
99
|
+
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_EFFECT_STATE_CHANGED] = "MC_POST_EFFECT_STATE_CHANGED"
|
|
100
|
+
____exports.ModCallbacksCustom.MC_POST_NPC_STATE_CHANGED = 48
|
|
101
|
+
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_NPC_STATE_CHANGED] = "MC_POST_NPC_STATE_CHANGED"
|
|
102
|
+
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_INIT = 49
|
|
95
103
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_INIT] = "MC_POST_GRID_ENTITY_INIT"
|
|
96
|
-
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_UPDATE =
|
|
104
|
+
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_UPDATE = 50
|
|
97
105
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_UPDATE] = "MC_POST_GRID_ENTITY_UPDATE"
|
|
98
|
-
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_REMOVE =
|
|
106
|
+
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_REMOVE = 51
|
|
99
107
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_REMOVE] = "MC_POST_GRID_ENTITY_REMOVE"
|
|
100
|
-
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_STATE_CHANGE =
|
|
108
|
+
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_STATE_CHANGE = 52
|
|
101
109
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_STATE_CHANGE] = "MC_POST_GRID_ENTITY_STATE_CHANGE"
|
|
102
|
-
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_BROKEN =
|
|
110
|
+
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_BROKEN = 53
|
|
103
111
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_BROKEN] = "MC_POST_GRID_ENTITY_BROKEN"
|
|
104
|
-
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_COLLISION =
|
|
112
|
+
____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_COLLISION = 54
|
|
105
113
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_GRID_ENTITY_COLLISION] = "MC_POST_GRID_ENTITY_COLLISION"
|
|
106
|
-
____exports.ModCallbacksCustom.MC_POST_BONE_SWING =
|
|
114
|
+
____exports.ModCallbacksCustom.MC_POST_BONE_SWING = 55
|
|
107
115
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_BONE_SWING] = "MC_POST_BONE_SWING"
|
|
108
|
-
____exports.ModCallbacksCustom.MC_POST_CUSTOM_DOOR_ENTER =
|
|
116
|
+
____exports.ModCallbacksCustom.MC_POST_CUSTOM_DOOR_ENTER = 56
|
|
109
117
|
____exports.ModCallbacksCustom[____exports.ModCallbacksCustom.MC_POST_CUSTOM_DOOR_ENTER] = "MC_POST_CUSTOM_DOOR_ENTER"
|
|
110
118
|
return ____exports
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
import { ModUpgraded } from "../classes/ModUpgraded";
|
|
3
|
+
export declare function debugDisplayInit(mod: ModUpgraded): void;
|
|
4
|
+
export declare function togglePlayerDisplay(): void;
|
|
5
|
+
export declare function toggleTearDisplay(): void;
|
|
6
|
+
export declare function toggleFamiliarDisplay(): void;
|
|
7
|
+
export declare function toggleBombDisplay(): void;
|
|
8
|
+
export declare function togglePickupDisplay(): void;
|
|
9
|
+
export declare function toggleSlotDisplay(): void;
|
|
10
|
+
export declare function toggleLaserDisplay(): void;
|
|
11
|
+
export declare function toggleKnifeDisplay(): void;
|
|
12
|
+
export declare function toggleProjectileDisplay(): void;
|
|
13
|
+
export declare function toggleEffectDisplay(): void;
|
|
14
|
+
export declare function toggleNPCDisplay(): void;
|
|
15
|
+
/**
|
|
16
|
+
* After using the "playerdisplay" console command, text will be drawn on each player for debugging
|
|
17
|
+
* purposes. Use this function to specify a callback function that will returns the string that
|
|
18
|
+
* should be drawn.
|
|
19
|
+
*/
|
|
20
|
+
export declare function setPlayerDisplay(textCallback: (player: EntityPlayer) => string): void;
|
|
21
|
+
/**
|
|
22
|
+
* After using the "teardisplay" console command, text will be drawn on each tear for debugging
|
|
23
|
+
* purposes. Use this function to specify a callback function that will returns the string that
|
|
24
|
+
* should be drawn.
|
|
25
|
+
*/
|
|
26
|
+
export declare function setTearDisplay(textCallback: (tear: EntityTear) => string): void;
|
|
27
|
+
/**
|
|
28
|
+
* After using the "familiardisplay" console command, text will be drawn on each familiar for
|
|
29
|
+
* debugging purposes. Use this function to specify a callback function that will returns the string
|
|
30
|
+
* that should be drawn.
|
|
31
|
+
*/
|
|
32
|
+
export declare function setFamiliarDisplay(textCallback: (familiar: EntityFamiliar) => string): void;
|
|
33
|
+
/**
|
|
34
|
+
* After using the "bombdisplay" console command, text will be drawn on each bomb for debugging
|
|
35
|
+
* purposes. Use this function to specify a callback function that will returns the string that
|
|
36
|
+
* should be drawn.
|
|
37
|
+
*/
|
|
38
|
+
export declare function setBombDisplay(textCallback: (bomb: EntityBomb) => string): void;
|
|
39
|
+
/**
|
|
40
|
+
* After using the "pickupdisplay" console command, text will be drawn on each pickup for debugging
|
|
41
|
+
* purposes. Use this function to specify a callback function that will returns the string that
|
|
42
|
+
* should be drawn.
|
|
43
|
+
*/
|
|
44
|
+
export declare function setPickupDisplay(textCallback: (pickup: EntityPickup) => string): void;
|
|
45
|
+
/**
|
|
46
|
+
* After using the "slotdisplay" console command, text will be drawn on each slot for debugging
|
|
47
|
+
* purposes. Use this function to specify a callback function that will returns the string that
|
|
48
|
+
* should be drawn.
|
|
49
|
+
*/
|
|
50
|
+
export declare function setSlotDisplay(textCallback: (slot: Entity) => string): void;
|
|
51
|
+
/**
|
|
52
|
+
* After using the "laserdisplay" console command, text will be drawn on each laser for debugging
|
|
53
|
+
* purposes. Use this function to specify a callback function that will returns the string that
|
|
54
|
+
* should be drawn.
|
|
55
|
+
*/
|
|
56
|
+
export declare function setLaserDisplay(textCallback: (laser: EntityLaser) => string): void;
|
|
57
|
+
/**
|
|
58
|
+
* After using the "knifedisplay" console command, text will be drawn on each knife for debugging
|
|
59
|
+
* purposes. Use this function to specify a callback function that will returns the string that
|
|
60
|
+
* should be drawn.
|
|
61
|
+
*/
|
|
62
|
+
export declare function setKnifeDisplay(textCallback: (knife: EntityKnife) => string): void;
|
|
63
|
+
/**
|
|
64
|
+
* After using the "projectiledisplay" console command, text will be drawn on each projectile for
|
|
65
|
+
* debugging purposes. Use this function to specify a callback function that will returns the string
|
|
66
|
+
* that should be drawn.
|
|
67
|
+
*/
|
|
68
|
+
export declare function setProjectileDisplay(textCallback: (projectile: EntityProjectile) => string): void;
|
|
69
|
+
/**
|
|
70
|
+
* After using the "effectdisplay" console command, text will be drawn on each effect for debugging
|
|
71
|
+
* purposes. Use this function to specify a callback function that will returns the string that
|
|
72
|
+
* should be drawn.
|
|
73
|
+
*/
|
|
74
|
+
export declare function setEffectDisplay(textCallback: (effect: EntityEffect) => string): void;
|
|
75
|
+
/**
|
|
76
|
+
* After using the "npcdisplay" console command, text will be drawn on each NPC for debugging
|
|
77
|
+
* purposes. Use this function to specify a callback function that will returns the string that
|
|
78
|
+
* should be drawn.
|
|
79
|
+
*/
|
|
80
|
+
export declare function setNPCDisplay(textCallback: (npc: EntityNPC) => string): void;
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____exports = {}
|
|
3
|
+
local defaultDisplayCallback, postFamiliarRender, postNPCRender, postPlayerRender, postPickupRender, postTearRender, postProjectileRender, postLaserRender, postKnifeRender, postEffectRender, postBombRender, postSlotRender, renderTextOnEntity, textCallbacks, v
|
|
4
|
+
local ____ModCallbacksCustom = require("enums.ModCallbacksCustom")
|
|
5
|
+
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
6
|
+
local ____entity = require("functions.entity")
|
|
7
|
+
local getEntityID = ____entity.getEntityID
|
|
8
|
+
local ____utils = require("functions.utils")
|
|
9
|
+
local isReflectionRender = ____utils.isReflectionRender
|
|
10
|
+
local printEnabled = ____utils.printEnabled
|
|
11
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
12
|
+
local saveDataManager = ____exports.saveDataManager
|
|
13
|
+
function defaultDisplayCallback(self, entity)
|
|
14
|
+
return getEntityID(nil, entity)
|
|
15
|
+
end
|
|
16
|
+
function postFamiliarRender(self, familiar)
|
|
17
|
+
if not v.run.familiar then
|
|
18
|
+
return
|
|
19
|
+
end
|
|
20
|
+
local text = textCallbacks:familiar(familiar)
|
|
21
|
+
renderTextOnEntity(nil, familiar, text)
|
|
22
|
+
end
|
|
23
|
+
function postNPCRender(self, npc)
|
|
24
|
+
if not v.run.npc then
|
|
25
|
+
return
|
|
26
|
+
end
|
|
27
|
+
local text = textCallbacks:npc(npc)
|
|
28
|
+
renderTextOnEntity(nil, npc, text)
|
|
29
|
+
end
|
|
30
|
+
function postPlayerRender(self, player)
|
|
31
|
+
if not v.run.player then
|
|
32
|
+
return
|
|
33
|
+
end
|
|
34
|
+
local text = textCallbacks:player(player)
|
|
35
|
+
renderTextOnEntity(nil, player, text)
|
|
36
|
+
end
|
|
37
|
+
function postPickupRender(self, pickup)
|
|
38
|
+
if not v.run.pickup then
|
|
39
|
+
return
|
|
40
|
+
end
|
|
41
|
+
local text = textCallbacks:pickup(pickup)
|
|
42
|
+
renderTextOnEntity(nil, pickup, text)
|
|
43
|
+
end
|
|
44
|
+
function postTearRender(self, tear)
|
|
45
|
+
if not v.run.tear then
|
|
46
|
+
return
|
|
47
|
+
end
|
|
48
|
+
local text = textCallbacks:tear(tear)
|
|
49
|
+
renderTextOnEntity(nil, tear, text)
|
|
50
|
+
end
|
|
51
|
+
function postProjectileRender(self, projectile)
|
|
52
|
+
if not v.run.projectile then
|
|
53
|
+
return
|
|
54
|
+
end
|
|
55
|
+
local text = textCallbacks:projectile(projectile)
|
|
56
|
+
renderTextOnEntity(nil, projectile, text)
|
|
57
|
+
end
|
|
58
|
+
function postLaserRender(self, laser)
|
|
59
|
+
if not v.run.laser then
|
|
60
|
+
return
|
|
61
|
+
end
|
|
62
|
+
local text = textCallbacks:laser(laser)
|
|
63
|
+
renderTextOnEntity(nil, laser, text)
|
|
64
|
+
end
|
|
65
|
+
function postKnifeRender(self, knife)
|
|
66
|
+
if not v.run.knife then
|
|
67
|
+
return
|
|
68
|
+
end
|
|
69
|
+
local text = textCallbacks:knife(knife)
|
|
70
|
+
renderTextOnEntity(nil, knife, text)
|
|
71
|
+
end
|
|
72
|
+
function postEffectRender(self, effect)
|
|
73
|
+
if not v.run.effect then
|
|
74
|
+
return
|
|
75
|
+
end
|
|
76
|
+
local text = textCallbacks:effect(effect)
|
|
77
|
+
renderTextOnEntity(nil, effect, text)
|
|
78
|
+
end
|
|
79
|
+
function postBombRender(self, bomb)
|
|
80
|
+
if not v.run.bomb then
|
|
81
|
+
return
|
|
82
|
+
end
|
|
83
|
+
local text = textCallbacks:bomb(bomb)
|
|
84
|
+
renderTextOnEntity(nil, bomb, text)
|
|
85
|
+
end
|
|
86
|
+
function postSlotRender(self, slot)
|
|
87
|
+
if not v.run.slot then
|
|
88
|
+
return
|
|
89
|
+
end
|
|
90
|
+
local text = textCallbacks:slot(slot)
|
|
91
|
+
renderTextOnEntity(nil, slot, text)
|
|
92
|
+
end
|
|
93
|
+
function renderTextOnEntity(self, entity, text)
|
|
94
|
+
if isReflectionRender(nil) then
|
|
95
|
+
return
|
|
96
|
+
end
|
|
97
|
+
local position = Isaac.WorldToScreen(entity.Position)
|
|
98
|
+
Isaac.RenderText(
|
|
99
|
+
text,
|
|
100
|
+
position.X,
|
|
101
|
+
position.Y,
|
|
102
|
+
1,
|
|
103
|
+
1,
|
|
104
|
+
1,
|
|
105
|
+
1
|
|
106
|
+
)
|
|
107
|
+
end
|
|
108
|
+
textCallbacks = {
|
|
109
|
+
player = defaultDisplayCallback,
|
|
110
|
+
tear = defaultDisplayCallback,
|
|
111
|
+
familiar = defaultDisplayCallback,
|
|
112
|
+
bomb = defaultDisplayCallback,
|
|
113
|
+
pickup = defaultDisplayCallback,
|
|
114
|
+
slot = defaultDisplayCallback,
|
|
115
|
+
laser = defaultDisplayCallback,
|
|
116
|
+
knife = defaultDisplayCallback,
|
|
117
|
+
projectile = defaultDisplayCallback,
|
|
118
|
+
effect = defaultDisplayCallback,
|
|
119
|
+
npc = defaultDisplayCallback
|
|
120
|
+
}
|
|
121
|
+
v = {run = {
|
|
122
|
+
player = false,
|
|
123
|
+
tear = false,
|
|
124
|
+
familiar = false,
|
|
125
|
+
bomb = false,
|
|
126
|
+
pickup = false,
|
|
127
|
+
slot = false,
|
|
128
|
+
laser = false,
|
|
129
|
+
knife = false,
|
|
130
|
+
projectile = false,
|
|
131
|
+
effect = false,
|
|
132
|
+
npc = false
|
|
133
|
+
}}
|
|
134
|
+
function ____exports.debugDisplayInit(self, mod)
|
|
135
|
+
saveDataManager(
|
|
136
|
+
nil,
|
|
137
|
+
"debugDisplay",
|
|
138
|
+
v,
|
|
139
|
+
function() return false end
|
|
140
|
+
)
|
|
141
|
+
mod:AddCallback(ModCallbacks.MC_POST_FAMILIAR_RENDER, postFamiliarRender)
|
|
142
|
+
mod:AddCallback(ModCallbacks.MC_POST_NPC_RENDER, postNPCRender)
|
|
143
|
+
mod:AddCallback(ModCallbacks.MC_POST_PLAYER_RENDER, postPlayerRender)
|
|
144
|
+
mod:AddCallback(ModCallbacks.MC_POST_PICKUP_RENDER, postPickupRender)
|
|
145
|
+
mod:AddCallback(ModCallbacks.MC_POST_TEAR_RENDER, postTearRender)
|
|
146
|
+
mod:AddCallback(ModCallbacks.MC_POST_PROJECTILE_RENDER, postProjectileRender)
|
|
147
|
+
mod:AddCallback(ModCallbacks.MC_POST_LASER_RENDER, postLaserRender)
|
|
148
|
+
mod:AddCallback(ModCallbacks.MC_POST_KNIFE_RENDER, postKnifeRender)
|
|
149
|
+
mod:AddCallback(ModCallbacks.MC_POST_EFFECT_RENDER, postEffectRender)
|
|
150
|
+
mod:AddCallback(ModCallbacks.MC_POST_BOMB_RENDER, postBombRender)
|
|
151
|
+
mod:AddCallbackCustom(ModCallbacksCustom.MC_POST_SLOT_RENDER, postSlotRender)
|
|
152
|
+
end
|
|
153
|
+
function ____exports.togglePlayerDisplay(self)
|
|
154
|
+
v.run.player = not v.run.player
|
|
155
|
+
printEnabled(nil, v.run.player, "player display")
|
|
156
|
+
end
|
|
157
|
+
function ____exports.toggleTearDisplay(self)
|
|
158
|
+
v.run.tear = not v.run.tear
|
|
159
|
+
printEnabled(nil, v.run.tear, "tear display")
|
|
160
|
+
end
|
|
161
|
+
function ____exports.toggleFamiliarDisplay(self)
|
|
162
|
+
v.run.familiar = not v.run.familiar
|
|
163
|
+
printEnabled(nil, v.run.familiar, "familiar display")
|
|
164
|
+
end
|
|
165
|
+
function ____exports.toggleBombDisplay(self)
|
|
166
|
+
v.run.bomb = not v.run.bomb
|
|
167
|
+
printEnabled(nil, v.run.bomb, "bomb display")
|
|
168
|
+
end
|
|
169
|
+
function ____exports.togglePickupDisplay(self)
|
|
170
|
+
v.run.pickup = not v.run.pickup
|
|
171
|
+
printEnabled(nil, v.run.pickup, "pickup display")
|
|
172
|
+
end
|
|
173
|
+
function ____exports.toggleSlotDisplay(self)
|
|
174
|
+
v.run.slot = not v.run.slot
|
|
175
|
+
printEnabled(nil, v.run.slot, "slot display")
|
|
176
|
+
end
|
|
177
|
+
function ____exports.toggleLaserDisplay(self)
|
|
178
|
+
v.run.laser = not v.run.laser
|
|
179
|
+
printEnabled(nil, v.run.laser, "laser display")
|
|
180
|
+
end
|
|
181
|
+
function ____exports.toggleKnifeDisplay(self)
|
|
182
|
+
v.run.knife = not v.run.knife
|
|
183
|
+
printEnabled(nil, v.run.knife, "knife display")
|
|
184
|
+
end
|
|
185
|
+
function ____exports.toggleProjectileDisplay(self)
|
|
186
|
+
v.run.projectile = not v.run.projectile
|
|
187
|
+
printEnabled(nil, v.run.projectile, "projectile display")
|
|
188
|
+
end
|
|
189
|
+
function ____exports.toggleEffectDisplay(self)
|
|
190
|
+
v.run.effect = not v.run.effect
|
|
191
|
+
printEnabled(nil, v.run.effect, "effect display")
|
|
192
|
+
end
|
|
193
|
+
function ____exports.toggleNPCDisplay(self)
|
|
194
|
+
v.run.npc = not v.run.npc
|
|
195
|
+
printEnabled(nil, v.run.npc, "NPC display")
|
|
196
|
+
end
|
|
197
|
+
function ____exports.setPlayerDisplay(self, textCallback)
|
|
198
|
+
textCallbacks.player = textCallback
|
|
199
|
+
end
|
|
200
|
+
function ____exports.setTearDisplay(self, textCallback)
|
|
201
|
+
textCallbacks.tear = textCallback
|
|
202
|
+
end
|
|
203
|
+
function ____exports.setFamiliarDisplay(self, textCallback)
|
|
204
|
+
textCallbacks.familiar = textCallback
|
|
205
|
+
end
|
|
206
|
+
function ____exports.setBombDisplay(self, textCallback)
|
|
207
|
+
textCallbacks.bomb = textCallback
|
|
208
|
+
end
|
|
209
|
+
function ____exports.setPickupDisplay(self, textCallback)
|
|
210
|
+
textCallbacks.pickup = textCallback
|
|
211
|
+
end
|
|
212
|
+
function ____exports.setSlotDisplay(self, textCallback)
|
|
213
|
+
textCallbacks.slot = textCallback
|
|
214
|
+
end
|
|
215
|
+
function ____exports.setLaserDisplay(self, textCallback)
|
|
216
|
+
textCallbacks.laser = textCallback
|
|
217
|
+
end
|
|
218
|
+
function ____exports.setKnifeDisplay(self, textCallback)
|
|
219
|
+
textCallbacks.knife = textCallback
|
|
220
|
+
end
|
|
221
|
+
function ____exports.setProjectileDisplay(self, textCallback)
|
|
222
|
+
textCallbacks.projectile = textCallback
|
|
223
|
+
end
|
|
224
|
+
function ____exports.setEffectDisplay(self, textCallback)
|
|
225
|
+
textCallbacks.effect = textCallback
|
|
226
|
+
end
|
|
227
|
+
function ____exports.setNPCDisplay(self, textCallback)
|
|
228
|
+
textCallbacks.npc = textCallback
|
|
229
|
+
end
|
|
230
|
+
return ____exports
|