isaacscript-common 55.1.1 → 56.0.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/index.rollup.d.ts +44 -16
- package/dist/isaacscript-common.lua +39 -7
- package/dist/src/functions/cards.d.ts +18 -15
- package/dist/src/functions/cards.d.ts.map +1 -1
- package/dist/src/functions/cards.lua +18 -15
- package/dist/src/functions/roomShape.d.ts +5 -0
- package/dist/src/functions/roomShape.d.ts.map +1 -1
- package/dist/src/functions/roomShape.lua +7 -0
- package/dist/src/functions/rooms.d.ts +10 -0
- package/dist/src/functions/rooms.d.ts.map +1 -1
- package/dist/src/functions/rooms.lua +14 -2
- package/dist/src/functions/stage.d.ts +8 -1
- package/dist/src/functions/stage.d.ts.map +1 -1
- package/dist/src/functions/stage.lua +5 -0
- package/dist/src/sets/bigRoomShapesSet.d.ts +3 -0
- package/dist/src/sets/bigRoomShapesSet.d.ts.map +1 -0
- package/dist/src/sets/bigRoomShapesSet.lua +17 -0
- package/package.json +2 -2
- package/src/functions/cards.ts +18 -15
- package/src/functions/roomShape.ts +9 -0
- package/src/functions/rooms.ts +18 -1
- package/src/functions/stage.ts +8 -1
- package/src/sets/bigRoomShapesSet.ts +12 -0
- package/src/sets/itemConfigCardTypesForCardsSet.ts +4 -4
package/dist/index.rollup.d.ts
CHANGED
|
@@ -4987,9 +4987,12 @@ export declare function getBossRushDoor(): GridEntityDoor | undefined;
|
|
|
4987
4987
|
export declare function getBossSet(stage: LevelStage, stageType: StageType): ReadonlySet<BossID> | undefined;
|
|
4988
4988
|
|
|
4989
4989
|
/**
|
|
4990
|
-
* Helper function to get a card description from a
|
|
4990
|
+
* Helper function to get a card description from a `CardType` value. Returns "Unknown" if the
|
|
4991
|
+
* provided card type is not valid.
|
|
4991
4992
|
*
|
|
4992
|
-
*
|
|
4993
|
+
* This function works for both vanilla and modded trinkets.
|
|
4994
|
+
*
|
|
4995
|
+
* For example, `getCardDescription(CardType.FOOL)` would return "Where journey begins".
|
|
4993
4996
|
*/
|
|
4994
4997
|
export declare function getCardDescription(cardType: CardType): string;
|
|
4995
4998
|
|
|
@@ -7842,7 +7845,14 @@ export declare function getVoidDoor(): GridEntityDoor | undefined;
|
|
|
7842
7845
|
*/
|
|
7843
7846
|
export declare function giveTrinketsBack(player: EntityPlayer, trinketSituation: TrinketSituation | undefined): void;
|
|
7844
7847
|
|
|
7845
|
-
/**
|
|
7848
|
+
/**
|
|
7849
|
+
* Helper function to directly warp to a specific stage using the "stage" console command.
|
|
7850
|
+
*
|
|
7851
|
+
* Note that if you use this function on game frame 0, it will confuse the
|
|
7852
|
+
* `POST_GAME_STARTED_REORDERED`, `POST_NEW_LEVEL_REORDERED`, and `POST_NEW_ROOM_REORDERED` custom
|
|
7853
|
+
* callbacks. If you are using the function in this situation, remember to call the
|
|
7854
|
+
* `reorderedCallbacksSetStage` function.
|
|
7855
|
+
*/
|
|
7846
7856
|
export declare function goToStage(stage: LevelStage, stageType: StageType): void;
|
|
7847
7857
|
|
|
7848
7858
|
export declare const GRID_INDEX_CENTER_OF_1X1_ROOM = 67;
|
|
@@ -8189,6 +8199,12 @@ export declare function inAngelShop(): boolean;
|
|
|
8189
8199
|
*/
|
|
8190
8200
|
export declare function inBeastRoom(): boolean;
|
|
8191
8201
|
|
|
8202
|
+
/**
|
|
8203
|
+
* Helper function to detect if the current room is big. Specifically, this is all 1x2 rooms, 2x2
|
|
8204
|
+
* rooms, and L rooms.
|
|
8205
|
+
*/
|
|
8206
|
+
export declare function inBigRoom(): boolean;
|
|
8207
|
+
|
|
8192
8208
|
/**
|
|
8193
8209
|
* Helper function to check if the current room is the Boss Room for a particular boss. This will
|
|
8194
8210
|
* only work for bosses that have dedicated boss rooms in the "00.special rooms.stb" file.
|
|
@@ -8595,6 +8611,18 @@ export declare function isBeastRoom(roomData: RoomConfig): boolean;
|
|
|
8595
8611
|
*/
|
|
8596
8612
|
export declare function isBethany(player: EntityPlayer): boolean;
|
|
8597
8613
|
|
|
8614
|
+
/**
|
|
8615
|
+
* Helper function to detect if the provided room is big. Specifically, this is all 1x2 rooms, 2x2
|
|
8616
|
+
* rooms, and L rooms.
|
|
8617
|
+
*/
|
|
8618
|
+
export declare function isBigRoom(roomData: RoomConfig): boolean;
|
|
8619
|
+
|
|
8620
|
+
/**
|
|
8621
|
+
* Helper function to detect if the provided room shape is big. Specifically, this is all 1x2 rooms,
|
|
8622
|
+
* 2x2 rooms, and L rooms.
|
|
8623
|
+
*/
|
|
8624
|
+
export declare function isBigRoomShape(roomShape: RoomShape): boolean;
|
|
8625
|
+
|
|
8598
8626
|
/** Helper function to check if something is an instantiated `BitSet128` object. */
|
|
8599
8627
|
export declare function isBitSet128(object: unknown): object is BitSet128;
|
|
8600
8628
|
|
|
@@ -8634,11 +8662,12 @@ export declare function isBossRoomOf(roomData: RoomConfig, bossID: BossID): bool
|
|
|
8634
8662
|
export declare function isBossRushDoor(door: GridEntityDoor): boolean;
|
|
8635
8663
|
|
|
8636
8664
|
/**
|
|
8637
|
-
* Returns true for
|
|
8638
|
-
*
|
|
8639
|
-
* -
|
|
8640
|
-
* -
|
|
8641
|
-
* -
|
|
8665
|
+
* Returns true for card types that have the following item config card type:
|
|
8666
|
+
*
|
|
8667
|
+
* - `ItemConfigCardType.TAROT` (0)
|
|
8668
|
+
* - `ItemConfigCardType.SUIT` (1)
|
|
8669
|
+
* - `ItemConfigCardType.SPECIAL` (3)
|
|
8670
|
+
* - `ItemConfigCardType.TAROT_REVERSE` (5)
|
|
8642
8671
|
*/
|
|
8643
8672
|
export declare function isCard(cardType: CardType): boolean;
|
|
8644
8673
|
|
|
@@ -9252,7 +9281,7 @@ export declare function isMirrorRoom(roomData: RoomConfig): boolean;
|
|
|
9252
9281
|
*/
|
|
9253
9282
|
export declare function isMissedTear(tear: EntityTear): boolean;
|
|
9254
9283
|
|
|
9255
|
-
/** Returns true for any card
|
|
9284
|
+
/** Returns true for any card type added by a mod. */
|
|
9256
9285
|
export declare function isModdedCardType(cardType: CardType): boolean;
|
|
9257
9286
|
|
|
9258
9287
|
export declare function isModdedCharacter(character: PlayerType): boolean;
|
|
@@ -9337,7 +9366,7 @@ export declare function isPlayer(variable: unknown): variable is EntityPlayer;
|
|
|
9337
9366
|
*/
|
|
9338
9367
|
export declare function isPlayerAbleToAim(player: EntityPlayer): boolean;
|
|
9339
9368
|
|
|
9340
|
-
/** Returns true for
|
|
9369
|
+
/** Returns true for card types that have `ItemConfigCardType.SPECIAL_OBJECT`. */
|
|
9341
9370
|
export declare function isPocketItemObject(cardType: CardType): boolean;
|
|
9342
9371
|
|
|
9343
9372
|
/** Helper function to detect if a variable is of type `GridEntityPoop`. */
|
|
@@ -9443,7 +9472,7 @@ export declare function isRepentanceDoor(door: GridEntityDoor): boolean;
|
|
|
9443
9472
|
*/
|
|
9444
9473
|
export declare function isRepentanceStage(stageType: StageType): boolean;
|
|
9445
9474
|
|
|
9446
|
-
/** Returns true for
|
|
9475
|
+
/** Returns true for card types that have `ItemConfigCardType.TAROT_REVERSE`. */
|
|
9447
9476
|
export declare function isReverseTarotCard(cardType: CardType): boolean;
|
|
9448
9477
|
|
|
9449
9478
|
/** Helper function to check if something is an instantiated `RNG` object. */
|
|
@@ -9491,7 +9520,7 @@ export declare function isRoomType(roomData: RoomConfig, ...roomTypes: RoomType[
|
|
|
9491
9520
|
*/
|
|
9492
9521
|
export declare function isRoomVisible(roomGridIndexOrRoomDescriptor: int | RoomDescriptor, minimapAPI?: boolean): boolean;
|
|
9493
9522
|
|
|
9494
|
-
/** Returns true for
|
|
9523
|
+
/** Returns true for card types that have `ItemConfigCardType.RUNE`. */
|
|
9495
9524
|
export declare function isRune(cardType: CardType): boolean;
|
|
9496
9525
|
|
|
9497
9526
|
/** For `PickupVariant.SACK` (69). */
|
|
@@ -9600,7 +9629,7 @@ export declare function isSlot(entity: Entity): entity is EntitySlot;
|
|
|
9600
9629
|
/** Returns true for the specific variants of `EntityType.SLOT` that are machines. */
|
|
9601
9630
|
export declare function isSlotMachine(entity: Entity): boolean;
|
|
9602
9631
|
|
|
9603
|
-
/** Returns true for
|
|
9632
|
+
/** Returns true for card types that have `ItemConfigCardType.SPECIAL`. */
|
|
9604
9633
|
export declare function isSpecialCard(cardType: CardType): boolean;
|
|
9605
9634
|
|
|
9606
9635
|
/** Helper function to detect if a variable is of type `GridEntitySpikes`. */
|
|
@@ -9670,7 +9699,7 @@ export declare function isStoryBoss(entityType: EntityType): boolean;
|
|
|
9670
9699
|
|
|
9671
9700
|
export declare function isString(variable: unknown): variable is string;
|
|
9672
9701
|
|
|
9673
|
-
/** Returns true for
|
|
9702
|
+
/** Returns true for card types that have `ItemConfigCardType.SUIT`. */
|
|
9674
9703
|
export declare function isSuitCard(cardType: CardType): boolean;
|
|
9675
9704
|
|
|
9676
9705
|
export declare function isTable(variable: unknown): variable is LuaMap<AnyNotNil, unknown>;
|
|
@@ -9684,7 +9713,7 @@ export declare function isTainted(player: EntityPlayer): boolean;
|
|
|
9684
9713
|
/** Helper function for detecting when a player is Tainted Lazarus or Dead Tainted Lazarus. */
|
|
9685
9714
|
export declare function isTaintedLazarus(player: EntityPlayer): boolean;
|
|
9686
9715
|
|
|
9687
|
-
/** Returns true for
|
|
9716
|
+
/** Returns true for card types that have `ItemConfigCardType.TAROT`. */
|
|
9688
9717
|
export declare function isTarotCard(cardType: CardType): boolean;
|
|
9689
9718
|
|
|
9690
9719
|
/** Helper function to detect if a variable is of type `EntityTear`. */
|
|
@@ -9768,7 +9797,6 @@ export declare function isValidCollectibleType(collectibleType: CollectibleType)
|
|
|
9768
9797
|
*/
|
|
9769
9798
|
export declare function isValidGridPosition(gridPosition: Vector, roomShape: RoomShape): boolean;
|
|
9770
9799
|
|
|
9771
|
-
/** Returns true for any vanilla card or rune. */
|
|
9772
9800
|
export declare function isVanillaCardType(cardType: CardType): boolean;
|
|
9773
9801
|
|
|
9774
9802
|
export declare function isVanillaCharacter(character: PlayerType): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common
|
|
3
|
+
isaacscript-common 56.0.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -8889,8 +8889,8 @@ ____exports.TrinketType.CURSED_SKULL = 43
|
|
|
8889
8889
|
____exports.TrinketType[____exports.TrinketType.CURSED_SKULL] = "CURSED_SKULL"
|
|
8890
8890
|
____exports.TrinketType.SAFETY_CAP = 44
|
|
8891
8891
|
____exports.TrinketType[____exports.TrinketType.SAFETY_CAP] = "SAFETY_CAP"
|
|
8892
|
-
____exports.TrinketType.
|
|
8893
|
-
____exports.TrinketType[____exports.TrinketType.
|
|
8892
|
+
____exports.TrinketType.ACE_OF_SPADES = 45
|
|
8893
|
+
____exports.TrinketType[____exports.TrinketType.ACE_OF_SPADES] = "ACE_OF_SPADES"
|
|
8894
8894
|
____exports.TrinketType.ISAACS_FORK = 46
|
|
8895
8895
|
____exports.TrinketType[____exports.TrinketType.ISAACS_FORK] = "ISAACS_FORK"
|
|
8896
8896
|
____exports.TrinketType.MISSING_PAGE = 48
|
|
@@ -8911,8 +8911,8 @@ ____exports.TrinketType.MAGGYS_FAITH = 55
|
|
|
8911
8911
|
____exports.TrinketType[____exports.TrinketType.MAGGYS_FAITH] = "MAGGYS_FAITH"
|
|
8912
8912
|
____exports.TrinketType.JUDAS_TONGUE = 56
|
|
8913
8913
|
____exports.TrinketType[____exports.TrinketType.JUDAS_TONGUE] = "JUDAS_TONGUE"
|
|
8914
|
-
____exports.TrinketType.
|
|
8915
|
-
____exports.TrinketType[____exports.TrinketType.
|
|
8914
|
+
____exports.TrinketType.BLUE_BABYS_SOUL = 57
|
|
8915
|
+
____exports.TrinketType[____exports.TrinketType.BLUE_BABYS_SOUL] = "BLUE_BABYS_SOUL"
|
|
8916
8916
|
____exports.TrinketType.SAMSONS_LOCK = 58
|
|
8917
8917
|
____exports.TrinketType[____exports.TrinketType.SAMSONS_LOCK] = "SAMSONS_LOCK"
|
|
8918
8918
|
____exports.TrinketType.CAINS_EYE = 59
|
|
@@ -25893,6 +25893,25 @@ local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
|
|
|
25893
25893
|
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
25894
25894
|
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
25895
25895
|
____exports.L_ROOM_SHAPES_SET = __TS__New(ReadonlySet, {RoomShape.LTL, RoomShape.LTR, RoomShape.LBL, RoomShape.LBR})
|
|
25896
|
+
return ____exports
|
|
25897
|
+
end,
|
|
25898
|
+
["src.sets.bigRoomShapesSet"] = function(...)
|
|
25899
|
+
local ____lualib = require("lualib_bundle")
|
|
25900
|
+
local __TS__New = ____lualib.__TS__New
|
|
25901
|
+
local ____exports = {}
|
|
25902
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
25903
|
+
local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
|
|
25904
|
+
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
25905
|
+
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
25906
|
+
____exports.BIG_ROOM_SHAPES_SET = __TS__New(ReadonlySet, {
|
|
25907
|
+
RoomShape.SHAPE_1x2,
|
|
25908
|
+
RoomShape.SHAPE_2x1,
|
|
25909
|
+
RoomShape.SHAPE_2x2,
|
|
25910
|
+
RoomShape.LTL,
|
|
25911
|
+
RoomShape.LTR,
|
|
25912
|
+
RoomShape.LBL,
|
|
25913
|
+
RoomShape.LBR
|
|
25914
|
+
})
|
|
25896
25915
|
return ____exports
|
|
25897
25916
|
end,
|
|
25898
25917
|
["src.sets.narrowRoomShapesSet"] = function(...)
|
|
@@ -25928,6 +25947,8 @@ local ____roomShapeVolumes = require("src.objects.roomShapeVolumes")
|
|
|
25928
25947
|
local ROOM_SHAPE_VOLUMES = ____roomShapeVolumes.ROOM_SHAPE_VOLUMES
|
|
25929
25948
|
local ____LRoomShapesSet = require("src.sets.LRoomShapesSet")
|
|
25930
25949
|
local L_ROOM_SHAPES_SET = ____LRoomShapesSet.L_ROOM_SHAPES_SET
|
|
25950
|
+
local ____bigRoomShapesSet = require("src.sets.bigRoomShapesSet")
|
|
25951
|
+
local BIG_ROOM_SHAPES_SET = ____bigRoomShapesSet.BIG_ROOM_SHAPES_SET
|
|
25931
25952
|
local ____narrowRoomShapesSet = require("src.sets.narrowRoomShapesSet")
|
|
25932
25953
|
local NARROW_ROOM_SHAPES_SET = ____narrowRoomShapesSet.NARROW_ROOM_SHAPES_SET
|
|
25933
25954
|
function ____exports.isRoomShapeDoubleCharge(self, roomShape)
|
|
@@ -25961,6 +25982,9 @@ end
|
|
|
25961
25982
|
function ____exports.getRoomShapeWidth(self, roomShape)
|
|
25962
25983
|
return ROOM_SHAPE_TO_GRID_WIDTH[roomShape]
|
|
25963
25984
|
end
|
|
25985
|
+
function ____exports.isBigRoomShape(self, roomShape)
|
|
25986
|
+
return BIG_ROOM_SHAPES_SET:has(roomShape)
|
|
25987
|
+
end
|
|
25964
25988
|
function ____exports.isLRoomShape(self, roomShape)
|
|
25965
25989
|
return L_ROOM_SHAPES_SET:has(roomShape)
|
|
25966
25990
|
end
|
|
@@ -28104,6 +28128,7 @@ local getRoomDescriptor = ____roomData.getRoomDescriptor
|
|
|
28104
28128
|
local getRoomDescriptorReadOnly = ____roomData.getRoomDescriptorReadOnly
|
|
28105
28129
|
local getRoomGridIndex = ____roomData.getRoomGridIndex
|
|
28106
28130
|
local ____roomShape = require("src.functions.roomShape")
|
|
28131
|
+
local isBigRoomShape = ____roomShape.isBigRoomShape
|
|
28107
28132
|
local isLRoomShape = ____roomShape.isLRoomShape
|
|
28108
28133
|
local ____roomTransition = require("src.functions.roomTransition")
|
|
28109
28134
|
local reloadRoom = ____roomTransition.reloadRoom
|
|
@@ -28168,6 +28193,9 @@ end
|
|
|
28168
28193
|
function ____exports.isBeastRoom(self, roomData)
|
|
28169
28194
|
return roomData.Type == RoomType.DUNGEON and roomData.Subtype == asNumber(nil, DungeonSubType.BEAST_ROOM)
|
|
28170
28195
|
end
|
|
28196
|
+
function ____exports.isBigRoom(self, roomData)
|
|
28197
|
+
return isBigRoomShape(nil, roomData.Shape)
|
|
28198
|
+
end
|
|
28171
28199
|
function ____exports.isBossRoomOf(self, roomData, bossID)
|
|
28172
28200
|
return roomData.Type == RoomType.BOSS and roomData.StageID == StageID.SPECIAL_ROOMS and roomData.Subtype == asNumber(nil, bossID)
|
|
28173
28201
|
end
|
|
@@ -28302,6 +28330,10 @@ function ____exports.inBeastRoom(self)
|
|
|
28302
28330
|
local roomData = getRoomData(nil)
|
|
28303
28331
|
return ____exports.isBeastRoom(nil, roomData)
|
|
28304
28332
|
end
|
|
28333
|
+
function ____exports.inBigRoom(self)
|
|
28334
|
+
local roomData = getRoomData(nil)
|
|
28335
|
+
return ____exports.isBigRoom(nil, roomData)
|
|
28336
|
+
end
|
|
28305
28337
|
function ____exports.inBossRoomOf(self, bossID)
|
|
28306
28338
|
local roomData = getRoomData(nil)
|
|
28307
28339
|
return ____exports.isBossRoomOf(nil, roomData, bossID)
|
|
@@ -28441,12 +28473,12 @@ function ____exports.setRoomCleared(self)
|
|
|
28441
28473
|
for ____, door in ipairs(getDoors(nil)) do
|
|
28442
28474
|
do
|
|
28443
28475
|
if isHiddenSecretRoomDoor(nil, door) then
|
|
28444
|
-
goto
|
|
28476
|
+
goto __continue84
|
|
28445
28477
|
end
|
|
28446
28478
|
openDoorFast(nil, door)
|
|
28447
28479
|
door.ExtraVisible = false
|
|
28448
28480
|
end
|
|
28449
|
-
::
|
|
28481
|
+
::__continue84::
|
|
28450
28482
|
end
|
|
28451
28483
|
sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
|
|
28452
28484
|
game:ShakeScreen(0)
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { CardType } from "isaac-typescript-definitions";
|
|
2
2
|
import { ItemConfigCardType } from "isaac-typescript-definitions";
|
|
3
3
|
/**
|
|
4
|
-
* Helper function to get a card description from a
|
|
4
|
+
* Helper function to get a card description from a `CardType` value. Returns "Unknown" if the
|
|
5
|
+
* provided card type is not valid.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
+
* This function works for both vanilla and modded trinkets.
|
|
8
|
+
*
|
|
9
|
+
* For example, `getCardDescription(CardType.FOOL)` would return "Where journey begins".
|
|
7
10
|
*/
|
|
8
11
|
export declare function getCardDescription(cardType: CardType): string;
|
|
9
12
|
/**
|
|
@@ -23,30 +26,30 @@ export declare function getCardName(cardType: CardType): string;
|
|
|
23
26
|
*/
|
|
24
27
|
export declare function getItemConfigCardType(cardType: CardType): ItemConfigCardType | undefined;
|
|
25
28
|
/**
|
|
26
|
-
* Returns true for
|
|
27
|
-
*
|
|
28
|
-
* -
|
|
29
|
-
* -
|
|
30
|
-
* -
|
|
29
|
+
* Returns true for card types that have the following item config card type:
|
|
30
|
+
*
|
|
31
|
+
* - `ItemConfigCardType.TAROT` (0)
|
|
32
|
+
* - `ItemConfigCardType.SUIT` (1)
|
|
33
|
+
* - `ItemConfigCardType.SPECIAL` (3)
|
|
34
|
+
* - `ItemConfigCardType.TAROT_REVERSE` (5)
|
|
31
35
|
*/
|
|
32
36
|
export declare function isCard(cardType: CardType): boolean;
|
|
33
37
|
/** Returns whether the given card type matches the specified item config card type. */
|
|
34
38
|
export declare function isCardType(cardType: CardType, itemConfigCardType: ItemConfigCardType): boolean;
|
|
35
|
-
/** Returns true for any card
|
|
39
|
+
/** Returns true for any card type added by a mod. */
|
|
36
40
|
export declare function isModdedCardType(cardType: CardType): boolean;
|
|
37
|
-
/** Returns true for
|
|
41
|
+
/** Returns true for card types that have `ItemConfigCardType.SPECIAL_OBJECT`. */
|
|
38
42
|
export declare function isPocketItemObject(cardType: CardType): boolean;
|
|
39
|
-
/** Returns true for
|
|
43
|
+
/** Returns true for card types that have `ItemConfigCardType.TAROT_REVERSE`. */
|
|
40
44
|
export declare function isReverseTarotCard(cardType: CardType): boolean;
|
|
41
|
-
/** Returns true for
|
|
45
|
+
/** Returns true for card types that have `ItemConfigCardType.RUNE`. */
|
|
42
46
|
export declare function isRune(cardType: CardType): boolean;
|
|
43
|
-
/** Returns true for
|
|
47
|
+
/** Returns true for card types that have `ItemConfigCardType.SPECIAL`. */
|
|
44
48
|
export declare function isSpecialCard(cardType: CardType): boolean;
|
|
45
|
-
/** Returns true for
|
|
49
|
+
/** Returns true for card types that have `ItemConfigCardType.SUIT`. */
|
|
46
50
|
export declare function isSuitCard(cardType: CardType): boolean;
|
|
47
|
-
/** Returns true for
|
|
51
|
+
/** Returns true for card types that have `ItemConfigCardType.TAROT`. */
|
|
48
52
|
export declare function isTarotCard(cardType: CardType): boolean;
|
|
49
|
-
/** Returns true for any vanilla card or rune. */
|
|
50
53
|
export declare function isVanillaCardType(cardType: CardType): boolean;
|
|
51
54
|
/**
|
|
52
55
|
* Helper function to use a card without showing an animation and without the announcer voice
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cards.d.ts","sourceRoot":"","sources":["../../../src/functions/cards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAW,MAAM,8BAA8B,CAAC;AAW3E
|
|
1
|
+
{"version":3,"file":"cards.d.ts","sourceRoot":"","sources":["../../../src/functions/cards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAW,MAAM,8BAA8B,CAAC;AAW3E;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAgB7D;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAgBtD;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,QAAQ,GACjB,kBAAkB,GAAG,SAAS,CAOhC;AAED;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAOlD;AAED,uFAAuF;AACvF,wBAAgB,UAAU,CACxB,QAAQ,EAAE,QAAQ,EAClB,kBAAkB,EAAE,kBAAkB,GACrC,OAAO,CAET;AAED,qDAAqD;AACrD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAE5D;AAED,iFAAiF;AACjF,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAE9D;AAED,gFAAgF;AAChF,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAE9D;AAED,uEAAuE;AACvE,wBAAgB,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAElD;AAED,0EAA0E;AAC1E,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAEzD;AAED,uEAAuE;AACvE,wBAAgB,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAEtD;AAED,wEAAwE;AACxE,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAEvD;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAE7D;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAG1E"}
|
|
@@ -16,13 +16,15 @@ local ____itemConfigCardTypesForCardsSet = require("src.sets.itemConfigCardTypes
|
|
|
16
16
|
local ITEM_CONFIG_CARD_TYPES_FOR_CARDS_SET = ____itemConfigCardTypesForCardsSet.ITEM_CONFIG_CARD_TYPES_FOR_CARDS_SET
|
|
17
17
|
local ____flag = require("src.functions.flag")
|
|
18
18
|
local addFlag = ____flag.addFlag
|
|
19
|
-
--- Returns true for any vanilla card or rune.
|
|
20
19
|
function ____exports.isVanillaCardType(self, cardType)
|
|
21
20
|
return cardType <= LAST_VANILLA_CARD_TYPE
|
|
22
21
|
end
|
|
23
|
-
--- Helper function to get a card description from a
|
|
22
|
+
--- Helper function to get a card description from a `CardType` value. Returns "Unknown" if the
|
|
23
|
+
-- provided card type is not valid.
|
|
24
24
|
--
|
|
25
|
-
--
|
|
25
|
+
-- This function works for both vanilla and modded trinkets.
|
|
26
|
+
--
|
|
27
|
+
-- For example, `getCardDescription(CardType.FOOL)` would return "Where journey begins".
|
|
26
28
|
function ____exports.getCardDescription(self, cardType)
|
|
27
29
|
local cardDescription = CARD_DESCRIPTIONS[cardType]
|
|
28
30
|
if cardDescription ~= nil then
|
|
@@ -62,11 +64,12 @@ function ____exports.getItemConfigCardType(self, cardType)
|
|
|
62
64
|
end
|
|
63
65
|
return itemConfigCard.CardType
|
|
64
66
|
end
|
|
65
|
-
--- Returns true for
|
|
66
|
-
--
|
|
67
|
-
-- -
|
|
68
|
-
-- -
|
|
69
|
-
-- -
|
|
67
|
+
--- Returns true for card types that have the following item config card type:
|
|
68
|
+
--
|
|
69
|
+
-- - `ItemConfigCardType.TAROT` (0)
|
|
70
|
+
-- - `ItemConfigCardType.SUIT` (1)
|
|
71
|
+
-- - `ItemConfigCardType.SPECIAL` (3)
|
|
72
|
+
-- - `ItemConfigCardType.TAROT_REVERSE` (5)
|
|
70
73
|
function ____exports.isCard(self, cardType)
|
|
71
74
|
local itemConfigCardType = ____exports.getItemConfigCardType(nil, cardType)
|
|
72
75
|
if itemConfigCardType == nil then
|
|
@@ -78,31 +81,31 @@ end
|
|
|
78
81
|
function ____exports.isCardType(self, cardType, itemConfigCardType)
|
|
79
82
|
return itemConfigCardType == ____exports.getItemConfigCardType(nil, cardType)
|
|
80
83
|
end
|
|
81
|
-
--- Returns true for any card
|
|
84
|
+
--- Returns true for any card type added by a mod.
|
|
82
85
|
function ____exports.isModdedCardType(self, cardType)
|
|
83
86
|
return not ____exports.isVanillaCardType(nil, cardType)
|
|
84
87
|
end
|
|
85
|
-
--- Returns true for
|
|
88
|
+
--- Returns true for card types that have `ItemConfigCardType.SPECIAL_OBJECT`.
|
|
86
89
|
function ____exports.isPocketItemObject(self, cardType)
|
|
87
90
|
return ____exports.isCardType(nil, cardType, ItemConfigCardType.SPECIAL_OBJECT)
|
|
88
91
|
end
|
|
89
|
-
--- Returns true for
|
|
92
|
+
--- Returns true for card types that have `ItemConfigCardType.TAROT_REVERSE`.
|
|
90
93
|
function ____exports.isReverseTarotCard(self, cardType)
|
|
91
94
|
return ____exports.isCardType(nil, cardType, ItemConfigCardType.TAROT_REVERSE)
|
|
92
95
|
end
|
|
93
|
-
--- Returns true for
|
|
96
|
+
--- Returns true for card types that have `ItemConfigCardType.RUNE`.
|
|
94
97
|
function ____exports.isRune(self, cardType)
|
|
95
98
|
return ____exports.isCardType(nil, cardType, ItemConfigCardType.RUNE)
|
|
96
99
|
end
|
|
97
|
-
--- Returns true for
|
|
100
|
+
--- Returns true for card types that have `ItemConfigCardType.SPECIAL`.
|
|
98
101
|
function ____exports.isSpecialCard(self, cardType)
|
|
99
102
|
return ____exports.isCardType(nil, cardType, ItemConfigCardType.SPECIAL)
|
|
100
103
|
end
|
|
101
|
-
--- Returns true for
|
|
104
|
+
--- Returns true for card types that have `ItemConfigCardType.SUIT`.
|
|
102
105
|
function ____exports.isSuitCard(self, cardType)
|
|
103
106
|
return ____exports.isCardType(nil, cardType, ItemConfigCardType.SUIT)
|
|
104
107
|
end
|
|
105
|
-
--- Returns true for
|
|
108
|
+
--- Returns true for card types that have `ItemConfigCardType.TAROT`.
|
|
106
109
|
function ____exports.isTarotCard(self, cardType)
|
|
107
110
|
return ____exports.isCardType(nil, cardType, ItemConfigCardType.TAROT)
|
|
108
111
|
end
|
|
@@ -58,6 +58,11 @@ export declare function getRoomShapeTopLeftPosition(roomShape: RoomShape): Reado
|
|
|
58
58
|
*/
|
|
59
59
|
export declare function getRoomShapeVolume(roomShape: RoomShape): int;
|
|
60
60
|
export declare function getRoomShapeWidth(roomShape: RoomShape): int;
|
|
61
|
+
/**
|
|
62
|
+
* Helper function to detect if the provided room shape is big. Specifically, this is all 1x2 rooms,
|
|
63
|
+
* 2x2 rooms, and L rooms.
|
|
64
|
+
*/
|
|
65
|
+
export declare function isBigRoomShape(roomShape: RoomShape): boolean;
|
|
61
66
|
export declare function isLRoomShape(roomShape: RoomShape): boolean;
|
|
62
67
|
export declare function isNarrowRoom(roomShape: RoomShape): boolean;
|
|
63
68
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roomShape.d.ts","sourceRoot":"","sources":["../../../src/functions/roomShape.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"roomShape.d.ts","sourceRoot":"","sources":["../../../src/functions/roomShape.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAanD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,GACjB,GAAG,GAAG,SAAS,CAIjB;AAED;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAC7C,SAAS,EAAE,SAAS,GACnB,QAAQ,CAAC,MAAM,CAAC,CAElB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,SAAS,GACnB,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,CAEpC;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,SAAS,GAAG,GAAG,CAE7D;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,MAAM,EAAE,CAE3E;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,SAAS,GACnB,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,CAEpC;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,SAAS,GACnB,QAAQ,CAAC,MAAM,CAAC,CAElB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,SAAS,GAAG,GAAG,CAE5D;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,GAAG,CAE3D;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAE5D;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAE1D;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAE1D;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAGrE"}
|
|
@@ -19,6 +19,8 @@ local ____roomShapeVolumes = require("src.objects.roomShapeVolumes")
|
|
|
19
19
|
local ROOM_SHAPE_VOLUMES = ____roomShapeVolumes.ROOM_SHAPE_VOLUMES
|
|
20
20
|
local ____LRoomShapesSet = require("src.sets.LRoomShapesSet")
|
|
21
21
|
local L_ROOM_SHAPES_SET = ____LRoomShapesSet.L_ROOM_SHAPES_SET
|
|
22
|
+
local ____bigRoomShapesSet = require("src.sets.bigRoomShapesSet")
|
|
23
|
+
local BIG_ROOM_SHAPES_SET = ____bigRoomShapesSet.BIG_ROOM_SHAPES_SET
|
|
22
24
|
local ____narrowRoomShapesSet = require("src.sets.narrowRoomShapesSet")
|
|
23
25
|
local NARROW_ROOM_SHAPES_SET = ____narrowRoomShapesSet.NARROW_ROOM_SHAPES_SET
|
|
24
26
|
--- Helper function to see if a given room shape will grant a single charge or a double charge to the
|
|
@@ -88,6 +90,11 @@ end
|
|
|
88
90
|
function ____exports.getRoomShapeWidth(self, roomShape)
|
|
89
91
|
return ROOM_SHAPE_TO_GRID_WIDTH[roomShape]
|
|
90
92
|
end
|
|
93
|
+
--- Helper function to detect if the provided room shape is big. Specifically, this is all 1x2 rooms,
|
|
94
|
+
-- 2x2 rooms, and L rooms.
|
|
95
|
+
function ____exports.isBigRoomShape(self, roomShape)
|
|
96
|
+
return BIG_ROOM_SHAPES_SET:has(roomShape)
|
|
97
|
+
end
|
|
91
98
|
function ____exports.isLRoomShape(self, roomShape)
|
|
92
99
|
return L_ROOM_SHAPES_SET:has(roomShape)
|
|
93
100
|
end
|
|
@@ -119,6 +119,11 @@ export declare function inAngelShop(): boolean;
|
|
|
119
119
|
* being equal to `DungeonSubType.BEAST_ROOM` (4).
|
|
120
120
|
*/
|
|
121
121
|
export declare function inBeastRoom(): boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Helper function to detect if the current room is big. Specifically, this is all 1x2 rooms, 2x2
|
|
124
|
+
* rooms, and L rooms.
|
|
125
|
+
*/
|
|
126
|
+
export declare function inBigRoom(): boolean;
|
|
122
127
|
/**
|
|
123
128
|
* Helper function to check if the current room is the Boss Room for a particular boss. This will
|
|
124
129
|
* only work for bosses that have dedicated boss rooms in the "00.special rooms.stb" file.
|
|
@@ -267,6 +272,11 @@ export declare function isAngelShop(roomData: RoomConfig): boolean;
|
|
|
267
272
|
* being equal to `DungeonSubType.BEAST_ROOM` (4).
|
|
268
273
|
*/
|
|
269
274
|
export declare function isBeastRoom(roomData: RoomConfig): boolean;
|
|
275
|
+
/**
|
|
276
|
+
* Helper function to detect if the provided room is big. Specifically, this is all 1x2 rooms, 2x2
|
|
277
|
+
* rooms, and L rooms.
|
|
278
|
+
*/
|
|
279
|
+
export declare function isBigRoom(roomData: RoomConfig): boolean;
|
|
270
280
|
/**
|
|
271
281
|
* Helper function to check if the provided room is the Boss Room for a particular boss. This will
|
|
272
282
|
* only work for bosses that have dedicated boss rooms in the "00.special rooms.stb" file.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooms.d.ts","sourceRoot":"","sources":["../../../src/functions/rooms.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,MAAM,EACN,YAAY,EACZ,UAAU,EACX,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,SAAS,EAQT,SAAS,EACT,QAAQ,EAGT,MAAM,8BAA8B,CAAC;AAuCtC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,aAAa,EAAE,GAAG,GAAG,IAAI,CAcnD;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,GAAG,CAGjC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,IAAI,KAAK,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAiBlE;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,GAAG,EAChB,oBAAoB,UAAO,EAC3B,iCAAiC,UAAQ,GACxC,QAAQ,CAAC,UAAU,CAAC,GAAG,SAAS,CAclC;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,YAAY,CAOlD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAE1D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CACtB,4BAA4B,UAAQ,GACnC,cAAc,EAAE,CAOlB;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,4BAA4B,UAAQ,GACnC,cAAc,EAAE,CAqBlB;AAED;;;;;G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oomDescriptor
|
|
|
59
59
|
local getRoomDescriptorReadOnly = ____roomData.getRoomDescriptorReadOnly
|
|
60
60
|
local getRoomGridIndex = ____roomData.getRoomGridIndex
|
|
61
61
|
local ____roomShape = require("src.functions.roomShape")
|
|
62
|
+
local isBigRoomShape = ____roomShape.isBigRoomShape
|
|
62
63
|
local isLRoomShape = ____roomShape.isLRoomShape
|
|
63
64
|
local ____roomTransition = require("src.functions.roomTransition")
|
|
64
65
|
local reloadRoom = ____roomTransition.reloadRoom
|
|
@@ -156,6 +157,11 @@ end
|
|
|
156
157
|
function ____exports.isBeastRoom(self, roomData)
|
|
157
158
|
return roomData.Type == RoomType.DUNGEON and roomData.Subtype == asNumber(nil, DungeonSubType.BEAST_ROOM)
|
|
158
159
|
end
|
|
160
|
+
--- Helper function to detect if the provided room is big. Specifically, this is all 1x2 rooms, 2x2
|
|
161
|
+
-- rooms, and L rooms.
|
|
162
|
+
function ____exports.isBigRoom(self, roomData)
|
|
163
|
+
return isBigRoomShape(nil, roomData.Shape)
|
|
164
|
+
end
|
|
159
165
|
--- Helper function to check if the provided room is the Boss Room for a particular boss. This will
|
|
160
166
|
-- only work for bosses that have dedicated boss rooms in the "00.special rooms.stb" file.
|
|
161
167
|
function ____exports.isBossRoomOf(self, roomData, bossID)
|
|
@@ -409,6 +415,12 @@ function ____exports.inBeastRoom(self)
|
|
|
409
415
|
local roomData = getRoomData(nil)
|
|
410
416
|
return ____exports.isBeastRoom(nil, roomData)
|
|
411
417
|
end
|
|
418
|
+
--- Helper function to detect if the current room is big. Specifically, this is all 1x2 rooms, 2x2
|
|
419
|
+
-- rooms, and L rooms.
|
|
420
|
+
function ____exports.inBigRoom(self)
|
|
421
|
+
local roomData = getRoomData(nil)
|
|
422
|
+
return ____exports.isBigRoom(nil, roomData)
|
|
423
|
+
end
|
|
412
424
|
--- Helper function to check if the current room is the Boss Room for a particular boss. This will
|
|
413
425
|
-- only work for bosses that have dedicated boss rooms in the "00.special rooms.stb" file.
|
|
414
426
|
function ____exports.inBossRoomOf(self, bossID)
|
|
@@ -632,12 +644,12 @@ function ____exports.setRoomCleared(self)
|
|
|
632
644
|
for ____, door in ipairs(getDoors(nil)) do
|
|
633
645
|
do
|
|
634
646
|
if isHiddenSecretRoomDoor(nil, door) then
|
|
635
|
-
goto
|
|
647
|
+
goto __continue84
|
|
636
648
|
end
|
|
637
649
|
openDoorFast(nil, door)
|
|
638
650
|
door.ExtraVisible = false
|
|
639
651
|
end
|
|
640
|
-
::
|
|
652
|
+
::__continue84::
|
|
641
653
|
end
|
|
642
654
|
sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
|
|
643
655
|
game:ShakeScreen(0)
|
|
@@ -54,7 +54,14 @@ export declare function getStage(): LevelStage;
|
|
|
54
54
|
export declare function getStageID(stage?: LevelStage, stageType?: StageType): StageID;
|
|
55
55
|
/** Alias for the `Level.GetStageType` method. */
|
|
56
56
|
export declare function getStageType(): StageType;
|
|
57
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* Helper function to directly warp to a specific stage using the "stage" console command.
|
|
59
|
+
*
|
|
60
|
+
* Note that if you use this function on game frame 0, it will confuse the
|
|
61
|
+
* `POST_GAME_STARTED_REORDERED`, `POST_NEW_LEVEL_REORDERED`, and `POST_NEW_ROOM_REORDERED` custom
|
|
62
|
+
* callbacks. If you are using the function in this situation, remember to call the
|
|
63
|
+
* `reorderedCallbacksSetStage` function.
|
|
64
|
+
*/
|
|
58
65
|
export declare function goToStage(stage: LevelStage, stageType: StageType): void;
|
|
59
66
|
/**
|
|
60
67
|
* Returns whether the provided stage and stage type represent a "final floor". This is defined as a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../../../src/functions/stage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAEL,UAAU,EACV,QAAQ,EACR,SAAS,EACV,MAAM,8BAA8B,C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OAAO,CAK9C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,SAAS,EACpB,MAAM,UAAQ,GACb,IAAI,CAUN;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAE9D"}
|
|
@@ -158,6 +158,11 @@ function ____exports.getStageType(self)
|
|
|
158
158
|
return level:GetStageType()
|
|
159
159
|
end
|
|
160
160
|
--- Helper function to directly warp to a specific stage using the "stage" console command.
|
|
161
|
+
--
|
|
162
|
+
-- Note that if you use this function on game frame 0, it will confuse the
|
|
163
|
+
-- `POST_GAME_STARTED_REORDERED`, `POST_NEW_LEVEL_REORDERED`, and `POST_NEW_ROOM_REORDERED` custom
|
|
164
|
+
-- callbacks. If you are using the function in this situation, remember to call the
|
|
165
|
+
-- `reorderedCallbacksSetStage` function.
|
|
161
166
|
function ____exports.goToStage(self, stage, stageType)
|
|
162
167
|
local stageTypeLetterSuffix = ____exports.stageTypeToLetter(nil, stageType)
|
|
163
168
|
local command = ("stage " .. tostring(stage)) .. stageTypeLetterSuffix
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bigRoomShapesSet.d.ts","sourceRoot":"","sources":["../../../src/sets/bigRoomShapesSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAGzD,eAAO,MAAM,mBAAmB,wBAQ9B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__New = ____lualib.__TS__New
|
|
3
|
+
local ____exports = {}
|
|
4
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
5
|
+
local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
|
|
6
|
+
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
7
|
+
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
8
|
+
____exports.BIG_ROOM_SHAPES_SET = __TS__New(ReadonlySet, {
|
|
9
|
+
RoomShape.SHAPE_1x2,
|
|
10
|
+
RoomShape.SHAPE_2x1,
|
|
11
|
+
RoomShape.SHAPE_2x2,
|
|
12
|
+
RoomShape.LTL,
|
|
13
|
+
RoomShape.LTR,
|
|
14
|
+
RoomShape.LBL,
|
|
15
|
+
RoomShape.LBR
|
|
16
|
+
})
|
|
17
|
+
return ____exports
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "56.0.0",
|
|
4
4
|
"description": "Helper functions and features for IsaacScript mods.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"isaac",
|
|
@@ -25,6 +25,6 @@
|
|
|
25
25
|
"main": "dist/src/index",
|
|
26
26
|
"types": "dist/index.rollup.d.ts",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"isaac-typescript-definitions": "^
|
|
28
|
+
"isaac-typescript-definitions": "^26.0.0"
|
|
29
29
|
}
|
|
30
30
|
}
|
package/src/functions/cards.ts
CHANGED
|
@@ -11,9 +11,12 @@ import { ITEM_CONFIG_CARD_TYPES_FOR_CARDS_SET } from "../sets/itemConfigCardType
|
|
|
11
11
|
import { addFlag } from "./flag";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Helper function to get a card description from a
|
|
14
|
+
* Helper function to get a card description from a `CardType` value. Returns "Unknown" if the
|
|
15
|
+
* provided card type is not valid.
|
|
15
16
|
*
|
|
16
|
-
*
|
|
17
|
+
* This function works for both vanilla and modded trinkets.
|
|
18
|
+
*
|
|
19
|
+
* For example, `getCardDescription(CardType.FOOL)` would return "Where journey begins".
|
|
17
20
|
*/
|
|
18
21
|
export function getCardDescription(cardType: CardType): string {
|
|
19
22
|
// "ItemConfigCard.Description" is bugged with vanilla cards on patch v1.7.6, so we use a
|
|
@@ -77,11 +80,12 @@ export function getItemConfigCardType(
|
|
|
77
80
|
}
|
|
78
81
|
|
|
79
82
|
/**
|
|
80
|
-
* Returns true for
|
|
81
|
-
*
|
|
82
|
-
* -
|
|
83
|
-
* -
|
|
84
|
-
* -
|
|
83
|
+
* Returns true for card types that have the following item config card type:
|
|
84
|
+
*
|
|
85
|
+
* - `ItemConfigCardType.TAROT` (0)
|
|
86
|
+
* - `ItemConfigCardType.SUIT` (1)
|
|
87
|
+
* - `ItemConfigCardType.SPECIAL` (3)
|
|
88
|
+
* - `ItemConfigCardType.TAROT_REVERSE` (5)
|
|
85
89
|
*/
|
|
86
90
|
export function isCard(cardType: CardType): boolean {
|
|
87
91
|
const itemConfigCardType = getItemConfigCardType(cardType);
|
|
@@ -100,42 +104,41 @@ export function isCardType(
|
|
|
100
104
|
return itemConfigCardType === getItemConfigCardType(cardType);
|
|
101
105
|
}
|
|
102
106
|
|
|
103
|
-
/** Returns true for any card
|
|
107
|
+
/** Returns true for any card type added by a mod. */
|
|
104
108
|
export function isModdedCardType(cardType: CardType): boolean {
|
|
105
109
|
return !isVanillaCardType(cardType);
|
|
106
110
|
}
|
|
107
111
|
|
|
108
|
-
/** Returns true for
|
|
112
|
+
/** Returns true for card types that have `ItemConfigCardType.SPECIAL_OBJECT`. */
|
|
109
113
|
export function isPocketItemObject(cardType: CardType): boolean {
|
|
110
114
|
return isCardType(cardType, ItemConfigCardType.SPECIAL_OBJECT);
|
|
111
115
|
}
|
|
112
116
|
|
|
113
|
-
/** Returns true for
|
|
117
|
+
/** Returns true for card types that have `ItemConfigCardType.TAROT_REVERSE`. */
|
|
114
118
|
export function isReverseTarotCard(cardType: CardType): boolean {
|
|
115
119
|
return isCardType(cardType, ItemConfigCardType.TAROT_REVERSE);
|
|
116
120
|
}
|
|
117
121
|
|
|
118
|
-
/** Returns true for
|
|
122
|
+
/** Returns true for card types that have `ItemConfigCardType.RUNE`. */
|
|
119
123
|
export function isRune(cardType: CardType): boolean {
|
|
120
124
|
return isCardType(cardType, ItemConfigCardType.RUNE);
|
|
121
125
|
}
|
|
122
126
|
|
|
123
|
-
/** Returns true for
|
|
127
|
+
/** Returns true for card types that have `ItemConfigCardType.SPECIAL`. */
|
|
124
128
|
export function isSpecialCard(cardType: CardType): boolean {
|
|
125
129
|
return isCardType(cardType, ItemConfigCardType.SPECIAL);
|
|
126
130
|
}
|
|
127
131
|
|
|
128
|
-
/** Returns true for
|
|
132
|
+
/** Returns true for card types that have `ItemConfigCardType.SUIT`. */
|
|
129
133
|
export function isSuitCard(cardType: CardType): boolean {
|
|
130
134
|
return isCardType(cardType, ItemConfigCardType.SUIT);
|
|
131
135
|
}
|
|
132
136
|
|
|
133
|
-
/** Returns true for
|
|
137
|
+
/** Returns true for card types that have `ItemConfigCardType.TAROT`. */
|
|
134
138
|
export function isTarotCard(cardType: CardType): boolean {
|
|
135
139
|
return isCardType(cardType, ItemConfigCardType.TAROT);
|
|
136
140
|
}
|
|
137
141
|
|
|
138
|
-
/** Returns true for any vanilla card or rune. */
|
|
139
142
|
export function isVanillaCardType(cardType: CardType): boolean {
|
|
140
143
|
return cardType <= LAST_VANILLA_CARD_TYPE;
|
|
141
144
|
}
|
|
@@ -10,6 +10,7 @@ import { ROOM_SHAPE_TO_GRID_WIDTH } from "../objects/roomShapeToGridWidth";
|
|
|
10
10
|
import { ROOM_SHAPE_TO_TOP_LEFT_POSITION } from "../objects/roomShapeToTopLeftPosition";
|
|
11
11
|
import { ROOM_SHAPE_VOLUMES } from "../objects/roomShapeVolumes";
|
|
12
12
|
import { L_ROOM_SHAPES_SET } from "../sets/LRoomShapesSet";
|
|
13
|
+
import { BIG_ROOM_SHAPES_SET } from "../sets/bigRoomShapesSet";
|
|
13
14
|
import { NARROW_ROOM_SHAPES_SET } from "../sets/narrowRoomShapesSet";
|
|
14
15
|
|
|
15
16
|
/**
|
|
@@ -109,6 +110,14 @@ export function getRoomShapeWidth(roomShape: RoomShape): int {
|
|
|
109
110
|
return ROOM_SHAPE_TO_GRID_WIDTH[roomShape];
|
|
110
111
|
}
|
|
111
112
|
|
|
113
|
+
/**
|
|
114
|
+
* Helper function to detect if the provided room shape is big. Specifically, this is all 1x2 rooms,
|
|
115
|
+
* 2x2 rooms, and L rooms.
|
|
116
|
+
*/
|
|
117
|
+
export function isBigRoomShape(roomShape: RoomShape): boolean {
|
|
118
|
+
return BIG_ROOM_SHAPES_SET.has(roomShape);
|
|
119
|
+
}
|
|
120
|
+
|
|
112
121
|
export function isLRoomShape(roomShape: RoomShape): boolean {
|
|
113
122
|
return L_ROOM_SHAPES_SET.has(roomShape);
|
|
114
123
|
}
|
package/src/functions/rooms.ts
CHANGED
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
getRoomDescriptorReadOnly,
|
|
46
46
|
getRoomGridIndex,
|
|
47
47
|
} from "./roomData";
|
|
48
|
-
import { isLRoomShape } from "./roomShape";
|
|
48
|
+
import { isBigRoomShape, isLRoomShape } from "./roomShape";
|
|
49
49
|
import { reloadRoom } from "./roomTransition";
|
|
50
50
|
import { getGotoCommand } from "./stage";
|
|
51
51
|
import { asNumber } from "./types";
|
|
@@ -318,6 +318,15 @@ export function inBeastRoom(): boolean {
|
|
|
318
318
|
return isBeastRoom(roomData);
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
+
/**
|
|
322
|
+
* Helper function to detect if the current room is big. Specifically, this is all 1x2 rooms, 2x2
|
|
323
|
+
* rooms, and L rooms.
|
|
324
|
+
*/
|
|
325
|
+
export function inBigRoom(): boolean {
|
|
326
|
+
const roomData = getRoomData();
|
|
327
|
+
return isBigRoom(roomData);
|
|
328
|
+
}
|
|
329
|
+
|
|
321
330
|
/**
|
|
322
331
|
* Helper function to check if the current room is the Boss Room for a particular boss. This will
|
|
323
332
|
* only work for bosses that have dedicated boss rooms in the "00.special rooms.stb" file.
|
|
@@ -601,6 +610,14 @@ export function isBeastRoom(roomData: RoomConfig): boolean {
|
|
|
601
610
|
);
|
|
602
611
|
}
|
|
603
612
|
|
|
613
|
+
/**
|
|
614
|
+
* Helper function to detect if the provided room is big. Specifically, this is all 1x2 rooms, 2x2
|
|
615
|
+
* rooms, and L rooms.
|
|
616
|
+
*/
|
|
617
|
+
export function isBigRoom(roomData: RoomConfig): boolean {
|
|
618
|
+
return isBigRoomShape(roomData.Shape);
|
|
619
|
+
}
|
|
620
|
+
|
|
604
621
|
/**
|
|
605
622
|
* Helper function to check if the provided room is the Boss Room for a particular boss. This will
|
|
606
623
|
* only work for bosses that have dedicated boss rooms in the "00.special rooms.stb" file.
|
package/src/functions/stage.ts
CHANGED
|
@@ -181,7 +181,14 @@ export function getStageType(): StageType {
|
|
|
181
181
|
return level.GetStageType();
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
/**
|
|
184
|
+
/**
|
|
185
|
+
* Helper function to directly warp to a specific stage using the "stage" console command.
|
|
186
|
+
*
|
|
187
|
+
* Note that if you use this function on game frame 0, it will confuse the
|
|
188
|
+
* `POST_GAME_STARTED_REORDERED`, `POST_NEW_LEVEL_REORDERED`, and `POST_NEW_ROOM_REORDERED` custom
|
|
189
|
+
* callbacks. If you are using the function in this situation, remember to call the
|
|
190
|
+
* `reorderedCallbacksSetStage` function.
|
|
191
|
+
*/
|
|
185
192
|
export function goToStage(stage: LevelStage, stageType: StageType): void {
|
|
186
193
|
const stageTypeLetterSuffix = stageTypeToLetter(stageType);
|
|
187
194
|
const command = `stage ${stage}${stageTypeLetterSuffix}`;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RoomShape } from "isaac-typescript-definitions";
|
|
2
|
+
import { ReadonlySet } from "../types/ReadonlySet";
|
|
3
|
+
|
|
4
|
+
export const BIG_ROOM_SHAPES_SET = new ReadonlySet<RoomShape>([
|
|
5
|
+
RoomShape.SHAPE_1x2, // 4
|
|
6
|
+
RoomShape.SHAPE_2x1, // 6
|
|
7
|
+
RoomShape.SHAPE_2x2, // 8
|
|
8
|
+
RoomShape.LTL, // 9
|
|
9
|
+
RoomShape.LTR, // 10
|
|
10
|
+
RoomShape.LBL, // 11
|
|
11
|
+
RoomShape.LBR, // 12
|
|
12
|
+
]);
|
|
@@ -4,8 +4,8 @@ import { ReadonlySet } from "../types/ReadonlySet";
|
|
|
4
4
|
/** The set of all `ItemConfigCardType` values that are not a rune or special object. */
|
|
5
5
|
export const ITEM_CONFIG_CARD_TYPES_FOR_CARDS_SET =
|
|
6
6
|
new ReadonlySet<ItemConfigCardType>([
|
|
7
|
-
ItemConfigCardType.TAROT,
|
|
8
|
-
ItemConfigCardType.SUIT,
|
|
9
|
-
ItemConfigCardType.SPECIAL,
|
|
10
|
-
ItemConfigCardType.TAROT_REVERSE,
|
|
7
|
+
ItemConfigCardType.TAROT, // 0
|
|
8
|
+
ItemConfigCardType.SUIT, // 1
|
|
9
|
+
ItemConfigCardType.SPECIAL, // 3
|
|
10
|
+
ItemConfigCardType.TAROT_REVERSE, // 5
|
|
11
11
|
]);
|