isaacscript-common 7.6.0 → 7.7.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/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/init.d.ts.map +1 -1
- package/dist/features/customStage/init.lua +3 -1
- package/dist/features/customStage/versusScreen.d.ts.map +1 -1
- package/dist/features/customStage/versusScreen.lua +6 -0
- package/dist/features/customTrapdoor/spawn.d.ts.map +1 -1
- package/dist/features/customTrapdoor/spawn.lua +3 -4
- package/dist/features/extraConsoleCommands/commandsSubroutines.d.ts +1 -0
- package/dist/features/extraConsoleCommands/commandsSubroutines.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/commandsSubroutines.lua +31 -7
- package/dist/features/extraConsoleCommands/init.lua +1 -0
- package/dist/features/extraConsoleCommands/listCommands.d.ts +2 -0
- package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/listCommands.lua +5 -0
- package/dist/functions/levelGrid.d.ts +44 -12
- package/dist/functions/levelGrid.d.ts.map +1 -1
- package/dist/functions/levelGrid.lua +97 -59
- package/dist/interfaces/CustomStageTSConfig.d.ts +1 -1
- package/dist/interfaces/GridEntityCustomData.d.ts +2 -2
- package/dist/interfaces/GridEntityCustomData.d.ts.map +1 -1
- package/dist/objects/roomTypeNames.d.ts +0 -1
- package/dist/objects/roomTypeNames.d.ts.map +1 -1
- package/dist/objects/roomTypeNames.lua +0 -1
- package/package.json +1 -1
- package/src/features/customGridEntity.ts +30 -20
- package/src/features/customStage/customStageConstants.ts +2 -0
- package/src/features/customStage/init.ts +2 -1
- package/src/features/customStage/versusScreen.ts +7 -1
- package/src/features/customTrapdoor/spawn.ts +3 -4
- package/src/features/extraConsoleCommands/commandsSubroutines.ts +30 -9
- package/src/features/extraConsoleCommands/init.ts +1 -0
- package/src/features/extraConsoleCommands/listCommands.ts +6 -0
- package/src/functions/levelGrid.ts +126 -61
- package/src/interfaces/CustomStageTSConfig.ts +1 -1
- package/src/interfaces/GridEntityCustomData.ts +2 -2
- package/src/objects/roomTypeNames.ts +0 -2
|
@@ -28,8 +28,11 @@ export declare function customGridEntityInit(mod: ModUpgraded): void;
|
|
|
28
28
|
* @param gridIndexOrPosition The grid index or position in the room that you want to spawn the grid
|
|
29
29
|
* entity at. If a position is specified, the closest grid index will be
|
|
30
30
|
* used.
|
|
31
|
-
* @param gridCollisionClass The collision class that you want the custom grid entity to
|
|
32
|
-
*
|
|
31
|
+
* @param gridCollisionClass Optional. The collision class that you want the custom grid entity to
|
|
32
|
+
* have. If not specified, the grid collision class from the base grid
|
|
33
|
+
* entity will be used.
|
|
34
|
+
* @param anm2Path Optional. The path to the ANM2 file to use for the sprite. If not specified, the
|
|
35
|
+
* normal sprite from the base grid entity will be used.
|
|
33
36
|
* @param defaultAnimation Optional. The name of the animation to play after the sprite is
|
|
34
37
|
* initialized and after the player re-enters a room with this grid entity
|
|
35
38
|
* in it. If not specified, the default animation in the anm2 will be used.
|
|
@@ -38,7 +41,7 @@ export declare function customGridEntityInit(mod: ModUpgraded): void;
|
|
|
38
41
|
* @param baseGridEntityVariant Optional. The variant of the grid entity to use as a "base" for this
|
|
39
42
|
* custom grid entity. Default is 0.
|
|
40
43
|
*/
|
|
41
|
-
export declare function spawnCustomGridEntity(gridEntityTypeCustom: GridEntityType, gridIndexOrPosition: int | Vector, gridCollisionClass
|
|
44
|
+
export declare function spawnCustomGridEntity(gridEntityTypeCustom: GridEntityType, gridIndexOrPosition: int | Vector, gridCollisionClass?: GridCollisionClass, anm2Path?: string, defaultAnimation?: string, baseGridEntityType?: GridEntityType, baseGridEntityVariant?: number): GridEntity;
|
|
42
45
|
/**
|
|
43
46
|
* Helper function to remove a custom grid entity created by the `spawnCustomGrid` function.
|
|
44
47
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customGridEntity.d.ts","sourceRoot":"","sources":["../../src/features/customGridEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,kBAAkB,EAClB,cAAc,EAGf,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAerD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAoB1E,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAmB3D;
|
|
1
|
+
{"version":3,"file":"customGridEntity.d.ts","sourceRoot":"","sources":["../../src/features/customGridEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,kBAAkB,EAClB,cAAc,EAGf,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAerD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAoB1E,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAmB3D;AAoID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,qBAAqB,CACnC,oBAAoB,EAAE,cAAc,EACpC,mBAAmB,EAAE,GAAG,GAAG,MAAM,EACjC,kBAAkB,CAAC,EAAE,kBAAkB,EACvC,QAAQ,CAAC,EAAE,MAAM,EACjB,gBAAgB,CAAC,EAAE,MAAM,EACzB,kBAAkB,iBAA4B,EAC9C,qBAAqB,SAAI,GACxB,UAAU,CA8CZ;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CACpC,+BAA+B,EAAE,GAAG,GAAG,MAAM,GAAG,UAAU,EAC1D,UAAU,UAAO,GAChB,UAAU,GAAG,SAAS,CAuCxB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,KAAK,CAC5C;IAAC,UAAU,EAAE,UAAU;IAAE,IAAI,EAAE,oBAAoB;CAAC,CACrD,CAqBA;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,qBAAqB,EAAE,UAAU,GAAG,GAAG,GACtC,cAAc,GAAG,SAAS,CAsB5B;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,qBAAqB,EAAE,UAAU,GAAG,GAAG,GACtC,OAAO,CAOT"}
|
|
@@ -115,10 +115,12 @@ function postNewRoomReordered(self)
|
|
|
115
115
|
roomCustomGridEntities:delete(gridIndex)
|
|
116
116
|
goto __continue19
|
|
117
117
|
end
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
118
|
+
if data.anm2Path ~= nil then
|
|
119
|
+
local sprite = decoration:GetSprite()
|
|
120
|
+
sprite:Load(data.anm2Path, true)
|
|
121
|
+
local animationToPlay = data.defaultAnimation == nil and sprite:GetDefaultAnimation() or data.defaultAnimation
|
|
122
|
+
sprite:Play(animationToPlay, true)
|
|
123
|
+
end
|
|
122
124
|
end
|
|
123
125
|
::__continue19::
|
|
124
126
|
end
|
|
@@ -165,8 +167,11 @@ end
|
|
|
165
167
|
-- @param gridIndexOrPosition The grid index or position in the room that you want to spawn the grid
|
|
166
168
|
-- entity at. If a position is specified, the closest grid index will be
|
|
167
169
|
-- used.
|
|
168
|
-
-- @param gridCollisionClass The collision class that you want the custom grid entity to
|
|
169
|
-
--
|
|
170
|
+
-- @param gridCollisionClass Optional. The collision class that you want the custom grid entity to
|
|
171
|
+
-- have. If not specified, the grid collision class from the base grid
|
|
172
|
+
-- entity will be used.
|
|
173
|
+
-- @param anm2Path Optional. The path to the ANM2 file to use for the sprite. If not specified, the
|
|
174
|
+
-- normal sprite from the base grid entity will be used.
|
|
170
175
|
-- @param defaultAnimation Optional. The name of the animation to play after the sprite is
|
|
171
176
|
-- initialized and after the player re-enters a room with this grid entity
|
|
172
177
|
-- in it. If not specified, the default animation in the anm2 will be used.
|
|
@@ -189,11 +194,15 @@ function ____exports.spawnCustomGridEntity(self, gridEntityTypeCustom, gridIndex
|
|
|
189
194
|
if customGridEntity == nil then
|
|
190
195
|
error("Failed to spawn a custom grid entity.")
|
|
191
196
|
end
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
+
if gridCollisionClass ~= nil then
|
|
198
|
+
customGridEntity.CollisionClass = gridCollisionClass
|
|
199
|
+
end
|
|
200
|
+
if anm2Path ~= nil then
|
|
201
|
+
local sprite = customGridEntity:GetSprite()
|
|
202
|
+
sprite:Load(anm2Path, true)
|
|
203
|
+
local animationToPlay = defaultAnimation == nil and sprite:GetDefaultAnimation() or defaultAnimation
|
|
204
|
+
sprite:Play(animationToPlay, true)
|
|
205
|
+
end
|
|
197
206
|
local customGridEntityData = {
|
|
198
207
|
gridEntityTypeCustom = gridEntityTypeCustom,
|
|
199
208
|
roomListIndex = roomListIndex,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
export declare const CUSTOM_STAGE_FEATURE_NAME = "customStage";
|
|
2
3
|
export declare const ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH = "gfx/isaacscript-custom-stage";
|
|
3
4
|
/** Corresponds to "ui_streak.anm2". */
|
|
4
5
|
export declare enum UIStreakAnimation {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customStageConstants.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/customStageConstants.ts"],"names":[],"mappings":";AAAA,eAAO,MAAM,iCAAiC,iCAAiC,CAAC;AAEhF,uCAAuC;AACvC,oBAAY,iBAAiB;IAC3B,IAAI,IAAA;IACJ,IAAI,IAAA;IACJ,SAAS,IAAA;CACV;AAED,uCAAuC;AACvC,eAAO,MAAM,8BAA8B,EAAE;IAC3C,QAAQ,EAAE,GAAG,IAAI,iBAAiB,GAAG,GAAG;CAKhC,CAAC"}
|
|
1
|
+
{"version":3,"file":"customStageConstants.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/customStageConstants.ts"],"names":[],"mappings":";AAAA,eAAO,MAAM,yBAAyB,gBAAgB,CAAC;AAEvD,eAAO,MAAM,iCAAiC,iCAAiC,CAAC;AAEhF,uCAAuC;AACvC,oBAAY,iBAAiB;IAC3B,IAAI,IAAA;IACJ,IAAI,IAAA;IACJ,SAAS,IAAA;CACV;AAED,uCAAuC;AACvC,eAAO,MAAM,8BAA8B,EAAE;IAC3C,QAAQ,EAAE,GAAG,IAAI,iBAAiB,GAAG,GAAG;CAKhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/init.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/init.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AA8BxD,wBAAgB,eAAe,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CA0BtD"}
|
|
@@ -19,6 +19,8 @@ local ____exports = require("features.saveDataManager.exports")
|
|
|
19
19
|
local saveDataManager = ____exports.saveDataManager
|
|
20
20
|
local ____backdrop = require("features.customStage.backdrop")
|
|
21
21
|
local setCustomStageBackdrop = ____backdrop.setCustomStageBackdrop
|
|
22
|
+
local ____customStageConstants = require("features.customStage.customStageConstants")
|
|
23
|
+
local CUSTOM_STAGE_FEATURE_NAME = ____customStageConstants.CUSTOM_STAGE_FEATURE_NAME
|
|
22
24
|
local ____customStageGridEntities = require("features.customStage.customStageGridEntities")
|
|
23
25
|
local convertVanillaTrapdoors = ____customStageGridEntities.convertVanillaTrapdoors
|
|
24
26
|
local removeUrnRewards = ____customStageGridEntities.removeUrnRewards
|
|
@@ -133,7 +135,7 @@ function ____exports.customStageInit(self, mod)
|
|
|
133
135
|
if customStagesMap.size == 0 then
|
|
134
136
|
return
|
|
135
137
|
end
|
|
136
|
-
saveDataManager(nil,
|
|
138
|
+
saveDataManager(nil, CUSTOM_STAGE_FEATURE_NAME, v)
|
|
137
139
|
versusScreenInit(nil)
|
|
138
140
|
mod:AddCallback(ModCallback.POST_RENDER, postRender)
|
|
139
141
|
mod:AddCallback(ModCallback.POST_CURSE_EVAL, postCurseEval)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versusScreen.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/versusScreen.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"versusScreen.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/versusScreen.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AA+EnE;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAavC;AAED,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CA4ExE;AAmGD,wBAAgB,sBAAsB,IAAI,IAAI,CAkC7C"}
|
|
@@ -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
|
|
@@ -174,6 +178,7 @@ function ____exports.playVersusScreenAnimation(self, customStage)
|
|
|
174
178
|
v.run.showingBossVersusScreen = true
|
|
175
179
|
pause(nil)
|
|
176
180
|
hud:SetVisible(false)
|
|
181
|
+
disableAllSound(nil, CUSTOM_STAGE_FEATURE_NAME)
|
|
177
182
|
do
|
|
178
183
|
local ____getPlayerPNGPaths_result_0 = getPlayerPNGPaths(nil)
|
|
179
184
|
local namePNGPath = ____getPlayerPNGPaths_result_0.namePNGPath
|
|
@@ -226,6 +231,7 @@ local function finishVersusScreenAnimation(self)
|
|
|
226
231
|
v.run.showingBossVersusScreen = false
|
|
227
232
|
unpause(nil)
|
|
228
233
|
hud:SetVisible(true)
|
|
234
|
+
enableAllSound(nil, CUSTOM_STAGE_FEATURE_NAME)
|
|
229
235
|
sfxManager:Play(SoundEffect.CASTLE_PORTCULLIS)
|
|
230
236
|
end
|
|
231
237
|
function ____exports.versusScreenPostRender(self)
|
|
@@ -1 +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,
|
|
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"}
|
|
@@ -43,10 +43,9 @@ function ____exports.spawnCustomTrapdoorToDestination(self, gridIndexOrPosition,
|
|
|
43
43
|
local roomTrapdoorMap = v.level.trapdoors:getAndSetDefault(roomListIndex)
|
|
44
44
|
local customTrapdoorDescription = {open = open, destination = destination, firstSpawn = firstSpawn}
|
|
45
45
|
roomTrapdoorMap:set(gridIndex, customTrapdoorDescription)
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
end
|
|
46
|
+
local sprite = gridEntity:GetSprite()
|
|
47
|
+
local animation = open and TrapdoorAnimation.OPENED or TrapdoorAnimation.CLOSED
|
|
48
|
+
sprite:Play(animation, true)
|
|
50
49
|
return gridEntity
|
|
51
50
|
end
|
|
52
51
|
return ____exports
|
|
@@ -7,4 +7,5 @@ export declare function listGridEntities(params: string, includeWalls: boolean):
|
|
|
7
7
|
export declare function movePlayer(params: string, direction: Direction): void;
|
|
8
8
|
export declare function spawnTrapdoorOrCrawlSpace(trapdoor: boolean): void;
|
|
9
9
|
export declare function warpToRoomType(roomType: RoomType): void;
|
|
10
|
+
export declare function warpNextToRoomType(roomType: RoomType): void;
|
|
10
11
|
//# sourceMappingURL=commandsSubroutines.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandsSubroutines.d.ts","sourceRoot":"","sources":["../../../src/features/extraConsoleCommands/commandsSubroutines.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAIT,QAAQ,EACT,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAmBpD,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI,CAcrE;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAqBlD;AAED,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,EACd,wBAAwB,EAAE,OAAO,GAChC,IAAI,CAYN;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,GAAG,IAAI,CAY5E;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI,CAgBrE;AAED,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAUjE;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"commandsSubroutines.d.ts","sourceRoot":"","sources":["../../../src/features/extraConsoleCommands/commandsSubroutines.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAIT,QAAQ,EACT,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAmBpD,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI,CAcrE;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAqBlD;AAED,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,EACd,wBAAwB,EAAE,OAAO,GAChC,IAAI,CAYN;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,GAAG,IAAI,CAY5E;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI,CAgBrE;AAED,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAUjE;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAWvD;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAuB3D"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local Map = ____lualib.Map
|
|
3
|
+
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
1
4
|
local ____exports = {}
|
|
2
5
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
6
|
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
@@ -12,6 +15,7 @@ local directionToVector = ____direction.directionToVector
|
|
|
12
15
|
local ____gridEntities = require("functions.gridEntities")
|
|
13
16
|
local spawnGridEntityWithVariant = ____gridEntities.spawnGridEntityWithVariant
|
|
14
17
|
local ____levelGrid = require("functions.levelGrid")
|
|
18
|
+
local getRoomAdjacentGridIndexes = ____levelGrid.getRoomAdjacentGridIndexes
|
|
15
19
|
local getRoomGridIndexesForType = ____levelGrid.getRoomGridIndexesForType
|
|
16
20
|
local ____logEntities = require("functions.logEntities")
|
|
17
21
|
local logAllEntities = ____logEntities.logAllEntities
|
|
@@ -26,7 +30,6 @@ local changeRoom = ____rooms.changeRoom
|
|
|
26
30
|
local ____utils = require("functions.utils")
|
|
27
31
|
local printConsole = ____utils.printConsole
|
|
28
32
|
local ____roomTypeNames = require("objects.roomTypeNames")
|
|
29
|
-
local DEFAULT_ROOM_TYPE_NAME = ____roomTypeNames.DEFAULT_ROOM_TYPE_NAME
|
|
30
33
|
local ROOM_TYPE_NAMES = ____roomTypeNames.ROOM_TYPE_NAMES
|
|
31
34
|
local DEFAULT_MOVE_UNITS = 0.5
|
|
32
35
|
function ____exports.addHeart(self, params, healthType)
|
|
@@ -109,12 +112,6 @@ function ____exports.spawnTrapdoorOrCrawlSpace(self, trapdoor)
|
|
|
109
112
|
end
|
|
110
113
|
function ____exports.warpToRoomType(self, roomType)
|
|
111
114
|
local roomTypeName = ROOM_TYPE_NAMES[roomType]
|
|
112
|
-
if roomTypeName == DEFAULT_ROOM_TYPE_NAME then
|
|
113
|
-
printConsole(
|
|
114
|
-
nil,
|
|
115
|
-
"Invalid room type: " .. tostring(roomType)
|
|
116
|
-
)
|
|
117
|
-
end
|
|
118
115
|
local gridIndexes = getRoomGridIndexesForType(nil, roomType)
|
|
119
116
|
local firstGridIndex = gridIndexes[1]
|
|
120
117
|
if firstGridIndex == nil then
|
|
@@ -127,4 +124,31 @@ function ____exports.warpToRoomType(self, roomType)
|
|
|
127
124
|
((("Warped to room type: " .. roomTypeName) .. " (") .. tostring(roomType)) .. ")"
|
|
128
125
|
)
|
|
129
126
|
end
|
|
127
|
+
function ____exports.warpNextToRoomType(self, roomType)
|
|
128
|
+
local roomTypeName = ROOM_TYPE_NAMES[roomType]
|
|
129
|
+
local gridIndexes = getRoomGridIndexesForType(nil, roomType)
|
|
130
|
+
local firstGridIndex = gridIndexes[1]
|
|
131
|
+
if firstGridIndex == nil then
|
|
132
|
+
printConsole(nil, ("There are no " .. roomTypeName) .. "s on this floor.")
|
|
133
|
+
return
|
|
134
|
+
end
|
|
135
|
+
local adjacentRoomGridIndexes = getRoomAdjacentGridIndexes(nil, firstGridIndex)
|
|
136
|
+
for ____, ____value in __TS__Iterator(adjacentRoomGridIndexes:entries()) do
|
|
137
|
+
local _doorSlot = ____value[1]
|
|
138
|
+
local roomGridIndex = ____value[2]
|
|
139
|
+
local roomData = getRoomData(nil, roomGridIndex)
|
|
140
|
+
if roomData ~= nil and roomData.Type == RoomType.DEFAULT then
|
|
141
|
+
changeRoom(nil, firstGridIndex)
|
|
142
|
+
printConsole(
|
|
143
|
+
nil,
|
|
144
|
+
((("Warped next to room type: " .. roomTypeName) .. " (") .. tostring(roomType)) .. ")"
|
|
145
|
+
)
|
|
146
|
+
return
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
printConsole(
|
|
150
|
+
nil,
|
|
151
|
+
((("Failed to find the room next to room type: " .. roomTypeName) .. " (") .. tostring(roomType)) .. ")"
|
|
152
|
+
)
|
|
153
|
+
end
|
|
130
154
|
return ____exports
|
|
@@ -42,6 +42,7 @@ function initMap(self)
|
|
|
42
42
|
extraConsoleCommandsFunctionMap:set("bombsDisplay", commandsDisplay.bombsDisplay)
|
|
43
43
|
extraConsoleCommandsFunctionMap:set("bombs", commands.bombs)
|
|
44
44
|
extraConsoleCommandsFunctionMap:set("boneHearts", commands.boneHearts)
|
|
45
|
+
extraConsoleCommandsFunctionMap:set("bossNextRoom", commands.bossNextRoom)
|
|
45
46
|
extraConsoleCommandsFunctionMap:set("bossRoom", commands.bossRoom)
|
|
46
47
|
extraConsoleCommandsFunctionMap:set("bossRush", commands.bossRush)
|
|
47
48
|
extraConsoleCommandsFunctionMap:set("brokenHearts", commands.brokenHearts)
|
|
@@ -44,6 +44,8 @@ export declare function bombs(params: string): void;
|
|
|
44
44
|
* numbers to remove hearts.)
|
|
45
45
|
*/
|
|
46
46
|
export declare function boneHearts(params: string): void;
|
|
47
|
+
/** Warps to the room next to the first Boss Room on the floor. */
|
|
48
|
+
export declare function bossNextRoom(): void;
|
|
47
49
|
/** Warps to the first Boss Room on the floor. */
|
|
48
50
|
export declare function bossRoom(): void;
|
|
49
51
|
/** Warps to the Boss Rush for the floor. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listCommands.d.ts","sourceRoot":"","sources":["../../../src/features/extraConsoleCommands/listCommands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"listCommands.d.ts","sourceRoot":"","sources":["../../../src/features/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,MAAM,EAAE,MAAM,GAAG,IAAI,CAQ1C;AAED,6EAA6E;AAC7E,wBAAgB,MAAM,IAAI,IAAI,CAK7B;AAED;;;GAGG;AACH,wBAAgB,IAAI,IAAI,IAAI,CAG3B;AAED,6DAA6D;AAC7D,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAkBvD;AAED,gEAAgE;AAChE,wBAAgB,KAAK,IAAI,IAAI,CAY5B;AAED,+CAA+C;AAC/C,wBAAgB,YAAY,IAAI,IAAI,CAInC;AAED,4CAA4C;AAC5C,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED,yDAAyD;AACzD,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAED;;;GAGG;AACH,wBAAgB,KAAK,IAAI,IAAI,CAQ5B;AAED,wCAAwC;AACxC,wBAAgB,KAAK,IAAI,IAAI,CAE5B;AAED,6CAA6C;AAC7C,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAED,qDAAqD;AACrD,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAED,yDAAyD;AACzD,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAED,sFAAsF;AACtF,wBAAgB,MAAM,IAAI,IAAI,CAQ7B;AAED,wFAAwF;AACxF,wBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEvC;AAED;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA0BzC"}
|
|
@@ -107,6 +107,7 @@ local listEntities = ____commandsSubroutines.listEntities
|
|
|
107
107
|
local listGridEntities = ____commandsSubroutines.listGridEntities
|
|
108
108
|
local movePlayer = ____commandsSubroutines.movePlayer
|
|
109
109
|
local spawnTrapdoorOrCrawlSpace = ____commandsSubroutines.spawnTrapdoorOrCrawlSpace
|
|
110
|
+
local warpNextToRoomType = ____commandsSubroutines.warpNextToRoomType
|
|
110
111
|
local warpToRoomType = ____commandsSubroutines.warpToRoomType
|
|
111
112
|
local ____v = require("features.extraConsoleCommands.v")
|
|
112
113
|
local v = ____v.default
|
|
@@ -322,6 +323,10 @@ end
|
|
|
322
323
|
function ____exports.boneHearts(self, params)
|
|
323
324
|
addHeart(nil, params, HealthType.BONE)
|
|
324
325
|
end
|
|
326
|
+
--- Warps to the room next to the first Boss Room on the floor.
|
|
327
|
+
function ____exports.bossNextRoom(self)
|
|
328
|
+
warpNextToRoomType(nil, RoomType.BOSS)
|
|
329
|
+
end
|
|
325
330
|
--- Warps to the first Boss Room on the floor.
|
|
326
331
|
function ____exports.bossRoom(self)
|
|
327
332
|
warpToRoomType(nil, RoomType.BOSS)
|
|
@@ -8,7 +8,23 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { DoorSlot, RoomShape, RoomType } from "isaac-typescript-definitions";
|
|
10
10
|
/**
|
|
11
|
-
* Helper function to get the room grid indexes that
|
|
11
|
+
* Helper function to get only the adjacent room grid indexes that exist (i.e. have room data).
|
|
12
|
+
*
|
|
13
|
+
* This is just a filtering of the results of the `getAdjacentExistingRoomGridIndexes` function. See
|
|
14
|
+
* that function for more information.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getAdjacentExistingRoomGridIndexes(roomGridIndex?: int): int[];
|
|
17
|
+
/**
|
|
18
|
+
* Helper function to get only the adjacent room grid indexes that do not exist (i.e. do not have
|
|
19
|
+
* room data).
|
|
20
|
+
*
|
|
21
|
+
* This is just a filtering of the results of the `getAdjacentExistingRoomGridIndexes` function. See
|
|
22
|
+
* that function for more information.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getAdjacentNonExistingRoomGridIndexes(roomGridIndex?: int): int[];
|
|
25
|
+
/**
|
|
26
|
+
* Helper function to get all of the room grid indexes that are adjacent to a given room grid index
|
|
27
|
+
* (even if those room grid indexes do not have any rooms in them).
|
|
12
28
|
*
|
|
13
29
|
* Adjacent room grid indexes that are outside of the grid will not be included in the returned
|
|
14
30
|
* array.
|
|
@@ -54,6 +70,17 @@ export declare function getNewRoomCandidatesForLevel(): Array<[
|
|
|
54
70
|
doorSlot: DoorSlot,
|
|
55
71
|
newRoomGridIndex: int
|
|
56
72
|
]>;
|
|
73
|
+
/**
|
|
74
|
+
* Helper function to get the grid indexes of all the rooms connected to the given room index,
|
|
75
|
+
* taking the shape of the room into account. (This will only include rooms with valid data.)
|
|
76
|
+
*
|
|
77
|
+
* Returns an empty map if the provided room grid index is out of bounds or has no associated room
|
|
78
|
+
* data.
|
|
79
|
+
*
|
|
80
|
+
* @param roomGridIndex Optional. Default is the current room index.
|
|
81
|
+
* @returns A map of `DoorSlot` to the corresponding room grid index.
|
|
82
|
+
*/
|
|
83
|
+
export declare function getRoomAdjacentGridIndexes(roomGridIndex?: int): Map<DoorSlot, int>;
|
|
57
84
|
/**
|
|
58
85
|
* Helper function to get an array of all of the safe grid indexes for rooms that match the
|
|
59
86
|
* specified room type.
|
|
@@ -65,25 +92,22 @@ export declare function getNewRoomCandidatesForLevel(): Array<[
|
|
|
65
92
|
*/
|
|
66
93
|
export declare function getRoomGridIndexesForType(...roomTypes: RoomType[]): int[];
|
|
67
94
|
/**
|
|
68
|
-
* Helper function to get the grid indexes
|
|
69
|
-
*
|
|
95
|
+
* Helper function to get only the adjacent room grid indexes for a room shape that exist (i.e. have
|
|
96
|
+
* room data).
|
|
70
97
|
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* @param roomGridIndex Optional. Default is the current room index.
|
|
75
|
-
* @returns A map of `DoorSlot` to the corresponding room grid index.
|
|
98
|
+
* This is just a filtering of the results of the `getRoomShapeAdjacentGridIndexes` function. See
|
|
99
|
+
* that function for more information.
|
|
76
100
|
*/
|
|
77
|
-
export declare function
|
|
101
|
+
export declare function getRoomShapeAdjacentExistingGridIndexes(safeRoomGridIndex: int, roomShape: RoomShape): Map<DoorSlot, int>;
|
|
78
102
|
/**
|
|
79
103
|
* Helper function to get the room grid index delta that each hypothetical door in a given room
|
|
80
104
|
* shape would go to.
|
|
81
105
|
*
|
|
82
|
-
* This is used by the `
|
|
106
|
+
* This is used by the `getRoomShapeAdjacentGridIndexes` function.
|
|
83
107
|
*
|
|
84
108
|
* @returns A map of `DoorSlot` to the corresponding room grid index delta.
|
|
85
109
|
*/
|
|
86
|
-
export declare function
|
|
110
|
+
export declare function getRoomShapeAdjacentGridIndexDeltas(roomShape: RoomShape): Map<DoorSlot, int>;
|
|
87
111
|
/**
|
|
88
112
|
* Helper function to get the room grid index that each hypothetical door in a given room shape
|
|
89
113
|
* would go to. (This will not include room grid indexes that are outside of the grid.)
|
|
@@ -93,7 +117,15 @@ export declare function getRoomShapeNeighborGridIndexDeltas(roomShape: RoomShape
|
|
|
93
117
|
* @param roomShape The shape of the room.
|
|
94
118
|
* @returns A map of `DoorSlot` to the corresponding room grid index.
|
|
95
119
|
*/
|
|
96
|
-
export declare function
|
|
120
|
+
export declare function getRoomShapeAdjacentGridIndexes(safeRoomGridIndex: int, roomShape: RoomShape): Map<DoorSlot, int>;
|
|
121
|
+
/**
|
|
122
|
+
* Helper function to get only the adjacent room grid indexes for a room shape that do not exist
|
|
123
|
+
* (i.e. do not have room data).
|
|
124
|
+
*
|
|
125
|
+
* This is just a filtering of the results of the `getRoomShapeAdjacentGridIndexes` function. See
|
|
126
|
+
* that function for more information.
|
|
127
|
+
*/
|
|
128
|
+
export declare function getRoomShapeAdjacentNonExistingGridIndexes(safeRoomGridIndex: int, roomShape: RoomShape): Map<DoorSlot, int>;
|
|
97
129
|
/**
|
|
98
130
|
* Helper function to check if the given room grid index is a dead end. Specifically, this is
|
|
99
131
|
* defined as having only one adjacent room that exists.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"levelGrid.d.ts","sourceRoot":"","sources":["../../src/functions/levelGrid.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAEL,QAAQ,EAKR,SAAS,EACT,QAAQ,EACT,MAAM,8BAA8B,CAAC;AA8BtC
|
|
1
|
+
{"version":3,"file":"levelGr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