isaacscript-common 6.11.1 → 6.11.2
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/postFlip.lua +2 -2
- package/dist/callbacks/subscriptions/postFirstFlip.d.ts +1 -1
- package/dist/callbacks/subscriptions/postFirstFlip.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postFirstFlip.lua +2 -2
- package/dist/callbacks/subscriptions/postFlip.d.ts +1 -1
- package/dist/callbacks/subscriptions/postFlip.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postFlip.lua +2 -2
- package/dist/enums/ModCallbackCustom.d.ts +2 -2
- package/dist/enums/private/StageTravelState.d.ts +6 -1
- package/dist/enums/private/StageTravelState.d.ts.map +1 -1
- package/dist/enums/private/StageTravelState.lua +10 -0
- package/dist/enums/private/TrapdoorAnimation.d.ts +6 -0
- package/dist/enums/private/TrapdoorAnimation.d.ts.map +1 -0
- package/dist/enums/private/TrapdoorAnimation.lua +6 -0
- package/dist/features/customGridEntity.d.ts +8 -5
- package/dist/features/customGridEntity.d.ts.map +1 -1
- package/dist/features/customGridEntity.lua +58 -15
- package/dist/features/customStage/exports.d.ts.map +1 -1
- package/dist/features/customStage/exports.lua +0 -13
- package/dist/features/customStage/init.d.ts.map +1 -1
- package/dist/features/customStage/init.lua +16 -1
- package/dist/features/customStage/streakText.d.ts.map +1 -1
- package/dist/features/customStage/streakText.lua +0 -1
- package/dist/features/customTrapdoor/blackSprite.d.ts +2 -0
- package/dist/features/customTrapdoor/blackSprite.d.ts.map +1 -0
- package/dist/features/customTrapdoor/blackSprite.lua +19 -0
- package/dist/features/customTrapdoor/customTrapdoorConstants.d.ts +8 -3
- package/dist/features/customTrapdoor/customTrapdoorConstants.d.ts.map +1 -1
- package/dist/features/customTrapdoor/customTrapdoorConstants.lua +9 -1
- package/dist/features/customTrapdoor/exports.d.ts +11 -19
- package/dist/features/customTrapdoor/exports.d.ts.map +1 -1
- package/dist/features/customTrapdoor/exports.lua +48 -82
- package/dist/features/customTrapdoor/init.d.ts +3 -0
- package/dist/features/customTrapdoor/init.d.ts.map +1 -0
- package/dist/features/customTrapdoor/init.lua +173 -0
- package/dist/features/customTrapdoor/openClose.d.ts +5 -0
- package/dist/features/customTrapdoor/openClose.d.ts.map +1 -0
- package/dist/features/customTrapdoor/openClose.lua +60 -0
- package/dist/features/customTrapdoor/touched.d.ts +4 -0
- package/dist/features/customTrapdoor/touched.d.ts.map +1 -0
- package/dist/features/customTrapdoor/touched.lua +141 -0
- package/dist/features/customTrapdoor/v.d.ts +16 -2
- package/dist/features/customTrapdoor/v.d.ts.map +1 -1
- package/dist/features/customTrapdoor/v.lua +8 -6
- package/dist/features/extraConsoleCommands/init.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/init.lua +3 -1
- package/dist/features/taintedLazarusPlayers.d.ts.map +1 -1
- package/dist/features/taintedLazarusPlayers.lua +13 -21
- package/dist/functions/log.lua +3 -3
- package/dist/functions/playerIndex.d.ts +5 -0
- package/dist/functions/playerIndex.d.ts.map +1 -1
- package/dist/functions/playerIndex.lua +16 -6
- package/dist/functions/table.d.ts +1 -1
- package/dist/functions/table.d.ts.map +1 -1
- package/dist/initFeatures.d.ts.map +1 -1
- package/dist/initFeatures.lua +3 -0
- package/dist/interfaces/CustomGridEntityData.d.ts +5 -1
- package/dist/interfaces/CustomGridEntityData.d.ts.map +1 -1
- package/dist/interfaces/private/CustomTrapdoorDescription.d.ts +3 -0
- package/dist/interfaces/private/CustomTrapdoorDescription.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/callbacks/postFlip.ts +3 -2
- package/src/callbacks/subscriptions/postFirstFlip.ts +6 -3
- package/src/callbacks/subscriptions/postFlip.ts +6 -3
- package/src/enums/ModCallbackCustom.ts +2 -2
- package/src/enums/private/StageTravelState.ts +5 -1
- package/src/enums/private/TrapdoorAnimation.ts +5 -0
- package/src/features/customGridEntity.ts +68 -10
- package/src/features/customStage/exports.ts +3 -22
- package/src/features/customStage/init.ts +20 -0
- package/src/features/customStage/streakText.ts +0 -1
- package/src/features/customTrapdoor/blackSprite.ts +16 -0
- package/src/features/customTrapdoor/customTrapdoorConstants.ts +13 -3
- package/src/features/customTrapdoor/exports.ts +52 -121
- package/src/features/customTrapdoor/init.ts +215 -0
- package/src/features/customTrapdoor/openClose.ts +103 -0
- package/src/features/customTrapdoor/touched.ts +175 -0
- package/src/features/customTrapdoor/v.ts +16 -10
- package/src/features/deployJSONRoom.ts +1 -1
- package/src/features/extraConsoleCommands/init.ts +5 -2
- package/src/features/saveDataManager/main.ts +1 -1
- package/src/features/taintedLazarusPlayers.ts +32 -31
- package/src/functions/deepCopy.ts +2 -2
- package/src/functions/entities.ts +1 -1
- package/src/functions/playerIndex.ts +12 -0
- package/src/functions/rng.ts +1 -1
- package/src/functions/table.ts +2 -2
- package/src/initFeatures.ts +2 -0
- package/src/interfaces/CustomGridEntityData.ts +6 -1
- package/src/interfaces/private/CustomTrapdoorDescription.ts +4 -0
|
@@ -1,78 +1,43 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local Map = ____lualib.Map
|
|
1
3
|
local ____exports = {}
|
|
2
|
-
local
|
|
4
|
+
local getDefaultDestination
|
|
3
5
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
4
6
|
local GridCollisionClass = ____isaac_2Dtypescript_2Ddefinitions.GridCollisionClass
|
|
5
|
-
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
6
7
|
local ____cachedClasses = require("cachedClasses")
|
|
7
8
|
local game = ____cachedClasses.game
|
|
9
|
+
local ____TrapdoorAnimation = require("enums.private.TrapdoorAnimation")
|
|
10
|
+
local TrapdoorAnimation = ____TrapdoorAnimation.TrapdoorAnimation
|
|
8
11
|
local ____featuresInitialized = require("featuresInitialized")
|
|
9
12
|
local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
|
|
10
13
|
local ____nextStage = require("functions.nextStage")
|
|
11
14
|
local getNextStage = ____nextStage.getNextStage
|
|
12
15
|
local getNextStageType = ____nextStage.getNextStageType
|
|
13
|
-
local
|
|
14
|
-
local
|
|
16
|
+
local ____roomData = require("functions.roomData")
|
|
17
|
+
local getRoomListIndex = ____roomData.getRoomListIndex
|
|
18
|
+
local ____vector = require("functions.vector")
|
|
19
|
+
local isVector = ____vector.isVector
|
|
15
20
|
local ____customGridEntity = require("features.customGridEntity")
|
|
16
21
|
local spawnCustomGridEntity = ____customGridEntity.spawnCustomGridEntity
|
|
17
|
-
local ____roomClearFrame = require("features.roomClearFrame")
|
|
18
|
-
local getRoomClearGameFrame = ____roomClearFrame.getRoomClearGameFrame
|
|
19
22
|
local ____customTrapdoorConstants = require("features.customTrapdoor.customTrapdoorConstants")
|
|
20
23
|
local CUSTOM_TRAPDOOR_FEATURE_NAME = ____customTrapdoorConstants.CUSTOM_TRAPDOOR_FEATURE_NAME
|
|
21
24
|
local GridEntityTypeCustom = ____customTrapdoorConstants.GridEntityTypeCustom
|
|
22
|
-
local
|
|
23
|
-
local
|
|
24
|
-
local TRAPDOOR_OPEN_DISTANCE_AFTER_BOSS = ____customTrapdoorConstants.TRAPDOOR_OPEN_DISTANCE_AFTER_BOSS
|
|
25
|
+
local ____openClose = require("features.customTrapdoor.openClose")
|
|
26
|
+
local shouldTrapdoorSpawnOpen = ____openClose.shouldTrapdoorSpawnOpen
|
|
25
27
|
local ____v = require("features.customTrapdoor.v")
|
|
26
|
-
local
|
|
27
|
-
function
|
|
28
|
+
local v = ____v.default
|
|
29
|
+
function getDefaultDestination(self)
|
|
28
30
|
local nextStage = getNextStage(nil)
|
|
29
31
|
local nextStageType = getNextStageType(nil)
|
|
30
32
|
return {nextStage, nextStageType}
|
|
31
33
|
end
|
|
32
|
-
function defaultShouldOpenFunc(self, gridEntity)
|
|
33
|
-
local trapdoorDescription = getCustomTrapdoorDescription(nil, gridEntity)
|
|
34
|
-
if trapdoorDescription == nil then
|
|
35
|
-
return false
|
|
36
|
-
end
|
|
37
|
-
local room = game:GetRoom()
|
|
38
|
-
local roomClear = room:IsClear()
|
|
39
|
-
return not anyPlayerCloserThan(nil, gridEntity.Position, TRAPDOOR_OPEN_DISTANCE) and not isPlayerCloseAfterBoss(nil, gridEntity.Position) and not shouldBeClosedFromStartingInRoomWithEnemies(nil, trapdoorDescription.firstSpawn, roomClear)
|
|
40
|
-
end
|
|
41
|
-
function isPlayerCloseAfterBoss(self, position)
|
|
42
|
-
local gameFrameCount = game:GetFrameCount()
|
|
43
|
-
local room = game:GetRoom()
|
|
44
|
-
local roomType = room:GetType()
|
|
45
|
-
local roomClearGameFrame = getRoomClearGameFrame(nil)
|
|
46
|
-
if roomType ~= RoomType.BOSS or roomClearGameFrame == nil or gameFrameCount >= roomClearGameFrame + TRAPDOOR_BOSS_REACTION_FRAMES then
|
|
47
|
-
return false
|
|
48
|
-
end
|
|
49
|
-
return anyPlayerCloserThan(nil, position, TRAPDOOR_OPEN_DISTANCE_AFTER_BOSS)
|
|
50
|
-
end
|
|
51
|
-
function shouldBeClosedFromStartingInRoomWithEnemies(self, firstSpawn, roomClear)
|
|
52
|
-
return firstSpawn and not roomClear
|
|
53
|
-
end
|
|
54
|
-
function defaultShouldCloseFunc(self)
|
|
55
|
-
return false
|
|
56
|
-
end
|
|
57
|
-
function defaultShouldSpawnOpenFunc(self, gridEntity)
|
|
58
|
-
local room = game:GetRoom()
|
|
59
|
-
local roomFrameCount = room:GetFrameCount()
|
|
60
|
-
local roomClear = room:IsClear()
|
|
61
|
-
if roomFrameCount > 0 then
|
|
62
|
-
return false
|
|
63
|
-
end
|
|
64
|
-
if not roomClear then
|
|
65
|
-
return false
|
|
66
|
-
end
|
|
67
|
-
return defaultShouldOpenFunc(nil, gridEntity)
|
|
68
|
-
end
|
|
69
34
|
--- Helper function to spawn a trapdoor grid entity that will have one or more of the following
|
|
70
35
|
-- attributes:
|
|
71
36
|
--
|
|
72
37
|
-- - custom destination (or custom logic for after the player enters)
|
|
73
38
|
-- - custom graphics
|
|
74
39
|
-- - custom logic for opening/closing
|
|
75
|
-
-- - TODO: animation
|
|
40
|
+
-- - TODO: player jumping animation?
|
|
76
41
|
--
|
|
77
42
|
-- You can use this function to take the player to your custom stage.
|
|
78
43
|
--
|
|
@@ -80,48 +45,49 @@ end
|
|
|
80
45
|
-- respawned every time the player re-enters the room.
|
|
81
46
|
--
|
|
82
47
|
-- @param gridIndexOrPosition The location in the room to spawn the trapdoor.
|
|
83
|
-
-- @param
|
|
84
|
-
-- either be a tuple containing the stage and stage type, a
|
|
85
|
-
-- the name of a custom stage
|
|
86
|
-
--
|
|
87
|
-
--
|
|
88
|
-
-- function that returns one of these things. By default, the destination will
|
|
89
|
-
-- be set to the next floor like that of a vanilla trapdoor.
|
|
48
|
+
-- @param destination Optional. Used to specify where the player will go after jumping into the
|
|
49
|
+
-- trapdoor. Can either be a tuple containing the stage and stage type, or a
|
|
50
|
+
-- string containing the name of a custom stage. If not specified at all, then
|
|
51
|
+
-- the "normal" destination corresponding to the current stage and room will be
|
|
52
|
+
-- used (e.g. the next floor).
|
|
90
53
|
-- @param anm2Path Optional. The path to the anm2 file to use. By default, the vanilla trapdoor anm2
|
|
91
|
-
-- of "gfx/grid/door_11_trapdoor.anm2" will be used.
|
|
92
|
-
--
|
|
93
|
-
--
|
|
94
|
-
-- emulates a vanilla trapdoor
|
|
95
|
-
|
|
96
|
-
-- every frame to determine if it should close. By default, a function that
|
|
97
|
-
-- emulates a vanilla trapdoor will be used.
|
|
98
|
-
-- @param _spawnOpen Optional. Whether or not to spawn the trapdoor in an open state. Can either be
|
|
99
|
-
-- a boolean or a function returning a boolean. By default, a function that
|
|
100
|
-
-- emulates a vanilla trapdoor will be used.
|
|
101
|
-
function ____exports.spawnCustomTrapdoor(self, gridIndexOrPosition, _destination, anm2Path, _shouldOpenFunc, _shouldCloseFunc, _spawnOpen)
|
|
102
|
-
if _destination == nil then
|
|
103
|
-
_destination = defaultDestinationFunc
|
|
104
|
-
end
|
|
54
|
+
-- of "gfx/grid/door_11_trapdoor.anm2" will be used. The specified anm2 file must
|
|
55
|
+
-- have animations called "Opened", "Closed", and "Open Animation".
|
|
56
|
+
-- @param spawnOpen Optional. Whether or not to spawn the trapdoor in an open state. By default,
|
|
57
|
+
-- behavior will be used that emulates a vanilla trapdoor.
|
|
58
|
+
function ____exports.spawnCustomTrapdoor(self, gridIndexOrPosition, destination, anm2Path, spawnOpen)
|
|
105
59
|
if anm2Path == nil then
|
|
106
60
|
anm2Path = "gfx/grid/door_11_trapdoor.anm2"
|
|
107
61
|
end
|
|
108
|
-
if _shouldOpenFunc == nil then
|
|
109
|
-
_shouldOpenFunc = defaultShouldOpenFunc
|
|
110
|
-
end
|
|
111
|
-
if _shouldCloseFunc == nil then
|
|
112
|
-
_shouldCloseFunc = defaultShouldCloseFunc
|
|
113
|
-
end
|
|
114
|
-
if _spawnOpen == nil then
|
|
115
|
-
_spawnOpen = defaultShouldSpawnOpenFunc
|
|
116
|
-
end
|
|
117
62
|
errorIfFeaturesNotInitialized(nil, CUSTOM_TRAPDOOR_FEATURE_NAME)
|
|
118
|
-
|
|
63
|
+
local room = game:GetRoom()
|
|
64
|
+
local roomFrameCount = room:GetFrameCount()
|
|
65
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
66
|
+
local gridIndex = isVector(nil, gridIndexOrPosition) and room:GetGridIndex(gridIndexOrPosition) or gridIndexOrPosition
|
|
67
|
+
local gridEntity = spawnCustomGridEntity(
|
|
119
68
|
nil,
|
|
120
69
|
GridEntityTypeCustom.TRAPDOOR_CUSTOM,
|
|
121
70
|
gridIndexOrPosition,
|
|
71
|
+
GridCollisionClass.NONE,
|
|
122
72
|
anm2Path,
|
|
123
|
-
|
|
124
|
-
GridCollisionClass.NONE
|
|
73
|
+
TrapdoorAnimation.OPENED
|
|
125
74
|
)
|
|
75
|
+
local firstSpawn = roomFrameCount ~= 0
|
|
76
|
+
local ____temp_0
|
|
77
|
+
if spawnOpen == nil then
|
|
78
|
+
____temp_0 = shouldTrapdoorSpawnOpen(nil, gridEntity, firstSpawn)
|
|
79
|
+
else
|
|
80
|
+
____temp_0 = spawnOpen
|
|
81
|
+
end
|
|
82
|
+
local open = ____temp_0
|
|
83
|
+
local destinationToUse = destination == nil and getDefaultDestination(nil) or destination
|
|
84
|
+
local roomTrapdoorMap = v.level.trapdoors:getAndSetDefault(roomListIndex)
|
|
85
|
+
local customTrapdoorDescription = {open = open, destination = destinationToUse, firstSpawn = firstSpawn}
|
|
86
|
+
roomTrapdoorMap:set(gridIndex, customTrapdoorDescription)
|
|
87
|
+
if not open then
|
|
88
|
+
local sprite = gridEntity:GetSprite()
|
|
89
|
+
sprite:Play(TrapdoorAnimation.CLOSED, true)
|
|
90
|
+
end
|
|
91
|
+
return gridEntity
|
|
126
92
|
end
|
|
127
93
|
return ____exports
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/features/customTrapdoor/init.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAuBxD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CASzD"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__ArraySome = ____lualib.__TS__ArraySome
|
|
3
|
+
local Map = ____lualib.Map
|
|
4
|
+
local ____exports = {}
|
|
5
|
+
local postRender, checkAllPlayersJumpComplete, checkPixelationToBlackComplete, checkPausingOnBlackComplete, checkAllPlayersLayingDownComplete, goToCustomDestination, anyPlayerPlayingExtraAnimation, postPEffectUpdate, checkJumpComplete, postGridEntityUpdateTrapdoor
|
|
6
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
|
+
local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
|
|
8
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
9
|
+
local RoomTransitionAnim = ____isaac_2Dtypescript_2Ddefinitions.RoomTransitionAnim
|
|
10
|
+
local ____cachedClasses = require("cachedClasses")
|
|
11
|
+
local game = ____cachedClasses.game
|
|
12
|
+
local ____ModCallbackCustom = require("enums.ModCallbackCustom")
|
|
13
|
+
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
14
|
+
local ____StageTravelState = require("enums.private.StageTravelState")
|
|
15
|
+
local StageTravelState = ____StageTravelState.StageTravelState
|
|
16
|
+
local ____playerCenter = require("functions.playerCenter")
|
|
17
|
+
local movePlayersToCenter = ____playerCenter.movePlayersToCenter
|
|
18
|
+
local ____playerIndex = require("functions.playerIndex")
|
|
19
|
+
local getAllPlayers = ____playerIndex.getAllPlayers
|
|
20
|
+
local ____roomData = require("functions.roomData")
|
|
21
|
+
local getRoomGridIndex = ____roomData.getRoomGridIndex
|
|
22
|
+
local getRoomListIndex = ____roomData.getRoomListIndex
|
|
23
|
+
local ____stage = require("functions.stage")
|
|
24
|
+
local setStage = ____stage.setStage
|
|
25
|
+
local ____types = require("functions.types")
|
|
26
|
+
local isString = ____types.isString
|
|
27
|
+
local ____exports = require("features.customStage.exports")
|
|
28
|
+
local setCustomStage = ____exports.setCustomStage
|
|
29
|
+
local ____streakText = require("features.customStage.streakText")
|
|
30
|
+
local topStreakTextStart = ____streakText.topStreakTextStart
|
|
31
|
+
local ____disableInputs = require("features.disableInputs")
|
|
32
|
+
local enableAllInputs = ____disableInputs.enableAllInputs
|
|
33
|
+
local ____runInNFrames = require("features.runInNFrames")
|
|
34
|
+
local runNextGameFrame = ____runInNFrames.runNextGameFrame
|
|
35
|
+
local ____runNextRoom = require("features.runNextRoom")
|
|
36
|
+
local runNextRoom = ____runNextRoom.runNextRoom
|
|
37
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
38
|
+
local saveDataManager = ____exports.saveDataManager
|
|
39
|
+
local ____blackSprite = require("features.customTrapdoor.blackSprite")
|
|
40
|
+
local drawBlackSprite = ____blackSprite.drawBlackSprite
|
|
41
|
+
local ____customTrapdoorConstants = require("features.customTrapdoor.customTrapdoorConstants")
|
|
42
|
+
local CUSTOM_TRAPDOOR_FEATURE_NAME = ____customTrapdoorConstants.CUSTOM_TRAPDOOR_FEATURE_NAME
|
|
43
|
+
local PIXELATION_TO_BLACK_FRAMES = ____customTrapdoorConstants.PIXELATION_TO_BLACK_FRAMES
|
|
44
|
+
local ____openClose = require("features.customTrapdoor.openClose")
|
|
45
|
+
local checkCustomTrapdoorOpenClose = ____openClose.checkCustomTrapdoorOpenClose
|
|
46
|
+
local ____touched = require("features.customTrapdoor.touched")
|
|
47
|
+
local checkCustomTrapdoorPlayerTouched = ____touched.checkCustomTrapdoorPlayerTouched
|
|
48
|
+
local ____v = require("features.customTrapdoor.v")
|
|
49
|
+
local v = ____v.default
|
|
50
|
+
function postRender(self)
|
|
51
|
+
checkAllPlayersJumpComplete(nil)
|
|
52
|
+
checkPixelationToBlackComplete(nil)
|
|
53
|
+
checkPausingOnBlackComplete(nil)
|
|
54
|
+
checkAllPlayersLayingDownComplete(nil)
|
|
55
|
+
drawBlackSprite(nil)
|
|
56
|
+
end
|
|
57
|
+
function checkAllPlayersJumpComplete(self)
|
|
58
|
+
if v.run.state ~= StageTravelState.PLAYERS_JUMPING_DOWN then
|
|
59
|
+
return
|
|
60
|
+
end
|
|
61
|
+
if anyPlayerPlayingExtraAnimation(nil) then
|
|
62
|
+
return
|
|
63
|
+
end
|
|
64
|
+
local renderFrameCount = Isaac.GetFrameCount()
|
|
65
|
+
local roomGridIndex = getRoomGridIndex(nil)
|
|
66
|
+
v.run.state = StageTravelState.PIXELATION_TO_BLACK
|
|
67
|
+
v.run.stateRenderFrame = renderFrameCount
|
|
68
|
+
game:StartRoomTransition(roomGridIndex, Direction.NO_DIRECTION, RoomTransitionAnim.PIXELATION)
|
|
69
|
+
end
|
|
70
|
+
function checkPixelationToBlackComplete(self)
|
|
71
|
+
if v.run.state ~= StageTravelState.PIXELATION_TO_BLACK or v.run.stateRenderFrame == nil then
|
|
72
|
+
return
|
|
73
|
+
end
|
|
74
|
+
local hud = game:GetHUD()
|
|
75
|
+
local renderFrameCount = Isaac.GetFrameCount()
|
|
76
|
+
local roomGridIndex = getRoomGridIndex(nil)
|
|
77
|
+
local renderFrameScreenBlack = v.run.stateRenderFrame + PIXELATION_TO_BLACK_FRAMES
|
|
78
|
+
if renderFrameCount < renderFrameScreenBlack then
|
|
79
|
+
return
|
|
80
|
+
end
|
|
81
|
+
v.run.state = StageTravelState.PAUSING_ON_BLACK
|
|
82
|
+
v.run.stateRenderFrame = renderFrameCount
|
|
83
|
+
hud:SetVisible(false)
|
|
84
|
+
goToCustomDestination(nil)
|
|
85
|
+
game:StartRoomTransition(roomGridIndex, Direction.NO_DIRECTION, RoomTransitionAnim.PIXELATION)
|
|
86
|
+
end
|
|
87
|
+
function checkPausingOnBlackComplete(self)
|
|
88
|
+
if v.run.state ~= StageTravelState.PAUSING_ON_BLACK or v.run.stateRenderFrame == nil then
|
|
89
|
+
return
|
|
90
|
+
end
|
|
91
|
+
local hud = game:GetHUD()
|
|
92
|
+
local renderFrameCount = Isaac.GetFrameCount()
|
|
93
|
+
local renderFrameScreenBlack = v.run.stateRenderFrame + PIXELATION_TO_BLACK_FRAMES
|
|
94
|
+
if renderFrameCount < renderFrameScreenBlack then
|
|
95
|
+
return
|
|
96
|
+
end
|
|
97
|
+
v.run.state = StageTravelState.PIXELATION_TO_ROOM
|
|
98
|
+
hud:SetVisible(true)
|
|
99
|
+
runNextRoom(
|
|
100
|
+
nil,
|
|
101
|
+
function()
|
|
102
|
+
movePlayersToCenter(nil)
|
|
103
|
+
v.run.state = StageTravelState.PLAYERS_LAYING_DOWN
|
|
104
|
+
for ____, player in ipairs(getAllPlayers(nil)) do
|
|
105
|
+
player:AnimateAppear()
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
)
|
|
109
|
+
runNextGameFrame(
|
|
110
|
+
nil,
|
|
111
|
+
function()
|
|
112
|
+
topStreakTextStart(nil)
|
|
113
|
+
end
|
|
114
|
+
)
|
|
115
|
+
end
|
|
116
|
+
function checkAllPlayersLayingDownComplete(self)
|
|
117
|
+
if v.run.state ~= StageTravelState.PLAYERS_LAYING_DOWN then
|
|
118
|
+
return
|
|
119
|
+
end
|
|
120
|
+
if anyPlayerPlayingExtraAnimation(nil) then
|
|
121
|
+
return
|
|
122
|
+
end
|
|
123
|
+
v.run.state = StageTravelState.NONE
|
|
124
|
+
enableAllInputs(nil, CUSTOM_TRAPDOOR_FEATURE_NAME)
|
|
125
|
+
end
|
|
126
|
+
function goToCustomDestination(self)
|
|
127
|
+
if v.run.destination == nil then
|
|
128
|
+
return
|
|
129
|
+
end
|
|
130
|
+
if isString(nil, v.run.destination) then
|
|
131
|
+
setCustomStage(nil, "Slaughterhouse")
|
|
132
|
+
else
|
|
133
|
+
local stage, stageType = table.unpack(v.run.destination)
|
|
134
|
+
setStage(nil, stage, stageType)
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
function anyPlayerPlayingExtraAnimation(self)
|
|
138
|
+
local players = getAllPlayers(nil)
|
|
139
|
+
return __TS__ArraySome(
|
|
140
|
+
players,
|
|
141
|
+
function(____, player) return not player:IsExtraAnimationFinished() end
|
|
142
|
+
)
|
|
143
|
+
end
|
|
144
|
+
function postPEffectUpdate(self, player)
|
|
145
|
+
checkJumpComplete(nil, player)
|
|
146
|
+
end
|
|
147
|
+
function checkJumpComplete(self, player)
|
|
148
|
+
if v.run.state ~= StageTravelState.PLAYERS_JUMPING_DOWN then
|
|
149
|
+
return
|
|
150
|
+
end
|
|
151
|
+
local sprite = player:GetSprite()
|
|
152
|
+
if sprite:IsFinished("Trapdoor") then
|
|
153
|
+
player.Visible = false
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
function postGridEntityUpdateTrapdoor(self, gridEntity)
|
|
157
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
158
|
+
local gridIndex = gridEntity:GetGridIndex()
|
|
159
|
+
local roomTrapdoorMap = v.level.trapdoors:getAndSetDefault(roomListIndex)
|
|
160
|
+
local trapdoorDescription = roomTrapdoorMap:get(gridIndex)
|
|
161
|
+
if trapdoorDescription == nil then
|
|
162
|
+
return
|
|
163
|
+
end
|
|
164
|
+
checkCustomTrapdoorOpenClose(nil, gridEntity, trapdoorDescription)
|
|
165
|
+
checkCustomTrapdoorPlayerTouched(nil, gridEntity, trapdoorDescription)
|
|
166
|
+
end
|
|
167
|
+
function ____exports.customTrapdoorInit(self, mod)
|
|
168
|
+
saveDataManager(nil, CUSTOM_TRAPDOOR_FEATURE_NAME, v)
|
|
169
|
+
mod:AddCallback(ModCallback.POST_RENDER, postRender)
|
|
170
|
+
mod:AddCallback(ModCallback.POST_PEFFECT_UPDATE, postPEffectUpdate)
|
|
171
|
+
mod:AddCallbackCustom(ModCallbackCustom.POST_GRID_ENTITY_UPDATE, postGridEntityUpdateTrapdoor)
|
|
172
|
+
end
|
|
173
|
+
return ____exports
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
import { CustomTrapdoorDescription } from "../../interfaces/private/CustomTrapdoorDescription";
|
|
3
|
+
export declare function checkCustomTrapdoorOpenClose(gridEntity: GridEntity, trapdoorDescription: CustomTrapdoorDescription): void;
|
|
4
|
+
export declare function shouldTrapdoorSpawnOpen(gridEntity: GridEntity, firstSpawn: boolean): boolean;
|
|
5
|
+
//# sourceMappingURL=openClose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openClose.d.ts","sourceRoot":"","sources":["../../../src/features/customTrapdoor/openClose.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAQ/F,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,UAAU,EACtB,mBAAmB,EAAE,yBAAyB,GAC7C,IAAI,CASN;AAoDD,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,OAAO,GAClB,OAAO,CAuBT"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local shouldTrapdoorOpen, isPlayerCloseAfterBoss, shouldBeClosedFromStartingInRoomWithEnemies, open
|
|
3
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
4
|
+
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
5
|
+
local ____cachedClasses = require("cachedClasses")
|
|
6
|
+
local game = ____cachedClasses.game
|
|
7
|
+
local ____TrapdoorAnimation = require("enums.private.TrapdoorAnimation")
|
|
8
|
+
local TrapdoorAnimation = ____TrapdoorAnimation.TrapdoorAnimation
|
|
9
|
+
local ____positionVelocity = require("functions.positionVelocity")
|
|
10
|
+
local anyPlayerCloserThan = ____positionVelocity.anyPlayerCloserThan
|
|
11
|
+
local ____roomClearFrame = require("features.roomClearFrame")
|
|
12
|
+
local getRoomClearGameFrame = ____roomClearFrame.getRoomClearGameFrame
|
|
13
|
+
local ____customTrapdoorConstants = require("features.customTrapdoor.customTrapdoorConstants")
|
|
14
|
+
local TRAPDOOR_BOSS_REACTION_FRAMES = ____customTrapdoorConstants.TRAPDOOR_BOSS_REACTION_FRAMES
|
|
15
|
+
local TRAPDOOR_OPEN_DISTANCE = ____customTrapdoorConstants.TRAPDOOR_OPEN_DISTANCE
|
|
16
|
+
local TRAPDOOR_OPEN_DISTANCE_AFTER_BOSS = ____customTrapdoorConstants.TRAPDOOR_OPEN_DISTANCE_AFTER_BOSS
|
|
17
|
+
function shouldTrapdoorOpen(self, gridEntity, firstSpawn)
|
|
18
|
+
local room = game:GetRoom()
|
|
19
|
+
local roomClear = room:IsClear()
|
|
20
|
+
return not anyPlayerCloserThan(nil, gridEntity.Position, TRAPDOOR_OPEN_DISTANCE) and not isPlayerCloseAfterBoss(nil, gridEntity.Position) and not shouldBeClosedFromStartingInRoomWithEnemies(nil, firstSpawn, roomClear)
|
|
21
|
+
end
|
|
22
|
+
function isPlayerCloseAfterBoss(self, position)
|
|
23
|
+
local gameFrameCount = game:GetFrameCount()
|
|
24
|
+
local room = game:GetRoom()
|
|
25
|
+
local roomType = room:GetType()
|
|
26
|
+
local roomClearGameFrame = getRoomClearGameFrame(nil)
|
|
27
|
+
if roomType ~= RoomType.BOSS or roomClearGameFrame == nil or gameFrameCount >= roomClearGameFrame + TRAPDOOR_BOSS_REACTION_FRAMES then
|
|
28
|
+
return false
|
|
29
|
+
end
|
|
30
|
+
return anyPlayerCloserThan(nil, position, TRAPDOOR_OPEN_DISTANCE_AFTER_BOSS)
|
|
31
|
+
end
|
|
32
|
+
function shouldBeClosedFromStartingInRoomWithEnemies(self, firstSpawn, roomClear)
|
|
33
|
+
return firstSpawn and not roomClear
|
|
34
|
+
end
|
|
35
|
+
function open(self, gridEntity, trapdoorDescription)
|
|
36
|
+
trapdoorDescription.open = true
|
|
37
|
+
local sprite = gridEntity:GetSprite()
|
|
38
|
+
sprite:Play(TrapdoorAnimation.OPEN_ANIMATION, true)
|
|
39
|
+
end
|
|
40
|
+
function ____exports.checkCustomTrapdoorOpenClose(self, gridEntity, trapdoorDescription)
|
|
41
|
+
if trapdoorDescription.open then
|
|
42
|
+
return
|
|
43
|
+
end
|
|
44
|
+
if shouldTrapdoorOpen(nil, gridEntity, trapdoorDescription.firstSpawn) then
|
|
45
|
+
open(nil, gridEntity, trapdoorDescription)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
function ____exports.shouldTrapdoorSpawnOpen(self, gridEntity, firstSpawn)
|
|
49
|
+
local room = game:GetRoom()
|
|
50
|
+
local roomFrameCount = room:GetFrameCount()
|
|
51
|
+
local roomClear = room:IsClear()
|
|
52
|
+
if roomFrameCount > 0 then
|
|
53
|
+
return false
|
|
54
|
+
end
|
|
55
|
+
if not roomClear then
|
|
56
|
+
return false
|
|
57
|
+
end
|
|
58
|
+
return shouldTrapdoorOpen(nil, gridEntity, firstSpawn)
|
|
59
|
+
end
|
|
60
|
+
return ____exports
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
import { CustomTrapdoorDescription } from "../../interfaces/private/CustomTrapdoorDescription";
|
|
3
|
+
export declare function checkCustomTrapdoorPlayerTouched(gridEntity: GridEntity, trapdoorDescription: CustomTrapdoorDescription): void;
|
|
4
|
+
//# sourceMappingURL=touched.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"touched.d.ts","sourceRoot":"","sources":["../../../src/features/customTrapdoor/touched.ts"],"names":[],"mappings":";AAaA,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAa/F,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,UAAU,EACtB,mBAAmB,EAAE,yBAAyB,GAC7C,IAAI,CA8BN"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__ArrayForEach = ____lualib.__TS__ArrayForEach
|
|
3
|
+
local ____exports = {}
|
|
4
|
+
local canPlayerInteractWithTrapdoor, playerTouchedCustomTrapdoor, startDelayedJump, adjustPlayerVelocityToTrapdoor, setPlayerAttributes, dropTaintedForgotten
|
|
5
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
|
+
local EntityCollisionClass = ____isaac_2Dtypescript_2Ddefinitions.EntityCollisionClass
|
|
7
|
+
local EntityPartition = ____isaac_2Dtypescript_2Ddefinitions.EntityPartition
|
|
8
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
9
|
+
local ____constants = require("constants")
|
|
10
|
+
local VectorZero = ____constants.VectorZero
|
|
11
|
+
local ____StageTravelState = require("enums.private.StageTravelState")
|
|
12
|
+
local StageTravelState = ____StageTravelState.StageTravelState
|
|
13
|
+
local ____playerIndex = require("functions.playerIndex")
|
|
14
|
+
local getOtherPlayers = ____playerIndex.getOtherPlayers
|
|
15
|
+
local getPlayers = ____playerIndex.getPlayers
|
|
16
|
+
local isChildPlayer = ____playerIndex.isChildPlayer
|
|
17
|
+
local ____players = require("functions.players")
|
|
18
|
+
local isCharacter = ____players.isCharacter
|
|
19
|
+
local ____disableInputs = require("features.disableInputs")
|
|
20
|
+
local disableAllInputs = ____disableInputs.disableAllInputs
|
|
21
|
+
local ____ponyDetection = require("features.ponyDetection")
|
|
22
|
+
local isPlayerUsingPony = ____ponyDetection.isPlayerUsingPony
|
|
23
|
+
local ____runInNFrames = require("features.runInNFrames")
|
|
24
|
+
local runInNGameFrames = ____runInNFrames.runInNGameFrames
|
|
25
|
+
local runNextGameFrame = ____runInNFrames.runNextGameFrame
|
|
26
|
+
local ____customTrapdoorConstants = require("features.customTrapdoor.customTrapdoorConstants")
|
|
27
|
+
local ANIMATIONS_THAT_PREVENT_STAGE_TRAVEL = ____customTrapdoorConstants.ANIMATIONS_THAT_PREVENT_STAGE_TRAVEL
|
|
28
|
+
local CUSTOM_TRAPDOOR_FEATURE_NAME = ____customTrapdoorConstants.CUSTOM_TRAPDOOR_FEATURE_NAME
|
|
29
|
+
local OTHER_PLAYER_TRAPDOOR_JUMP_DELAY_GAME_FRAMES = ____customTrapdoorConstants.OTHER_PLAYER_TRAPDOOR_JUMP_DELAY_GAME_FRAMES
|
|
30
|
+
local OTHER_PLAYER_TRAPDOOR_JUMP_DURATION_GAME_FRAMES = ____customTrapdoorConstants.OTHER_PLAYER_TRAPDOOR_JUMP_DURATION_GAME_FRAMES
|
|
31
|
+
local TRAPDOOR_TOUCH_DISTANCE = ____customTrapdoorConstants.TRAPDOOR_TOUCH_DISTANCE
|
|
32
|
+
local ____v = require("features.customTrapdoor.v")
|
|
33
|
+
local v = ____v.default
|
|
34
|
+
function canPlayerInteractWithTrapdoor(self, player)
|
|
35
|
+
local sprite = player:GetSprite()
|
|
36
|
+
local animation = sprite:GetAnimation()
|
|
37
|
+
return not player:IsHoldingItem() and not ANIMATIONS_THAT_PREVENT_STAGE_TRAVEL:has(animation)
|
|
38
|
+
end
|
|
39
|
+
function playerTouchedCustomTrapdoor(self, gridEntity, trapdoorDescription, player)
|
|
40
|
+
v.run.state = StageTravelState.PLAYERS_JUMPING_DOWN
|
|
41
|
+
v.run.destination = trapdoorDescription.destination
|
|
42
|
+
disableAllInputs(nil, CUSTOM_TRAPDOOR_FEATURE_NAME)
|
|
43
|
+
setPlayerAttributes(nil, player, gridEntity.Position)
|
|
44
|
+
dropTaintedForgotten(nil, player)
|
|
45
|
+
player:PlayExtraAnimation("Trapdoor")
|
|
46
|
+
local otherPlayers = getOtherPlayers(nil, player)
|
|
47
|
+
__TS__ArrayForEach(
|
|
48
|
+
otherPlayers,
|
|
49
|
+
function(____, otherPlayer, i)
|
|
50
|
+
local gameFramesToWaitBeforeJumping = OTHER_PLAYER_TRAPDOOR_JUMP_DELAY_GAME_FRAMES * (i + 1)
|
|
51
|
+
local otherPlayerPtr = EntityPtr(otherPlayer)
|
|
52
|
+
runInNGameFrames(
|
|
53
|
+
nil,
|
|
54
|
+
function()
|
|
55
|
+
startDelayedJump(nil, otherPlayerPtr, gridEntity.Position)
|
|
56
|
+
end,
|
|
57
|
+
gameFramesToWaitBeforeJumping
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
function startDelayedJump(self, entityPtr, trapdoorPosition)
|
|
63
|
+
local entity = entityPtr.Ref
|
|
64
|
+
if entity == nil then
|
|
65
|
+
return
|
|
66
|
+
end
|
|
67
|
+
local player = entity:ToPlayer()
|
|
68
|
+
if player == nil then
|
|
69
|
+
return
|
|
70
|
+
end
|
|
71
|
+
player:PlayExtraAnimation("Trapdoor")
|
|
72
|
+
adjustPlayerVelocityToTrapdoor(nil, entityPtr, player.Position, trapdoorPosition)
|
|
73
|
+
end
|
|
74
|
+
function adjustPlayerVelocityToTrapdoor(self, entityPtr, startPos, endPos)
|
|
75
|
+
local entity = entityPtr.Ref
|
|
76
|
+
if entity == nil then
|
|
77
|
+
return
|
|
78
|
+
end
|
|
79
|
+
local player = entity:ToPlayer()
|
|
80
|
+
if player == nil then
|
|
81
|
+
return
|
|
82
|
+
end
|
|
83
|
+
local sprite = player:GetSprite()
|
|
84
|
+
if sprite:IsFinished("Trapdoor") then
|
|
85
|
+
return
|
|
86
|
+
end
|
|
87
|
+
local frame = sprite:GetFrame()
|
|
88
|
+
if frame > OTHER_PLAYER_TRAPDOOR_JUMP_DURATION_GAME_FRAMES then
|
|
89
|
+
return
|
|
90
|
+
end
|
|
91
|
+
local totalDifference = endPos - startPos
|
|
92
|
+
local differencePerFrame = totalDifference / OTHER_PLAYER_TRAPDOOR_JUMP_DURATION_GAME_FRAMES
|
|
93
|
+
local differenceForThisFrame = differencePerFrame * (frame + 1)
|
|
94
|
+
local targetPosition = startPos + differenceForThisFrame
|
|
95
|
+
local calculatedVelocity = player.Position - targetPosition
|
|
96
|
+
player.Velocity = calculatedVelocity
|
|
97
|
+
runNextGameFrame(
|
|
98
|
+
nil,
|
|
99
|
+
function()
|
|
100
|
+
adjustPlayerVelocityToTrapdoor(nil, entityPtr, startPos, endPos)
|
|
101
|
+
end
|
|
102
|
+
)
|
|
103
|
+
end
|
|
104
|
+
function setPlayerAttributes(self, trapdoorPlayer, position)
|
|
105
|
+
trapdoorPlayer.Position = position
|
|
106
|
+
for ____, player in ipairs(getPlayers(nil)) do
|
|
107
|
+
player.Velocity = VectorZero
|
|
108
|
+
player.EntityCollisionClass = EntityCollisionClass.NONE
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
function dropTaintedForgotten(self, player)
|
|
112
|
+
if isCharacter(nil, player, PlayerType.THE_FORGOTTEN_B) then
|
|
113
|
+
local taintedSoul = player:GetOtherTwin()
|
|
114
|
+
if taintedSoul ~= nil then
|
|
115
|
+
taintedSoul:ThrowHeldEntity(VectorZero)
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
function ____exports.checkCustomTrapdoorPlayerTouched(self, gridEntity, trapdoorDescription)
|
|
120
|
+
if v.run.state ~= StageTravelState.NONE then
|
|
121
|
+
return
|
|
122
|
+
end
|
|
123
|
+
if not trapdoorDescription.open then
|
|
124
|
+
return
|
|
125
|
+
end
|
|
126
|
+
local playersTouching = Isaac.FindInRadius(gridEntity.Position, TRAPDOOR_TOUCH_DISTANCE, EntityPartition.PLAYER)
|
|
127
|
+
for ____, playerEntity in ipairs(playersTouching) do
|
|
128
|
+
do
|
|
129
|
+
local player = playerEntity:ToPlayer()
|
|
130
|
+
if player == nil then
|
|
131
|
+
goto __continue5
|
|
132
|
+
end
|
|
133
|
+
if not isPlayerUsingPony(nil, player) and not isChildPlayer(nil, player) and canPlayerInteractWithTrapdoor(nil, player) then
|
|
134
|
+
playerTouchedCustomTrapdoor(nil, gridEntity, trapdoorDescription, player)
|
|
135
|
+
return
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
::__continue5::
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
return ____exports
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import { LevelStage, StageType } from "isaac-typescript-definitions";
|
|
2
|
+
import { DefaultMap } from "../../classes/DefaultMap";
|
|
3
|
+
import { StageTravelState } from "../../enums/private/StageTravelState";
|
|
2
4
|
import { CustomTrapdoorDescription } from "../../interfaces/private/CustomTrapdoorDescription";
|
|
3
|
-
|
|
5
|
+
declare const v: {
|
|
6
|
+
run: {
|
|
7
|
+
state: StageTravelState;
|
|
8
|
+
/** The render frame that this state was reached. */
|
|
9
|
+
stateRenderFrame: number | null;
|
|
10
|
+
destination: string | [stage: LevelStage, stageType: StageType] | null;
|
|
11
|
+
};
|
|
12
|
+
level: {
|
|
13
|
+
/** Indexed by room list index and grid index. */
|
|
14
|
+
trapdoors: DefaultMap<number, Map<number, CustomTrapdoorDescription>, []>;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default v;
|
|
4
18
|
//# sourceMappingURL=v.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v.d.ts","sourceRoot":"","sources":["../../../src/features/customTrapdoor/v.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"v.d.ts","sourceRoot":"","sources":["../../../src/features/customTrapdoor/v.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAE/F,QAAA,MAAM,CAAC;;;QAIH,oDAAoD;;;;;QAUpD,iDAAiD;;;CAKpD,CAAC;AACF,eAAe,CAAC,CAAC"}
|
|
@@ -2,14 +2,16 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local Map = ____lualib.Map
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
4
|
local ____exports = {}
|
|
5
|
+
local ____DefaultMap = require("classes.DefaultMap")
|
|
6
|
+
local DefaultMap = ____DefaultMap.DefaultMap
|
|
5
7
|
local ____StageTravelState = require("enums.private.StageTravelState")
|
|
6
8
|
local StageTravelState = ____StageTravelState.StageTravelState
|
|
7
9
|
local v = {
|
|
8
|
-
run = {state = StageTravelState.NONE},
|
|
9
|
-
|
|
10
|
+
run = {state = StageTravelState.NONE, stateRenderFrame = nil, destination = nil},
|
|
11
|
+
level = {trapdoors = __TS__New(
|
|
12
|
+
DefaultMap,
|
|
13
|
+
function() return __TS__New(Map) end
|
|
14
|
+
)}
|
|
10
15
|
}
|
|
11
|
-
|
|
12
|
-
local gridIndex = gridEntity:GetGridIndex()
|
|
13
|
-
return v.room.trapdoors:get(gridIndex)
|
|
14
|
-
end
|
|
16
|
+
____exports.default = v
|
|
15
17
|
return ____exports
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/features/extraConsoleCommands/init.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/features/extraConsoleCommands/init.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAWxD,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAK/D"}
|
|
@@ -11,6 +11,8 @@ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
|
11
11
|
local TearVariant = ____isaac_2Dtypescript_2Ddefinitions.TearVariant
|
|
12
12
|
local ____constants = require("constants")
|
|
13
13
|
local MAX_SPEED_STAT = ____constants.MAX_SPEED_STAT
|
|
14
|
+
local ____flag = require("functions.flag")
|
|
15
|
+
local bitFlags = ____flag.bitFlags
|
|
14
16
|
local ____map = require("functions.map")
|
|
15
17
|
local getMapPartialMatch = ____map.getMapPartialMatch
|
|
16
18
|
local ____utils = require("functions.utils")
|
|
@@ -212,7 +214,7 @@ function entityTakeDmgPlayer(self)
|
|
|
212
214
|
return nil
|
|
213
215
|
end
|
|
214
216
|
function postCurseEval(self, curses)
|
|
215
|
-
return v.persistent.disableCurses and LevelCurse.NONE or curses
|
|
217
|
+
return v.persistent.disableCurses and bitFlags(nil, LevelCurse.NONE) or curses
|
|
216
218
|
end
|
|
217
219
|
function executeCmd(self, command, params)
|
|
218
220
|
local resultTuple = getMapPartialMatch(nil, command, extraConsoleCommandsFunctionMap)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taintedLazarusPlayers.d.ts","sourceRoot":"","sources":["../../src/features/taintedLazarusPlayers.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"taintedLazarusPlayers.d.ts","sourceRoot":"","sources":["../../src/features/taintedLazarusPlayers.ts"],"names":[],"mappings":";AA+FA;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,YAAY,GACnB,YAAY,GAAG,SAAS,CAK1B"}
|