isaacscript-common 51.7.0 → 51.9.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 +52 -2
- package/dist/isaacscript-common.lua +58 -1
- package/dist/src/functions/collectibles.d.ts +3 -2
- package/dist/src/functions/collectibles.d.ts.map +1 -1
- package/dist/src/functions/collectibles.lua +3 -2
- package/dist/src/functions/gridEntities.d.ts +6 -0
- package/dist/src/functions/gridEntities.d.ts.map +1 -1
- package/dist/src/functions/gridEntities.lua +13 -0
- package/dist/src/functions/rooms.d.ts +8 -0
- package/dist/src/functions/rooms.d.ts.map +1 -1
- package/dist/src/functions/rooms.lua +8 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/objects/gridEntityTypeToANM2Path.d.ts +31 -0
- package/dist/src/objects/gridEntityTypeToANM2Path.d.ts.map +1 -0
- package/dist/src/objects/gridEntityTypeToANM2Path.lua +34 -0
- package/dist/src/types/CompositionTypeSatisfiesEnum.d.ts +34 -0
- package/dist/src/types/CompositionTypeSatisfiesEnum.d.ts.map +1 -0
- package/dist/src/types/CompositionTypeSatisfiesEnum.lua +9 -0
- package/package.json +2 -2
- package/src/functions/collectibles.ts +3 -2
- package/src/functions/gridEntities.ts +33 -14
- package/src/functions/rooms.ts +8 -0
- package/src/index.ts +1 -0
- package/src/objects/gridEntityTypeToANM2Path.ts +49 -0
- package/src/types/CompositionTypeSatisfiesEnum.ts +66 -0
package/dist/index.rollup.d.ts
CHANGED
|
@@ -1687,6 +1687,40 @@ export declare function combineArrays<T>(...arrays: Array<T[] | readonly T[]>):
|
|
|
1687
1687
|
*/
|
|
1688
1688
|
export declare function combineSets<T>(...sets: Array<Set<T> | ReadonlySet<T>>): Set<T>;
|
|
1689
1689
|
|
|
1690
|
+
/**
|
|
1691
|
+
* Helper type to validate that a union of interfaces with a field of `type` that is based on an
|
|
1692
|
+
* enum is complete.
|
|
1693
|
+
*
|
|
1694
|
+
* For example:
|
|
1695
|
+
*
|
|
1696
|
+
* ```ts
|
|
1697
|
+
* enum ObjectiveType {
|
|
1698
|
+
* FOO,
|
|
1699
|
+
* BAR,
|
|
1700
|
+
* BAZ,
|
|
1701
|
+
* }
|
|
1702
|
+
*
|
|
1703
|
+
* interface FooObjective {
|
|
1704
|
+
* type: ObjectiveType.FOO;
|
|
1705
|
+
* fooThing: number;
|
|
1706
|
+
* }
|
|
1707
|
+
*
|
|
1708
|
+
* interface BarObjective {
|
|
1709
|
+
* type: ObjectiveType.BAR;
|
|
1710
|
+
* barThing: string;
|
|
1711
|
+
* }
|
|
1712
|
+
*
|
|
1713
|
+
* type Objective = FooObjective | BarObjective;
|
|
1714
|
+
* type _Test = CompositionTypeSatisfiesEnum<Objective, ObjectiveType>;
|
|
1715
|
+
* ```
|
|
1716
|
+
*
|
|
1717
|
+
* In this example, `Test` would be flagged by TypeScript because `Objective` does not contain an
|
|
1718
|
+
* entry for `BazObjective`.
|
|
1719
|
+
*/
|
|
1720
|
+
export declare type CompositionTypeSatisfiesEnum<T extends {
|
|
1721
|
+
type: unknown;
|
|
1722
|
+
}, _Enum extends T["type"]> = unknown;
|
|
1723
|
+
|
|
1690
1724
|
/**
|
|
1691
1725
|
* Helper function to get the enum name for the specified `Controller` value. Note that this will
|
|
1692
1726
|
* trim off the "BUTTON_" prefix.
|
|
@@ -5212,8 +5246,9 @@ export declare function getCollectibleName(collectibleOrCollectibleType: EntityP
|
|
|
5212
5246
|
export declare function getCollectiblePedestalType(collectible: EntityPickup): CollectiblePedestalType;
|
|
5213
5247
|
|
|
5214
5248
|
/**
|
|
5215
|
-
* Helper function to get a collectible's quality
|
|
5216
|
-
* Returns 0 if the provided collectible type was not
|
|
5249
|
+
* Helper function to get a collectible's quality, which ranges from 0 to 4 (inclusive). For
|
|
5250
|
+
* example, Mom's Knife has a quality of 4. Returns 0 if the provided collectible type was not
|
|
5251
|
+
* valid.
|
|
5217
5252
|
*/
|
|
5218
5253
|
export declare function getCollectibleQuality(collectibleOrCollectibleType: EntityPickup | CollectibleType): int;
|
|
5219
5254
|
|
|
@@ -8108,6 +8143,8 @@ export declare function inAngelShop(): boolean;
|
|
|
8108
8143
|
/**
|
|
8109
8144
|
* Helper function to check to see if the current room is the Boss Room for The Beast.
|
|
8110
8145
|
*
|
|
8146
|
+
* This function is useful because the `Room.GetBossID` method returns 0 for The Beast room.
|
|
8147
|
+
*
|
|
8111
8148
|
* Under the hood, this checks the room type being equal to `RoomType.DUNGEON` (16) and the sub-type
|
|
8112
8149
|
* being equal to `DungeonSubType.BEAST_ROOM` (4).
|
|
8113
8150
|
*/
|
|
@@ -8167,6 +8204,8 @@ export declare function inDimension(dimension: Dimension): boolean;
|
|
|
8167
8204
|
/**
|
|
8168
8205
|
* Helper function to check to see if the current room is the Boss Room for Dogma.
|
|
8169
8206
|
*
|
|
8207
|
+
* This function is useful because the `Room.GetBossID` method returns 0 for the Dogma room.
|
|
8208
|
+
*
|
|
8170
8209
|
* Note that the "living room" on the Home floor with the TV at the top of the room is not the Dogma
|
|
8171
8210
|
* Boss Room, as the player is teleported to a different room after watching the TV cutscene.
|
|
8172
8211
|
*
|
|
@@ -8503,6 +8542,8 @@ export declare function isBattery(pickup: EntityPickup): pickup is EntityPickupB
|
|
|
8503
8542
|
/**
|
|
8504
8543
|
* Helper function to check to see if the provided room is the Boss Room for The Beast.
|
|
8505
8544
|
*
|
|
8545
|
+
* This function is useful because the `Room.GetBossID` method returns 0 for The Beast room.
|
|
8546
|
+
*
|
|
8506
8547
|
* Under the hood, this checks the room type being equal to `RoomType.DUNGEON` (16) and the sub-type
|
|
8507
8548
|
* being equal to `DungeonSubType.BEAST_ROOM` (4).
|
|
8508
8549
|
*/
|
|
@@ -8824,6 +8865,8 @@ export declare function isDevilsCrownTreasureRoom(roomDescriptor: RoomDescriptor
|
|
|
8824
8865
|
/**
|
|
8825
8866
|
* Helper function to check to see if the provided room is the Boss Room for Dogma.
|
|
8826
8867
|
*
|
|
8868
|
+
* This function is useful because the `Room.GetBossID` method returns 0 for the Dogma room.
|
|
8869
|
+
*
|
|
8827
8870
|
* Note that the "living room" on the Home floor with the TV at the top of the room is not the Dogma
|
|
8828
8871
|
* Boss Room, as the player is teleported to a different room after watching the TV cutscene.
|
|
8829
8872
|
*
|
|
@@ -16693,6 +16736,13 @@ export declare function setFloorDisplayFlags(displayFlagsMap: Map<int, BitFlags<
|
|
|
16693
16736
|
*/
|
|
16694
16737
|
export declare function setGridEntityInvisible(gridEntity: GridEntity): void;
|
|
16695
16738
|
|
|
16739
|
+
/**
|
|
16740
|
+
* Helper function to change the type of a grid entity to another type. Use this instead of the
|
|
16741
|
+
* `GridEntity.SetType` method since that does not properly handle updating the sprite of the grid
|
|
16742
|
+
* entity after the type is changed.
|
|
16743
|
+
*/
|
|
16744
|
+
export declare function setGridEntityType(gridEntity: GridEntity, gridEntityType: GridEntityType): void;
|
|
16745
|
+
|
|
16696
16746
|
/**
|
|
16697
16747
|
* Helper function to check for one or more elements in a set at once without having to repeatedly
|
|
16698
16748
|
* call the `Set.has` method.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 51.
|
|
3
|
+
isaacscript-common 51.9.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -26953,6 +26953,42 @@ ____exports.ROOM_SHAPE_TO_TOP_LEFT_WALL_GRID_INDEX_MAP = __TS__New(ReadonlyMap,
|
|
|
26953
26953
|
{RoomShape.IIH, 56},
|
|
26954
26954
|
{RoomShape.LTL, 13}
|
|
26955
26955
|
})
|
|
26956
|
+
return ____exports
|
|
26957
|
+
end,
|
|
26958
|
+
["src.objects.gridEntityTypeToANM2Path"] = function(...)
|
|
26959
|
+
local ____exports = {}
|
|
26960
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
26961
|
+
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
26962
|
+
____exports.GRID_ENTITY_TYPE_TO_ANM2_PATH = {
|
|
26963
|
+
[GridEntityType.NULL] = nil,
|
|
26964
|
+
[GridEntityType.DECORATION] = "gfx/grid/Props_01_Basement.anm2",
|
|
26965
|
+
[GridEntityType.ROCK] = "gfx/grid/grid_rock.anm2",
|
|
26966
|
+
[GridEntityType.BLOCK] = "gfx/grid/grid_rock.anm2",
|
|
26967
|
+
[GridEntityType.ROCK_TINTED] = "gfx/grid/grid_rock.anm2",
|
|
26968
|
+
[GridEntityType.ROCK_BOMB] = "gfx/grid/grid_rock.anm2",
|
|
26969
|
+
[GridEntityType.ROCK_ALT] = "gfx/grid/grid_rock.anm2",
|
|
26970
|
+
[GridEntityType.PIT] = "gfx/grid/grid_pit.anm2",
|
|
26971
|
+
[GridEntityType.SPIKES] = "gfx/grid/grid_spikes.anm2",
|
|
26972
|
+
[GridEntityType.SPIKES_ON_OFF] = "gfx/grid/grid_spikes.anm2",
|
|
26973
|
+
[GridEntityType.SPIDER_WEB] = "gfx/grid/grid_web.anm2",
|
|
26974
|
+
[GridEntityType.LOCK] = "gfx/grid/grid_locks.anm2",
|
|
26975
|
+
[GridEntityType.TNT] = "gfx/grid/grid_tnt.anm2",
|
|
26976
|
+
[GridEntityType.FIREPLACE] = "gfx/grid/grid_fireplace.anm2",
|
|
26977
|
+
[GridEntityType.POOP] = "gfx/grid/grid_poop.anm2",
|
|
26978
|
+
[GridEntityType.WALL] = nil,
|
|
26979
|
+
[GridEntityType.DOOR] = nil,
|
|
26980
|
+
[GridEntityType.TRAPDOOR] = "gfx/grid/Door_11_TrapDoor.anm2",
|
|
26981
|
+
[GridEntityType.CRAWL_SPACE] = "gfx/grid/door_20_secrettrapdoor.anm2",
|
|
26982
|
+
[GridEntityType.GRAVITY] = nil,
|
|
26983
|
+
[GridEntityType.PRESSURE_PLATE] = "gfx/grid/grid_pressureplate.anm2",
|
|
26984
|
+
[GridEntityType.STATUE] = nil,
|
|
26985
|
+
[GridEntityType.ROCK_SUPER_SPECIAL] = "gfx/grid/grid_rock.anm2",
|
|
26986
|
+
[GridEntityType.TELEPORTER] = "gfx/grid/grid_teleporter.anm2",
|
|
26987
|
+
[GridEntityType.PILLAR] = "gfx/grid/grid_rock.anm2",
|
|
26988
|
+
[GridEntityType.ROCK_SPIKED] = "gfx/grid/grid_rock.anm2",
|
|
26989
|
+
[GridEntityType.ROCK_ALT_2] = "gfx/grid/grid_rock.anm2",
|
|
26990
|
+
[GridEntityType.ROCK_GOLD] = "gfx/grid/grid_rock.anm2"
|
|
26991
|
+
}
|
|
26956
26992
|
return ____exports
|
|
26957
26993
|
end,
|
|
26958
26994
|
["src.sets.poopGridEntityXMLTypesSet"] = function(...)
|
|
@@ -28316,6 +28352,8 @@ local GRID_ENTITY_XML_MAP = ____gridEntityXMLMap.GRID_ENTITY_XML_MAP
|
|
|
28316
28352
|
local ____roomShapeToTopLeftWallGridIndexMap = require("src.maps.roomShapeToTopLeftWallGridIndexMap")
|
|
28317
28353
|
local DEFAULT_TOP_LEFT_WALL_GRID_INDEX = ____roomShapeToTopLeftWallGridIndexMap.DEFAULT_TOP_LEFT_WALL_GRID_INDEX
|
|
28318
28354
|
local ROOM_SHAPE_TO_TOP_LEFT_WALL_GRID_INDEX_MAP = ____roomShapeToTopLeftWallGridIndexMap.ROOM_SHAPE_TO_TOP_LEFT_WALL_GRID_INDEX_MAP
|
|
28355
|
+
local ____gridEntityTypeToANM2Path = require("src.objects.gridEntityTypeToANM2Path")
|
|
28356
|
+
local GRID_ENTITY_TYPE_TO_ANM2_PATH = ____gridEntityTypeToANM2Path.GRID_ENTITY_TYPE_TO_ANM2_PATH
|
|
28319
28357
|
local ____poopGridEntityXMLTypesSet = require("src.sets.poopGridEntityXMLTypesSet")
|
|
28320
28358
|
local POOP_GRID_ENTITY_XML_TYPES_SET = ____poopGridEntityXMLTypesSet.POOP_GRID_ENTITY_XML_TYPES_SET
|
|
28321
28359
|
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
@@ -28704,6 +28742,14 @@ function ____exports.setGridEntityInvisible(self, gridEntity)
|
|
|
28704
28742
|
local sprite = gridEntity:GetSprite()
|
|
28705
28743
|
sprite:Reset()
|
|
28706
28744
|
end
|
|
28745
|
+
function ____exports.setGridEntityType(self, gridEntity, gridEntityType)
|
|
28746
|
+
gridEntity:SetType(gridEntityType)
|
|
28747
|
+
local sprite = gridEntity:GetSprite()
|
|
28748
|
+
local anm2Path = GRID_ENTITY_TYPE_TO_ANM2_PATH[gridEntityType]
|
|
28749
|
+
if anm2Path ~= nil then
|
|
28750
|
+
sprite:Load(anm2Path, true)
|
|
28751
|
+
end
|
|
28752
|
+
end
|
|
28707
28753
|
function ____exports.spawnGiantPoop(self, topLeftGridIndex)
|
|
28708
28754
|
local room = game:GetRoom()
|
|
28709
28755
|
local gridWidth = room:GetGridWidth()
|
|
@@ -54970,6 +55016,17 @@ return ____exports
|
|
|
54970
55016
|
end,
|
|
54971
55017
|
["src.types.AllButLast"] = function(...)
|
|
54972
55018
|
local ____exports = {}
|
|
55019
|
+
return ____exports
|
|
55020
|
+
end,
|
|
55021
|
+
["src.types.CompositionTypeSatisfiesEnum"] = function(...)
|
|
55022
|
+
local ____exports = {}
|
|
55023
|
+
local ObjectiveType = {}
|
|
55024
|
+
ObjectiveType.FOO = 0
|
|
55025
|
+
ObjectiveType[ObjectiveType.FOO] = "FOO"
|
|
55026
|
+
ObjectiveType.BAR = 1
|
|
55027
|
+
ObjectiveType[ObjectiveType.BAR] = "BAR"
|
|
55028
|
+
ObjectiveType.BAZ = 2
|
|
55029
|
+
ObjectiveType[ObjectiveType.BAZ] = "BAZ"
|
|
54973
55030
|
return ____exports
|
|
54974
55031
|
end,
|
|
54975
55032
|
["src.types.Decrement"] = function(...)
|
|
@@ -68,8 +68,9 @@ export declare function getCollectibleName(collectibleOrCollectibleType: EntityP
|
|
|
68
68
|
*/
|
|
69
69
|
export declare function getCollectiblePedestalType(collectible: EntityPickup): CollectiblePedestalType;
|
|
70
70
|
/**
|
|
71
|
-
* Helper function to get a collectible's quality
|
|
72
|
-
* Returns 0 if the provided collectible type was not
|
|
71
|
+
* Helper function to get a collectible's quality, which ranges from 0 to 4 (inclusive). For
|
|
72
|
+
* example, Mom's Knife has a quality of 4. Returns 0 if the provided collectible type was not
|
|
73
|
+
* valid.
|
|
73
74
|
*/
|
|
74
75
|
export declare function getCollectibleQuality(collectibleOrCollectibleType: EntityPickup | CollectibleType): int;
|
|
75
76
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collectibles.d.ts","sourceRoot":"","sources":["../../../src/functions/collectibles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,uBAAuB,EACvB,aAAa,EACd,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,eAAe,EAEf,oBAAoB,EAEpB,QAAQ,EACR,WAAW,EAGZ,MAAM,8BAA8B,CAAC;AAsCtC,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAStE;AAED,iGAAiG;AACjG,wBAAgB,uBAAuB,CACrC,4BAA4B,EAAE,YAAY,GAAG,eAAe,EAC5D,SAAS,EAAE,SAAS,GACnB,OAAO,CAYT;AAED,6FAA6F;AAC7F,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAsBT;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,oBAAoB,CAYtB;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,MAAM,CAoBR;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,GAAG,CAgBL;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,4BAA4B,EAAE,YAAY,GAAG,eAAe,EAC5D,MAAM,EAAE,YAAY,GACnB,WAAW,CA6Bb;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CACvC,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAAG,CAAC,CAAC,GAChE,MAAM,CAgBR;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,GAAG,CAYL;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,QAAQ,CAYV;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,GAAG,CAYL;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,MAAM,CAmBR;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,YAAY,GACxB,uBAAuB,CAUzB;AAED
|
|
1
|
+
{"version":3,"file":"collectibles.d.ts","sourceRoot":"","sources":["../../../src/functions/collectibles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,uBAAuB,EACvB,aAAa,EACd,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,eAAe,EAEf,oBAAoB,EAEpB,QAAQ,EACR,WAAW,EAGZ,MAAM,8BAA8B,CAAC;AAsCtC,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAStE;AAED,iGAAiG;AACjG,wBAAgB,uBAAuB,CACrC,4BAA4B,EAAE,YAAY,GAAG,eAAe,EAC5D,SAAS,EAAE,SAAS,GACnB,OAAO,CAYT;AAED,6FAA6F;AAC7F,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAsBT;AAED;;;GAGG;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EAAE,YAAY,EACzB,uBAAuB,EAAE,uBAAuB,GAC/C,IAAI,CAWN;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,YAAY,EACzB,OAAO,EAAE,MAAM,GAAG,SAAS,GAC1B,IAAI,CAqBN;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,YAAY,EACzB,kBAAkB,EAAE,eAAe,GAClC,IAAI,CA2BN;AAED;;;GAGG;AACH,wBAAgB,qCAAqC,IAAI,IAAI,CAK5D"}
|
|
@@ -290,8 +290,9 @@ function ____exports.getCollectiblePedestalType(self, collectible)
|
|
|
290
290
|
local sprite = collectible:GetSprite()
|
|
291
291
|
return sprite:GetOverlayFrame()
|
|
292
292
|
end
|
|
293
|
-
--- Helper function to get a collectible's quality
|
|
294
|
-
-- Returns 0 if the provided collectible type was not
|
|
293
|
+
--- Helper function to get a collectible's quality, which ranges from 0 to 4 (inclusive). For
|
|
294
|
+
-- example, Mom's Knife has a quality of 4. Returns 0 if the provided collectible type was not
|
|
295
|
+
-- valid.
|
|
295
296
|
function ____exports.getCollectibleQuality(self, collectibleOrCollectibleType)
|
|
296
297
|
local collectibleType = getCollectibleTypeFromArg(nil, collectibleOrCollectibleType, "getCollectibleQuality")
|
|
297
298
|
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
@@ -234,6 +234,12 @@ export declare function removeGridEntity(gridEntityOrGridIndex: GridEntity | int
|
|
|
234
234
|
* reset.)
|
|
235
235
|
*/
|
|
236
236
|
export declare function setGridEntityInvisible(gridEntity: GridEntity): void;
|
|
237
|
+
/**
|
|
238
|
+
* Helper function to change the type of a grid entity to another type. Use this instead of the
|
|
239
|
+
* `GridEntity.SetType` method since that does not properly handle updating the sprite of the grid
|
|
240
|
+
* entity after the type is changed.
|
|
241
|
+
*/
|
|
242
|
+
export declare function setGridEntityType(gridEntity: GridEntity, gridEntityType: GridEntityType): void;
|
|
237
243
|
/**
|
|
238
244
|
* Helper function to spawn a giant poop. This is performed by spawning each of the four quadrant
|
|
239
245
|
* grid entities in the appropriate positions.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gridEntities.d.ts","sourceRoot":"","sources":["../../../src/functions/gridEntities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAGL,cAAc,EAIf,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"gridEntities.d.ts","sourceRoot":"","sources":["../../../src/functions/gridEntities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAGL,cAAc,EAIf,MAAM,8BAA8B,CAAC;AAYtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AA0C1D;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,iBAAiB,EAAE,iBAAiB,EACpC,oBAAoB,EAAE,GAAG,GACxB,CAAC,cAAc,EAAE,GAAG,CAAC,GAAG,SAAS,CAenC;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,cAAc,EAC9B,OAAO,SAAK,GACX,OAAO,CAiBT;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,GAAG,EAAE,CAKzC;AAED;;;;;;;;;GASG;AACH,wBAAgB,kCAAkC,CAChD,UAAU,EAAE,UAAU,GACrB,MAAM,EAAE,CAoBV;AAED,qFAAqF;AACrF,wBAAgB,+BAA+B,CAC7C,YAAY,EAAE,YAAY,GACzB,CAAC,cAAc,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,CAAC,CAuBhD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,eAAe,CAC7B,GAAG,eAAe,EAAE,cAAc,EAAE,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AExB;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"}
|
|
@@ -28,6 +28,8 @@ local GRID_ENTITY_XML_MAP = ____gridEntityXMLMap.GRID_ENTITY_XML_MAP
|
|
|
28
28
|
local ____roomShapeToTopLeftWallGridIndexMap = require("src.maps.roomShapeToTopLeftWallGridIndexMap")
|
|
29
29
|
local DEFAULT_TOP_LEFT_WALL_GRID_INDEX = ____roomShapeToTopLeftWallGridIndexMap.DEFAULT_TOP_LEFT_WALL_GRID_INDEX
|
|
30
30
|
local ROOM_SHAPE_TO_TOP_LEFT_WALL_GRID_INDEX_MAP = ____roomShapeToTopLeftWallGridIndexMap.ROOM_SHAPE_TO_TOP_LEFT_WALL_GRID_INDEX_MAP
|
|
31
|
+
local ____gridEntityTypeToANM2Path = require("src.objects.gridEntityTypeToANM2Path")
|
|
32
|
+
local GRID_ENTITY_TYPE_TO_ANM2_PATH = ____gridEntityTypeToANM2Path.GRID_ENTITY_TYPE_TO_ANM2_PATH
|
|
31
33
|
local ____poopGridEntityXMLTypesSet = require("src.sets.poopGridEntityXMLTypesSet")
|
|
32
34
|
local POOP_GRID_ENTITY_XML_TYPES_SET = ____poopGridEntityXMLTypesSet.POOP_GRID_ENTITY_XML_TYPES_SET
|
|
33
35
|
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
@@ -582,6 +584,17 @@ function ____exports.setGridEntityInvisible(self, gridEntity)
|
|
|
582
584
|
local sprite = gridEntity:GetSprite()
|
|
583
585
|
sprite:Reset()
|
|
584
586
|
end
|
|
587
|
+
--- Helper function to change the type of a grid entity to another type. Use this instead of the
|
|
588
|
+
-- `GridEntity.SetType` method since that does not properly handle updating the sprite of the grid
|
|
589
|
+
-- entity after the type is changed.
|
|
590
|
+
function ____exports.setGridEntityType(self, gridEntity, gridEntityType)
|
|
591
|
+
gridEntity:SetType(gridEntityType)
|
|
592
|
+
local sprite = gridEntity:GetSprite()
|
|
593
|
+
local anm2Path = GRID_ENTITY_TYPE_TO_ANM2_PATH[gridEntityType]
|
|
594
|
+
if anm2Path ~= nil then
|
|
595
|
+
sprite:Load(anm2Path, true)
|
|
596
|
+
end
|
|
597
|
+
end
|
|
585
598
|
--- Helper function to spawn a giant poop. This is performed by spawning each of the four quadrant
|
|
586
599
|
-- grid entities in the appropriate positions.
|
|
587
600
|
--
|
|
@@ -113,6 +113,8 @@ export declare function inAngelShop(): boolean;
|
|
|
113
113
|
/**
|
|
114
114
|
* Helper function to check to see if the current room is the Boss Room for The Beast.
|
|
115
115
|
*
|
|
116
|
+
* This function is useful because the `Room.GetBossID` method returns 0 for The Beast room.
|
|
117
|
+
*
|
|
116
118
|
* Under the hood, this checks the room type being equal to `RoomType.DUNGEON` (16) and the sub-type
|
|
117
119
|
* being equal to `DungeonSubType.BEAST_ROOM` (4).
|
|
118
120
|
*/
|
|
@@ -147,6 +149,8 @@ export declare function inDevilsCrownTreasureRoom(): boolean;
|
|
|
147
149
|
/**
|
|
148
150
|
* Helper function to check to see if the current room is the Boss Room for Dogma.
|
|
149
151
|
*
|
|
152
|
+
* This function is useful because the `Room.GetBossID` method returns 0 for the Dogma room.
|
|
153
|
+
*
|
|
150
154
|
* Note that the "living room" on the Home floor with the TV at the top of the room is not the Dogma
|
|
151
155
|
* Boss Room, as the player is teleported to a different room after watching the TV cutscene.
|
|
152
156
|
*
|
|
@@ -257,6 +261,8 @@ export declare function isAngelShop(roomData: RoomConfig): boolean;
|
|
|
257
261
|
/**
|
|
258
262
|
* Helper function to check to see if the provided room is the Boss Room for The Beast.
|
|
259
263
|
*
|
|
264
|
+
* This function is useful because the `Room.GetBossID` method returns 0 for The Beast room.
|
|
265
|
+
*
|
|
260
266
|
* Under the hood, this checks the room type being equal to `RoomType.DUNGEON` (16) and the sub-type
|
|
261
267
|
* being equal to `DungeonSubType.BEAST_ROOM` (4).
|
|
262
268
|
*/
|
|
@@ -291,6 +297,8 @@ export declare function isDevilsCrownTreasureRoom(roomDescriptor: RoomDescriptor
|
|
|
291
297
|
/**
|
|
292
298
|
* Helper function to check to see if the provided room is the Boss Room for Dogma.
|
|
293
299
|
*
|
|
300
|
+
* This function is useful because the `Room.GetBossID` method returns 0 for the Dogma room.
|
|
301
|
+
*
|
|
294
302
|
* Note that the "living room" on the Home floor with the TV at the top of the room is not the Dogma
|
|
295
303
|
* Boss Room, as the player is teleported to a different room after watching the TV cutscene.
|
|
296
304
|
*
|
|
@@ -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,wBAAg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gB,YAAY,CAAC,cAAc,EAAE,cAAc,GAAG,OAAO,CAEpE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAWrC;AAED,iFAAiF;AACjF,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"}
|
|
@@ -149,6 +149,8 @@ function ____exports.isAngelShop(self, roomData)
|
|
|
149
149
|
end
|
|
150
150
|
--- Helper function to check to see if the provided room is the Boss Room for The Beast.
|
|
151
151
|
--
|
|
152
|
+
-- This function is useful because the `Room.GetBossID` method returns 0 for The Beast room.
|
|
153
|
+
--
|
|
152
154
|
-- Under the hood, this checks the room type being equal to `RoomType.DUNGEON` (16) and the sub-type
|
|
153
155
|
-- being equal to `DungeonSubType.BEAST_ROOM` (4).
|
|
154
156
|
function ____exports.isBeastRoom(self, roomData)
|
|
@@ -183,6 +185,8 @@ function ____exports.isDevilsCrownTreasureRoom(self, roomDescriptor)
|
|
|
183
185
|
end
|
|
184
186
|
--- Helper function to check to see if the provided room is the Boss Room for Dogma.
|
|
185
187
|
--
|
|
188
|
+
-- This function is useful because the `Room.GetBossID` method returns 0 for the Dogma room.
|
|
189
|
+
--
|
|
186
190
|
-- Note that the "living room" on the Home floor with the TV at the top of the room is not the Dogma
|
|
187
191
|
-- Boss Room, as the player is teleported to a different room after watching the TV cutscene.
|
|
188
192
|
--
|
|
@@ -397,6 +401,8 @@ function ____exports.inAngelShop(self)
|
|
|
397
401
|
end
|
|
398
402
|
--- Helper function to check to see if the current room is the Boss Room for The Beast.
|
|
399
403
|
--
|
|
404
|
+
-- This function is useful because the `Room.GetBossID` method returns 0 for The Beast room.
|
|
405
|
+
--
|
|
400
406
|
-- Under the hood, this checks the room type being equal to `RoomType.DUNGEON` (16) and the sub-type
|
|
401
407
|
-- being equal to `DungeonSubType.BEAST_ROOM` (4).
|
|
402
408
|
function ____exports.inBeastRoom(self)
|
|
@@ -437,6 +443,8 @@ function ____exports.inDevilsCrownTreasureRoom(self)
|
|
|
437
443
|
end
|
|
438
444
|
--- Helper function to check to see if the current room is the Boss Room for Dogma.
|
|
439
445
|
--
|
|
446
|
+
-- This function is useful because the `Room.GetBossID` method returns 0 for the Dogma room.
|
|
447
|
+
--
|
|
440
448
|
-- Note that the "living room" on the Home floor with the TV at the top of the room is not the Dogma
|
|
441
449
|
-- Boss Room, as the player is teleported to a different room after watching the TV cutscene.
|
|
442
450
|
--
|
package/dist/src/index.d.ts
CHANGED
|
@@ -161,6 +161,7 @@ export * from "./types/AnyClass";
|
|
|
161
161
|
export * from "./types/AnyEntity";
|
|
162
162
|
export * from "./types/AnyFunction";
|
|
163
163
|
export * from "./types/AnyGridEntity";
|
|
164
|
+
export * from "./types/CompositionTypeSatisfiesEnum";
|
|
164
165
|
export * from "./types/ConversionHeartSubType";
|
|
165
166
|
export * from "./types/Decrement";
|
|
166
167
|
export * from "./types/ERange";
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,C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AAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const GRID_ENTITY_TYPE_TO_ANM2_PATH: {
|
|
2
|
+
readonly 0: undefined;
|
|
3
|
+
readonly 1: "gfx/grid/Props_01_Basement.anm2";
|
|
4
|
+
readonly 2: "gfx/grid/grid_rock.anm2";
|
|
5
|
+
readonly 3: "gfx/grid/grid_rock.anm2";
|
|
6
|
+
readonly 4: "gfx/grid/grid_rock.anm2";
|
|
7
|
+
readonly 5: "gfx/grid/grid_rock.anm2";
|
|
8
|
+
readonly 6: "gfx/grid/grid_rock.anm2";
|
|
9
|
+
readonly 7: "gfx/grid/grid_pit.anm2";
|
|
10
|
+
readonly 8: "gfx/grid/grid_spikes.anm2";
|
|
11
|
+
readonly 9: "gfx/grid/grid_spikes.anm2";
|
|
12
|
+
readonly 10: "gfx/grid/grid_web.anm2";
|
|
13
|
+
readonly 11: "gfx/grid/grid_locks.anm2";
|
|
14
|
+
readonly 12: "gfx/grid/grid_tnt.anm2";
|
|
15
|
+
readonly 13: "gfx/grid/grid_fireplace.anm2";
|
|
16
|
+
readonly 14: "gfx/grid/grid_poop.anm2";
|
|
17
|
+
readonly 15: undefined;
|
|
18
|
+
readonly 16: undefined;
|
|
19
|
+
readonly 17: "gfx/grid/Door_11_TrapDoor.anm2";
|
|
20
|
+
readonly 18: "gfx/grid/door_20_secrettrapdoor.anm2";
|
|
21
|
+
readonly 19: undefined;
|
|
22
|
+
readonly 20: "gfx/grid/grid_pressureplate.anm2";
|
|
23
|
+
readonly 21: undefined;
|
|
24
|
+
readonly 22: "gfx/grid/grid_rock.anm2";
|
|
25
|
+
readonly 23: "gfx/grid/grid_teleporter.anm2";
|
|
26
|
+
readonly 24: "gfx/grid/grid_rock.anm2";
|
|
27
|
+
readonly 25: "gfx/grid/grid_rock.anm2";
|
|
28
|
+
readonly 26: "gfx/grid/grid_rock.anm2";
|
|
29
|
+
readonly 27: "gfx/grid/grid_rock.anm2";
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=gridEntityTypeToANM2Path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gridEntityTypeToANM2Path.d.ts","sourceRoot":"","sources":["../../../src/objects/gridEntityTypeToANM2Path.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CqB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
4
|
+
____exports.GRID_ENTITY_TYPE_TO_ANM2_PATH = {
|
|
5
|
+
[GridEntityType.NULL] = nil,
|
|
6
|
+
[GridEntityType.DECORATION] = "gfx/grid/Props_01_Basement.anm2",
|
|
7
|
+
[GridEntityType.ROCK] = "gfx/grid/grid_rock.anm2",
|
|
8
|
+
[GridEntityType.BLOCK] = "gfx/grid/grid_rock.anm2",
|
|
9
|
+
[GridEntityType.ROCK_TINTED] = "gfx/grid/grid_rock.anm2",
|
|
10
|
+
[GridEntityType.ROCK_BOMB] = "gfx/grid/grid_rock.anm2",
|
|
11
|
+
[GridEntityType.ROCK_ALT] = "gfx/grid/grid_rock.anm2",
|
|
12
|
+
[GridEntityType.PIT] = "gfx/grid/grid_pit.anm2",
|
|
13
|
+
[GridEntityType.SPIKES] = "gfx/grid/grid_spikes.anm2",
|
|
14
|
+
[GridEntityType.SPIKES_ON_OFF] = "gfx/grid/grid_spikes.anm2",
|
|
15
|
+
[GridEntityType.SPIDER_WEB] = "gfx/grid/grid_web.anm2",
|
|
16
|
+
[GridEntityType.LOCK] = "gfx/grid/grid_locks.anm2",
|
|
17
|
+
[GridEntityType.TNT] = "gfx/grid/grid_tnt.anm2",
|
|
18
|
+
[GridEntityType.FIREPLACE] = "gfx/grid/grid_fireplace.anm2",
|
|
19
|
+
[GridEntityType.POOP] = "gfx/grid/grid_poop.anm2",
|
|
20
|
+
[GridEntityType.WALL] = nil,
|
|
21
|
+
[GridEntityType.DOOR] = nil,
|
|
22
|
+
[GridEntityType.TRAPDOOR] = "gfx/grid/Door_11_TrapDoor.anm2",
|
|
23
|
+
[GridEntityType.CRAWL_SPACE] = "gfx/grid/door_20_secrettrapdoor.anm2",
|
|
24
|
+
[GridEntityType.GRAVITY] = nil,
|
|
25
|
+
[GridEntityType.PRESSURE_PLATE] = "gfx/grid/grid_pressureplate.anm2",
|
|
26
|
+
[GridEntityType.STATUE] = nil,
|
|
27
|
+
[GridEntityType.ROCK_SUPER_SPECIAL] = "gfx/grid/grid_rock.anm2",
|
|
28
|
+
[GridEntityType.TELEPORTER] = "gfx/grid/grid_teleporter.anm2",
|
|
29
|
+
[GridEntityType.PILLAR] = "gfx/grid/grid_rock.anm2",
|
|
30
|
+
[GridEntityType.ROCK_SPIKED] = "gfx/grid/grid_rock.anm2",
|
|
31
|
+
[GridEntityType.ROCK_ALT_2] = "gfx/grid/grid_rock.anm2",
|
|
32
|
+
[GridEntityType.ROCK_GOLD] = "gfx/grid/grid_rock.anm2"
|
|
33
|
+
}
|
|
34
|
+
return ____exports
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helper type to validate that a union of interfaces with a field of `type` that is based on an
|
|
3
|
+
* enum is complete.
|
|
4
|
+
*
|
|
5
|
+
* For example:
|
|
6
|
+
*
|
|
7
|
+
* ```ts
|
|
8
|
+
* enum ObjectiveType {
|
|
9
|
+
* FOO,
|
|
10
|
+
* BAR,
|
|
11
|
+
* BAZ,
|
|
12
|
+
* }
|
|
13
|
+
*
|
|
14
|
+
* interface FooObjective {
|
|
15
|
+
* type: ObjectiveType.FOO;
|
|
16
|
+
* fooThing: number;
|
|
17
|
+
* }
|
|
18
|
+
*
|
|
19
|
+
* interface BarObjective {
|
|
20
|
+
* type: ObjectiveType.BAR;
|
|
21
|
+
* barThing: string;
|
|
22
|
+
* }
|
|
23
|
+
*
|
|
24
|
+
* type Objective = FooObjective | BarObjective;
|
|
25
|
+
* type _Test = CompositionTypeSatisfiesEnum<Objective, ObjectiveType>;
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* In this example, `Test` would be flagged by TypeScript because `Objective` does not contain an
|
|
29
|
+
* entry for `BazObjective`.
|
|
30
|
+
*/
|
|
31
|
+
export type CompositionTypeSatisfiesEnum<T extends {
|
|
32
|
+
type: unknown;
|
|
33
|
+
}, _Enum extends T["type"]> = unknown;
|
|
34
|
+
//# sourceMappingURL=CompositionTypeSatisfiesEnum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompositionTypeSatisfiesEnum.d.ts","sourceRoot":"","sources":["../../../src/types/CompositionTypeSatisfiesEnum.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,MAAM,4BAA4B,CACtC,CAAC,SAAS;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,EAC3B,KAAK,SAAS,CAAC,CAAC,MAAM,CAAC,IACrB,OAAO,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ObjectiveType = {}
|
|
3
|
+
ObjectiveType.FOO = 0
|
|
4
|
+
ObjectiveType[ObjectiveType.FOO] = "FOO"
|
|
5
|
+
ObjectiveType.BAR = 1
|
|
6
|
+
ObjectiveType[ObjectiveType.BAR] = "BAR"
|
|
7
|
+
ObjectiveType.BAZ = 2
|
|
8
|
+
ObjectiveType[ObjectiveType.BAZ] = "BAZ"
|
|
9
|
+
return ____exports
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript-common",
|
|
3
|
-
"version": "51.
|
|
3
|
+
"version": "51.9.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": "^21.0.
|
|
28
|
+
"isaac-typescript-definitions": "^21.0.3"
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -360,8 +360,9 @@ export function getCollectiblePedestalType(
|
|
|
360
360
|
}
|
|
361
361
|
|
|
362
362
|
/**
|
|
363
|
-
* Helper function to get a collectible's quality
|
|
364
|
-
* Returns 0 if the provided collectible type was not
|
|
363
|
+
* Helper function to get a collectible's quality, which ranges from 0 to 4 (inclusive). For
|
|
364
|
+
* example, Mom's Knife has a quality of 4. Returns 0 if the provided collectible type was not
|
|
365
|
+
* valid.
|
|
365
366
|
*/
|
|
366
367
|
export function getCollectibleQuality(
|
|
367
368
|
collectibleOrCollectibleType: EntityPickup | CollectibleType,
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
DEFAULT_TOP_LEFT_WALL_GRID_INDEX,
|
|
17
17
|
ROOM_SHAPE_TO_TOP_LEFT_WALL_GRID_INDEX_MAP,
|
|
18
18
|
} from "../maps/roomShapeToTopLeftWallGridIndexMap";
|
|
19
|
+
import { GRID_ENTITY_TYPE_TO_ANM2_PATH } from "../objects/gridEntityTypeToANM2Path";
|
|
19
20
|
import { POOP_GRID_ENTITY_XML_TYPES_SET } from "../sets/poopGridEntityXMLTypesSet";
|
|
20
21
|
import type { AnyGridEntity } from "../types/AnyGridEntity";
|
|
21
22
|
import type { GridEntityID } from "../types/GridEntityID";
|
|
@@ -230,20 +231,6 @@ export function getGridEntities(
|
|
|
230
231
|
});
|
|
231
232
|
}
|
|
232
233
|
|
|
233
|
-
function getAllGridEntities(): GridEntity[] {
|
|
234
|
-
const room = game.GetRoom();
|
|
235
|
-
|
|
236
|
-
const gridEntities: GridEntity[] = [];
|
|
237
|
-
for (const gridIndex of getAllGridIndexes()) {
|
|
238
|
-
const gridEntity = room.GetGridEntity(gridIndex);
|
|
239
|
-
if (gridEntity !== undefined) {
|
|
240
|
-
gridEntities.push(gridEntity);
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
return gridEntities;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
234
|
/**
|
|
248
235
|
* Helper function to get every grid entity in the current room except for certain specific types.
|
|
249
236
|
*
|
|
@@ -266,6 +253,20 @@ export function getGridEntitiesExcept(
|
|
|
266
253
|
});
|
|
267
254
|
}
|
|
268
255
|
|
|
256
|
+
function getAllGridEntities(): GridEntity[] {
|
|
257
|
+
const room = game.GetRoom();
|
|
258
|
+
|
|
259
|
+
const gridEntities: GridEntity[] = [];
|
|
260
|
+
for (const gridIndex of getAllGridIndexes()) {
|
|
261
|
+
const gridEntity = room.GetGridEntity(gridIndex);
|
|
262
|
+
if (gridEntity !== undefined) {
|
|
263
|
+
gridEntities.push(gridEntity);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
return gridEntities;
|
|
268
|
+
}
|
|
269
|
+
|
|
269
270
|
/** Helper function to get all grid entities in a given radius around a given point. */
|
|
270
271
|
export function getGridEntitiesInRadius(
|
|
271
272
|
targetPosition: Vector,
|
|
@@ -716,6 +717,24 @@ export function setGridEntityInvisible(gridEntity: GridEntity): void {
|
|
|
716
717
|
sprite.Reset();
|
|
717
718
|
}
|
|
718
719
|
|
|
720
|
+
/**
|
|
721
|
+
* Helper function to change the type of a grid entity to another type. Use this instead of the
|
|
722
|
+
* `GridEntity.SetType` method since that does not properly handle updating the sprite of the grid
|
|
723
|
+
* entity after the type is changed.
|
|
724
|
+
*/
|
|
725
|
+
export function setGridEntityType(
|
|
726
|
+
gridEntity: GridEntity,
|
|
727
|
+
gridEntityType: GridEntityType,
|
|
728
|
+
): void {
|
|
729
|
+
gridEntity.SetType(gridEntityType);
|
|
730
|
+
|
|
731
|
+
const sprite = gridEntity.GetSprite();
|
|
732
|
+
const anm2Path = GRID_ENTITY_TYPE_TO_ANM2_PATH[gridEntityType];
|
|
733
|
+
if (anm2Path !== undefined) {
|
|
734
|
+
sprite.Load(anm2Path, true);
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
|
|
719
738
|
/**
|
|
720
739
|
* Helper function to spawn a giant poop. This is performed by spawning each of the four quadrant
|
|
721
740
|
* grid entities in the appropriate positions.
|
package/src/functions/rooms.ts
CHANGED
|
@@ -308,6 +308,8 @@ export function inAngelShop(): boolean {
|
|
|
308
308
|
/**
|
|
309
309
|
* Helper function to check to see if the current room is the Boss Room for The Beast.
|
|
310
310
|
*
|
|
311
|
+
* This function is useful because the `Room.GetBossID` method returns 0 for The Beast room.
|
|
312
|
+
*
|
|
311
313
|
* Under the hood, this checks the room type being equal to `RoomType.DUNGEON` (16) and the sub-type
|
|
312
314
|
* being equal to `DungeonSubType.BEAST_ROOM` (4).
|
|
313
315
|
*/
|
|
@@ -366,6 +368,8 @@ export function inDevilsCrownTreasureRoom(): boolean {
|
|
|
366
368
|
/**
|
|
367
369
|
* Helper function to check to see if the current room is the Boss Room for Dogma.
|
|
368
370
|
*
|
|
371
|
+
* This function is useful because the `Room.GetBossID` method returns 0 for the Dogma room.
|
|
372
|
+
*
|
|
369
373
|
* Note that the "living room" on the Home floor with the TV at the top of the room is not the Dogma
|
|
370
374
|
* Boss Room, as the player is teleported to a different room after watching the TV cutscene.
|
|
371
375
|
*
|
|
@@ -585,6 +589,8 @@ export function isAngelShop(roomData: RoomConfig): boolean {
|
|
|
585
589
|
/**
|
|
586
590
|
* Helper function to check to see if the provided room is the Boss Room for The Beast.
|
|
587
591
|
*
|
|
592
|
+
* This function is useful because the `Room.GetBossID` method returns 0 for The Beast room.
|
|
593
|
+
*
|
|
588
594
|
* Under the hood, this checks the room type being equal to `RoomType.DUNGEON` (16) and the sub-type
|
|
589
595
|
* being equal to `DungeonSubType.BEAST_ROOM` (4).
|
|
590
596
|
*/
|
|
@@ -658,6 +664,8 @@ export function isDevilsCrownTreasureRoom(
|
|
|
658
664
|
/**
|
|
659
665
|
* Helper function to check to see if the provided room is the Boss Room for Dogma.
|
|
660
666
|
*
|
|
667
|
+
* This function is useful because the `Room.GetBossID` method returns 0 for the Dogma room.
|
|
668
|
+
*
|
|
661
669
|
* Note that the "living room" on the Home floor with the TV at the top of the room is not the Dogma
|
|
662
670
|
* Boss Room, as the player is teleported to a different room after watching the TV cutscene.
|
|
663
671
|
*
|
package/src/index.ts
CHANGED
|
@@ -161,6 +161,7 @@ export * from "./types/AnyClass";
|
|
|
161
161
|
export * from "./types/AnyEntity";
|
|
162
162
|
export * from "./types/AnyFunction";
|
|
163
163
|
export * from "./types/AnyGridEntity";
|
|
164
|
+
export * from "./types/CompositionTypeSatisfiesEnum";
|
|
164
165
|
export * from "./types/ConversionHeartSubType";
|
|
165
166
|
export * from "./types/Decrement";
|
|
166
167
|
export * from "./types/ERange";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { GridEntityType } from "isaac-typescript-definitions";
|
|
2
|
+
|
|
3
|
+
// cspell:disable
|
|
4
|
+
|
|
5
|
+
export const GRID_ENTITY_TYPE_TO_ANM2_PATH = {
|
|
6
|
+
[GridEntityType.NULL]: undefined, // 0
|
|
7
|
+
[GridEntityType.DECORATION]: "gfx/grid/Props_01_Basement.anm2", // 1
|
|
8
|
+
// Also there is:
|
|
9
|
+
// - props_03_caves.anm2
|
|
10
|
+
// - props_05_depths.anm2
|
|
11
|
+
// - props_07_the womb.anm2
|
|
12
|
+
// - props_07_utero.anm2
|
|
13
|
+
// - props_07_the womb_blue.anm2
|
|
14
|
+
// - props_09_sheol.anm2
|
|
15
|
+
// - props_10_cathedral.anm2
|
|
16
|
+
// - props_11_the chest.anm2
|
|
17
|
+
// - props_12_greed.anm2
|
|
18
|
+
// - props_01x_downpour.anm2
|
|
19
|
+
// - props_02x_dross.anm2
|
|
20
|
+
// - props_03x_mines.anm2
|
|
21
|
+
// - props_07_the corpse.anm2
|
|
22
|
+
// - props_0ex_isaacs_bedroom.anm2
|
|
23
|
+
[GridEntityType.ROCK]: "gfx/grid/grid_rock.anm2", // 2
|
|
24
|
+
[GridEntityType.BLOCK]: "gfx/grid/grid_rock.anm2", // 3
|
|
25
|
+
[GridEntityType.ROCK_TINTED]: "gfx/grid/grid_rock.anm2", // 4
|
|
26
|
+
[GridEntityType.ROCK_BOMB]: "gfx/grid/grid_rock.anm2", // 5
|
|
27
|
+
[GridEntityType.ROCK_ALT]: "gfx/grid/grid_rock.anm2", // 6
|
|
28
|
+
[GridEntityType.PIT]: "gfx/grid/grid_pit.anm2", // 7
|
|
29
|
+
[GridEntityType.SPIKES]: "gfx/grid/grid_spikes.anm2", // 8
|
|
30
|
+
[GridEntityType.SPIKES_ON_OFF]: "gfx/grid/grid_spikes.anm2", // 9
|
|
31
|
+
[GridEntityType.SPIDER_WEB]: "gfx/grid/grid_web.anm2", // 10
|
|
32
|
+
[GridEntityType.LOCK]: "gfx/grid/grid_locks.anm2", // 11
|
|
33
|
+
[GridEntityType.TNT]: "gfx/grid/grid_tnt.anm2", // 12
|
|
34
|
+
[GridEntityType.FIREPLACE]: "gfx/grid/grid_fireplace.anm2", // 13
|
|
35
|
+
[GridEntityType.POOP]: "gfx/grid/grid_poop.anm2", // 14
|
|
36
|
+
[GridEntityType.WALL]: undefined, // 15
|
|
37
|
+
[GridEntityType.DOOR]: undefined, // 16
|
|
38
|
+
[GridEntityType.TRAPDOOR]: "gfx/grid/Door_11_TrapDoor.anm2", // 17
|
|
39
|
+
[GridEntityType.CRAWL_SPACE]: "gfx/grid/door_20_secrettrapdoor.anm2", // 18
|
|
40
|
+
[GridEntityType.GRAVITY]: undefined, // 19
|
|
41
|
+
[GridEntityType.PRESSURE_PLATE]: "gfx/grid/grid_pressureplate.anm2", // 20
|
|
42
|
+
[GridEntityType.STATUE]: undefined, // 21
|
|
43
|
+
[GridEntityType.ROCK_SUPER_SPECIAL]: "gfx/grid/grid_rock.anm2", // 22
|
|
44
|
+
[GridEntityType.TELEPORTER]: "gfx/grid/grid_teleporter.anm2", // 23
|
|
45
|
+
[GridEntityType.PILLAR]: "gfx/grid/grid_rock.anm2", // 24
|
|
46
|
+
[GridEntityType.ROCK_SPIKED]: "gfx/grid/grid_rock.anm2", // 25
|
|
47
|
+
[GridEntityType.ROCK_ALT_2]: "gfx/grid/grid_rock.anm2", // 26
|
|
48
|
+
[GridEntityType.ROCK_GOLD]: "gfx/grid/grid_rock.anm2", // 27
|
|
49
|
+
} as const satisfies Record<GridEntityType, string | undefined>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helper type to validate that a union of interfaces with a field of `type` that is based on an
|
|
3
|
+
* enum is complete.
|
|
4
|
+
*
|
|
5
|
+
* For example:
|
|
6
|
+
*
|
|
7
|
+
* ```ts
|
|
8
|
+
* enum ObjectiveType {
|
|
9
|
+
* FOO,
|
|
10
|
+
* BAR,
|
|
11
|
+
* BAZ,
|
|
12
|
+
* }
|
|
13
|
+
*
|
|
14
|
+
* interface FooObjective {
|
|
15
|
+
* type: ObjectiveType.FOO;
|
|
16
|
+
* fooThing: number;
|
|
17
|
+
* }
|
|
18
|
+
*
|
|
19
|
+
* interface BarObjective {
|
|
20
|
+
* type: ObjectiveType.BAR;
|
|
21
|
+
* barThing: string;
|
|
22
|
+
* }
|
|
23
|
+
*
|
|
24
|
+
* type Objective = FooObjective | BarObjective;
|
|
25
|
+
* type _Test = CompositionTypeSatisfiesEnum<Objective, ObjectiveType>;
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* In this example, `Test` would be flagged by TypeScript because `Objective` does not contain an
|
|
29
|
+
* entry for `BazObjective`.
|
|
30
|
+
*/
|
|
31
|
+
export type CompositionTypeSatisfiesEnum<
|
|
32
|
+
T extends { type: unknown },
|
|
33
|
+
_Enum extends T["type"],
|
|
34
|
+
> = unknown;
|
|
35
|
+
|
|
36
|
+
// -----
|
|
37
|
+
// Tests
|
|
38
|
+
// -----
|
|
39
|
+
|
|
40
|
+
enum ObjectiveType {
|
|
41
|
+
FOO,
|
|
42
|
+
BAR,
|
|
43
|
+
BAZ,
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface FooObjective {
|
|
47
|
+
type: ObjectiveType.FOO;
|
|
48
|
+
fooThing: number;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface BarObjective {
|
|
52
|
+
type: ObjectiveType.BAR;
|
|
53
|
+
barThing: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
interface BazObjective {
|
|
57
|
+
type: ObjectiveType.BAZ;
|
|
58
|
+
bazThing: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
type Objective1 = FooObjective | BarObjective | BazObjective;
|
|
62
|
+
type _Test1 = CompositionTypeSatisfiesEnum<Objective1, ObjectiveType>;
|
|
63
|
+
|
|
64
|
+
type Objective2 = FooObjective | BarObjective;
|
|
65
|
+
// @ts-expect-error Missing "Baz".
|
|
66
|
+
type _Test2 = CompositionTypeSatisfiesEnum<Objective2, ObjectiveType>;
|