isaacscript-common 7.5.0 → 7.6.1
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/classes/DefaultMap.d.ts +3 -2
- package/dist/classes/DefaultMap.d.ts.map +1 -1
- package/dist/classes/DefaultMap.lua +2 -1
- package/dist/features/customGridEntity.d.ts +6 -3
- package/dist/features/customGridEntity.d.ts.map +1 -1
- package/dist/features/customGridEntity.lua +20 -11
- package/dist/features/customStage/customStageConstants.d.ts +1 -0
- package/dist/features/customStage/customStageConstants.d.ts.map +1 -1
- package/dist/features/customStage/customStageConstants.lua +1 -0
- package/dist/features/customStage/customStageGridEntities.d.ts.map +1 -1
- package/dist/features/customStage/customStageGridEntities.lua +9 -5
- package/dist/features/customStage/customStageUtils.d.ts +2 -1
- package/dist/features/customStage/customStageUtils.d.ts.map +1 -1
- package/dist/features/customStage/customStageUtils.lua +40 -1
- package/dist/features/customStage/exports.d.ts +1 -25
- package/dist/features/customStage/exports.d.ts.map +1 -1
- package/dist/features/customStage/exports.lua +28 -29
- package/dist/features/customStage/init.d.ts.map +1 -1
- package/dist/features/customStage/init.lua +3 -1
- package/dist/features/customStage/v.d.ts +0 -2
- package/dist/features/customStage/v.d.ts.map +1 -1
- package/dist/features/customStage/v.lua +0 -2
- package/dist/features/customStage/versusScreen.d.ts.map +1 -1
- package/dist/features/customStage/versusScreen.lua +80 -60
- package/dist/features/customTrapdoor/exports.d.ts +28 -16
- package/dist/features/customTrapdoor/exports.d.ts.map +1 -1
- package/dist/features/customTrapdoor/exports.lua +45 -61
- package/dist/features/customTrapdoor/init.d.ts.map +1 -1
- package/dist/features/customTrapdoor/init.lua +12 -10
- package/dist/features/customTrapdoor/spawn.d.ts +6 -0
- package/dist/features/customTrapdoor/spawn.d.ts.map +1 -0
- package/dist/features/customTrapdoor/spawn.lua +51 -0
- package/dist/features/customTrapdoor/v.d.ts +2 -2
- package/dist/features/customTrapdoor/v.d.ts.map +1 -1
- package/dist/functions/doors.d.ts +6 -5
- package/dist/functions/doors.d.ts.map +1 -1
- package/dist/functions/doors.lua +25 -12
- package/dist/functions/enums.d.ts +3 -3
- package/dist/functions/enums.lua +3 -3
- package/dist/functions/players.d.ts.map +1 -1
- package/dist/functions/players.lua +3 -2
- package/dist/index.d.ts +172 -11145
- package/dist/index.d.ts.map +1 -1
- package/dist/index.lua +4 -4
- package/dist/interfaces/{CustomStageLua.d.ts → CustomStageTSConfig.d.ts} +87 -61
- package/dist/interfaces/CustomStageTSConfig.d.ts.map +1 -0
- package/dist/interfaces/{CustomStageLua.lua → CustomStageTSConfig.lua} +0 -0
- package/dist/interfaces/GridEntityCustomData.d.ts +2 -2
- package/dist/interfaces/GridEntityCustomData.d.ts.map +1 -1
- package/dist/interfaces/JSONRoomsFile.d.ts +6 -5
- package/dist/interfaces/JSONRoomsFile.d.ts.map +1 -1
- package/dist/interfaces/private/CustomStage.d.ts +1 -1
- package/dist/interfaces/private/CustomStage.d.ts.map +1 -1
- package/dist/interfaces/private/CustomTrapdoorDescription.d.ts +2 -2
- package/dist/interfaces/private/CustomTrapdoorDescription.d.ts.map +1 -1
- package/dist/interfaces/private/CustomTrapdoorDestination.d.ts +14 -0
- package/dist/interfaces/private/CustomTrapdoorDestination.d.ts.map +1 -0
- package/dist/{types/TrapdoorDestination.lua → interfaces/private/CustomTrapdoorDestination.lua} +0 -0
- package/package.json +1 -1
- package/src/classes/DefaultMap.ts +3 -2
- package/src/features/customGridEntity.ts +30 -20
- package/src/features/customStage/customStageConstants.ts +2 -0
- package/src/features/customStage/customStageGridEntities.ts +20 -16
- package/src/features/customStage/customStageUtils.ts +52 -1
- package/src/features/customStage/exports.ts +33 -45
- package/src/features/customStage/init.ts +3 -2
- package/src/features/customStage/v.ts +0 -6
- package/src/features/customStage/versusScreen.ts +78 -57
- package/src/features/customTrapdoor/exports.ts +60 -66
- package/src/features/customTrapdoor/init.ts +12 -11
- package/src/features/customTrapdoor/spawn.ts +53 -0
- package/src/features/customTrapdoor/v.ts +2 -2
- package/src/functions/doors.ts +37 -21
- package/src/functions/enums.ts +3 -3
- package/src/functions/players.ts +7 -3
- package/src/index.ts +3 -4
- package/src/interfaces/{CustomStageLua.ts → CustomStageTSConfig.ts} +108 -42
- package/src/interfaces/GridEntityCustomData.ts +2 -2
- package/src/interfaces/JSONRoomsFile.ts +6 -5
- package/src/interfaces/private/CustomStage.ts +4 -1
- package/src/interfaces/private/CustomTrapdoorDescription.ts +2 -2
- package/src/interfaces/private/CustomTrapdoorDestination.ts +14 -0
- package/dist/interfaces/CustomStageLua.d.ts.map +0 -1
- package/dist/types/TrapdoorDestination.d.ts +0 -6
- package/dist/types/TrapdoorDestination.d.ts.map +0 -1
- package/src/types/TrapdoorDestination.ts +0 -8
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
|
-
local Map = ____lualib.Map
|
|
3
2
|
local __TS__ArraySome = ____lualib.__TS__ArraySome
|
|
3
|
+
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
4
4
|
local ____exports = {}
|
|
5
|
-
local willVanillaVersusScreenPlay, getPlayerPNGPaths, getBossPNGPaths, DEFAULT_CHARACTER, PNG_PATH_PREFIX, PLAYER_PORTRAIT_PNG_PATH_PREFIX
|
|
5
|
+
local willVanillaVersusScreenPlay, getPlayerPNGPaths, getBossPNGPaths, getBossPNGPathsCustom, DEFAULT_CHARACTER, PNG_PATH_PREFIX, PLAYER_PORTRAIT_PNG_PATH_PREFIX
|
|
6
6
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
7
|
local BossID = ____isaac_2Dtypescript_2Ddefinitions.BossID
|
|
8
8
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
@@ -17,8 +17,8 @@ local ____array = require("functions.array")
|
|
|
17
17
|
local arrayRemove = ____array.arrayRemove
|
|
18
18
|
local ____bosses = require("functions.bosses")
|
|
19
19
|
local getBosses = ____bosses.getBosses
|
|
20
|
-
local
|
|
21
|
-
local
|
|
20
|
+
local ____roomData = require("functions.roomData")
|
|
21
|
+
local getRoomSubType = ____roomData.getRoomSubType
|
|
22
22
|
local ____utils = require("functions.utils")
|
|
23
23
|
local erange = ____utils.erange
|
|
24
24
|
local ____bossNamePNGFileNames = require("objects.bossNamePNGFileNames")
|
|
@@ -33,12 +33,16 @@ local ____versusScreenBackgroundColors = require("objects.versusScreenBackground
|
|
|
33
33
|
local VERSUS_SCREEN_BACKGROUND_COLORS = ____versusScreenBackgroundColors.VERSUS_SCREEN_BACKGROUND_COLORS
|
|
34
34
|
local ____versusScreenDirtSpotColors = require("objects.versusScreenDirtSpotColors")
|
|
35
35
|
local VERSUS_SCREEN_DIRT_SPOT_COLORS = ____versusScreenDirtSpotColors.VERSUS_SCREEN_DIRT_SPOT_COLORS
|
|
36
|
+
local ____disableAllSound = require("features.disableAllSound")
|
|
37
|
+
local disableAllSound = ____disableAllSound.disableAllSound
|
|
38
|
+
local enableAllSound = ____disableAllSound.enableAllSound
|
|
36
39
|
local ____pause = require("features.pause")
|
|
37
40
|
local pause = ____pause.pause
|
|
38
41
|
local unpause = ____pause.unpause
|
|
39
42
|
local ____runInNFrames = require("features.runInNFrames")
|
|
40
43
|
local runNextGameFrame = ____runInNFrames.runNextGameFrame
|
|
41
44
|
local ____customStageConstants = require("features.customStage.customStageConstants")
|
|
45
|
+
local CUSTOM_STAGE_FEATURE_NAME = ____customStageConstants.CUSTOM_STAGE_FEATURE_NAME
|
|
42
46
|
local ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH = ____customStageConstants.ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH
|
|
43
47
|
local ____exports = require("features.customStage.exports")
|
|
44
48
|
local DEFAULT_BASE_STAGE = ____exports.DEFAULT_BASE_STAGE
|
|
@@ -46,7 +50,6 @@ local DEFAULT_BASE_STAGE_TYPE = ____exports.DEFAULT_BASE_STAGE_TYPE
|
|
|
46
50
|
local INVALID_STAGE_VALUE = ____exports.INVALID_STAGE_VALUE
|
|
47
51
|
local ____v = require("features.customStage.v")
|
|
48
52
|
local v = ____v.default
|
|
49
|
-
local customBossPNGPaths = ____v.customBossPNGPaths
|
|
50
53
|
function willVanillaVersusScreenPlay(self)
|
|
51
54
|
local bosses = getBosses(nil)
|
|
52
55
|
return __TS__ArraySome(
|
|
@@ -57,40 +60,51 @@ end
|
|
|
57
60
|
function getPlayerPNGPaths(self)
|
|
58
61
|
local player = Isaac.GetPlayer()
|
|
59
62
|
local character = player:GetPlayerType()
|
|
60
|
-
local
|
|
61
|
-
if
|
|
62
|
-
|
|
63
|
+
local namePNGFileName = PLAYER_NAME_PNG_FILE_NAMES[character]
|
|
64
|
+
if namePNGFileName == nil then
|
|
65
|
+
namePNGFileName = PLAYER_NAME_PNG_FILE_NAMES[DEFAULT_CHARACTER]
|
|
63
66
|
end
|
|
64
|
-
local
|
|
65
|
-
local
|
|
66
|
-
if
|
|
67
|
-
|
|
67
|
+
local namePNGPath = (PNG_PATH_PREFIX .. "/") .. tostring(namePNGFileName)
|
|
68
|
+
local portraitFileName = PLAYER_PORTRAIT_PNG_FILE_NAMES[character]
|
|
69
|
+
if namePNGFileName == nil then
|
|
70
|
+
portraitFileName = PLAYER_PORTRAIT_PNG_FILE_NAMES[DEFAULT_CHARACTER]
|
|
68
71
|
end
|
|
69
|
-
local
|
|
70
|
-
return {
|
|
72
|
+
local portraitPNGPath = (PLAYER_PORTRAIT_PNG_PATH_PREFIX .. "/") .. tostring(portraitFileName)
|
|
73
|
+
return {namePNGPath = namePNGPath, portraitPNGPath = portraitPNGPath}
|
|
71
74
|
end
|
|
72
|
-
function getBossPNGPaths(self)
|
|
75
|
+
function getBossPNGPaths(self, customStage)
|
|
76
|
+
local paths = getBossPNGPathsCustom(nil, customStage)
|
|
77
|
+
if paths ~= nil then
|
|
78
|
+
return paths
|
|
79
|
+
end
|
|
73
80
|
local bosses = getBosses(nil)
|
|
74
81
|
local firstBoss = bosses[1]
|
|
75
|
-
if firstBoss ~= nil then
|
|
76
|
-
local entityID = getEntityID(nil, firstBoss)
|
|
77
|
-
local pngPaths = customBossPNGPaths:get(entityID)
|
|
78
|
-
if pngPaths ~= nil then
|
|
79
|
-
return pngPaths
|
|
80
|
-
end
|
|
81
|
-
end
|
|
82
82
|
local bossID = firstBoss == nil and 0 or firstBoss:GetBossID()
|
|
83
83
|
if bossID == 0 then
|
|
84
84
|
local questionMarkSprite = (PNG_PATH_PREFIX .. "/") .. BOSS_NAME_PNG_FILE_NAMES[BossID.BLUE_BABY]
|
|
85
|
-
local
|
|
86
|
-
local
|
|
87
|
-
return {
|
|
88
|
-
end
|
|
89
|
-
local
|
|
90
|
-
local
|
|
91
|
-
local
|
|
92
|
-
local
|
|
93
|
-
return {
|
|
85
|
+
local namePNGPath = questionMarkSprite
|
|
86
|
+
local portraitPNGPath = questionMarkSprite
|
|
87
|
+
return {namePNGPath = namePNGPath, portraitPNGPath = portraitPNGPath}
|
|
88
|
+
end
|
|
89
|
+
local namePNGFileName = BOSS_NAME_PNG_FILE_NAMES[bossID]
|
|
90
|
+
local namePNGPath = (PNG_PATH_PREFIX .. "/") .. namePNGFileName
|
|
91
|
+
local portraitPNGFileName = BOSS_PORTRAIT_PNG_FILE_NAMES[bossID]
|
|
92
|
+
local portraitPNGPath = (PNG_PATH_PREFIX .. "/") .. portraitPNGFileName
|
|
93
|
+
return {namePNGPath = namePNGPath, portraitPNGPath = portraitPNGPath}
|
|
94
|
+
end
|
|
95
|
+
function getBossPNGPathsCustom(self, customStage)
|
|
96
|
+
if customStage.bossPool == nil then
|
|
97
|
+
return nil
|
|
98
|
+
end
|
|
99
|
+
local roomSubType = getRoomSubType(nil)
|
|
100
|
+
local matchingBossEntry = __TS__ArrayFind(
|
|
101
|
+
customStage.bossPool,
|
|
102
|
+
function(____, bossEntry) return bossEntry.subType == roomSubType end
|
|
103
|
+
)
|
|
104
|
+
if matchingBossEntry == nil then
|
|
105
|
+
return nil
|
|
106
|
+
end
|
|
107
|
+
return matchingBossEntry.versusScreen
|
|
94
108
|
end
|
|
95
109
|
DEFAULT_CHARACTER = PlayerType.ISAAC
|
|
96
110
|
local DEFAULT_STAGE_ID = StageID.BASEMENT
|
|
@@ -164,37 +178,46 @@ function ____exports.playVersusScreenAnimation(self, customStage)
|
|
|
164
178
|
v.run.showingBossVersusScreen = true
|
|
165
179
|
pause(nil)
|
|
166
180
|
hud:SetVisible(false)
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
181
|
+
disableAllSound(nil, CUSTOM_STAGE_FEATURE_NAME)
|
|
182
|
+
do
|
|
183
|
+
local ____getPlayerPNGPaths_result_0 = getPlayerPNGPaths(nil)
|
|
184
|
+
local namePNGPath = ____getPlayerPNGPaths_result_0.namePNGPath
|
|
185
|
+
local portraitPNGPath = ____getPlayerPNGPaths_result_0.portraitPNGPath
|
|
186
|
+
versusScreenSprite:ReplaceSpritesheet(PLAYER_NAME_ANM2_LAYER, namePNGPath)
|
|
187
|
+
versusScreenSprite:ReplaceSpritesheet(PLAYER_PORTRAIT_ANM2_LAYER, portraitPNGPath)
|
|
188
|
+
end
|
|
189
|
+
do
|
|
190
|
+
local ____getBossPNGPaths_result_1 = getBossPNGPaths(nil, customStage)
|
|
191
|
+
local namePNGPath = ____getBossPNGPaths_result_1.namePNGPath
|
|
192
|
+
local portraitPNGPath = ____getBossPNGPaths_result_1.portraitPNGPath
|
|
193
|
+
versusScreenSprite:ReplaceSpritesheet(BOSS_NAME_ANM2_LAYER, namePNGPath)
|
|
194
|
+
versusScreenSprite:ReplaceSpritesheet(BOSS_PORTRAIT_ANM2_LAYER, portraitPNGPath)
|
|
195
|
+
end
|
|
173
196
|
versusScreenSprite:LoadGraphics()
|
|
174
197
|
local backgroundColor = VERSUS_SCREEN_BACKGROUND_COLORS[DEFAULT_STAGE_ID]
|
|
175
|
-
local
|
|
176
|
-
if
|
|
177
|
-
|
|
178
|
-
end
|
|
179
|
-
if
|
|
180
|
-
local
|
|
181
|
-
local r =
|
|
182
|
-
local g =
|
|
183
|
-
local b =
|
|
184
|
-
local a =
|
|
198
|
+
local ____customStage_versusScreen_backgroundColor_2 = customStage.versusScreen
|
|
199
|
+
if ____customStage_versusScreen_backgroundColor_2 ~= nil then
|
|
200
|
+
____customStage_versusScreen_backgroundColor_2 = ____customStage_versusScreen_backgroundColor_2.backgroundColor
|
|
201
|
+
end
|
|
202
|
+
if ____customStage_versusScreen_backgroundColor_2 ~= nil then
|
|
203
|
+
local ____customStage_versusScreen_backgroundColor_4 = customStage.versusScreen.backgroundColor
|
|
204
|
+
local r = ____customStage_versusScreen_backgroundColor_4.r
|
|
205
|
+
local g = ____customStage_versusScreen_backgroundColor_4.g
|
|
206
|
+
local b = ____customStage_versusScreen_backgroundColor_4.b
|
|
207
|
+
local a = ____customStage_versusScreen_backgroundColor_4.a
|
|
185
208
|
backgroundColor = Color(r, g, b, a)
|
|
186
209
|
end
|
|
187
210
|
versusScreenBackgroundSprite.Color = backgroundColor
|
|
188
211
|
local dirtSpotColor = VERSUS_SCREEN_DIRT_SPOT_COLORS[DEFAULT_STAGE_ID]
|
|
189
|
-
local
|
|
190
|
-
if
|
|
191
|
-
|
|
192
|
-
end
|
|
193
|
-
if
|
|
194
|
-
local
|
|
195
|
-
local r =
|
|
196
|
-
local g =
|
|
197
|
-
local b =
|
|
212
|
+
local ____customStage_versusScreen_dirtSpotColor_5 = customStage.versusScreen
|
|
213
|
+
if ____customStage_versusScreen_dirtSpotColor_5 ~= nil then
|
|
214
|
+
____customStage_versusScreen_dirtSpotColor_5 = ____customStage_versusScreen_dirtSpotColor_5.dirtSpotColor
|
|
215
|
+
end
|
|
216
|
+
if ____customStage_versusScreen_dirtSpotColor_5 ~= nil then
|
|
217
|
+
local ____customStage_versusScreen_dirtSpotColor_7 = customStage.versusScreen.dirtSpotColor
|
|
218
|
+
local r = ____customStage_versusScreen_dirtSpotColor_7.r
|
|
219
|
+
local g = ____customStage_versusScreen_dirtSpotColor_7.g
|
|
220
|
+
local b = ____customStage_versusScreen_dirtSpotColor_7.b
|
|
198
221
|
dirtSpotColor = Color(r, g, b)
|
|
199
222
|
end
|
|
200
223
|
versusScreenDirtSpotSprite.Color = dirtSpotColor
|
|
@@ -208,16 +231,13 @@ local function finishVersusScreenAnimation(self)
|
|
|
208
231
|
v.run.showingBossVersusScreen = false
|
|
209
232
|
unpause(nil)
|
|
210
233
|
hud:SetVisible(true)
|
|
234
|
+
enableAllSound(nil, CUSTOM_STAGE_FEATURE_NAME)
|
|
211
235
|
sfxManager:Play(SoundEffect.CASTLE_PORTCULLIS)
|
|
212
236
|
end
|
|
213
237
|
function ____exports.versusScreenPostRender(self)
|
|
214
238
|
if not v.run.showingBossVersusScreen then
|
|
215
239
|
return
|
|
216
240
|
end
|
|
217
|
-
local isPaused = game:IsPaused()
|
|
218
|
-
if isPaused then
|
|
219
|
-
return
|
|
220
|
-
end
|
|
221
241
|
if versusScreenSprite:IsFinished(VERSUS_SCREEN_ANIMATION_NAME) then
|
|
222
242
|
finishVersusScreenAnimation(nil)
|
|
223
243
|
return
|
|
@@ -1,33 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
/// <reference types="isaac-typescript-definitions" />
|
|
3
|
-
/// <reference types="isaac-typescript-definitions" />
|
|
4
|
-
import { TrapdoorDestination } from "../../types/TrapdoorDestination";
|
|
1
|
+
import { LevelStage, StageType } from "isaac-typescript-definitions";
|
|
5
2
|
/**
|
|
6
|
-
* Helper function to spawn a trapdoor grid entity that will
|
|
7
|
-
*
|
|
3
|
+
* Helper function to spawn a trapdoor grid entity that will take a player to a custom stage. If you
|
|
4
|
+
* want to create a custom trapdoor that goes to a vanilla stage instead, use the
|
|
5
|
+
* `spawnCustomTrapdoorToVanilla` helper function.
|
|
6
|
+
*
|
|
7
|
+
* Custom trapdoors can have one or more of the following attributes:
|
|
8
8
|
*
|
|
9
9
|
* - custom destination (or custom logic for after the player enters)
|
|
10
10
|
* - custom graphics
|
|
11
11
|
* - custom logic for opening/closing
|
|
12
12
|
*
|
|
13
|
-
* You can use this function to take the player to your custom stage.
|
|
14
|
-
*
|
|
15
13
|
* Under the hood, the custom trapdoor is represented by a decoration grid entity and is manually
|
|
16
14
|
* respawned every time the player re-enters the room.
|
|
17
15
|
*
|
|
18
16
|
* @param gridIndexOrPosition The location in the room to spawn the trapdoor.
|
|
19
|
-
* @param
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
17
|
+
* @param customStageName The name of the custom stage.
|
|
18
|
+
* @param customStageFloorNum The floor of the custom stage. For most purposes, you should use 1 or
|
|
19
|
+
* 2.
|
|
20
|
+
* @param anm2Path Optional. The path to the anm2 file to use. By default, the vanilla trapdoor anm2
|
|
21
|
+
* of "gfx/grid/door_11_trapdoor.anm2" will be used. The specified anm2 file must
|
|
22
|
+
* have animations called "Opened", "Closed", and "Open Animation".
|
|
23
|
+
* @param spawnOpen Optional. Whether or not to spawn the trapdoor in an open state. By default,
|
|
24
|
+
* behavior will be used that emulates a vanilla trapdoor.
|
|
25
|
+
*/
|
|
26
|
+
export declare function spawnCustomTrapdoor(gridIndexOrPosition: int | Vector, customStageName: string, customStageFloorNum: int, anm2Path?: string, spawnOpen?: boolean): GridEntity;
|
|
27
|
+
/**
|
|
28
|
+
* This is the same thing as the `spawnCustomTrapdoor` function, but instead of having a destination
|
|
29
|
+
* of a custom stage, it has a destination of a vanilla stage.
|
|
30
|
+
*
|
|
31
|
+
* For more information, see the `spawnCustomTrapdoor` function.
|
|
32
|
+
*
|
|
33
|
+
* @param gridIndexOrPosition The location in the room to spawn the trapdoor.
|
|
34
|
+
* @param stage Optional. The number of the vanilla stage to go to. If not provided, the "normal"
|
|
35
|
+
* next stage will be selected.
|
|
36
|
+
* @param stageType The stage type of the vanilla stage to go to. If not provided, the "normal" next
|
|
37
|
+
* stage type will be selected.
|
|
26
38
|
* @param anm2Path Optional. The path to the anm2 file to use. By default, the vanilla trapdoor anm2
|
|
27
39
|
* of "gfx/grid/door_11_trapdoor.anm2" will be used. The specified anm2 file must
|
|
28
40
|
* have animations called "Opened", "Closed", and "Open Animation".
|
|
29
41
|
* @param spawnOpen Optional. Whether or not to spawn the trapdoor in an open state. By default,
|
|
30
42
|
* behavior will be used that emulates a vanilla trapdoor.
|
|
31
43
|
*/
|
|
32
|
-
export declare function
|
|
44
|
+
export declare function spawnCustomTrapdoorToVanilla(gridIndexOrPosition: int | Vector, stage?: LevelStage, stageType?: StageType, anm2Path?: string, spawnOpen?: boolean): GridEntity;
|
|
33
45
|
//# sourceMappingURL=exports.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../../src/features/customTrapdoor/exports.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../../src/features/customTrapdoor/exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAOrE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,mBAAmB,CACjC,mBAAmB,EAAE,GAAG,GAAG,MAAM,EACjC,eAAe,EAAE,MAAM,EACvB,mBAAmB,EAAE,GAAG,EACxB,QAAQ,SAAmC,EAC3C,SAAS,CAAC,EAAE,OAAO,GAClB,UAAU,CAcZ;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,4BAA4B,CAC1C,mBAAmB,EAAE,GAAG,GAAG,MAAM,EACjC,KAAK,CAAC,EAAE,UAAU,EAClB,SAAS,CAAC,EAAE,SAAS,EACrB,QAAQ,SAAmC,EAC3C,SAAS,CAAC,EAAE,OAAO,GAClB,UAAU,CAkBZ"}
|
|
@@ -1,94 +1,78 @@
|
|
|
1
|
-
local ____lualib = require("lualib_bundle")
|
|
2
|
-
local Map = ____lualib.Map
|
|
3
1
|
local ____exports = {}
|
|
4
|
-
local getDefaultDestination
|
|
5
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
|
-
local GridCollisionClass = ____isaac_2Dtypescript_2Ddefinitions.GridCollisionClass
|
|
7
|
-
local ____cachedClasses = require("core.cachedClasses")
|
|
8
|
-
local game = ____cachedClasses.game
|
|
9
|
-
local ____TrapdoorAnimation = require("enums.private.TrapdoorAnimation")
|
|
10
|
-
local TrapdoorAnimation = ____TrapdoorAnimation.TrapdoorAnimation
|
|
11
2
|
local ____featuresInitialized = require("featuresInitialized")
|
|
12
3
|
local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
|
|
13
4
|
local ____nextStage = require("functions.nextStage")
|
|
14
5
|
local getNextStage = ____nextStage.getNextStage
|
|
15
6
|
local getNextStageType = ____nextStage.getNextStageType
|
|
16
|
-
local ____roomData = require("functions.roomData")
|
|
17
|
-
local getRoomListIndex = ____roomData.getRoomListIndex
|
|
18
|
-
local ____vector = require("functions.vector")
|
|
19
|
-
local isVector = ____vector.isVector
|
|
20
|
-
local ____customGridEntity = require("features.customGridEntity")
|
|
21
|
-
local spawnCustomGridEntity = ____customGridEntity.spawnCustomGridEntity
|
|
22
7
|
local ____customTrapdoorConstants = require("features.customTrapdoor.customTrapdoorConstants")
|
|
23
8
|
local CUSTOM_TRAPDOOR_FEATURE_NAME = ____customTrapdoorConstants.CUSTOM_TRAPDOOR_FEATURE_NAME
|
|
24
|
-
local
|
|
25
|
-
local
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
local nextStageType = getNextStageType(nil)
|
|
32
|
-
return {nextStage, nextStageType}
|
|
33
|
-
end
|
|
34
|
-
--- Helper function to spawn a trapdoor grid entity that will have one or more of the following
|
|
35
|
-
-- attributes:
|
|
9
|
+
local ____spawn = require("features.customTrapdoor.spawn")
|
|
10
|
+
local spawnCustomTrapdoorToDestination = ____spawn.spawnCustomTrapdoorToDestination
|
|
11
|
+
--- Helper function to spawn a trapdoor grid entity that will take a player to a custom stage. If you
|
|
12
|
+
-- want to create a custom trapdoor that goes to a vanilla stage instead, use the
|
|
13
|
+
-- `spawnCustomTrapdoorToVanilla` helper function.
|
|
14
|
+
--
|
|
15
|
+
-- Custom trapdoors can have one or more of the following attributes:
|
|
36
16
|
--
|
|
37
17
|
-- - custom destination (or custom logic for after the player enters)
|
|
38
18
|
-- - custom graphics
|
|
39
19
|
-- - custom logic for opening/closing
|
|
40
20
|
--
|
|
41
|
-
-- You can use this function to take the player to your custom stage.
|
|
42
|
-
--
|
|
43
21
|
-- Under the hood, the custom trapdoor is represented by a decoration grid entity and is manually
|
|
44
22
|
-- respawned every time the player re-enters the room.
|
|
45
23
|
--
|
|
46
24
|
-- @param gridIndexOrPosition The location in the room to spawn the trapdoor.
|
|
47
|
-
-- @param
|
|
48
|
-
--
|
|
49
|
-
--
|
|
50
|
-
-- StageType.ORIGINAL]` corresponds to Caves 1, and a destination of
|
|
51
|
-
-- `["Slaughterhouse", 1]` corresponds to a custom stage of Slaughterhouse 1. If
|
|
52
|
-
-- the destination is undefined, then the "normal" destination corresponding to
|
|
53
|
-
-- the current stage and room will be used (e.g. the next floor, in most cases).
|
|
25
|
+
-- @param customStageName The name of the custom stage.
|
|
26
|
+
-- @param customStageFloorNum The floor of the custom stage. For most purposes, you should use 1 or
|
|
27
|
+
-- 2.
|
|
54
28
|
-- @param anm2Path Optional. The path to the anm2 file to use. By default, the vanilla trapdoor anm2
|
|
55
29
|
-- of "gfx/grid/door_11_trapdoor.anm2" will be used. The specified anm2 file must
|
|
56
30
|
-- have animations called "Opened", "Closed", and "Open Animation".
|
|
57
31
|
-- @param spawnOpen Optional. Whether or not to spawn the trapdoor in an open state. By default,
|
|
58
32
|
-- behavior will be used that emulates a vanilla trapdoor.
|
|
59
|
-
function ____exports.spawnCustomTrapdoor(self, gridIndexOrPosition,
|
|
33
|
+
function ____exports.spawnCustomTrapdoor(self, gridIndexOrPosition, customStageName, customStageFloorNum, anm2Path, spawnOpen)
|
|
60
34
|
if anm2Path == nil then
|
|
61
35
|
anm2Path = "gfx/grid/door_11_trapdoor.anm2"
|
|
62
36
|
end
|
|
63
37
|
errorIfFeaturesNotInitialized(nil, CUSTOM_TRAPDOOR_FEATURE_NAME)
|
|
64
|
-
local
|
|
65
|
-
|
|
66
|
-
local roomListIndex = getRoomListIndex(nil)
|
|
67
|
-
local gridIndex = isVector(nil, gridIndexOrPosition) and room:GetGridIndex(gridIndexOrPosition) or gridIndexOrPosition
|
|
68
|
-
local gridEntity = spawnCustomGridEntity(
|
|
38
|
+
local destination = {customStageName = customStageName, customStageFloorNum = customStageFloorNum}
|
|
39
|
+
return spawnCustomTrapdoorToDestination(
|
|
69
40
|
nil,
|
|
70
|
-
GridEntityTypeCustom.TRAPDOOR_CUSTOM,
|
|
71
41
|
gridIndexOrPosition,
|
|
72
|
-
|
|
42
|
+
destination,
|
|
73
43
|
anm2Path,
|
|
74
|
-
|
|
44
|
+
spawnOpen
|
|
75
45
|
)
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
46
|
+
end
|
|
47
|
+
--- This is the same thing as the `spawnCustomTrapdoor` function, but instead of having a destination
|
|
48
|
+
-- of a custom stage, it has a destination of a vanilla stage.
|
|
49
|
+
--
|
|
50
|
+
-- For more information, see the `spawnCustomTrapdoor` function.
|
|
51
|
+
--
|
|
52
|
+
-- @param gridIndexOrPosition The location in the room to spawn the trapdoor.
|
|
53
|
+
-- @param stage Optional. The number of the vanilla stage to go to. If not provided, the "normal"
|
|
54
|
+
-- next stage will be selected.
|
|
55
|
+
-- @param stageType The stage type of the vanilla stage to go to. If not provided, the "normal" next
|
|
56
|
+
-- stage type will be selected.
|
|
57
|
+
-- @param anm2Path Optional. The path to the anm2 file to use. By default, the vanilla trapdoor anm2
|
|
58
|
+
-- of "gfx/grid/door_11_trapdoor.anm2" will be used. The specified anm2 file must
|
|
59
|
+
-- have animations called "Opened", "Closed", and "Open Animation".
|
|
60
|
+
-- @param spawnOpen Optional. Whether or not to spawn the trapdoor in an open state. By default,
|
|
61
|
+
-- behavior will be used that emulates a vanilla trapdoor.
|
|
62
|
+
function ____exports.spawnCustomTrapdoorToVanilla(self, gridIndexOrPosition, stage, stageType, anm2Path, spawnOpen)
|
|
63
|
+
if anm2Path == nil then
|
|
64
|
+
anm2Path = "gfx/grid/door_11_trapdoor.anm2"
|
|
91
65
|
end
|
|
92
|
-
|
|
66
|
+
errorIfFeaturesNotInitialized(nil, CUSTOM_TRAPDOOR_FEATURE_NAME)
|
|
67
|
+
local vanillaStage = stage == nil and getNextStage(nil) or stage
|
|
68
|
+
local vanillaStageType = stageType == nil and getNextStageType(nil) or stageType
|
|
69
|
+
local destination = {vanillaStage = vanillaStage, vanillaStageType = vanillaStageType}
|
|
70
|
+
return spawnCustomTrapdoorToDestination(
|
|
71
|
+
nil,
|
|
72
|
+
gridIndexOrPosition,
|
|
73
|
+
destination,
|
|
74
|
+
anm2Path,
|
|
75
|
+
spawnOpen
|
|
76
|
+
)
|
|
93
77
|
end
|
|
94
78
|
return ____exports
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/features/customTrapdoor/init.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/features/customTrapdoor/init.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAyBxD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAUzD"}
|
|
@@ -2,7 +2,7 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local __TS__ArraySome = ____lualib.__TS__ArraySome
|
|
3
3
|
local Map = ____lualib.Map
|
|
4
4
|
local ____exports = {}
|
|
5
|
-
local postRender, checkAllPlayersJumpComplete, checkPixelationToBlackComplete, checkSecondPixelationHalfWay, checkAllPlayersLayingDownComplete,
|
|
5
|
+
local postRender, checkAllPlayersJumpComplete, checkPixelationToBlackComplete, checkSecondPixelationHalfWay, checkAllPlayersLayingDownComplete, goToCustomTrapdoorDestination, anyPlayerPlayingExtraAnimation, postPEffectUpdate, checkJumpComplete, postGridEntityCustomUpdateTrapdoor
|
|
6
6
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
7
|
local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
|
|
8
8
|
local EntityCollisionClass = ____isaac_2Dtypescript_2Ddefinitions.EntityCollisionClass
|
|
@@ -26,8 +26,6 @@ local ____roomTransition = require("functions.roomTransition")
|
|
|
26
26
|
local teleport = ____roomTransition.teleport
|
|
27
27
|
local ____stage = require("functions.stage")
|
|
28
28
|
local setStage = ____stage.setStage
|
|
29
|
-
local ____types = require("functions.types")
|
|
30
|
-
local isString = ____types.isString
|
|
31
29
|
local ____exports = require("features.customStage.exports")
|
|
32
30
|
local disableCustomStage = ____exports.disableCustomStage
|
|
33
31
|
local setCustomStage = ____exports.setCustomStage
|
|
@@ -93,7 +91,7 @@ function checkPixelationToBlackComplete(self)
|
|
|
93
91
|
local futureRenderFrameCount = Isaac.GetFrameCount()
|
|
94
92
|
v.run.state = StageTravelState.WAITING_FOR_SECOND_PIXELATION_TO_GET_HALF_WAY
|
|
95
93
|
v.run.stateRenderFrame = futureRenderFrameCount
|
|
96
|
-
|
|
94
|
+
goToCustomTrapdoorDestination(nil)
|
|
97
95
|
teleport(
|
|
98
96
|
nil,
|
|
99
97
|
startingRoomIndex,
|
|
@@ -145,17 +143,21 @@ function checkAllPlayersLayingDownComplete(self)
|
|
|
145
143
|
v.run.state = StageTravelState.NONE
|
|
146
144
|
enableAllInputs(nil, CUSTOM_TRAPDOOR_FEATURE_NAME)
|
|
147
145
|
end
|
|
148
|
-
function
|
|
146
|
+
function goToCustomTrapdoorDestination(self)
|
|
149
147
|
if v.run.destination == nil then
|
|
150
148
|
return
|
|
151
149
|
end
|
|
152
|
-
local
|
|
153
|
-
|
|
154
|
-
|
|
150
|
+
local ____v_run_destination_0 = v.run.destination
|
|
151
|
+
local customStageName = ____v_run_destination_0.customStageName
|
|
152
|
+
local customStageFloorNum = ____v_run_destination_0.customStageFloorNum
|
|
153
|
+
local vanillaStage = ____v_run_destination_0.vanillaStage
|
|
154
|
+
local vanillaStageType = ____v_run_destination_0.vanillaStageType
|
|
155
|
+
if customStageName ~= nil and customStageFloorNum ~= nil then
|
|
156
|
+
local firstFloor = customStageFloorNum == 1
|
|
155
157
|
setCustomStage(nil, "Slaughterhouse", firstFloor)
|
|
156
|
-
|
|
158
|
+
elseif vanillaStage ~= nil and vanillaStageType ~= nil then
|
|
157
159
|
disableCustomStage(nil)
|
|
158
|
-
setStage(nil,
|
|
160
|
+
setStage(nil, vanillaStage, vanillaStageType)
|
|
159
161
|
end
|
|
160
162
|
end
|
|
161
163
|
function anyPlayerPlayingExtraAnimation(self)
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
3
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
4
|
+
import { CustomTrapdoorDestination } from "../../interfaces/private/CustomTrapdoorDestination";
|
|
5
|
+
export declare function spawnCustomTrapdoorToDestination(gridIndexOrPosition: int | Vector, destination: CustomTrapdoorDestination, anm2Path: string, spawnOpen?: boolean): GridEntity;
|
|
6
|
+
//# sourceMappingURL=spawn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spawn.d.ts","sourceRoot":"","sources":["../../../src/features/customTrapdoor/spawn.ts"],"names":[],"mappings":";;;AAMA,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAM/F,wBAAgB,gCAAgC,CAC9C,mBAAmB,EAAE,GAAG,GAAG,MAAM,EACjC,WAAW,EAAE,yBAAyB,EACtC,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,OAAO,GAClB,UAAU,CAmCZ"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local Map = ____lualib.Map
|
|
3
|
+
local ____exports = {}
|
|
4
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
5
|
+
local GridCollisionClass = ____isaac_2Dtypescript_2Ddefinitions.GridCollisionClass
|
|
6
|
+
local ____cachedClasses = require("core.cachedClasses")
|
|
7
|
+
local game = ____cachedClasses.game
|
|
8
|
+
local ____TrapdoorAnimation = require("enums.private.TrapdoorAnimation")
|
|
9
|
+
local TrapdoorAnimation = ____TrapdoorAnimation.TrapdoorAnimation
|
|
10
|
+
local ____roomData = require("functions.roomData")
|
|
11
|
+
local getRoomListIndex = ____roomData.getRoomListIndex
|
|
12
|
+
local ____vector = require("functions.vector")
|
|
13
|
+
local isVector = ____vector.isVector
|
|
14
|
+
local ____customGridEntity = require("features.customGridEntity")
|
|
15
|
+
local spawnCustomGridEntity = ____customGridEntity.spawnCustomGridEntity
|
|
16
|
+
local ____customTrapdoorConstants = require("features.customTrapdoor.customTrapdoorConstants")
|
|
17
|
+
local GridEntityTypeCustom = ____customTrapdoorConstants.GridEntityTypeCustom
|
|
18
|
+
local ____openClose = require("features.customTrapdoor.openClose")
|
|
19
|
+
local shouldTrapdoorSpawnOpen = ____openClose.shouldTrapdoorSpawnOpen
|
|
20
|
+
local ____v = require("features.customTrapdoor.v")
|
|
21
|
+
local v = ____v.default
|
|
22
|
+
function ____exports.spawnCustomTrapdoorToDestination(self, gridIndexOrPosition, destination, anm2Path, spawnOpen)
|
|
23
|
+
local room = game:GetRoom()
|
|
24
|
+
local roomFrameCount = room:GetFrameCount()
|
|
25
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
26
|
+
local gridIndex = isVector(nil, gridIndexOrPosition) and room:GetGridIndex(gridIndexOrPosition) or gridIndexOrPosition
|
|
27
|
+
local gridEntity = spawnCustomGridEntity(
|
|
28
|
+
nil,
|
|
29
|
+
GridEntityTypeCustom.TRAPDOOR_CUSTOM,
|
|
30
|
+
gridIndexOrPosition,
|
|
31
|
+
GridCollisionClass.NONE,
|
|
32
|
+
anm2Path,
|
|
33
|
+
TrapdoorAnimation.OPENED
|
|
34
|
+
)
|
|
35
|
+
local firstSpawn = roomFrameCount ~= 0
|
|
36
|
+
local ____temp_0
|
|
37
|
+
if spawnOpen == nil then
|
|
38
|
+
____temp_0 = shouldTrapdoorSpawnOpen(nil, gridEntity, firstSpawn)
|
|
39
|
+
else
|
|
40
|
+
____temp_0 = spawnOpen
|
|
41
|
+
end
|
|
42
|
+
local open = ____temp_0
|
|
43
|
+
local roomTrapdoorMap = v.level.trapdoors:getAndSetDefault(roomListIndex)
|
|
44
|
+
local customTrapdoorDescription = {open = open, destination = destination, firstSpawn = firstSpawn}
|
|
45
|
+
roomTrapdoorMap:set(gridIndex, customTrapdoorDescription)
|
|
46
|
+
local sprite = gridEntity:GetSprite()
|
|
47
|
+
local animation = open and TrapdoorAnimation.OPENED or TrapdoorAnimation.CLOSED
|
|
48
|
+
sprite:Play(animation, true)
|
|
49
|
+
return gridEntity
|
|
50
|
+
end
|
|
51
|
+
return ____exports
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { DefaultMap } from "../../classes/DefaultMap";
|
|
2
2
|
import { StageTravelState } from "../../enums/private/StageTravelState";
|
|
3
3
|
import { CustomTrapdoorDescription } from "../../interfaces/private/CustomTrapdoorDescription";
|
|
4
|
-
import {
|
|
4
|
+
import { CustomTrapdoorDestination } from "../../interfaces/private/CustomTrapdoorDestination";
|
|
5
5
|
declare const v: {
|
|
6
6
|
run: {
|
|
7
7
|
state: StageTravelState;
|
|
8
8
|
/** The render frame that this state was reached. */
|
|
9
9
|
stateRenderFrame: number | null;
|
|
10
|
-
destination:
|
|
10
|
+
destination: CustomTrapdoorDestination | null;
|
|
11
11
|
};
|
|
12
12
|
level: {
|
|
13
13
|
/** Indexed by room list index and grid index. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v.d.ts","sourceRoot":"","sources":["../../../src/features/customTrapdoor/v.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"v.d.ts","sourceRoot":"","sources":["../../../src/features/customTrapdoor/v.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAE/F,QAAA,MAAM,CAAC;;;QAIH,oDAAoD;;;;;QAOpD,iDAAiD;;;CAKpD,CAAC;AACF,eAAe,CAAC,CAAC"}
|
|
@@ -6,8 +6,14 @@ export declare function closeAllDoors(): void;
|
|
|
6
6
|
*/
|
|
7
7
|
export declare function closeDoorFast(door: GridEntityDoor): void;
|
|
8
8
|
export declare function doorSlotFlagToDoorSlot(doorSlotFlag: DoorSlotFlag): DoorSlot;
|
|
9
|
+
export declare function doorSlotFlagsToDoorSlots(doorSlotFlags: BitFlags<DoorSlotFlag>): DoorSlot[];
|
|
9
10
|
export declare function doorSlotToDirection(doorSlot: DoorSlot): Direction;
|
|
10
11
|
export declare function doorSlotToDoorSlotFlag(doorSlot: DoorSlot): DoorSlotFlag;
|
|
12
|
+
/**
|
|
13
|
+
* Helper function to convert an array of door slots or a set of door slots to the resulting bit
|
|
14
|
+
* flag number.
|
|
15
|
+
*/
|
|
16
|
+
export declare function doorSlotsToDoorSlotFlags(doorSlots: DoorSlot[] | readonly DoorSlot[] | Set<DoorSlot> | ReadonlySet<DoorSlot>): BitFlags<DoorSlotFlag>;
|
|
11
17
|
export declare function getAngelRoomDoor(): GridEntityDoor | undefined;
|
|
12
18
|
export declare function getDevilRoomDoor(): GridEntityDoor | undefined;
|
|
13
19
|
/**
|
|
@@ -31,11 +37,6 @@ export declare function getDoorEnterPosition(door: GridEntityDoor): Readonly<Vec
|
|
|
31
37
|
* amount of units.
|
|
32
38
|
*/
|
|
33
39
|
export declare function getDoorSlotEnterPositionOffset(doorSlot: DoorSlot): Readonly<Vector>;
|
|
34
|
-
/**
|
|
35
|
-
* Helper function to convert an array of door slots or a set of door slots to the resulting bit
|
|
36
|
-
* flag number.
|
|
37
|
-
*/
|
|
38
|
-
export declare function getDoorSlotFlags(doorSlots: DoorSlot[] | readonly DoorSlot[] | Set<DoorSlot> | ReadonlySet<DoorSlot>): BitFlags<DoorSlotFlag>;
|
|
39
40
|
/** Helper function to get the possible door slots that can exist for a given room shape. */
|
|
40
41
|
export declare function getDoorSlotsForRoomShape(roomShape: RoomShape): ReadonlySet<DoorSlot>;
|
|
41
42
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doors.d.ts","sourceRoot":"","sources":["../../src/functions/doors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,YAAY,EAIZ,SAAS,EACT,QAAQ,EACT,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"doors.d.ts","sourceRoot":"","sources":["../../src/functions/doors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,YAAY,EAIZ,SAAS,EACT,QAAQ,EACT,MAAM,8BAA8B,CAAC;A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