isaacscript-common 3.11.0 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/callbacks/postBombInitLate.lua +1 -1
- package/callbacks/postBoneSwing.lua +1 -1
- package/callbacks/postCollectibleInitFirst.lua +1 -1
- package/callbacks/postCursedTeleport.lua +1 -1
- package/callbacks/postCustomDoorEnter.lua +1 -1
- package/callbacks/postDiceRoomActivated.d.ts +1 -0
- package/callbacks/postDiceRoomActivated.lua +39 -0
- package/callbacks/postEffectInitLate.lua +1 -1
- package/callbacks/postEffectStateChanged.lua +1 -1
- package/callbacks/postFamiliarInitLate.lua +1 -1
- package/callbacks/postFamiliarStateChanged.lua +1 -1
- package/callbacks/postGreedModeWave.lua +1 -1
- package/callbacks/postHolyMantleRemoved.lua +1 -1
- package/callbacks/postItemDischarged.d.ts +1 -1
- package/callbacks/postItemDischarged.lua +1 -1
- package/callbacks/postKnifeInitLate.lua +1 -1
- package/callbacks/postLaserInitLate.lua +1 -1
- package/callbacks/postNPCInitLate.lua +1 -1
- package/callbacks/postNPCStateChanged.lua +1 -1
- package/callbacks/postPickupCollect.lua +1 -1
- package/callbacks/postPickupInitFirst.lua +1 -1
- package/callbacks/postPickupInitLate.lua +1 -1
- package/callbacks/postPickupStateChanged.lua +1 -1
- package/callbacks/postPlayerChangeHealth.lua +1 -1
- package/callbacks/postPlayerChangeType.lua +1 -1
- package/callbacks/postPlayerCollectible.lua +1 -1
- package/callbacks/postPlayerFatalDamage.lua +1 -1
- package/callbacks/postPlayerInitLate.lua +1 -1
- package/callbacks/postProjectileInitLate.lua +1 -1
- package/callbacks/postPurchase.lua +1 -1
- package/callbacks/postRoomClearChanged.lua +1 -1
- package/callbacks/postSacrifice.lua +1 -1
- package/callbacks/postSlotDestroyed.lua +1 -1
- package/callbacks/postTearInitLate.lua +1 -1
- package/callbacks/postTearInitVeryLate.lua +1 -1
- package/callbacks/postTransformation.lua +1 -1
- package/callbacks/postTrinketBreak.lua +1 -1
- package/callbacks/preBerserkDeath.lua +1 -1
- package/callbacks/preNewLevel.lua +1 -1
- package/callbacks/subscriptions/postDiceRoomActivated.d.ts +5 -0
- package/callbacks/subscriptions/postDiceRoomActivated.lua +29 -0
- package/constants.d.ts +2 -0
- package/constants.lua +2 -0
- package/enums/ModCallbackCustom.d.ts +84 -72
- package/enums/ModCallbackCustom.lua +74 -72
- package/functions/entity.d.ts +6 -0
- package/functions/entity.lua +44 -0
- package/functions/log.d.ts +5 -0
- package/functions/log.lua +40 -10
- package/functions/utils.d.ts +1 -0
- package/functions/utils.lua +1 -0
- package/initCustomCallbacks.lua +75 -72
- package/interfaces/AddCallbackParameterCustom.d.ts +2 -0
- package/objects/callbackRegisterFunctions.lua +3 -0
- package/package.json +2 -2
|
@@ -26,7 +26,7 @@ end
|
|
|
26
26
|
v = {room = {firedSet = __TS__New(Set)}}
|
|
27
27
|
---
|
|
28
28
|
-- @internal
|
|
29
|
-
function ____exports.
|
|
29
|
+
function ____exports.postBombInitLateInit(self, mod)
|
|
30
30
|
saveDataManager(nil, "postBombInitLate", v, hasSubscriptions)
|
|
31
31
|
mod:AddCallback(ModCallback.POST_BOMB_UPDATE, postBombUpdate)
|
|
32
32
|
end
|
|
@@ -43,7 +43,7 @@ BONE_SWING_ANIMATIONS = __TS__New(Set, {"Swing", "Swing2", "Spin"})
|
|
|
43
43
|
v = {room = {boneClubAnimations = __TS__New(Map)}}
|
|
44
44
|
---
|
|
45
45
|
-- @internal
|
|
46
|
-
function ____exports.
|
|
46
|
+
function ____exports.postBoneSwingInit(self, mod)
|
|
47
47
|
saveDataManager(nil, "postBoneSwing", v, hasSubscriptions)
|
|
48
48
|
mod:AddCallback(ModCallback.POST_KNIFE_RENDER, postKnifeRender)
|
|
49
49
|
end
|
|
@@ -28,7 +28,7 @@ end
|
|
|
28
28
|
v = {run = {seenCollectibles = __TS__New(Set)}}
|
|
29
29
|
---
|
|
30
30
|
-- @internal
|
|
31
|
-
function ____exports.
|
|
31
|
+
function ____exports.postCollectibleInitFirstInit(self, mod)
|
|
32
32
|
saveDataManager(nil, "postCollectibleInitFirst", v, hasSubscriptions)
|
|
33
33
|
mod:AddCallback(ModCallback.POST_PICKUP_INIT, postPickupInitCollectible, PickupVariant.COLLECTIBLE)
|
|
34
34
|
end
|
|
@@ -113,7 +113,7 @@ v = {
|
|
|
113
113
|
}
|
|
114
114
|
---
|
|
115
115
|
-- @internal
|
|
116
|
-
function ____exports.
|
|
116
|
+
function ____exports.postCursedTeleportInit(self, mod)
|
|
117
117
|
saveDataManager(nil, "postCursedTeleport", v, hasSubscriptions)
|
|
118
118
|
mod:AddCallback(ModCallback.ENTITY_TAKE_DMG, entityTakeDmgPlayer, EntityType.PLAYER)
|
|
119
119
|
mod:AddCallback(ModCallback.POST_PLAYER_RENDER, postPlayerRenderPlayer, PlayerVariant.PLAYER)
|
|
@@ -157,7 +157,7 @@ v = {room = {
|
|
|
157
157
|
}}
|
|
158
158
|
---
|
|
159
159
|
-- @internal
|
|
160
|
-
function ____exports.
|
|
160
|
+
function ____exports.postCustomDoorEnterInit(self)
|
|
161
161
|
saveDataManager(nil, "postCustomDoorEnter", v, hasSubscriptions)
|
|
162
162
|
end
|
|
163
163
|
--- `isaacscript-common` provides custom doors that can be spawned where any wall segment is. If you
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local hasSubscriptions, postEffectUpdateDiceFloor, v
|
|
3
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
4
|
+
local EffectVariant = ____isaac_2Dtypescript_2Ddefinitions.EffectVariant
|
|
5
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
6
|
+
local ____constants = require("constants")
|
|
7
|
+
local DICE_FLOOR_TRIGGER_DISTANCE = ____constants.DICE_FLOOR_TRIGGER_DISTANCE
|
|
8
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
9
|
+
local saveDataManager = ____exports.saveDataManager
|
|
10
|
+
local ____player = require("functions.player")
|
|
11
|
+
local getClosestPlayer = ____player.getClosestPlayer
|
|
12
|
+
local ____postDiceRoomActivated = require("callbacks.subscriptions.postDiceRoomActivated")
|
|
13
|
+
local postDiceRoomActivatedFire = ____postDiceRoomActivated.postDiceRoomActivatedFire
|
|
14
|
+
local postDiceRoomActivatedHasSubscriptions = ____postDiceRoomActivated.postDiceRoomActivatedHasSubscriptions
|
|
15
|
+
function hasSubscriptions(self)
|
|
16
|
+
return postDiceRoomActivatedHasSubscriptions(nil)
|
|
17
|
+
end
|
|
18
|
+
function postEffectUpdateDiceFloor(self, effect)
|
|
19
|
+
if not hasSubscriptions(nil) then
|
|
20
|
+
return
|
|
21
|
+
end
|
|
22
|
+
if v.room.diceRoomActivated then
|
|
23
|
+
return
|
|
24
|
+
end
|
|
25
|
+
local closestPlayer = getClosestPlayer(nil, effect.Position)
|
|
26
|
+
local distance = effect.Position:Distance(closestPlayer.Position)
|
|
27
|
+
if distance <= DICE_FLOOR_TRIGGER_DISTANCE then
|
|
28
|
+
v.room.diceRoomActivated = true
|
|
29
|
+
postDiceRoomActivatedFire(nil, closestPlayer, effect.SubType)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
v = {room = {diceRoomActivated = false}}
|
|
33
|
+
---
|
|
34
|
+
-- @internal
|
|
35
|
+
function ____exports.postDiceRoomActivatedInit(self, mod)
|
|
36
|
+
saveDataManager(nil, "postDiceRoomActivated", v, hasSubscriptions)
|
|
37
|
+
mod:AddCallback(ModCallback.POST_EFFECT_UPDATE, postEffectUpdateDiceFloor, EffectVariant.DICE_FLOOR)
|
|
38
|
+
end
|
|
39
|
+
return ____exports
|
|
@@ -26,7 +26,7 @@ end
|
|
|
26
26
|
v = {room = {firedSet = __TS__New(Set)}}
|
|
27
27
|
---
|
|
28
28
|
-- @internal
|
|
29
|
-
function ____exports.
|
|
29
|
+
function ____exports.postEffectInitLateInit(self, mod)
|
|
30
30
|
saveDataManager(nil, "postEffectInitLate", v, hasSubscriptions)
|
|
31
31
|
mod:AddCallback(ModCallback.POST_EFFECT_UPDATE, postEffectUpdate)
|
|
32
32
|
end
|
|
@@ -32,7 +32,7 @@ v = {run = {effectStateMap = __TS__New(
|
|
|
32
32
|
)}}
|
|
33
33
|
---
|
|
34
34
|
-- @internal
|
|
35
|
-
function ____exports.
|
|
35
|
+
function ____exports.postEffectStateChangedInit(self, mod)
|
|
36
36
|
saveDataManager(nil, "postEffectStateChanged", v, hasSubscriptions)
|
|
37
37
|
mod:AddCallback(ModCallback.POST_EFFECT_UPDATE, postEffectUpdate)
|
|
38
38
|
end
|
|
@@ -26,7 +26,7 @@ end
|
|
|
26
26
|
v = {run = {firedSet = __TS__New(Set)}}
|
|
27
27
|
---
|
|
28
28
|
-- @internal
|
|
29
|
-
function ____exports.
|
|
29
|
+
function ____exports.postFamiliarInitLateInit(self, mod)
|
|
30
30
|
saveDataManager(nil, "postFamiliarInitLate", v, hasSubscriptions)
|
|
31
31
|
mod:AddCallback(ModCallback.POST_FAMILIAR_UPDATE, postFamiliarUpdate)
|
|
32
32
|
end
|
|
@@ -32,7 +32,7 @@ v = {run = {familiarStateMap = __TS__New(
|
|
|
32
32
|
)}}
|
|
33
33
|
---
|
|
34
34
|
-- @internal
|
|
35
|
-
function ____exports.
|
|
35
|
+
function ____exports.postFamiliarStateChangedInit(self, mod)
|
|
36
36
|
saveDataManager(nil, "postFamiliarStateChanged", v, hasSubscriptions)
|
|
37
37
|
mod:AddCallback(ModCallback.POST_FAMILIAR_UPDATE, postFamiliarUpdate)
|
|
38
38
|
end
|
|
@@ -27,7 +27,7 @@ end
|
|
|
27
27
|
v = {run = {currentGreedWave = 0}}
|
|
28
28
|
---
|
|
29
29
|
-- @internal
|
|
30
|
-
function ____exports.
|
|
30
|
+
function ____exports.postGreedModeWaveInit(self, mod)
|
|
31
31
|
saveDataManager(nil, "postModeGreedWave", v, hasSubscriptions)
|
|
32
32
|
mod:AddCallback(ModCallback.POST_UPDATE, postUpdate)
|
|
33
33
|
end
|
|
@@ -34,7 +34,7 @@ end
|
|
|
34
34
|
v = {run = {playersHolyMantleMap = __TS__New(DefaultMap, 0)}}
|
|
35
35
|
---
|
|
36
36
|
-- @internal
|
|
37
|
-
function ____exports.
|
|
37
|
+
function ____exports.postHolyMantleRemovedInit(self, mod)
|
|
38
38
|
saveDataManager(nil, "postHolyMantleRemoved", v, hasSubscriptions)
|
|
39
39
|
mod:AddCallbackCustom(ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, postPEffectUpdateReordered)
|
|
40
40
|
end
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ModUpgraded } from "../classes/ModUpgraded";
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function postItemDischargeInit(mod: ModUpgraded): void;
|
|
@@ -96,7 +96,7 @@ v = {
|
|
|
96
96
|
},
|
|
97
97
|
room = {playersBulbLastCollisionFrame = __TS__New(Map)}
|
|
98
98
|
}
|
|
99
|
-
function ____exports.
|
|
99
|
+
function ____exports.postItemDischargeInit(self, mod)
|
|
100
100
|
saveDataManager(nil, "postItemDischarge", v, hasSubscriptions)
|
|
101
101
|
mod:AddCallback(ModCallback.POST_PEFFECT_UPDATE, postPEffectUpdate)
|
|
102
102
|
mod:AddCallback(ModCallback.PRE_NPC_COLLISION, preNPCCollisionSucker, EntityType.SUCKER)
|
|
@@ -26,7 +26,7 @@ end
|
|
|
26
26
|
v = {room = {firedSet = __TS__New(Set)}}
|
|
27
27
|
---
|
|
28
28
|
-- @internal
|
|
29
|
-
function ____exports.
|
|
29
|
+
function ____exports.postKnifeInitLateInit(self, mod)
|
|
30
30
|
saveDataManager(nil, "postKnifeInitLate", v, hasSubscriptions)
|
|
31
31
|
mod:AddCallback(ModCallback.POST_KNIFE_UPDATE, postKnifeUpdate)
|
|
32
32
|
end
|
|
@@ -26,7 +26,7 @@ end
|
|
|
26
26
|
v = {room = {firedSet = __TS__New(Set)}}
|
|
27
27
|
---
|
|
28
28
|
-- @internal
|
|
29
|
-
function ____exports.
|
|
29
|
+
function ____exports.postLaserInitLateInit(self, mod)
|
|
30
30
|
saveDataManager(nil, "postLaserInitLate", v, hasSubscriptions)
|
|
31
31
|
mod:AddCallback(ModCallback.POST_LASER_UPDATE, postLaserUpdate)
|
|
32
32
|
end
|
|
@@ -26,7 +26,7 @@ end
|
|
|
26
26
|
v = {room = {firedSet = __TS__New(Set)}}
|
|
27
27
|
---
|
|
28
28
|
-- @internal
|
|
29
|
-
function ____exports.
|
|
29
|
+
function ____exports.postNPCInitLateInit(self, mod)
|
|
30
30
|
saveDataManager(nil, "postNPCInitLate", v, hasSubscriptions)
|
|
31
31
|
mod:AddCallback(ModCallback.POST_NPC_UPDATE, postNPCUpdate)
|
|
32
32
|
end
|
|
@@ -32,7 +32,7 @@ v = {run = {npcStateMap = __TS__New(
|
|
|
32
32
|
)}}
|
|
33
33
|
---
|
|
34
34
|
-- @internal
|
|
35
|
-
function ____exports.
|
|
35
|
+
function ____exports.postNPCStateChangedInit(self, mod)
|
|
36
36
|
saveDataManager(nil, "postNPCStateChanged", v, hasSubscriptions)
|
|
37
37
|
mod:AddCallback(ModCallback.POST_NPC_UPDATE, postNPCUpdate)
|
|
38
38
|
end
|
|
@@ -34,7 +34,7 @@ end
|
|
|
34
34
|
v = {room = {firedSet = __TS__New(Set)}}
|
|
35
35
|
---
|
|
36
36
|
-- @internal
|
|
37
|
-
function ____exports.
|
|
37
|
+
function ____exports.postPickupCollectInit(self, mod)
|
|
38
38
|
saveDataManager(nil, "postPickupCollect", v, hasSubscriptions)
|
|
39
39
|
mod:AddCallback(ModCallback.POST_PICKUP_RENDER, postPickupRender)
|
|
40
40
|
end
|
|
@@ -48,7 +48,7 @@ POST_ASCENT_ROOM_TYPES = __TS__New(Set, {RoomType.TREASURE, RoomType.BOSS})
|
|
|
48
48
|
v = {run = {postAscentPickupInitSeeds = __TS__New(Set)}}
|
|
49
49
|
---
|
|
50
50
|
-- @internal
|
|
51
|
-
function ____exports.
|
|
51
|
+
function ____exports.postPickupInitFirstInit(self, mod)
|
|
52
52
|
saveDataManager(nil, "postPickupInitFirst", v, hasSubscriptions)
|
|
53
53
|
mod:AddCallback(ModCallback.POST_PICKUP_INIT, postPickupInit)
|
|
54
54
|
end
|
|
@@ -26,7 +26,7 @@ end
|
|
|
26
26
|
v = {room = {firedSet = __TS__New(Set)}}
|
|
27
27
|
---
|
|
28
28
|
-- @internal
|
|
29
|
-
function ____exports.
|
|
29
|
+
function ____exports.postPickupInitLateInit(self, mod)
|
|
30
30
|
saveDataManager(nil, "postPickupInitLate", v, hasSubscriptions)
|
|
31
31
|
mod:AddCallback(ModCallback.POST_PICKUP_UPDATE, postPickupUpdate)
|
|
32
32
|
end
|
|
@@ -32,7 +32,7 @@ v = {run = {pickupStateMap = __TS__New(
|
|
|
32
32
|
)}}
|
|
33
33
|
---
|
|
34
34
|
-- @internal
|
|
35
|
-
function ____exports.
|
|
35
|
+
function ____exports.postPickupStateChangedInit(self, mod)
|
|
36
36
|
saveDataManager(nil, "postPickupStateChanged", v, hasSubscriptions)
|
|
37
37
|
mod:AddCallback(ModCallback.POST_PICKUP_UPDATE, postPickupUpdate)
|
|
38
38
|
end
|
|
@@ -45,7 +45,7 @@ v = {run = {playersHealthMap = __TS__New(
|
|
|
45
45
|
)}}
|
|
46
46
|
---
|
|
47
47
|
-- @internal
|
|
48
|
-
function ____exports.
|
|
48
|
+
function ____exports.postPlayerChangeHealthInit(self, mod)
|
|
49
49
|
saveDataManager(nil, "postPlayerChangeHealth", v, hasSubscriptions)
|
|
50
50
|
mod:AddCallbackCustom(ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, postPEffectUpdateReordered)
|
|
51
51
|
end
|
|
@@ -34,7 +34,7 @@ v = {run = {playersCharacterMap = __TS__New(
|
|
|
34
34
|
)}}
|
|
35
35
|
---
|
|
36
36
|
-- @internal
|
|
37
|
-
function ____exports.
|
|
37
|
+
function ____exports.postPlayerChangeTypeInit(self, mod)
|
|
38
38
|
saveDataManager(nil, "postPlayerChangeType", v, hasSubscriptions)
|
|
39
39
|
mod:AddCallbackCustom(ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, postPEffectUpdateReordered)
|
|
40
40
|
end
|
|
@@ -88,7 +88,7 @@ v = {run = {
|
|
|
88
88
|
}}
|
|
89
89
|
---
|
|
90
90
|
-- @internal
|
|
91
|
-
function ____exports.
|
|
91
|
+
function ____exports.postPlayerCollectibleCallbacksInit(self, mod)
|
|
92
92
|
saveDataManager(nil, "postPlayerCollectible", v, hasSubscriptions)
|
|
93
93
|
mod:AddCallback(ModCallback.POST_PEFFECT_UPDATE, postPEffectUpdate)
|
|
94
94
|
end
|
|
@@ -66,7 +66,7 @@ end
|
|
|
66
66
|
v = {run = {playersLastDamageGameFrame = __TS__New(Map)}}
|
|
67
67
|
---
|
|
68
68
|
-- @internal
|
|
69
|
-
function ____exports.
|
|
69
|
+
function ____exports.postPlayerFatalDamageInit(self, mod)
|
|
70
70
|
saveDataManager(nil, "postPlayerFatalDamage", v)
|
|
71
71
|
mod:AddCallback(ModCallback.ENTITY_TAKE_DMG, entityTakeDmgPlayer, EntityType.PLAYER)
|
|
72
72
|
end
|
|
@@ -28,7 +28,7 @@ end
|
|
|
28
28
|
v = {run = {playersFiredSet = __TS__New(Set)}}
|
|
29
29
|
---
|
|
30
30
|
-- @internal
|
|
31
|
-
function ____exports.
|
|
31
|
+
function ____exports.postPlayerInitLateInit(self, mod)
|
|
32
32
|
saveDataManager(nil, "postPlayerInitLate", v, hasSubscriptions)
|
|
33
33
|
mod:AddCallback(ModCallback.POST_PLAYER_UPDATE, postPlayerUpdate)
|
|
34
34
|
end
|
|
@@ -26,7 +26,7 @@ end
|
|
|
26
26
|
v = {room = {firedSet = __TS__New(Set)}}
|
|
27
27
|
---
|
|
28
28
|
-- @internal
|
|
29
|
-
function ____exports.
|
|
29
|
+
function ____exports.postProjectileInitLateInit(self, mod)
|
|
30
30
|
saveDataManager(nil, "postProjectileInitLate", v, hasSubscriptions)
|
|
31
31
|
mod:AddCallback(ModCallback.POST_PROJECTILE_UPDATE, postProjectileUpdate)
|
|
32
32
|
end
|
|
@@ -44,7 +44,7 @@ end
|
|
|
44
44
|
v = {room = {playersHoldingItemOnLastFrameMap = __TS__New(DefaultMap, false)}}
|
|
45
45
|
---
|
|
46
46
|
-- @internal
|
|
47
|
-
function ____exports.
|
|
47
|
+
function ____exports.postPurchaseInit(self, mod)
|
|
48
48
|
saveDataManager(nil, "postPurchase", v, hasSubscriptions)
|
|
49
49
|
mod:AddCallbackCustom(ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, postPEffectUpdateReordered)
|
|
50
50
|
end
|
|
@@ -36,7 +36,7 @@ end
|
|
|
36
36
|
v = {room = {cleared = false}}
|
|
37
37
|
---
|
|
38
38
|
-- @internal
|
|
39
|
-
function ____exports.
|
|
39
|
+
function ____exports.postRoomClearChangedInit(self, mod)
|
|
40
40
|
saveDataManager(nil, "postRoomClearChanged", v, hasSubscriptions)
|
|
41
41
|
mod:AddCallback(ModCallback.POST_UPDATE, postUpdate)
|
|
42
42
|
mod:AddCallbackCustom(ModCallbackCustom.POST_NEW_ROOM_REORDERED, postNewRoomReordered)
|
|
@@ -37,7 +37,7 @@ end
|
|
|
37
37
|
v = {level = {numSacrifices = 0}}
|
|
38
38
|
---
|
|
39
39
|
-- @internal
|
|
40
|
-
function ____exports.
|
|
40
|
+
function ____exports.postSacrificeInit(self, mod)
|
|
41
41
|
saveDataManager(nil, "postSacrifice", v, hasSubscriptions)
|
|
42
42
|
mod:AddCallback(ModCallback.ENTITY_TAKE_DMG, entityTakeDmgPlayer, EntityType.PLAYER)
|
|
43
43
|
end
|
|
@@ -58,7 +58,7 @@ v = {room = {
|
|
|
58
58
|
}}
|
|
59
59
|
---
|
|
60
60
|
-- @internal
|
|
61
|
-
function ____exports.
|
|
61
|
+
function ____exports.postSlotDestroyedInit(self, mod)
|
|
62
62
|
saveDataManager(nil, "postSlotDestroyed", v, hasSubscriptions)
|
|
63
63
|
mod:AddCallback(ModCallback.POST_ENTITY_REMOVE, postEntityRemove, EntityType.SLOT)
|
|
64
64
|
mod:AddCallbackCustom(ModCallbackCustom.POST_SLOT_ANIMATION_CHANGED, postSlotAnimationChanged)
|
|
@@ -26,7 +26,7 @@ end
|
|
|
26
26
|
v = {room = {firedSet = __TS__New(Set)}}
|
|
27
27
|
---
|
|
28
28
|
-- @internal
|
|
29
|
-
function ____exports.
|
|
29
|
+
function ____exports.postTearInitLateInit(self, mod)
|
|
30
30
|
saveDataManager(nil, "postTearInitLate", v, hasSubscriptions)
|
|
31
31
|
mod:AddCallback(ModCallback.POST_TEAR_UPDATE, postTearUpdate)
|
|
32
32
|
end
|
|
@@ -29,7 +29,7 @@ end
|
|
|
29
29
|
v = {room = {firedSet = __TS__New(Set)}}
|
|
30
30
|
---
|
|
31
31
|
-- @internal
|
|
32
|
-
function ____exports.
|
|
32
|
+
function ____exports.postTearInitVeryLateInit(self, mod)
|
|
33
33
|
saveDataManager(nil, "postTearInitVeryLate", v, hasSubscriptions)
|
|
34
34
|
mod:AddCallback(ModCallback.POST_TEAR_UPDATE, postTearUpdate)
|
|
35
35
|
end
|
|
@@ -41,7 +41,7 @@ v = {run = {playersTransformationsMap = __TS__New(
|
|
|
41
41
|
)}}
|
|
42
42
|
---
|
|
43
43
|
-- @internal
|
|
44
|
-
function ____exports.
|
|
44
|
+
function ____exports.postTransformationInit(self, mod)
|
|
45
45
|
saveDataManager(nil, "postTransformation", v, hasSubscriptions)
|
|
46
46
|
mod:AddCallbackCustom(ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, postPEffectUpdateReordered)
|
|
47
47
|
end
|
|
@@ -64,7 +64,7 @@ v = {run = {playersTrinketMap = __TS__New(
|
|
|
64
64
|
)}}
|
|
65
65
|
---
|
|
66
66
|
-- @internal
|
|
67
|
-
function ____exports.
|
|
67
|
+
function ____exports.postTrinketBreakInit(self, mod)
|
|
68
68
|
saveDataManager(nil, "postTrinketBreak", v, hasSubscriptions)
|
|
69
69
|
mod:AddCallback(ModCallback.ENTITY_TAKE_DMG, entityTakeDmgPlayer, EntityType.PLAYER)
|
|
70
70
|
mod:AddCallbackCustom(ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, postPEffectUpdateReordered)
|
|
@@ -32,7 +32,7 @@ function postPEffectUpdateReordered(self, player)
|
|
|
32
32
|
end
|
|
33
33
|
---
|
|
34
34
|
-- @internal
|
|
35
|
-
function ____exports.
|
|
35
|
+
function ____exports.preBerserkDeathInit(self, mod)
|
|
36
36
|
mod:AddCallbackCustom(ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, postPEffectUpdateReordered)
|
|
37
37
|
end
|
|
38
38
|
return ____exports
|
|
@@ -39,7 +39,7 @@ TRAVELING_TO_NEXT_FLOOR_ANIMATIONS = __TS__New(Set, {"Trapdoor", "LightTravel"})
|
|
|
39
39
|
firedOnStage = nil
|
|
40
40
|
---
|
|
41
41
|
-- @internal
|
|
42
|
-
function ____exports.
|
|
42
|
+
function ____exports.preNewLevelInit(self, mod)
|
|
43
43
|
mod:AddCallback(ModCallback.POST_PLAYER_RENDER, postPlayerRender)
|
|
44
44
|
end
|
|
45
45
|
return ____exports
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local subscriptions = {}
|
|
3
|
+
---
|
|
4
|
+
-- @internal
|
|
5
|
+
function ____exports.postDiceRoomActivatedHasSubscriptions(self)
|
|
6
|
+
return #subscriptions > 0
|
|
7
|
+
end
|
|
8
|
+
---
|
|
9
|
+
-- @internal
|
|
10
|
+
function ____exports.postDiceRoomActivatedRegister(self, ...)
|
|
11
|
+
local args = {...}
|
|
12
|
+
subscriptions[#subscriptions + 1] = args
|
|
13
|
+
end
|
|
14
|
+
---
|
|
15
|
+
-- @internal
|
|
16
|
+
function ____exports.postDiceRoomActivatedFire(self, player, diceFloorSubType)
|
|
17
|
+
for ____, ____value in ipairs(subscriptions) do
|
|
18
|
+
local callback = ____value[1]
|
|
19
|
+
local callbackDiceFloorSubType = ____value[2]
|
|
20
|
+
do
|
|
21
|
+
if callbackDiceFloorSubType ~= nil and callbackDiceFloorSubType ~= diceFloorSubType then
|
|
22
|
+
goto __continue5
|
|
23
|
+
end
|
|
24
|
+
callback(nil, player, diceFloorSubType)
|
|
25
|
+
end
|
|
26
|
+
::__continue5::
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
return ____exports
|
package/constants.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ export declare const BLIND_ITEM_PNG_PATH = "gfx/items/collectibles/questionmark.
|
|
|
15
15
|
/** Bombs explode when their frame count is equal to this value. */
|
|
16
16
|
export declare const BOMB_EXPLODE_FRAME = 45;
|
|
17
17
|
export declare const DEFAULT_ITEM_POOL_TYPE = ItemPoolType.TREASURE;
|
|
18
|
+
/** For `EntityType.EFFECT` (1000), `EffectVariant.DICE_FLOOR` (76) */
|
|
19
|
+
export declare const DICE_FLOOR_TRIGGER_DISTANCE = 75;
|
|
18
20
|
/** This is also the distance that a player spawns from the door that they enter a room from. */
|
|
19
21
|
export declare const DISTANCE_OF_GRID_TILE = 40;
|
|
20
22
|
export declare const DOOR_HITBOX_RADIUS = 11;
|
package/constants.lua
CHANGED
|
@@ -19,6 +19,8 @@ ____exports.BLIND_ITEM_PNG_PATH = "gfx/items/collectibles/questionmark.png"
|
|
|
19
19
|
--- Bombs explode when their frame count is equal to this value.
|
|
20
20
|
____exports.BOMB_EXPLODE_FRAME = 45
|
|
21
21
|
____exports.DEFAULT_ITEM_POOL_TYPE = ItemPoolType.TREASURE
|
|
22
|
+
--- For `EntityType.EFFECT` (1000), `EffectVariant.DICE_FLOOR` (76)
|
|
23
|
+
____exports.DICE_FLOOR_TRIGGER_DISTANCE = 75
|
|
22
24
|
--- This is also the distance that a player spawns from the door that they enter a room from.
|
|
23
25
|
____exports.DISTANCE_OF_GRID_TILE = 40
|
|
24
26
|
____exports.DOOR_HITBOX_RADIUS = 11
|