isaacscript-common 6.20.2 → 6.21.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/constantsFirstLast.d.ts +2 -2
- package/dist/constantsFirstLast.lua +2 -2
- package/dist/enums/RockAltType.d.ts +12 -1
- package/dist/enums/RockAltType.d.ts.map +1 -1
- package/dist/enums/RockAltType.lua +4 -2
- package/dist/features/customStage/backdrop.d.ts.map +1 -1
- package/dist/features/customStage/backdrop.lua +3 -2
- package/dist/features/customStage/customStageConstants.d.ts +11 -0
- package/dist/features/customStage/customStageConstants.d.ts.map +1 -1
- package/dist/features/customStage/customStageConstants.lua +10 -0
- package/dist/features/customStage/customStageGridEntities.d.ts +1 -0
- package/dist/features/customStage/customStageGridEntities.d.ts.map +1 -1
- package/dist/features/customStage/customStageGridEntities.lua +58 -23
- package/dist/features/customStage/exports.d.ts +4 -5
- package/dist/features/customStage/exports.d.ts.map +1 -1
- package/dist/features/customStage/exports.lua +49 -51
- package/dist/features/customStage/init.d.ts.map +1 -1
- package/dist/features/customStage/init.lua +7 -12
- package/dist/features/customStage/shadows.d.ts.map +1 -1
- package/dist/features/customStage/shadows.lua +2 -1
- package/dist/features/customStage/streakText.d.ts +0 -7
- package/dist/features/customStage/streakText.d.ts.map +1 -1
- package/dist/features/customStage/streakText.lua +51 -84
- package/dist/features/customStage/v.d.ts +13 -0
- package/dist/features/customStage/v.d.ts.map +1 -1
- package/dist/features/customStage/v.lua +6 -1
- package/dist/features/customTrapdoor/exports.d.ts +7 -6
- package/dist/features/customTrapdoor/exports.d.ts.map +1 -1
- package/dist/features/customTrapdoor/exports.lua +6 -5
- package/dist/features/customTrapdoor/init.d.ts.map +1 -1
- package/dist/features/customTrapdoor/init.lua +11 -6
- package/dist/features/customTrapdoor/touched.lua +0 -1
- package/dist/features/customTrapdoor/v.d.ts +1 -1
- package/dist/features/extraConsoleCommands/commandsSubroutines.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/commandsSubroutines.lua +3 -3
- package/dist/features/saveDataManager/exports.d.ts +3 -0
- package/dist/features/saveDataManager/exports.d.ts.map +1 -1
- package/dist/features/saveDataManager/exports.lua +3 -0
- package/dist/functions/collectibleSet.d.ts +1 -1
- package/dist/functions/collectibleSet.lua +1 -1
- package/dist/functions/doors.d.ts +10 -0
- package/dist/functions/doors.d.ts.map +1 -1
- package/dist/functions/doors.lua +6 -0
- package/dist/functions/log.d.ts +1 -15
- package/dist/functions/log.d.ts.map +1 -1
- package/dist/functions/log.lua +3 -218
- package/dist/functions/logEntities.d.ts +16 -0
- package/dist/functions/logEntities.d.ts.map +1 -0
- package/dist/functions/logEntities.lua +220 -0
- package/dist/functions/rockAlt.d.ts +6 -5
- package/dist/functions/rockAlt.d.ts.map +1 -1
- package/dist/functions/rockAlt.lua +147 -18
- package/dist/functions/roomTransition.d.ts +26 -0
- package/dist/functions/roomTransition.d.ts.map +1 -0
- package/dist/functions/roomTransition.lua +75 -0
- package/dist/functions/rooms.d.ts +1 -18
- package/dist/functions/rooms.d.ts.map +1 -1
- package/dist/functions/rooms.lua +3 -52
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.lua +8 -0
- package/dist/interfaces/private/CustomTrapdoorDescription.d.ts +1 -1
- package/dist/interfaces/private/CustomTrapdoorDescription.d.ts.map +1 -1
- package/dist/objects/backdropTypeToRockAltType.lua +3 -3
- package/package.json +1 -1
- package/src/constantsFirstLast.ts +2 -2
- package/src/enums/RockAltType.ts +14 -1
- package/src/features/customStage/backdrop.ts +2 -1
- package/src/features/customStage/customStageConstants.ts +16 -0
- package/src/features/customStage/customStageGridEntities.ts +47 -0
- package/src/features/customStage/exports.ts +44 -40
- package/src/features/customStage/init.ts +7 -18
- package/src/features/customStage/shadows.ts +2 -1
- package/src/features/customStage/streakText.ts +58 -95
- package/src/features/customStage/v.ts +17 -0
- package/src/features/customTrapdoor/exports.ts +9 -6
- package/src/features/customTrapdoor/init.ts +16 -5
- package/src/features/customTrapdoor/touched.ts +0 -2
- package/src/features/customTrapdoor/v.ts +1 -1
- package/src/features/extraConsoleCommands/commandsSubroutines.ts +4 -1
- package/src/features/saveDataManager/exports.ts +3 -0
- package/src/functions/collectibleSet.ts +1 -1
- package/src/functions/doors.ts +10 -0
- package/src/functions/log.ts +1 -279
- package/src/functions/logEntities.ts +276 -0
- package/src/functions/rockAlt.ts +147 -19
- package/src/functions/roomTransition.ts +78 -0
- package/src/functions/rooms.ts +2 -60
- package/src/index.ts +1 -0
- package/src/interfaces/private/CustomTrapdoorDescription.ts +3 -1
- package/src/objects/backdropTypeToRockAltType.ts +3 -3
|
@@ -4,8 +4,8 @@ export declare const FIRST_COLLECTIBLE_TYPE = CollectibleType.SAD_ONION;
|
|
|
4
4
|
/**
|
|
5
5
|
* Will change depending on how many modded collectibles there are.
|
|
6
6
|
*
|
|
7
|
-
* Equal to `itemConfig.GetCollectibles().Size - 1`. (`Size` includes invalid collectibles
|
|
8
|
-
* subtract one to account for `CollectibleType.NULL`.)
|
|
7
|
+
* Equal to `itemConfig.GetCollectibles().Size - 1`. (`Size` includes invalid collectibles, like
|
|
8
|
+
* 666. We subtract one to account for `CollectibleType.NULL`.)
|
|
9
9
|
*/
|
|
10
10
|
export declare const LAST_COLLECTIBLE_TYPE: CollectibleType;
|
|
11
11
|
/**
|
|
@@ -17,8 +17,8 @@ local getLastEnumValue = ____enums.getLastEnumValue
|
|
|
17
17
|
____exports.FIRST_COLLECTIBLE_TYPE = CollectibleType.SAD_ONION
|
|
18
18
|
--- Will change depending on how many modded collectibles there are.
|
|
19
19
|
--
|
|
20
|
-
-- Equal to `itemConfig.GetCollectibles().Size - 1`. (`Size` includes invalid collectibles
|
|
21
|
-
-- subtract one to account for `CollectibleType.NULL`.)
|
|
20
|
+
-- Equal to `itemConfig.GetCollectibles().Size - 1`. (`Size` includes invalid collectibles, like
|
|
21
|
+
-- 666. We subtract one to account for `CollectibleType.NULL`.)
|
|
22
22
|
____exports.LAST_COLLECTIBLE_TYPE = itemConfig:GetCollectibles().Size - 1
|
|
23
23
|
--- Calculated from the `CollectibleType` enum.
|
|
24
24
|
--
|
|
@@ -3,6 +3,17 @@ export declare enum RockAltType {
|
|
|
3
3
|
MUSHROOM = 1,
|
|
4
4
|
SKULL = 2,
|
|
5
5
|
POLYP = 3,
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Destroying buckets in Downpour give different outcomes than in Dross.
|
|
8
|
+
*
|
|
9
|
+
* See: https://bindingofisaacrebirth.fandom.com/wiki/Rocks#Buckets
|
|
10
|
+
*/
|
|
11
|
+
BUCKET_DOWNPOUR = 4,
|
|
12
|
+
/**
|
|
13
|
+
* Destroying buckets in Dross give different outcomes than in Downpour.
|
|
14
|
+
*
|
|
15
|
+
* See: https://bindingofisaacrebirth.fandom.com/wiki/Rocks#Buckets
|
|
16
|
+
*/
|
|
17
|
+
BUCKET_DROSS = 5
|
|
7
18
|
}
|
|
8
19
|
//# sourceMappingURL=RockAltType.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RockAltType.d.ts","sourceRoot":"","sources":["../../src/enums/RockAltType.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,GAAG,IAAA;IACH,QAAQ,IAAA;IACR,KAAK,IAAA;IACL,KAAK,IAAA;
|
|
1
|
+
{"version":3,"file":"RockAltType.d.ts","sourceRoot":"","sources":["../../src/enums/RockAltType.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,GAAG,IAAA;IACH,QAAQ,IAAA;IACR,KAAK,IAAA;IACL,KAAK,IAAA;IAEL;;;;OAIG;IACH,eAAe,IAAA;IAEf;;;;OAIG;IACH,YAAY,IAAA;CACb"}
|
|
@@ -8,6 +8,8 @@ ____exports.RockAltType.SKULL = 2
|
|
|
8
8
|
____exports.RockAltType[____exports.RockAltType.SKULL] = "SKULL"
|
|
9
9
|
____exports.RockAltType.POLYP = 3
|
|
10
10
|
____exports.RockAltType[____exports.RockAltType.POLYP] = "POLYP"
|
|
11
|
-
____exports.RockAltType.
|
|
12
|
-
____exports.RockAltType[____exports.RockAltType.
|
|
11
|
+
____exports.RockAltType.BUCKET_DOWNPOUR = 4
|
|
12
|
+
____exports.RockAltType[____exports.RockAltType.BUCKET_DOWNPOUR] = "BUCKET_DOWNPOUR"
|
|
13
|
+
____exports.RockAltType.BUCKET_DROSS = 5
|
|
14
|
+
____exports.RockAltType[____exports.RockAltType.BUCKET_DROSS] = "BUCKET_DROSS"
|
|
13
15
|
return ____exports
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backdrop.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/backdrop.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"backdrop.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/backdrop.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AA2E3D,wBAAgB,WAAW,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAc1D"}
|
|
@@ -2,7 +2,7 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local Set = ____lualib.Set
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
4
|
local ____exports = {}
|
|
5
|
-
local getBackdropPNGPath, spawnWallEntity, spawnSecondWallEntity, spawnFloorEntity, getNumFloorLayers, BackdropKind, DEFAULT_BACKDROP, ROOM_SHAPE_WALL_ANM2_LAYERS, ROOM_SHAPE_WALL_EXTRA_ANM2_LAYERS, WALL_OFFSET, L_FLOOR_ANM2_LAYERS, N_FLOOR_ANM2_LAYERS, BACKDROP_EFFECT_VARIANT
|
|
5
|
+
local getBackdropPNGPath, spawnWallEntity, spawnSecondWallEntity, spawnFloorEntity, getNumFloorLayers, BackdropKind, DEFAULT_BACKDROP, ROOM_SHAPE_WALL_ANM2_LAYERS, ROOM_SHAPE_WALL_EXTRA_ANM2_LAYERS, WALL_OFFSET, L_FLOOR_ANM2_LAYERS, N_FLOOR_ANM2_LAYERS, BACKDROP_EFFECT_VARIANT, BACKDROP_EFFECT_SUBTYPE
|
|
6
6
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
7
|
local EffectVariant = ____isaac_2Dtypescript_2Ddefinitions.EffectVariant
|
|
8
8
|
local EntityFlag = ____isaac_2Dtypescript_2Ddefinitions.EntityFlag
|
|
@@ -39,7 +39,7 @@ function spawnWallEntity(self, customStage, rng, isExtraWall)
|
|
|
39
39
|
local wallEffect = spawnEffectWithSeed(
|
|
40
40
|
nil,
|
|
41
41
|
BACKDROP_EFFECT_VARIANT,
|
|
42
|
-
|
|
42
|
+
BACKDROP_EFFECT_SUBTYPE,
|
|
43
43
|
VectorZero,
|
|
44
44
|
1
|
|
45
45
|
)
|
|
@@ -177,6 +177,7 @@ WALL_OFFSET = Vector(-80, -80)
|
|
|
177
177
|
L_FLOOR_ANM2_LAYERS = {16, 17}
|
|
178
178
|
N_FLOOR_ANM2_LAYERS = {18, 19}
|
|
179
179
|
BACKDROP_EFFECT_VARIANT = EffectVariant.LADDER
|
|
180
|
+
BACKDROP_EFFECT_SUBTYPE = 101
|
|
180
181
|
local BACKDROP_ROOM_TYPE_SET = __TS__New(Set, {RoomType.DEFAULT, RoomType.BOSS, RoomType.MINI_BOSS})
|
|
181
182
|
function ____exports.setBackdrop(self, customStage)
|
|
182
183
|
local room = game:GetRoom()
|
|
@@ -1,2 +1,13 @@
|
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
1
2
|
export declare const ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH = "gfx/isaacscript-custom-stage";
|
|
3
|
+
/** Corresponds to "ui_streak.anm2". */
|
|
4
|
+
export declare enum UIStreakAnimation {
|
|
5
|
+
NONE = 0,
|
|
6
|
+
TEXT = 1,
|
|
7
|
+
TEXT_STAY = 2
|
|
8
|
+
}
|
|
9
|
+
/** Corresponds to "ui_streak.anm2". */
|
|
10
|
+
export declare const UI_STREAK_ANIMATION_END_FRAMES: {
|
|
11
|
+
readonly [key in UIStreakAnimation]: int;
|
|
12
|
+
};
|
|
2
13
|
//# sourceMappingURL=customStageConstants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customStageConstants.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/customStageConstants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iCAAiC,iCAAiC,CAAC"}
|
|
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,3 +1,13 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
2
|
____exports.ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH = "gfx/isaacscript-custom-stage"
|
|
3
|
+
--- Corresponds to "ui_streak.anm2".
|
|
4
|
+
____exports.UIStreakAnimation = {}
|
|
5
|
+
____exports.UIStreakAnimation.NONE = 0
|
|
6
|
+
____exports.UIStreakAnimation[____exports.UIStreakAnimation.NONE] = "NONE"
|
|
7
|
+
____exports.UIStreakAnimation.TEXT = 1
|
|
8
|
+
____exports.UIStreakAnimation[____exports.UIStreakAnimation.TEXT] = "TEXT"
|
|
9
|
+
____exports.UIStreakAnimation.TEXT_STAY = 2
|
|
10
|
+
____exports.UIStreakAnimation[____exports.UIStreakAnimation.TEXT_STAY] = "TEXT_STAY"
|
|
11
|
+
--- Corresponds to "ui_streak.anm2".
|
|
12
|
+
____exports.UI_STREAK_ANIMATION_END_FRAMES = {[____exports.UIStreakAnimation.NONE] = 0, [____exports.UIStreakAnimation.TEXT] = 69, [____exports.UIStreakAnimation.TEXT_STAY] = 1}
|
|
3
13
|
return ____exports
|
|
@@ -8,6 +8,7 @@ export declare function setCustomRockGraphics(customStage: CustomStage, gridEnti
|
|
|
8
8
|
export declare function setCustomPitGraphics(customStage: CustomStage, gridEntity: GridEntity): void;
|
|
9
9
|
/** For GridEntityType.DOOR (16) */
|
|
10
10
|
export declare function setCustomDoorGraphics(customStage: CustomStage, gridEntity: GridEntity): void;
|
|
11
|
+
export declare function convertVanillaTrapdoors(customStage: CustomStage, gridEntity: GridEntity): void;
|
|
11
12
|
/**
|
|
12
13
|
* The rewards are based on the ones from the wiki:
|
|
13
14
|
* https://bindingofisaacrebirth.fandom.com/wiki/Rocks#Urns
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customStageGridEntities.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/customStageGridEntities.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"customStageGridEntities.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/customStageGridEntities.ts"],"names":[],"mappings":";AAgBA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAI3D,0CAA0C;AAC1C,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAyBN;AAED,oCAAoC;AACpC,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAqBN;AAED,mCAAmC;AACnC,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAkBN;AAED,mCAAmC;AACnC,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAmBN;AAuDD,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAYN;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAsBN"}
|
|
@@ -5,6 +5,7 @@ local getNewDoorPNGPath, removeEntitiesSpawnedFromGridEntity
|
|
|
5
5
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
6
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
7
7
|
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
8
|
+
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
8
9
|
local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
9
10
|
local ____DecorationVariant = require("enums.DecorationVariant")
|
|
10
11
|
local DecorationVariant = ____DecorationVariant.DecorationVariant
|
|
@@ -12,17 +13,23 @@ local ____entities = require("functions.entities")
|
|
|
12
13
|
local removeEntities = ____entities.removeEntities
|
|
13
14
|
local ____entitiesSpecific = require("functions.entitiesSpecific")
|
|
14
15
|
local getNPCs = ____entitiesSpecific.getNPCs
|
|
16
|
+
local ____gridEntities = require("functions.gridEntities")
|
|
17
|
+
local removeGridEntity = ____gridEntities.removeGridEntity
|
|
15
18
|
local ____pickupsSpecific = require("functions.pickupsSpecific")
|
|
16
19
|
local getCoins = ____pickupsSpecific.getCoins
|
|
17
20
|
local getCollectibles = ____pickupsSpecific.getCollectibles
|
|
18
21
|
local getTrinkets = ____pickupsSpecific.getTrinkets
|
|
19
22
|
local ____vector = require("functions.vector")
|
|
20
23
|
local vectorEquals = ____vector.vectorEquals
|
|
24
|
+
local ____exports = require("features.customTrapdoor.exports")
|
|
25
|
+
local spawnCustomTrapdoor = ____exports.spawnCustomTrapdoor
|
|
26
|
+
local ____v = require("features.customStage.v")
|
|
27
|
+
local v = ____v.default
|
|
21
28
|
function getNewDoorPNGPath(self, customStage, fileName)
|
|
22
29
|
repeat
|
|
23
|
-
local
|
|
24
|
-
local
|
|
25
|
-
if
|
|
30
|
+
local ____switch21 = fileName
|
|
31
|
+
local ____cond21 = ____switch21 == "gfx/grid/door_01_normaldoor.anm2"
|
|
32
|
+
if ____cond21 then
|
|
26
33
|
do
|
|
27
34
|
local ____customStage_doorPNGPaths_normal_0 = customStage.doorPNGPaths
|
|
28
35
|
if ____customStage_doorPNGPaths_normal_0 ~= nil then
|
|
@@ -31,8 +38,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
|
|
|
31
38
|
return ____customStage_doorPNGPaths_normal_0
|
|
32
39
|
end
|
|
33
40
|
end
|
|
34
|
-
|
|
35
|
-
if
|
|
41
|
+
____cond21 = ____cond21 or ____switch21 == "gfx/grid/door_02_treasureroomdoor.anm2"
|
|
42
|
+
if ____cond21 then
|
|
36
43
|
do
|
|
37
44
|
local ____customStage_doorPNGPaths_treasureRoom_2 = customStage.doorPNGPaths
|
|
38
45
|
if ____customStage_doorPNGPaths_treasureRoom_2 ~= nil then
|
|
@@ -41,8 +48,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
|
|
|
41
48
|
return ____customStage_doorPNGPaths_treasureRoom_2
|
|
42
49
|
end
|
|
43
50
|
end
|
|
44
|
-
|
|
45
|
-
if
|
|
51
|
+
____cond21 = ____cond21 or ____switch21 == "gfx/grid/door_03_ambushroomdoor.anm2"
|
|
52
|
+
if ____cond21 then
|
|
46
53
|
do
|
|
47
54
|
local ____customStage_doorPNGPaths_normalChallengeRoom_4 = customStage.doorPNGPaths
|
|
48
55
|
if ____customStage_doorPNGPaths_normalChallengeRoom_4 ~= nil then
|
|
@@ -51,8 +58,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
|
|
|
51
58
|
return ____customStage_doorPNGPaths_normalChallengeRoom_4
|
|
52
59
|
end
|
|
53
60
|
end
|
|
54
|
-
|
|
55
|
-
if
|
|
61
|
+
____cond21 = ____cond21 or ____switch21 == "gfx/grid/door_04_selfsacrificeroomdoor.anm2"
|
|
62
|
+
if ____cond21 then
|
|
56
63
|
do
|
|
57
64
|
local ____customStage_doorPNGPaths_curseRoom_6 = customStage.doorPNGPaths
|
|
58
65
|
if ____customStage_doorPNGPaths_curseRoom_6 ~= nil then
|
|
@@ -61,8 +68,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
|
|
|
61
68
|
return ____customStage_doorPNGPaths_curseRoom_6
|
|
62
69
|
end
|
|
63
70
|
end
|
|
64
|
-
|
|
65
|
-
if
|
|
71
|
+
____cond21 = ____cond21 or ____switch21 == "gfx/grid/door_05_arcaderoomdoor.anm2"
|
|
72
|
+
if ____cond21 then
|
|
66
73
|
do
|
|
67
74
|
local ____customStage_doorPNGPaths_arcade_8 = customStage.doorPNGPaths
|
|
68
75
|
if ____customStage_doorPNGPaths_arcade_8 ~= nil then
|
|
@@ -71,8 +78,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
|
|
|
71
78
|
return ____customStage_doorPNGPaths_arcade_8
|
|
72
79
|
end
|
|
73
80
|
end
|
|
74
|
-
|
|
75
|
-
if
|
|
81
|
+
____cond21 = ____cond21 or ____switch21 == "gfx/grid/door_07_devilroomdoor.anm2"
|
|
82
|
+
if ____cond21 then
|
|
76
83
|
do
|
|
77
84
|
local ____customStage_doorPNGPaths_devilRoom_10 = customStage.doorPNGPaths
|
|
78
85
|
if ____customStage_doorPNGPaths_devilRoom_10 ~= nil then
|
|
@@ -81,8 +88,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
|
|
|
81
88
|
return ____customStage_doorPNGPaths_devilRoom_10
|
|
82
89
|
end
|
|
83
90
|
end
|
|
84
|
-
|
|
85
|
-
if
|
|
91
|
+
____cond21 = ____cond21 or ____switch21 == "gfx/grid/door_07_holyroomdoor.anm2"
|
|
92
|
+
if ____cond21 then
|
|
86
93
|
do
|
|
87
94
|
local ____customStage_doorPNGPaths_angelRoom_12 = customStage.doorPNGPaths
|
|
88
95
|
if ____customStage_doorPNGPaths_angelRoom_12 ~= nil then
|
|
@@ -91,8 +98,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
|
|
|
91
98
|
return ____customStage_doorPNGPaths_angelRoom_12
|
|
92
99
|
end
|
|
93
100
|
end
|
|
94
|
-
|
|
95
|
-
if
|
|
101
|
+
____cond21 = ____cond21 or ____switch21 == "gfx/grid/door_08_holeinwall.anm2"
|
|
102
|
+
if ____cond21 then
|
|
96
103
|
do
|
|
97
104
|
local ____customStage_doorPNGPaths_secretRoom_14 = customStage.doorPNGPaths
|
|
98
105
|
if ____customStage_doorPNGPaths_secretRoom_14 ~= nil then
|
|
@@ -101,8 +108,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
|
|
|
101
108
|
return ____customStage_doorPNGPaths_secretRoom_14
|
|
102
109
|
end
|
|
103
110
|
end
|
|
104
|
-
|
|
105
|
-
if
|
|
111
|
+
____cond21 = ____cond21 or ____switch21 == "gfx/grid/door_09_bossambushroomdoor.anm2"
|
|
112
|
+
if ____cond21 then
|
|
106
113
|
do
|
|
107
114
|
local ____customStage_doorPNGPaths_bossChallengeRoom_16 = customStage.doorPNGPaths
|
|
108
115
|
if ____customStage_doorPNGPaths_bossChallengeRoom_16 ~= nil then
|
|
@@ -111,8 +118,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
|
|
|
111
118
|
return ____customStage_doorPNGPaths_bossChallengeRoom_16
|
|
112
119
|
end
|
|
113
120
|
end
|
|
114
|
-
|
|
115
|
-
if
|
|
121
|
+
____cond21 = ____cond21 or ____switch21 == "gfx/grid/door_10_bossroomdoor.anm2"
|
|
122
|
+
if ____cond21 then
|
|
116
123
|
do
|
|
117
124
|
local ____customStage_doorPNGPaths_bossRoom_18 = customStage.doorPNGPaths
|
|
118
125
|
if ____customStage_doorPNGPaths_bossRoom_18 ~= nil then
|
|
@@ -121,8 +128,8 @@ function getNewDoorPNGPath(self, customStage, fileName)
|
|
|
121
128
|
return ____customStage_doorPNGPaths_bossRoom_18
|
|
122
129
|
end
|
|
123
130
|
end
|
|
124
|
-
|
|
125
|
-
if
|
|
131
|
+
____cond21 = ____cond21 or ____switch21 == "gfx/grid/door_15_bossrushdoor.anm2"
|
|
132
|
+
if ____cond21 then
|
|
126
133
|
do
|
|
127
134
|
local ____customStage_doorPNGPaths_bossRush_20 = customStage.doorPNGPaths
|
|
128
135
|
if ____customStage_doorPNGPaths_bossRush_20 ~= nil then
|
|
@@ -146,6 +153,10 @@ function ____exports.setCustomDecorationGraphics(self, customStage, gridEntity)
|
|
|
146
153
|
if customStage.decorationsPNGPath == nil then
|
|
147
154
|
return
|
|
148
155
|
end
|
|
156
|
+
local gridEntityType = gridEntity:GetType()
|
|
157
|
+
if gridEntityType ~= GridEntityType.DECORATION then
|
|
158
|
+
return
|
|
159
|
+
end
|
|
149
160
|
local variant = gridEntity:GetVariant()
|
|
150
161
|
if variant ~= DecorationVariant.VANILLA_DECORATION then
|
|
151
162
|
return
|
|
@@ -162,6 +173,10 @@ function ____exports.setCustomRockGraphics(self, customStage, gridEntity)
|
|
|
162
173
|
if customStage.rocksPNGPath == nil then
|
|
163
174
|
return
|
|
164
175
|
end
|
|
176
|
+
local gridEntityRock = gridEntity:ToRock()
|
|
177
|
+
if gridEntityRock == nil then
|
|
178
|
+
return
|
|
179
|
+
end
|
|
165
180
|
local sprite = gridEntity:GetSprite()
|
|
166
181
|
local fileName = sprite:GetFilename()
|
|
167
182
|
if fileName == "gfx/grid/grid_rock.anm2" then
|
|
@@ -177,6 +192,10 @@ function ____exports.setCustomPitGraphics(self, customStage, gridEntity)
|
|
|
177
192
|
if customStage.pitsPNGPath == nil then
|
|
178
193
|
return
|
|
179
194
|
end
|
|
195
|
+
local gridEntityPit = gridEntity:ToPit()
|
|
196
|
+
if gridEntityPit == nil then
|
|
197
|
+
return
|
|
198
|
+
end
|
|
180
199
|
local sprite = gridEntity:GetSprite()
|
|
181
200
|
local fileName = sprite:GetFilename()
|
|
182
201
|
if fileName == "gfx/grid/grid_pit.anm2" then
|
|
@@ -186,6 +205,13 @@ function ____exports.setCustomPitGraphics(self, customStage, gridEntity)
|
|
|
186
205
|
end
|
|
187
206
|
--- For GridEntityType.DOOR (16)
|
|
188
207
|
function ____exports.setCustomDoorGraphics(self, customStage, gridEntity)
|
|
208
|
+
if customStage.doorPNGPaths == nil then
|
|
209
|
+
return
|
|
210
|
+
end
|
|
211
|
+
local gridEntityDoor = gridEntity:ToDoor()
|
|
212
|
+
if gridEntityDoor == nil then
|
|
213
|
+
return
|
|
214
|
+
end
|
|
189
215
|
local sprite = gridEntity:GetSprite()
|
|
190
216
|
local fileName = sprite:GetFilename()
|
|
191
217
|
local doorPNGPath = getNewDoorPNGPath(nil, customStage, fileName)
|
|
@@ -194,6 +220,15 @@ function ____exports.setCustomDoorGraphics(self, customStage, gridEntity)
|
|
|
194
220
|
sprite:LoadGraphics()
|
|
195
221
|
end
|
|
196
222
|
end
|
|
223
|
+
function ____exports.convertVanillaTrapdoors(self, customStage, gridEntity)
|
|
224
|
+
local gridEntityType = gridEntity:GetType()
|
|
225
|
+
if gridEntityType ~= GridEntityType.TRAPDOOR then
|
|
226
|
+
return
|
|
227
|
+
end
|
|
228
|
+
removeGridEntity(nil, gridEntity, true)
|
|
229
|
+
local destination = v.run.firstFloor and ({customStage.name, 2}) or nil
|
|
230
|
+
spawnCustomTrapdoor(nil, gridEntity.Position, destination)
|
|
231
|
+
end
|
|
197
232
|
--- The rewards are based on the ones from the wiki:
|
|
198
233
|
-- https://bindingofisaacrebirth.fandom.com/wiki/Rocks#Urns
|
|
199
234
|
--
|
|
@@ -6,12 +6,11 @@ import { EntityType } from "isaac-typescript-definitions";
|
|
|
6
6
|
* more details: https://isaacscript.github.io/main/custom-stages/
|
|
7
7
|
*
|
|
8
8
|
* @param name The name of the custom stage, corresponding to what is in the "tsconfig.json" file.
|
|
9
|
-
* @param
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* @param firstFloor Whether to go to the first floor or the second floor. For example, if you have
|
|
10
|
+
* a custom stage emulating Caves, then the first floor would be Caves 1, and the
|
|
11
|
+
* second floor would be Caves 2.
|
|
12
12
|
*/
|
|
13
|
-
export declare function setCustomStage(name: string,
|
|
14
|
-
export declare function setCustomStageDebug(): void;
|
|
13
|
+
export declare function setCustomStage(name: string, firstFloor?: boolean, verbose?: boolean): void;
|
|
15
14
|
/**
|
|
16
15
|
* By default, unknown bosses will be drawn on the boss "versus" screen as "???". If your custom
|
|
17
16
|
* stage has custom bosses, you can use this function to register the corresponding graphic file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/exports.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAKX,MAAM,8BAA8B,CAAC;AAsBtC;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,
|
|
1
|
+
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/exports.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAKX,MAAM,8BAA8B,CAAC;AAsBtC;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,UAAU,UAAO,EACjB,OAAO,UAAQ,GACd,IAAI,CA6CN;AA4ED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,GAAG,EACZ,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,GACtB,IAAI,CAGN"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
2
|
local Map = ____lualib.Map
|
|
3
3
|
local ____exports = {}
|
|
4
|
+
local setStageRoomsData
|
|
4
5
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
5
6
|
local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
|
|
6
7
|
local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
|
|
@@ -13,7 +14,6 @@ local reorderedCallbacksSetStage = ____reorderedCallbacks.reorderedCallbacksSetS
|
|
|
13
14
|
local ____entities = require("functions.entities")
|
|
14
15
|
local getEntityIDFromConstituents = ____entities.getEntityIDFromConstituents
|
|
15
16
|
local ____log = require("functions.log")
|
|
16
|
-
local log = ____log.log
|
|
17
17
|
local logError = ____log.logError
|
|
18
18
|
local ____rng = require("functions.rng")
|
|
19
19
|
local newRNG = ____rng.newRNG
|
|
@@ -24,99 +24,97 @@ local ____stage = require("functions.stage")
|
|
|
24
24
|
local setStage = ____stage.setStage
|
|
25
25
|
local ____customStageUtils = require("features.customStage.customStageUtils")
|
|
26
26
|
local getRandomCustomStageRoom = ____customStageUtils.getRandomCustomStageRoom
|
|
27
|
-
local ____streakText = require("features.customStage.streakText")
|
|
28
|
-
local topStreakTextStart = ____streakText.topStreakTextStart
|
|
29
27
|
local ____v = require("features.customStage.v")
|
|
30
28
|
local v = ____v.default
|
|
31
29
|
local customBossPNGPaths = ____v.customBossPNGPaths
|
|
32
30
|
local customStageCachedRoomData = ____v.customStageCachedRoomData
|
|
33
31
|
local customStagesMap = ____v.customStagesMap
|
|
34
|
-
|
|
35
|
-
local DEFAULT_BASE_STAGE_TYPE = StageType.ORIGINAL
|
|
36
|
-
--- Helper function to warp to a custom stage/level.
|
|
37
|
-
--
|
|
38
|
-
-- Custom stages/levels must first be defined in the "tsconfig.json" file. See the documentation for
|
|
39
|
-
-- more details: https://isaacscript.github.io/main/custom-stages/
|
|
40
|
-
--
|
|
41
|
-
-- @param name The name of the custom stage, corresponding to what is in the "tsconfig.json" file.
|
|
42
|
-
-- @param _firstFloor Whether to go to the first floor or the second floor. For example, if you have
|
|
43
|
-
-- a custom stage emulating Caves, then the first floor would be Caves 1, and the
|
|
44
|
-
-- second floor would be Caves 2.
|
|
45
|
-
function ____exports.setCustomStage(self, name, _firstFloor, verbose)
|
|
46
|
-
if _firstFloor == nil then
|
|
47
|
-
_firstFloor = true
|
|
48
|
-
end
|
|
49
|
-
if verbose == nil then
|
|
50
|
-
verbose = false
|
|
51
|
-
end
|
|
52
|
-
local customStage = customStagesMap:get(name)
|
|
53
|
-
if customStage == nil then
|
|
54
|
-
error(("Failed to set the custom stage of \"" .. name) .. "\" because it was not found in the custom stages map. (Try restarting IsaacScript / recompiling the mod / restarting the game, and try again. If that does not work, you probably forgot to define it in your \"tsconfig.json\" file.) See the website for more details on how to set up custom stages.")
|
|
55
|
-
end
|
|
32
|
+
function setStageRoomsData(self, customStage, rng, verbose)
|
|
56
33
|
local level = game:GetLevel()
|
|
57
34
|
local startingRoomGridIndex = level:GetStartingRoomIndex()
|
|
58
|
-
local seeds = game:GetSeeds()
|
|
59
|
-
local startSeed = seeds:GetStartSeed()
|
|
60
|
-
local rng = newRNG(nil, startSeed)
|
|
61
|
-
v.run.currentCustomStage = customStage
|
|
62
|
-
local baseStage = customStage.baseStage == nil and DEFAULT_BASE_STAGE or customStage.baseStage
|
|
63
|
-
local baseStageType = customStage.baseStageType == nil and DEFAULT_BASE_STAGE_TYPE or customStage.baseStageType
|
|
64
|
-
setStage(nil, baseStage, baseStageType)
|
|
65
35
|
for ____, room in ipairs(getRoomsInGrid(nil)) do
|
|
66
36
|
do
|
|
67
37
|
if room.SafeGridIndex == startingRoomGridIndex then
|
|
68
|
-
goto
|
|
38
|
+
goto __continue6
|
|
69
39
|
end
|
|
70
40
|
if room.Data == nil then
|
|
71
|
-
goto
|
|
41
|
+
goto __continue6
|
|
72
42
|
end
|
|
73
43
|
local roomType = room.Data.Type
|
|
74
44
|
local roomShapeMap = customStage.roomTypeMap:get(roomType)
|
|
75
45
|
if roomShapeMap == nil then
|
|
76
46
|
if roomType == RoomType.DEFAULT then
|
|
77
|
-
logError((((("Failed to find any custom rooms for RoomType." .. tostring(RoomType[roomType])) .. " (") .. tostring(roomType)) .. ") for custom stage: ") .. name)
|
|
47
|
+
logError((((("Failed to find any custom rooms for RoomType." .. tostring(RoomType[roomType])) .. " (") .. tostring(roomType)) .. ") for custom stage: ") .. customStage.name)
|
|
78
48
|
end
|
|
79
|
-
goto
|
|
49
|
+
goto __continue6
|
|
80
50
|
end
|
|
81
51
|
local roomShape = room.Data.Shape
|
|
82
52
|
local roomDoorSlotFlagMap = roomShapeMap:get(roomShape)
|
|
83
53
|
if roomDoorSlotFlagMap == nil then
|
|
84
|
-
logError((((((((("Failed to find any custom rooms for RoomType." .. tostring(RoomType[roomType])) .. " (") .. tostring(roomType)) .. ") + RoomShape.") .. tostring(RoomShape[roomShape])) .. " (") .. tostring(roomShape)) .. ") for custom stage: ") .. name)
|
|
85
|
-
goto
|
|
54
|
+
logError((((((((("Failed to find any custom rooms for RoomType." .. tostring(RoomType[roomType])) .. " (") .. tostring(roomType)) .. ") + RoomShape.") .. tostring(RoomShape[roomShape])) .. " (") .. tostring(roomShape)) .. ") for custom stage: ") .. customStage.name)
|
|
55
|
+
goto __continue6
|
|
86
56
|
end
|
|
87
57
|
local doorSlotFlags = room.Data.Doors
|
|
88
58
|
local roomsMetadata = roomDoorSlotFlagMap:get(doorSlotFlags)
|
|
89
59
|
if roomsMetadata == nil then
|
|
90
|
-
logError((((((((((("Failed to find any custom rooms for RoomType." .. tostring(RoomType[roomType])) .. " (") .. tostring(roomType)) .. ") + RoomShape.") .. tostring(RoomShape[roomShape])) .. " (") .. tostring(roomShape)) .. ") + DoorSlotFlags ") .. tostring(doorSlotFlags)) .. " for custom stage: ") .. name)
|
|
91
|
-
goto
|
|
60
|
+
logError((((((((((("Failed to find any custom rooms for RoomType." .. tostring(RoomType[roomType])) .. " (") .. tostring(roomType)) .. ") + RoomShape.") .. tostring(RoomShape[roomShape])) .. " (") .. tostring(roomShape)) .. ") + DoorSlotFlags ") .. tostring(doorSlotFlags)) .. " for custom stage: ") .. customStage.name)
|
|
61
|
+
goto __continue6
|
|
92
62
|
end
|
|
93
63
|
local randomRoom = getRandomCustomStageRoom(nil, roomsMetadata, rng, verbose)
|
|
94
64
|
local newRoomData = customStageCachedRoomData:get(randomRoom.variant)
|
|
95
65
|
if newRoomData == nil then
|
|
96
66
|
newRoomData = getRoomDataForTypeVariant(nil, roomType, randomRoom.variant, false)
|
|
97
67
|
if newRoomData == nil then
|
|
98
|
-
logError((("Failed to get the room data for room variant " .. tostring(randomRoom.variant)) .. " for custom stage: ") .. name)
|
|
99
|
-
goto
|
|
68
|
+
logError((("Failed to get the room data for room variant " .. tostring(randomRoom.variant)) .. " for custom stage: ") .. customStage.name)
|
|
69
|
+
goto __continue6
|
|
100
70
|
end
|
|
101
71
|
customStageCachedRoomData:set(randomRoom.variant, newRoomData)
|
|
102
72
|
end
|
|
103
73
|
room.Data = newRoomData
|
|
104
74
|
end
|
|
105
|
-
::
|
|
75
|
+
::__continue6::
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
local DEFAULT_BASE_STAGE = LevelStage.BASEMENT_2
|
|
79
|
+
local DEFAULT_BASE_STAGE_TYPE = StageType.ORIGINAL
|
|
80
|
+
--- Helper function to warp to a custom stage/level.
|
|
81
|
+
--
|
|
82
|
+
-- Custom stages/levels must first be defined in the "tsconfig.json" file. See the documentation for
|
|
83
|
+
-- more details: https://isaacscript.github.io/main/custom-stages/
|
|
84
|
+
--
|
|
85
|
+
-- @param name The name of the custom stage, corresponding to what is in the "tsconfig.json" file.
|
|
86
|
+
-- @param firstFloor Whether to go to the first floor or the second floor. For example, if you have
|
|
87
|
+
-- a custom stage emulating Caves, then the first floor would be Caves 1, and the
|
|
88
|
+
-- second floor would be Caves 2.
|
|
89
|
+
function ____exports.setCustomStage(self, name, firstFloor, verbose)
|
|
90
|
+
if firstFloor == nil then
|
|
91
|
+
firstFloor = true
|
|
92
|
+
end
|
|
93
|
+
if verbose == nil then
|
|
94
|
+
verbose = false
|
|
95
|
+
end
|
|
96
|
+
local customStage = customStagesMap:get(name)
|
|
97
|
+
if customStage == nil then
|
|
98
|
+
error(("Failed to set the custom stage of \"" .. name) .. "\" because it was not found in the custom stages map. (Try restarting IsaacScript / recompiling the mod / restarting the game, and try again. If that does not work, you probably forgot to define it in your \"tsconfig.json\" file.) See the website for more details on how to set up custom stages.")
|
|
99
|
+
end
|
|
100
|
+
local level = game:GetLevel()
|
|
101
|
+
local seeds = game:GetSeeds()
|
|
102
|
+
local startSeed = seeds:GetStartSeed()
|
|
103
|
+
local rng = newRNG(nil, startSeed)
|
|
104
|
+
v.run.currentCustomStage = customStage
|
|
105
|
+
v.run.firstFloor = firstFloor
|
|
106
|
+
local baseStage = customStage.baseStage == nil and DEFAULT_BASE_STAGE or customStage.baseStage
|
|
107
|
+
if not firstFloor then
|
|
108
|
+
baseStage = baseStage + 1
|
|
106
109
|
end
|
|
110
|
+
local baseStageType = customStage.baseStageType == nil and DEFAULT_BASE_STAGE_TYPE or customStage.baseStageType
|
|
111
|
+
setStage(nil, baseStage, baseStageType)
|
|
112
|
+
setStageRoomsData(nil, customStage, rng, verbose)
|
|
107
113
|
local stage = -1
|
|
108
114
|
local stageType = StageType.WRATH_OF_THE_LAMB
|
|
109
115
|
level:SetStage(stage, stageType)
|
|
110
116
|
reorderedCallbacksSetStage(nil, stage, stageType)
|
|
111
117
|
end
|
|
112
|
-
function ____exports.setCustomStageDebug(self)
|
|
113
|
-
local customStage = v.run.currentCustomStage
|
|
114
|
-
if customStage == nil then
|
|
115
|
-
log("No custom stage is currently loaded.")
|
|
116
|
-
return
|
|
117
|
-
end
|
|
118
|
-
topStreakTextStart(nil)
|
|
119
|
-
end
|
|
120
118
|
--- By default, unknown bosses will be drawn on the boss "versus" screen as "???". If your custom
|
|
121
119
|
-- stage has custom bosses, you can use this function to register the corresponding graphic file
|
|
122
120
|
-- files for them.
|
|
@@ -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;AA6BxD,wBAAgB,eAAe,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CA0BtD"}
|
|
@@ -3,7 +3,7 @@ local Map = ____lualib.Map
|
|
|
3
3
|
local __TS__ObjectAssign = ____lualib.__TS__ObjectAssign
|
|
4
4
|
local __TS__New = ____lualib.__TS__New
|
|
5
5
|
local ____exports = {}
|
|
6
|
-
local initRoomTypeMaps, getRoomTypeMap, postRender, postCurseEval,
|
|
6
|
+
local initRoomTypeMaps, getRoomTypeMap, postRender, postCurseEval, getShaderParams, postGridEntityBrokenRockAlt, postGridEntityInit, postNewRoomReordered
|
|
7
7
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
8
8
|
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
9
9
|
local LevelCurse = ____isaac_2Dtypescript_2Ddefinitions.LevelCurse
|
|
@@ -20,6 +20,7 @@ local saveDataManager = ____exports.saveDataManager
|
|
|
20
20
|
local ____backdrop = require("features.customStage.backdrop")
|
|
21
21
|
local setBackdrop = ____backdrop.setBackdrop
|
|
22
22
|
local ____customStageGridEntities = require("features.customStage.customStageGridEntities")
|
|
23
|
+
local convertVanillaTrapdoors = ____customStageGridEntities.convertVanillaTrapdoors
|
|
23
24
|
local removeUrnRewards = ____customStageGridEntities.removeUrnRewards
|
|
24
25
|
local setCustomDecorationGraphics = ____customStageGridEntities.setCustomDecorationGraphics
|
|
25
26
|
local setCustomDoorGraphics = ____customStageGridEntities.setCustomDoorGraphics
|
|
@@ -30,8 +31,6 @@ local ____shadows = require("features.customStage.shadows")
|
|
|
30
31
|
local setShadows = ____shadows.setShadows
|
|
31
32
|
local ____streakText = require("features.customStage.streakText")
|
|
32
33
|
local streakTextGetShaderParams = ____streakText.streakTextGetShaderParams
|
|
33
|
-
local streakTextInit = ____streakText.streakTextInit
|
|
34
|
-
local streakTextPostGameStarted = ____streakText.streakTextPostGameStarted
|
|
35
34
|
local streakTextPostRender = ____streakText.streakTextPostRender
|
|
36
35
|
local ____v = require("features.customStage.v")
|
|
37
36
|
local v = ____v.default
|
|
@@ -89,14 +88,11 @@ function postCurseEval(self, curses)
|
|
|
89
88
|
if customStage == nil then
|
|
90
89
|
return nil
|
|
91
90
|
end
|
|
92
|
-
if hasFlag(nil, curses, LevelCurse.
|
|
93
|
-
return removeFlag(nil, curses, LevelCurse.
|
|
91
|
+
if hasFlag(nil, curses, LevelCurse.LABYRINTH) then
|
|
92
|
+
return removeFlag(nil, curses, LevelCurse.LABYRINTH)
|
|
94
93
|
end
|
|
95
94
|
return nil
|
|
96
95
|
end
|
|
97
|
-
function postGameStarted(self)
|
|
98
|
-
streakTextPostGameStarted(nil)
|
|
99
|
-
end
|
|
100
96
|
function getShaderParams(self, shaderName)
|
|
101
97
|
local customStage = v.run.currentCustomStage
|
|
102
98
|
if customStage == nil then
|
|
@@ -112,7 +108,7 @@ function postGridEntityBrokenRockAlt(self, gridEntity)
|
|
|
112
108
|
end
|
|
113
109
|
removeUrnRewards(nil, customStage, gridEntity)
|
|
114
110
|
end
|
|
115
|
-
function
|
|
111
|
+
function postGridEntityInit(self, gridEntity)
|
|
116
112
|
local customStage = v.run.currentCustomStage
|
|
117
113
|
if customStage == nil then
|
|
118
114
|
return
|
|
@@ -121,6 +117,7 @@ function postGridEntityBrokenInit(self, gridEntity)
|
|
|
121
117
|
setCustomRockGraphics(nil, customStage, gridEntity)
|
|
122
118
|
setCustomPitGraphics(nil, customStage, gridEntity)
|
|
123
119
|
setCustomDoorGraphics(nil, customStage, gridEntity)
|
|
120
|
+
convertVanillaTrapdoors(nil, customStage, gridEntity)
|
|
124
121
|
end
|
|
125
122
|
function postNewRoomReordered(self)
|
|
126
123
|
local customStage = v.run.currentCustomStage
|
|
@@ -137,14 +134,12 @@ function ____exports.customStageInit(self, mod)
|
|
|
137
134
|
return
|
|
138
135
|
end
|
|
139
136
|
saveDataManager(nil, "customStage", v)
|
|
140
|
-
streakTextInit(nil)
|
|
141
137
|
versusScreenInit(nil)
|
|
142
138
|
mod:AddCallback(ModCallback.POST_RENDER, postRender)
|
|
143
139
|
mod:AddCallback(ModCallback.POST_CURSE_EVAL, postCurseEval)
|
|
144
|
-
mod:AddCallback(ModCallback.POST_GAME_STARTED, postGameStarted)
|
|
145
140
|
mod:AddCallback(ModCallback.GET_SHADER_PARAMS, getShaderParams)
|
|
146
141
|
mod:AddCallbackCustom(ModCallbackCustom.POST_GRID_ENTITY_BROKEN, postGridEntityBrokenRockAlt, GridEntityType.ROCK_ALT)
|
|
147
|
-
mod:AddCallbackCustom(ModCallbackCustom.POST_GRID_ENTITY_INIT,
|
|
142
|
+
mod:AddCallbackCustom(ModCallbackCustom.POST_GRID_ENTITY_INIT, postGridEntityInit)
|
|
148
143
|
mod:AddCallbackCustom(ModCallbackCustom.POST_NEW_ROOM_REORDERED, postNewRoomReordered)
|
|
149
144
|
end
|
|
150
145
|
return ____exports
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/shadows.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/shadows.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAqC3D,wBAAgB,UAAU,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAqCzD"}
|
|
@@ -19,6 +19,7 @@ local v = ____v.default
|
|
|
19
19
|
-- We arbitrarily choose a ladder for this purpose because it will not automatically despawn after
|
|
20
20
|
-- time passes, like most other effects.
|
|
21
21
|
local SHADOW_EFFECT_VARIANT = EffectVariant.LADDER
|
|
22
|
+
local SHADOW_EFFECT_SUBTYPE = 102
|
|
22
23
|
--- The animation comes from StageAPI.
|
|
23
24
|
local ROOM_SHAPE_TO_SHADOW_ANIMATION = {
|
|
24
25
|
[RoomShape.SHAPE_1x1] = "1x1",
|
|
@@ -50,7 +51,7 @@ function ____exports.setShadows(self, customStage)
|
|
|
50
51
|
local shadowEffect = spawnEffectWithSeed(
|
|
51
52
|
nil,
|
|
52
53
|
SHADOW_EFFECT_VARIANT,
|
|
53
|
-
|
|
54
|
+
SHADOW_EFFECT_SUBTYPE,
|
|
54
55
|
centerPos,
|
|
55
56
|
1
|
|
56
57
|
)
|