isaacscript-common 7.4.2 → 7.5.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/callbacks/postGridEntity.d.ts.map +1 -1
- package/dist/callbacks/postGridEntity.lua +53 -6
- package/dist/callbacks/postPlayerChangeStat.d.ts.map +1 -1
- package/dist/callbacks/postPlayerChangeStat.lua +9 -2
- package/dist/callbacks/subscriptions/postGridEntityCustomBroken.d.ts +1 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomBroken.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postGridEntityCustomBroken.lua +5 -2
- package/dist/callbacks/subscriptions/postGridEntityCustomInit.d.ts +9 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomInit.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomInit.lua +23 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomRemove.d.ts +9 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomRemove.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomRemove.lua +23 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomStateChanged.d.ts +9 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomStateChanged.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomStateChanged.lua +29 -0
- package/dist/callbacks/subscriptions/postPlayerChangeStat.d.ts +3 -2
- package/dist/callbacks/subscriptions/postPlayerChangeStat.d.ts.map +1 -1
- 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/enums/ModCallbackCustom.d.ts +131 -81
- package/dist/enums/ModCallbackCustom.d.ts.map +1 -1
- package/dist/enums/ModCallbackCustom.lua +67 -61
- package/dist/enums/StatType.d.ts +3 -1
- package/dist/enums/StatType.d.ts.map +1 -1
- package/dist/enums/StatType.lua +2 -0
- package/dist/features/customGridEntity.d.ts +30 -13
- package/dist/features/customGridEntity.d.ts.map +1 -1
- package/dist/features/customGridEntity.lua +67 -48
- package/dist/features/customStage/customStageGridEntities.d.ts.map +1 -1
- package/dist/features/customStage/customStageGridEntities.lua +37 -31
- 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/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 +74 -60
- package/dist/functions/dev.d.ts +20 -0
- package/dist/functions/dev.d.ts.map +1 -0
- package/dist/functions/dev.lua +34 -0
- 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/gridEntities.d.ts +3 -0
- package/dist/functions/gridEntities.d.ts.map +1 -1
- package/dist/functions/gridEntities.lua +35 -4
- package/dist/functions/playerStats.d.ts.map +1 -1
- package/dist/functions/playerStats.lua +2 -1
- package/dist/functions/players.d.ts.map +1 -1
- package/dist/functions/players.lua +3 -2
- package/dist/functions/rooms.d.ts +5 -0
- package/dist/functions/rooms.d.ts.map +1 -1
- package/dist/functions/rooms.lua +12 -2
- package/dist/index.d.ts +312 -198
- package/dist/index.d.ts.map +1 -1
- package/dist/index.lua +1134 -8
- package/dist/interfaces/{CustomStageLua.d.ts → CustomStageTSConfig.d.ts} +86 -60
- package/dist/interfaces/CustomStageTSConfig.d.ts.map +1 -0
- package/dist/interfaces/{CustomStageLua.lua → CustomStageTSConfig.lua} +0 -0
- package/dist/interfaces/JSONRoomsFile.d.ts +6 -5
- package/dist/interfaces/JSONRoomsFile.d.ts.map +1 -1
- package/dist/interfaces/StatTypeType.d.ts +1 -0
- package/dist/interfaces/StatTypeType.d.ts.map +1 -1
- package/dist/interfaces/private/AddCallbackParameterCustom.d.ts +6 -0
- package/dist/interfaces/private/AddCallbackParameterCustom.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/objects/callbackRegisterFunctions.d.ts.map +1 -1
- package/dist/objects/callbackRegisterFunctions.lua +9 -0
- package/dist/types/PossibleStatType.d.ts +7 -0
- package/dist/types/PossibleStatType.d.ts.map +1 -0
- package/dist/{interfaces/index.lua → types/PossibleStatType.lua} +0 -0
- package/package.json +1 -1
- package/src/callbacks/postGridEntity.ts +75 -10
- package/src/callbacks/postPlayerChangeStat.ts +8 -4
- package/src/callbacks/subscriptions/postGridEntityCustomBroken.ts +4 -0
- package/src/callbacks/subscriptions/postGridEntityCustomInit.ts +38 -0
- package/src/callbacks/subscriptions/postGridEntityCustomRemove.ts +35 -0
- package/src/callbacks/subscriptions/postGridEntityCustomStateChanged.ts +42 -0
- package/src/callbacks/subscriptions/postPlayerChangeStat.ts +4 -7
- package/src/classes/DefaultMap.ts +3 -2
- package/src/enums/ModCallbackCustom.ts +73 -20
- package/src/enums/StatType.ts +3 -3
- package/src/features/customGridEntity.ts +87 -61
- package/src/features/customStage/customStageGridEntities.ts +16 -7
- package/src/features/customStage/customStageUtils.ts +52 -1
- package/src/features/customStage/exports.ts +33 -45
- package/src/features/customStage/init.ts +1 -1
- package/src/features/customStage/v.ts +0 -6
- package/src/features/customStage/versusScreen.ts +70 -55
- package/src/functions/dev.ts +31 -0
- package/src/functions/doors.ts +37 -21
- package/src/functions/enums.ts +3 -3
- package/src/functions/gridEntities.ts +33 -1
- package/src/functions/playerStats.ts +1 -0
- package/src/functions/players.ts +7 -3
- package/src/functions/rooms.ts +18 -0
- package/src/index.ts +208 -9
- package/src/interfaces/{CustomStageLua.ts → CustomStageTSConfig.ts} +107 -41
- package/src/interfaces/JSONRoomsFile.ts +6 -5
- package/src/interfaces/StatTypeType.ts +1 -0
- package/src/interfaces/private/AddCallbackParameterCustom.ts +6 -0
- package/src/interfaces/private/CustomStage.ts +4 -1
- package/src/objects/callbackRegisterFunctions.ts +9 -0
- package/src/types/PossibleStatType.ts +12 -0
- package/dist/classes/index.d.ts +0 -3
- package/dist/classes/index.d.ts.map +0 -1
- package/dist/classes/index.lua +0 -18
- package/dist/core/index.d.ts +0 -5
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.lua +0 -34
- package/dist/enums/DecorationVariant.d.ts +0 -10
- package/dist/enums/DecorationVariant.d.ts.map +0 -1
- package/dist/enums/DecorationVariant.lua +0 -7
- package/dist/enums/index.d.ts +0 -11
- package/dist/enums/index.d.ts.map +0 -1
- package/dist/enums/index.lua +0 -82
- package/dist/features/index.d.ts +0 -30
- package/dist/features/index.d.ts.map +0 -1
- package/dist/features/index.lua +0 -216
- package/dist/functions/index.d.ts +0 -100
- package/dist/functions/index.d.ts.map +0 -1
- package/dist/functions/index.lua +0 -794
- package/dist/interfaces/CustomStageLua.d.ts.map +0 -1
- package/dist/interfaces/index.d.ts +0 -12
- package/dist/interfaces/index.d.ts.map +0 -1
- package/dist/maps/index.d.ts +0 -5
- package/dist/maps/index.d.ts.map +0 -1
- package/dist/maps/index.lua +0 -34
- package/dist/objects/index.d.ts +0 -2
- package/dist/objects/index.d.ts.map +0 -1
- package/dist/objects/index.lua +0 -10
- package/dist/types/index.d.ts +0 -11
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.lua +0 -10
- package/src/classes/index.ts +0 -2
- package/src/classes/indexTypeDoc.ts +0 -2
- package/src/core/index.ts +0 -4
- package/src/core/indexTypeDoc.ts +0 -4
- package/src/enums/DecorationVariant.ts +0 -10
- package/src/enums/index.ts +0 -10
- package/src/enums/indexTypeDoc.ts +0 -10
- package/src/features/index.ts +0 -59
- package/src/features/indexTypeDoc.ts +0 -30
- package/src/functions/index.ts +0 -101
- package/src/functions/indexTypeDoc.ts +0 -101
- package/src/indexTypeDoc.ts +0 -13
- package/src/interfaces/index.ts +0 -11
- package/src/interfaces/indexTypeDoc.ts +0 -11
- package/src/maps/index.ts +0 -4
- package/src/maps/indexTypeDoc.ts +0 -4
- package/src/objects/index.ts +0 -1
- package/src/objects/indexTypeDoc.ts +0 -1
- package/src/types/index.ts +0 -10
- package/src/types/indexTypeDoc.ts +0 -10
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ModUpgraded } from "../classes/ModUpgraded";
|
|
2
|
+
/**
|
|
3
|
+
* Helper function to enable some IsaacScript features that are useful when developing a mod. They
|
|
4
|
+
* shouldn't be enabled when your mod goes to production (i.e. it is uploaded to the Steam
|
|
5
|
+
* Workshop).
|
|
6
|
+
*
|
|
7
|
+
* The list of development features that are enabled are as follows:
|
|
8
|
+
*
|
|
9
|
+
* - `saveDataManagerSetGlobal` - Sets your local variables registered with the save data manager as
|
|
10
|
+
* global variables so you can access them from the in-game console.
|
|
11
|
+
* - `setLogFunctionsGlobal` - Sets the various log functions global so that you can access them
|
|
12
|
+
* from the in-game console.
|
|
13
|
+
* - `enableExtraConsoleCommands` - Enables many extra in-game console commands that make warping
|
|
14
|
+
* around easier (like e.g. `angel` to warp to the Angel Room).
|
|
15
|
+
* - `enableFastReset` - Makes it so that the r key resets the game instantaneously.
|
|
16
|
+
* - `removeFadeIn` - Removes the slow fade in that occurs at the beginning of the run, so that you
|
|
17
|
+
* can immediately start playing or testing.
|
|
18
|
+
*/
|
|
19
|
+
export declare function enableDevFeatures(mod: ModUpgraded): void;
|
|
20
|
+
//# sourceMappingURL=dev.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/functions/dev.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAOrD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAMxD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____exports = require("features.extraConsoleCommands.exports")
|
|
3
|
+
local enableExtraConsoleCommands = ____exports.enableExtraConsoleCommands
|
|
4
|
+
local ____fadeInRemover = require("features.fadeInRemover")
|
|
5
|
+
local removeFadeIn = ____fadeInRemover.removeFadeIn
|
|
6
|
+
local ____fastReset = require("features.fastReset")
|
|
7
|
+
local enableFastReset = ____fastReset.enableFastReset
|
|
8
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
9
|
+
local saveDataManagerSetGlobal = ____exports.saveDataManagerSetGlobal
|
|
10
|
+
local ____log = require("functions.log")
|
|
11
|
+
local setLogFunctionsGlobal = ____log.setLogFunctionsGlobal
|
|
12
|
+
--- Helper function to enable some IsaacScript features that are useful when developing a mod. They
|
|
13
|
+
-- shouldn't be enabled when your mod goes to production (i.e. it is uploaded to the Steam
|
|
14
|
+
-- Workshop).
|
|
15
|
+
--
|
|
16
|
+
-- The list of development features that are enabled are as follows:
|
|
17
|
+
--
|
|
18
|
+
-- - `saveDataManagerSetGlobal` - Sets your local variables registered with the save data manager as
|
|
19
|
+
-- global variables so you can access them from the in-game console.
|
|
20
|
+
-- - `setLogFunctionsGlobal` - Sets the various log functions global so that you can access them
|
|
21
|
+
-- from the in-game console.
|
|
22
|
+
-- - `enableExtraConsoleCommands` - Enables many extra in-game console commands that make warping
|
|
23
|
+
-- around easier (like e.g. `angel` to warp to the Angel Room).
|
|
24
|
+
-- - `enableFastReset` - Makes it so that the r key resets the game instantaneously.
|
|
25
|
+
-- - `removeFadeIn` - Removes the slow fade in that occurs at the beginning of the run, so that you
|
|
26
|
+
-- can immediately start playing or testing.
|
|
27
|
+
function ____exports.enableDevFeatures(self, mod)
|
|
28
|
+
saveDataManagerSetGlobal(nil)
|
|
29
|
+
setLogFunctionsGlobal(nil)
|
|
30
|
+
enableExtraConsoleCommands(nil, mod)
|
|
31
|
+
enableFastReset(nil)
|
|
32
|
+
removeFadeIn(nil)
|
|
33
|
+
end
|
|
34
|
+
return ____exports
|
|
@@ -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;AAyBtC,wBAAgB,aAAa,IAAI,IAAI,CAIpC;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAKxD;AAED,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,YAAY,GAAG,QAAQ,CAG3E;AAED,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,QAAQ,CAAC,YAAY,CAAC,GACpC,QAAQ,EAAE,CAWZ;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAEjE;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,GAAG,YAAY,CAEvE;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EACL,QAAQ,EAAE,GACV,SAAS,QAAQ,EAAE,GACnB,GAAG,CAAC,QAAQ,CAAC,GACb,WAAW,CAAC,QAAQ,CAAC,GACxB,QAAQ,CAAC,YAAY,CAAC,CASxB;AAED,wBAAgB,gBAAgB,IAAI,cAAc,GAAG,SAAS,CAG7D;AAED,wBAAgB,gBAAgB,IAAI,cAAc,GAAG,SAAS,CAG7D;AAED;;;GAGG;AACH,wBAAgB,2BAA2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ROM_DOOR
|
|
11
11
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
12
12
|
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
13
|
+
local DoorSlotFlag = ____isaac_2Dtypescript_2Ddefinitions.DoorSlotFlag
|
|
13
14
|
local DoorState = ____isaac_2Dtypescript_2Ddefinitions.DoorState
|
|
14
15
|
local DoorVariant = ____isaac_2Dtypescript_2Ddefinitions.DoorVariant
|
|
15
16
|
local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
|
|
@@ -35,6 +36,8 @@ local ____direction = require("functions.direction")
|
|
|
35
36
|
local directionToVector = ____direction.directionToVector
|
|
36
37
|
local ____enums = require("functions.enums")
|
|
37
38
|
local getEnumValues = ____enums.getEnumValues
|
|
39
|
+
local ____flag = require("functions.flag")
|
|
40
|
+
local hasFlag = ____flag.hasFlag
|
|
38
41
|
local ____tstlClass = require("functions.tstlClass")
|
|
39
42
|
local isTSTLSet = ____tstlClass.isTSTLSet
|
|
40
43
|
local ____types = require("functions.types")
|
|
@@ -66,13 +69,13 @@ function ____exports.getDoors(self, ...)
|
|
|
66
69
|
do
|
|
67
70
|
local door = room:GetDoor(doorSlot)
|
|
68
71
|
if door == nil then
|
|
69
|
-
goto
|
|
72
|
+
goto __continue22
|
|
70
73
|
end
|
|
71
74
|
if roomTypesSet.size == 0 or roomTypesSet:has(door.TargetRoomType) then
|
|
72
75
|
doors[#doors + 1] = door
|
|
73
76
|
end
|
|
74
77
|
end
|
|
75
|
-
::
|
|
78
|
+
::__continue22::
|
|
76
79
|
end
|
|
77
80
|
return doors
|
|
78
81
|
end
|
|
@@ -120,9 +123,29 @@ function ____exports.doorSlotFlagToDoorSlot(self, doorSlotFlag)
|
|
|
120
123
|
local doorSlot = DOOR_SLOT_FLAG_TO_DOOR_SLOT[doorSlotFlag]
|
|
121
124
|
return doorSlot == nil and DEFAULT_DOOR_SLOT or doorSlot
|
|
122
125
|
end
|
|
126
|
+
function ____exports.doorSlotFlagsToDoorSlots(self, doorSlotFlags)
|
|
127
|
+
local doorSlots = {}
|
|
128
|
+
for ____, doorSlotFlag in ipairs(getEnumValues(nil, DoorSlotFlag)) do
|
|
129
|
+
if hasFlag(nil, doorSlotFlags, doorSlotFlag) then
|
|
130
|
+
local doorSlot = ____exports.doorSlotFlagToDoorSlot(nil, doorSlotFlag)
|
|
131
|
+
doorSlots[#doorSlots + 1] = doorSlot
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
return doorSlots
|
|
135
|
+
end
|
|
123
136
|
function ____exports.doorSlotToDoorSlotFlag(self, doorSlot)
|
|
124
137
|
return DOOR_SLOT_TO_DOOR_SLOT_FLAG[doorSlot]
|
|
125
138
|
end
|
|
139
|
+
--- Helper function to convert an array of door slots or a set of door slots to the resulting bit
|
|
140
|
+
-- flag number.
|
|
141
|
+
function ____exports.doorSlotsToDoorSlotFlags(self, doorSlots)
|
|
142
|
+
local doorSlotArray = isTSTLSet(nil, doorSlots) and ({__TS__Spread(doorSlots:values())}) or doorSlots
|
|
143
|
+
local doorSlotFlagArray = __TS__ArrayMap(
|
|
144
|
+
doorSlotArray,
|
|
145
|
+
function(____, doorSlot) return ____exports.doorSlotToDoorSlotFlag(nil, doorSlot) end
|
|
146
|
+
)
|
|
147
|
+
return arrayToBitFlags(nil, doorSlotFlagArray)
|
|
148
|
+
end
|
|
126
149
|
function ____exports.getAngelRoomDoor(self)
|
|
127
150
|
local angelRoomDoors = ____exports.getDoors(nil, RoomType.ANGEL)
|
|
128
151
|
local ____temp_0
|
|
@@ -164,16 +187,6 @@ function ____exports.getDoorEnterPosition(self, door)
|
|
|
164
187
|
local offset = ____exports.getDoorSlotEnterPositionOffset(nil, door.Slot)
|
|
165
188
|
return door.Position + offset
|
|
166
189
|
end
|
|
167
|
-
--- Helper function to convert an array of door slots or a set of door slots to the resulting bit
|
|
168
|
-
-- flag number.
|
|
169
|
-
function ____exports.getDoorSlotFlags(self, doorSlots)
|
|
170
|
-
local doorSlotArray = isTSTLSet(nil, doorSlots) and ({__TS__Spread(doorSlots:values())}) or doorSlots
|
|
171
|
-
local doorSlotFlagArray = __TS__ArrayMap(
|
|
172
|
-
doorSlotArray,
|
|
173
|
-
function(____, doorSlot) return ____exports.doorSlotToDoorSlotFlag(nil, doorSlot) end
|
|
174
|
-
)
|
|
175
|
-
return arrayToBitFlags(nil, doorSlotFlagArray)
|
|
176
|
-
end
|
|
177
190
|
--- Helper function to get the possible door slots that can exist for a given room shape.
|
|
178
191
|
function ____exports.getDoorSlotsForRoomShape(self, roomShape)
|
|
179
192
|
return ROOM_SHAPE_TO_DOOR_SLOTS[roomShape]
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* Also see the `getEnumKeys` and `getEnumValues` helper functions.
|
|
17
17
|
*
|
|
18
18
|
* For a more in depth explanation, see:
|
|
19
|
-
* https://isaacscript.github.io/gotchas#iterating-over-enums
|
|
19
|
+
* https://isaacscript.github.io/main/gotchas#iterating-over-enums
|
|
20
20
|
*/
|
|
21
21
|
export declare function getEnumEntries<T>(transpiledEnum: T): Array<[key: string, value: T[keyof T]]>;
|
|
22
22
|
/**
|
|
@@ -33,7 +33,7 @@ export declare function getEnumEntries<T>(transpiledEnum: T): Array<[key: string
|
|
|
33
33
|
* Also see the `getEnumEntries` and `getEnumValues` helper functions.
|
|
34
34
|
*
|
|
35
35
|
* For a more in depth explanation, see:
|
|
36
|
-
* https://isaacscript.github.io/gotchas#iterating-over-enums
|
|
36
|
+
* https://isaacscript.github.io/main/gotchas#iterating-over-enums
|
|
37
37
|
*/
|
|
38
38
|
export declare function getEnumKeys<T>(transpiledEnum: T): string[];
|
|
39
39
|
/** Helper function to get the amount of entries inside of an enum. */
|
|
@@ -52,7 +52,7 @@ export declare function getEnumLength<T>(transpiledEnum: T): int;
|
|
|
52
52
|
* Also see the `getEnumEntries` and `getEnumKeys` helper functions.
|
|
53
53
|
*
|
|
54
54
|
* For a more in depth explanation, see:
|
|
55
|
-
* https://isaacscript.github.io/gotchas#iterating-over-enums
|
|
55
|
+
* https://isaacscript.github.io/main/gotchas#iterating-over-enums
|
|
56
56
|
*/
|
|
57
57
|
export declare function getEnumValues<T>(transpiledEnum: T): Array<T[keyof T]>;
|
|
58
58
|
/**
|
package/dist/functions/enums.lua
CHANGED
|
@@ -26,7 +26,7 @@ local irange = ____utils.irange
|
|
|
26
26
|
-- Also see the `getEnumKeys` and `getEnumValues` helper functions.
|
|
27
27
|
--
|
|
28
28
|
-- For a more in depth explanation, see:
|
|
29
|
-
-- https://isaacscript.github.io/gotchas#iterating-over-enums
|
|
29
|
+
-- https://isaacscript.github.io/main/gotchas#iterating-over-enums
|
|
30
30
|
function ____exports.getEnumEntries(self, transpiledEnum)
|
|
31
31
|
local enumEntries = {}
|
|
32
32
|
for key, value in pairs(transpiledEnum) do
|
|
@@ -61,7 +61,7 @@ end
|
|
|
61
61
|
-- Also see the `getEnumEntries` and `getEnumValues` helper functions.
|
|
62
62
|
--
|
|
63
63
|
-- For a more in depth explanation, see:
|
|
64
|
-
-- https://isaacscript.github.io/gotchas#iterating-over-enums
|
|
64
|
+
-- https://isaacscript.github.io/main/gotchas#iterating-over-enums
|
|
65
65
|
function ____exports.getEnumKeys(self, transpiledEnum)
|
|
66
66
|
local enumEntries = ____exports.getEnumEntries(nil, transpiledEnum)
|
|
67
67
|
return __TS__ArrayMap(
|
|
@@ -92,7 +92,7 @@ end
|
|
|
92
92
|
-- Also see the `getEnumEntries` and `getEnumKeys` helper functions.
|
|
93
93
|
--
|
|
94
94
|
-- For a more in depth explanation, see:
|
|
95
|
-
-- https://isaacscript.github.io/gotchas#iterating-over-enums
|
|
95
|
+
-- https://isaacscript.github.io/main/gotchas#iterating-over-enums
|
|
96
96
|
function ____exports.getEnumValues(self, transpiledEnum)
|
|
97
97
|
local enumEntries = ____exports.getEnumEntries(nil, transpiledEnum)
|
|
98
98
|
return __TS__ArrayMap(
|
|
@@ -168,6 +168,9 @@ export declare function removeGridEntities<T extends AnyGridEntity>(gridEntities
|
|
|
168
168
|
* Helper function to remove a grid entity by providing the grid entity object or the grid index
|
|
169
169
|
* inside of the room.
|
|
170
170
|
*
|
|
171
|
+
* If removing a Devil Statue or an Angel Statue, this will also remove the associated effect
|
|
172
|
+
* (`EffectVariant.DEVIL` (6) or `EffectVariant.ANGEL` (9), respectively.)
|
|
173
|
+
*
|
|
171
174
|
* @param gridEntityOrGridIndex The grid entity or grid index to remove.
|
|
172
175
|
* @param updateRoom Whether or not to update the room after the grid entity is removed. This is
|
|
173
176
|
* generally a good idea because if the room is not updated, you will be unable to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gridEntities.d.ts","sourceRoot":"","sources":["../../src/functions/gridEntities.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,
|
|
1
|
+
{"version":3,"file":"gridEntities.d.ts","sourceRoot":"","sources":["../../src/functions/gridEntities.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAGjB,cAAc,EACd,iBAAiB,EAGjB,eAAe,EAChB,MAAM,8BAA8B,CAAC;AAStC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAgCvD;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,iBAAiB,EAAE,iBAAiB,EACpC,oBAAoB,EAAE,GAAG,GACxB,CAAC,cAAc,EAAE,GAAG,CAAC,GAAG,SAAS,CAqBnC;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,GAAG,EAAE,CAKzC;AAED;;;;;;GAMG;AACH,wBAAgB,kCAAkC,CAChD,UAAU,EAAE,UAAU,GACrB,MAAM,EAAE,CA4BV;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,iBAAiB,GAAE,iBAAsB,GACxC,UAAU,EAAE,CAMd;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,eAAe,CAC7B,GAAG,eAAe,EAAE,cAAc,EAAE,GACnC,U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EAAE,GAClC,UAAU,EAAE,CAYd;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,aAAa,EACxD,YAAY,EAAE,CAAC,EAAE,EACjB,UAAU,EAAE,OAAO,EACnB,GAAG,CAAC,EAAE,GAAG,GACR,CAAC,EAAE,CAoBL;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAC9B,qBAAqB,EAAE,UAAU,GAAG,GAAG,EACvC,UAAU,EAAE,OAAO,GAClB,IAAI,CAqCN;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAGnE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,gBAAgB,EAAE,GAAG,GAAG,IAAI,CA4B1D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,cAAc,EAAE,cAAc,EAC9B,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAExB;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,GAAG,EACZ,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAgCxB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,GAAG,GAAG,UAAU,GAAG,SAAS,CAkBtE"}
|
|
@@ -6,6 +6,7 @@ local Map = ____lualib.Map
|
|
|
6
6
|
local ____exports = {}
|
|
7
7
|
local getAllGridEntities
|
|
8
8
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
9
|
+
local EffectVariant = ____isaac_2Dtypescript_2Ddefinitions.EffectVariant
|
|
9
10
|
local GridCollisionClass = ____isaac_2Dtypescript_2Ddefinitions.GridCollisionClass
|
|
10
11
|
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
11
12
|
local PoopGridEntityVariant = ____isaac_2Dtypescript_2Ddefinitions.PoopGridEntityVariant
|
|
@@ -22,6 +23,10 @@ local GRID_ENTITY_XML_MAP = ____gridEntityXMLMap.GRID_ENTITY_XML_MAP
|
|
|
22
23
|
local ____roomShapeToTopLeftWallGridIndexMap = require("maps.roomShapeToTopLeftWallGridIndexMap")
|
|
23
24
|
local DEFAULT_TOP_LEFT_WALL_GRID_INDEX = ____roomShapeToTopLeftWallGridIndexMap.DEFAULT_TOP_LEFT_WALL_GRID_INDEX
|
|
24
25
|
local ROOM_SHAPE_TO_TOP_LEFT_WALL_GRID_INDEX_MAP = ____roomShapeToTopLeftWallGridIndexMap.ROOM_SHAPE_TO_TOP_LEFT_WALL_GRID_INDEX_MAP
|
|
26
|
+
local ____entities = require("functions.entities")
|
|
27
|
+
local removeEntities = ____entities.removeEntities
|
|
28
|
+
local ____entitiesSpecific = require("functions.entitiesSpecific")
|
|
29
|
+
local getEffects = ____entitiesSpecific.getEffects
|
|
25
30
|
local ____math = require("functions.math")
|
|
26
31
|
local isCircleIntersectingRectangle = ____math.isCircleIntersectingRectangle
|
|
27
32
|
local ____rooms = require("functions.rooms")
|
|
@@ -35,6 +40,7 @@ local ____utils = require("functions.utils")
|
|
|
35
40
|
local erange = ____utils.erange
|
|
36
41
|
local ____vector = require("functions.vector")
|
|
37
42
|
local isVector = ____vector.isVector
|
|
43
|
+
local vectorEquals = ____vector.vectorEquals
|
|
38
44
|
--- Helper function to get every legal grid index for the current room.
|
|
39
45
|
--
|
|
40
46
|
-- Under the hood, this uses the `Room.GetGridSize` method.
|
|
@@ -113,6 +119,9 @@ end
|
|
|
113
119
|
--- Helper function to remove a grid entity by providing the grid entity object or the grid index
|
|
114
120
|
-- inside of the room.
|
|
115
121
|
--
|
|
122
|
+
-- If removing a Devil Statue or an Angel Statue, this will also remove the associated effect
|
|
123
|
+
-- (`EffectVariant.DEVIL` (6) or `EffectVariant.ANGEL` (9), respectively.)
|
|
124
|
+
--
|
|
116
125
|
-- @param gridEntityOrGridIndex The grid entity or grid index to remove.
|
|
117
126
|
-- @param updateRoom Whether or not to update the room after the grid entity is removed. This is
|
|
118
127
|
-- generally a good idea because if the room is not updated, you will be unable to
|
|
@@ -121,11 +130,33 @@ end
|
|
|
121
130
|
-- so set this to false if you need to run this function multiple times.
|
|
122
131
|
function ____exports.removeGridEntity(self, gridEntityOrGridIndex, updateRoom)
|
|
123
132
|
local room = game:GetRoom()
|
|
133
|
+
local ____isNumber_result_0
|
|
134
|
+
if isNumber(nil, gridEntityOrGridIndex) then
|
|
135
|
+
____isNumber_result_0 = room:GetGridEntity(gridEntityOrGridIndex)
|
|
136
|
+
else
|
|
137
|
+
____isNumber_result_0 = gridEntityOrGridIndex
|
|
138
|
+
end
|
|
139
|
+
local gridEntity = ____isNumber_result_0
|
|
140
|
+
if gridEntity == nil then
|
|
141
|
+
return
|
|
142
|
+
end
|
|
143
|
+
local gridEntityType = gridEntity:GetType()
|
|
144
|
+
local variant = gridEntity:GetVariant()
|
|
145
|
+
local position = gridEntity.Position
|
|
124
146
|
local gridIndex = isNumber(nil, gridEntityOrGridIndex) and gridEntityOrGridIndex or gridEntityOrGridIndex:GetGridIndex()
|
|
125
147
|
room:RemoveGridEntity(gridIndex, 0, false)
|
|
126
148
|
if updateRoom then
|
|
127
149
|
roomUpdateSafe(nil)
|
|
128
150
|
end
|
|
151
|
+
if gridEntityType == GridEntityType.STATUE then
|
|
152
|
+
local effectVariant = variant == asNumber(nil, StatueVariant.DEVIL) and EffectVariant.DEVIL or EffectVariant.ANGEL
|
|
153
|
+
local effects = getEffects(nil, effectVariant)
|
|
154
|
+
local effectsOnTile = __TS__ArrayFilter(
|
|
155
|
+
effects,
|
|
156
|
+
function(____, effect) return vectorEquals(nil, effect.Position, position) end
|
|
157
|
+
)
|
|
158
|
+
removeEntities(nil, effectsOnTile)
|
|
159
|
+
end
|
|
129
160
|
end
|
|
130
161
|
--- Helper function to spawn a grid entity with a specific variant.
|
|
131
162
|
--
|
|
@@ -135,13 +166,13 @@ end
|
|
|
135
166
|
-- - allows you to specify the grid index or the position
|
|
136
167
|
function ____exports.spawnGridEntityWithVariant(self, gridEntityType, variant, gridIndexOrPosition)
|
|
137
168
|
local room = game:GetRoom()
|
|
138
|
-
local
|
|
169
|
+
local ____isVector_result_1
|
|
139
170
|
if isVector(nil, gridIndexOrPosition) then
|
|
140
|
-
|
|
171
|
+
____isVector_result_1 = room:GetGridEntityFromPos(gridIndexOrPosition)
|
|
141
172
|
else
|
|
142
|
-
|
|
173
|
+
____isVector_result_1 = room:GetGridEntity(gridIndexOrPosition)
|
|
143
174
|
end
|
|
144
|
-
local existingGridEntity =
|
|
175
|
+
local existingGridEntity = ____isVector_result_1
|
|
145
176
|
if existingGridEntity ~= nil then
|
|
146
177
|
____exports.removeGridEntity(nil, existingGridEntity, true)
|
|
147
178
|
end
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playerStats.d.ts","sourceRoot":"","sources":["../../src/functions/playerStats.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,oFAAoF;AACpF,wBAAgB,aAAa,CAAC,CAAC,SAAS,QAAQ,EAC9C,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,CAAC,GACV,YAAY,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"playerStats.d.ts","sourceRoot":"","sources":["../../src/functions/playerStats.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,oFAAoF;AACpF,wBAAgB,aAAa,CAAC,CAAC,SAAS,QAAQ,EAC9C,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,CAAC,GACV,YAAY,CAAC,CAAC,CAAC,CAkBjB"}
|
|
@@ -15,7 +15,8 @@ function ____exports.getPlayerStat(self, player, statType)
|
|
|
15
15
|
[StatType.TEAR_FLAG] = player.TearFlags,
|
|
16
16
|
[StatType.TEAR_COLOR] = player.TearColor,
|
|
17
17
|
[StatType.FLYING] = player.CanFly,
|
|
18
|
-
[StatType.LUCK] = player.Luck
|
|
18
|
+
[StatType.LUCK] = player.Luck,
|
|
19
|
+
[StatType.SIZE] = player.SpriteScale
|
|
19
20
|
})[statType]
|
|
20
21
|
end
|
|
21
22
|
return ____exports
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"players.d.ts","sourceRoot":"","sources":["../../src/functions/players.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EAET,eAAe,EAIf,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"players.d.ts","sourceRoot":"","sources":["../../src/functions/players.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EAET,eAAe,EAIf,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AA6BjD,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAON;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,OAAO,CACrB,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,GACb,IAAI,CA4CN;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAGT;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAGrE;AAED;;;;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N;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,YAAY,EACpB,GAAG,gBAAgB,EAAE,eAAe,EAAE,GACrC,OAAO,CAIT;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAON;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAIlE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,UAAU,EACtB,MAAM,CAAC,EAAE,GAAG,EACZ,WAAW,UAAQ,GAClB,IAAI,CA6DN;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,aAAa,UAAO,GACnB,IAAI,CAsBN;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAEN"}
|
|
@@ -42,6 +42,7 @@ local getCollectibleArray = ____collectibleSet.getCollectibleArray
|
|
|
42
42
|
local ____enums = require("functions.enums")
|
|
43
43
|
local getEnumValues = ____enums.getEnumValues
|
|
44
44
|
local ____playerIndex = require("functions.playerIndex")
|
|
45
|
+
local getAllPlayers = ____playerIndex.getAllPlayers
|
|
45
46
|
local getPlayerIndexVanilla = ____playerIndex.getPlayerIndexVanilla
|
|
46
47
|
local getPlayers = ____playerIndex.getPlayers
|
|
47
48
|
local ____tears = require("functions.tears")
|
|
@@ -214,14 +215,14 @@ function ____exports.addTrinketCostume(self, player, trinketType)
|
|
|
214
215
|
player:AddCostume(itemConfigTrinket, false)
|
|
215
216
|
end
|
|
216
217
|
function ____exports.anyPlayerHasCollectible(self, collectibleType)
|
|
217
|
-
local players =
|
|
218
|
+
local players = getAllPlayers(nil)
|
|
218
219
|
return __TS__ArraySome(
|
|
219
220
|
players,
|
|
220
221
|
function(____, player) return player:HasCollectible(collectibleType) end
|
|
221
222
|
)
|
|
222
223
|
end
|
|
223
224
|
function ____exports.anyPlayerHasTrinket(self, trinketType)
|
|
224
|
-
local players =
|
|
225
|
+
local players = getAllPlayers(nil)
|
|
225
226
|
return __TS__ArraySome(
|
|
226
227
|
players,
|
|
227
228
|
function(____, player) return player:HasTrinket(trinketType) end
|
|
@@ -138,6 +138,11 @@ export declare function inMineShaft(): boolean;
|
|
|
138
138
|
* will only work for mini-bosses that have dedicated boss rooms in the "00.special rooms.stb" file.
|
|
139
139
|
*/
|
|
140
140
|
export declare function inMinibossRoomOf(minibossID: MinibossID): boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Helper function to check if the current room is a "mirror room" in Downpour or Dross. (These
|
|
143
|
+
* rooms are marked with a specific sub-type.)
|
|
144
|
+
*/
|
|
145
|
+
export declare function inMirrorRoom(): boolean;
|
|
141
146
|
/**
|
|
142
147
|
* Helper function for checking if the room is a secret shop (from the Member Card collectible).
|
|
143
148
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooms.d.ts","sourceRoot":"","sources":["../../src/functions/rooms.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EACZ,MAAM,EACN,SAAS,
|
|
1
|
+
{"version":3,"file":"rooms.d.ts","sourceRoot":"","sources":["../../src/functions/rooms.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EACZ,MAAM,EACN,SAAS,EAMT,YAAY,EACZ,UAAU,EAGV,QAAQ,EAGT,MAAM,8BAA8B,CAAC;AAkCtC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,aAAa,EAAE,GAAG,GAAG,IAAI,CAenD;AAED;;;G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FAA+F;AAC/F,wBAAgB,OAAO,IAAI,OAAO,CAUjC;AAED,wBAAgB,eAAe,IAAI,OAAO,CAIzC;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,OAAO,CASrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAWhE;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAWtC;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAItC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAMxC;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,kBAAkB,CAAC,EAAE,QAAQ,EAAE,GAAG,OAAO,CAcxE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAWrC;AAED,+DAA+D;AAC/D,wBAAgB,WAAW,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAG5D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,IAAI,CA8BrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAKvC"}
|
package/dist/functions/rooms.lua
CHANGED
|
@@ -15,6 +15,7 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
|
|
|
15
15
|
local AngelRoomSubType = ____isaac_2Dtypescript_2Ddefinitions.AngelRoomSubType
|
|
16
16
|
local Dimension = ____isaac_2Dtypescript_2Ddefinitions.Dimension
|
|
17
17
|
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
18
|
+
local DownpourRoomSubType = ____isaac_2Dtypescript_2Ddefinitions.DownpourRoomSubType
|
|
18
19
|
local DungeonSubType = ____isaac_2Dtypescript_2Ddefinitions.DungeonSubType
|
|
19
20
|
local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
|
|
20
21
|
local HomeRoomSubType = ____isaac_2Dtypescript_2Ddefinitions.HomeRoomSubType
|
|
@@ -324,6 +325,15 @@ function ____exports.inMinibossRoomOf(self, minibossID)
|
|
|
324
325
|
local roomSubType = getRoomSubType(nil)
|
|
325
326
|
return roomType == RoomType.MINI_BOSS and roomStageID == StageID.SPECIAL_ROOMS and roomSubType == asNumber(nil, minibossID)
|
|
326
327
|
end
|
|
328
|
+
--- Helper function to check if the current room is a "mirror room" in Downpour or Dross. (These
|
|
329
|
+
-- rooms are marked with a specific sub-type.)
|
|
330
|
+
function ____exports.inMirrorRoom(self)
|
|
331
|
+
local room = game:GetRoom()
|
|
332
|
+
local roomType = room:GetType()
|
|
333
|
+
local roomStageID = getRoomStageID(nil)
|
|
334
|
+
local roomSubType = getRoomSubType(nil)
|
|
335
|
+
return roomType == RoomType.DEFAULT and (roomStageID == StageID.DOWNPOUR or roomStageID == StageID.DROSS) and roomSubType == asNumber(nil, DownpourRoomSubType.MIRROR)
|
|
336
|
+
end
|
|
327
337
|
--- Helper function for checking if the room is a secret shop (from the Member Card collectible).
|
|
328
338
|
--
|
|
329
339
|
-- Secret shops are simply copies of normal shops, but with the backdrop of a secret room. In other
|
|
@@ -398,12 +408,12 @@ function ____exports.setRoomCleared(self)
|
|
|
398
408
|
for ____, door in ipairs(getDoors(nil)) do
|
|
399
409
|
do
|
|
400
410
|
if isHiddenSecretRoomDoor(nil, door) then
|
|
401
|
-
goto
|
|
411
|
+
goto __continue49
|
|
402
412
|
end
|
|
403
413
|
openDoorFast(nil, door)
|
|
404
414
|
door.ExtraVisible = false
|
|
405
415
|
end
|
|
406
|
-
::
|
|
416
|
+
::__continue49::
|
|
407
417
|
end
|
|
408
418
|
sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
|
|
409
419
|
game:ShakeScreen(0)
|