isaacscript-common 1.2.112 → 1.2.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/features/deployJSONRoom.d.ts +5 -5
- package/dist/functions/array.d.ts +2 -2
- package/dist/functions/cards.d.ts +3 -3
- package/dist/functions/charge.d.ts +3 -3
- package/dist/functions/deepCopy.d.ts +2 -2
- package/dist/functions/entity.d.ts +8 -8
- package/dist/functions/gridEntity.d.ts +1 -1
- package/dist/functions/npc.d.ts +4 -4
- package/dist/functions/player.d.ts +3 -3
- package/dist/functions/playerHealth.lua +8 -0
- package/dist/functions/positionVelocity.d.ts +1 -1
- package/dist/functions/rooms.d.ts +12 -12
- package/dist/functions/set.d.ts +1 -1
- package/dist/functions/spawnCollectible.d.ts +3 -3
- package/dist/functions/trinkets.d.ts +1 -1
- package/package.json +3 -3
|
@@ -15,9 +15,9 @@ import { JSONRoom } from "../types/JSONRoom";
|
|
|
15
15
|
* deployJSONRoom(firstJSONRoom);
|
|
16
16
|
* ```
|
|
17
17
|
* @param seed Optional. Specifies the seed that will be used for spawning every entity in the room.
|
|
18
|
-
*
|
|
18
|
+
* Default is `Random()`.
|
|
19
19
|
* @param verbose Optional. If specified, will write entries to the "log.txt" file that describe
|
|
20
|
-
* what the function is doing.
|
|
20
|
+
* what the function is doing. Default is false.
|
|
21
21
|
* @returns Before using the seed for spawning each entity, it is iterated with `nextSeed()`. The
|
|
22
22
|
* function returns the final iterated seed after spawning everything, which can be used in
|
|
23
23
|
* subsequent room deployments.
|
|
@@ -43,9 +43,9 @@ export declare function deployJSONRoom(jsonRoom: JSONRoom, seed?: number, verbos
|
|
|
43
43
|
* deployRandomJSONRoom(jsonRooms);
|
|
44
44
|
* ```
|
|
45
45
|
* @param seed Optional. Specifies the seed that will be used for determining the random room. After
|
|
46
|
-
* that, it is also used for spawning every entity in the room.
|
|
46
|
+
* that, it is also used for spawning every entity in the room. Default is `Random()`.
|
|
47
47
|
* @param verbose Optional. If specified, will write entries to the "log.txt" file that describe
|
|
48
|
-
* what the function is doing.
|
|
48
|
+
* what the function is doing. Default is false.
|
|
49
49
|
* @returns Before using the seed for spawning each entity, it is iterated with `nextSeed()`. The
|
|
50
50
|
* function returns the final iterated seed after spawning everything, which can be used in
|
|
51
51
|
* subsequent room deployments.
|
|
@@ -59,6 +59,6 @@ export declare function deployRandomJSONRoom(jsonRooms: JSONRoom[], seed?: numbe
|
|
|
59
59
|
*
|
|
60
60
|
* @param fillWithDecorations Optional. Set to true to fill every grid tile with an invisible
|
|
61
61
|
* decoration, which prevents vanilla entities in the room from respawning the next time that the
|
|
62
|
-
* player enters.
|
|
62
|
+
* player enters. Default is false.
|
|
63
63
|
*/
|
|
64
64
|
export declare function emptyRoom(fillWithDecorations: boolean): void;
|
|
@@ -67,7 +67,7 @@ export declare function arrayRemoveInPlace<T>(array: T[], ...elementsToRemove: T
|
|
|
67
67
|
* Helper function to get a random element from the provided array.
|
|
68
68
|
*
|
|
69
69
|
* @param array The array to get an element from.
|
|
70
|
-
* @param seed Optional. The seed used to select the random element. `Random()
|
|
70
|
+
* @param seed Optional. The seed used to select the random element. Default is `Random()`.
|
|
71
71
|
* @param exceptions Optional. An array of elements to skip over if selected.
|
|
72
72
|
*/
|
|
73
73
|
export declare function getRandomArrayElement<T>(array: T[] | readonly T[], seed?: number, exceptions?: T[] | readonly T[]): T;
|
|
@@ -76,7 +76,7 @@ export declare function getRandomArrayElement<T>(array: T[] | readonly T[], seed
|
|
|
76
76
|
* decided, it is then removed from the array (in-place).
|
|
77
77
|
*
|
|
78
78
|
* @param array The array to get an element from.
|
|
79
|
-
* @param seed Optional. The seed used to select the random element. `Random()
|
|
79
|
+
* @param seed Optional. The seed used to select the random element. Default is `Random()`.
|
|
80
80
|
* @param exceptions Optional. An array of elements to skip over if selected.
|
|
81
81
|
*/
|
|
82
82
|
export declare function getRandomArrayElementAndRemove<T>(array: T[], seed?: number, exceptions?: T[] | readonly T[]): T;
|
|
@@ -37,13 +37,13 @@ export declare function getMaxCards(): int;
|
|
|
37
37
|
* - any objects like Dice Shard
|
|
38
38
|
* - any modded cards.
|
|
39
39
|
*
|
|
40
|
-
* @param seed Optional. The seed with which to select the random card. `Random()
|
|
40
|
+
* @param seed Optional. The seed with which to select the random card. Default is `Random()`.
|
|
41
41
|
* @param exceptions Optional. An array of cards to not select.
|
|
42
42
|
*/
|
|
43
43
|
export declare function getRandomCard(seed?: number, exceptions?: Card[]): Card;
|
|
44
44
|
/**
|
|
45
45
|
* @param cardType The card type that represents the pool of cards to select from.
|
|
46
|
-
* @param seed Optional. The seed with which to select the random card. `Random()
|
|
46
|
+
* @param seed Optional. The seed with which to select the random card. Default is `Random()`.
|
|
47
47
|
* @param exceptions Optional. An array of cards to not select.
|
|
48
48
|
*/
|
|
49
49
|
export declare function getRandomCardOfType(cardType: CardType, seed?: number, exceptions?: Card[]): Card;
|
|
@@ -51,7 +51,7 @@ export declare function getRandomCardOfType(cardType: CardType, seed?: number, e
|
|
|
51
51
|
* Has an equal chance of returning any rune (e.g. Rune of Hagalaz, Blank Rune, Black Rune, Soul of
|
|
52
52
|
* Isaac, etc.). This will never return a Rune Shard.
|
|
53
53
|
*
|
|
54
|
-
* @param seed Optional. The seed with which to select the random rune. `Random()
|
|
54
|
+
* @param seed Optional. The seed with which to select the random rune. Default is `Random()`.
|
|
55
55
|
* @param exceptions Optional. An array of runes to not select.
|
|
56
56
|
*/
|
|
57
57
|
export declare function getRandomRune(seed?: number, exceptions?: Card[]): Card;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* - AAA Battery
|
|
10
10
|
*
|
|
11
11
|
* @param ignoreBigRoomDoubleCharge Optional. If set to true, it will treat the current room as a
|
|
12
|
-
* 1x1 room for the purposes of calculating how much charge to grant.
|
|
12
|
+
* 1x1 room for the purposes of calculating how much charge to grant. Default is false.
|
|
13
13
|
*/
|
|
14
14
|
export declare function addRoomClearCharges(ignoreBigRoomDoubleCharge?: boolean): void;
|
|
15
15
|
/**
|
|
@@ -23,7 +23,7 @@ export declare function addRoomClearCharges(ignoreBigRoomDoubleCharge?: boolean)
|
|
|
23
23
|
*
|
|
24
24
|
* @param player The player to grant the charges to.
|
|
25
25
|
* @param ignoreBigRoomDoubleCharge Optional. If set to true, it will treat the current room as a
|
|
26
|
-
* 1x1 room for the purposes of calculating how much charge to grant.
|
|
26
|
+
* 1x1 room for the purposes of calculating how much charge to grant. Default is false.
|
|
27
27
|
*/
|
|
28
28
|
export declare function addRoomClearCharge(player: EntityPlayer, ignoreBigRoomDoubleCharge?: boolean): void;
|
|
29
29
|
/**
|
|
@@ -38,7 +38,7 @@ export declare function addRoomClearCharge(player: EntityPlayer, ignoreBigRoomDo
|
|
|
38
38
|
* @param player The player to grant the charges to.
|
|
39
39
|
* @param activeSlot The active item slot to grant the charges to.
|
|
40
40
|
* @param ignoreBigRoomDoubleCharge Optional. If set to true, it will treat the current room as a
|
|
41
|
-
* 1x1 room for the purposes of calculating how much charge to grant.
|
|
41
|
+
* 1x1 room for the purposes of calculating how much charge to grant. Default is false.
|
|
42
42
|
*/
|
|
43
43
|
export declare function addRoomClearChargeToSlot(player: EntityPlayer, activeSlot: ActiveSlot, ignoreBigRoomDoubleCharge?: boolean): void;
|
|
44
44
|
export declare function playChargeSoundEffect(player: EntityPlayer, activeSlot: ActiveSlot): void;
|
|
@@ -20,8 +20,8 @@ export declare enum SerializationType {
|
|
|
20
20
|
*
|
|
21
21
|
* @param oldObject The object to copy.
|
|
22
22
|
* @param serializationType Has 3 possible values. Can leave TypeScriptToLua objects as-is, or can
|
|
23
|
-
* serialize objects to Lua tables, or can deserialize Lua tables to objects.
|
|
24
|
-
*
|
|
23
|
+
* serialize objects to Lua tables, or can deserialize Lua tables to objects. Defaults to
|
|
24
|
+
* `SerializationType.NONE`.
|
|
25
25
|
* @param traversalDescription Used to track the current key that we are operating on.
|
|
26
26
|
*/
|
|
27
27
|
export declare function deepCopy(oldObject: LuaTable | Map<AnyNotNil, unknown> | Set<AnyNotNil>, serializationType?: SerializationType, traversalDescription?: string): LuaTable | Map<AnyNotNil, unknown> | Set<AnyNotNil>;
|
|
@@ -6,10 +6,10 @@ export declare function anyEntityCloserThan(entities: Entity[], position: Vector
|
|
|
6
6
|
* `Isaac.CountEntities` method to avoid having to specify a spawner and to handle ignoring charmed
|
|
7
7
|
* enemies.
|
|
8
8
|
*
|
|
9
|
-
* @param entityType -1
|
|
10
|
-
* @param variant -1
|
|
11
|
-
* @param subType -1
|
|
12
|
-
* @param ignoreFriendly
|
|
9
|
+
* @param entityType Default is -1.
|
|
10
|
+
* @param variant Default is -1.
|
|
11
|
+
* @param subType Default is -1.
|
|
12
|
+
* @param ignoreFriendly Default is false.
|
|
13
13
|
*/
|
|
14
14
|
export declare function countEntities(entityType?: EntityType | int, variant?: number, subType?: number, ignoreFriendly?: boolean): number;
|
|
15
15
|
/**
|
|
@@ -50,7 +50,7 @@ export declare function getFilteredNewEntities<T extends AnyEntity>(oldEntities:
|
|
|
50
50
|
* @param matchingVariant Optional. If specified, will only return NPCs that match this variant.
|
|
51
51
|
* @param matchingSubType Optional. If specified, will only return NPCs that match this sub-type.
|
|
52
52
|
* @param ignoreFriendly Optional. If set to true, it will exclude friendly NPCs from being
|
|
53
|
-
* returned.
|
|
53
|
+
* returned. Default is false. Will only be taken into account if `matchingEntityType` is specified.
|
|
54
54
|
*/
|
|
55
55
|
export declare function getEntities(matchingEntityType?: EntityType | int, matchingVariant?: number, matchingSubType?: number, ignoreFriendly?: boolean): Entity[];
|
|
56
56
|
/** Helper function to return a string containing an entity's type, variant, and sub-type. */
|
|
@@ -59,7 +59,7 @@ export declare function getEntityID(entity: Entity): string;
|
|
|
59
59
|
* Helper function to measure an entity's velocity to see if it is moving.
|
|
60
60
|
*
|
|
61
61
|
* @param entity The entity whose velocity to measure.
|
|
62
|
-
* @param threshold Optional. The threshold from 0 to consider to be moving. 0.01
|
|
62
|
+
* @param threshold Optional. The threshold from 0 to consider to be moving. Default is 0.01.
|
|
63
63
|
*/
|
|
64
64
|
export declare function isEntityMoving(entity: Entity, threshold?: number): boolean;
|
|
65
65
|
/**
|
|
@@ -80,9 +80,9 @@ export declare function removeEntities(entities: Entity[], cap?: int): boolean;
|
|
|
80
80
|
* Helper function to remove all of the matching entities in the room.
|
|
81
81
|
*
|
|
82
82
|
* @param entityType The entity type to match.
|
|
83
|
-
* @param entityVariant Optional. The variant to match. -1
|
|
83
|
+
* @param entityVariant Optional. The variant to match. Default is -1 (which will match every
|
|
84
84
|
* variant).
|
|
85
|
-
* @param entitySubType Optional. The sub-type to match. -1
|
|
85
|
+
* @param entitySubType Optional. The sub-type to match. Default is -1 (which will match every
|
|
86
86
|
* sub-type).
|
|
87
87
|
* @param cap Optional. If specified, will only remove the given amount of collectibles.
|
|
88
88
|
* @returns True if one or more entities was removed, false otherwise.
|
|
@@ -100,7 +100,7 @@ export declare function removeAllMatchingGridEntities(...gridEntityType: GridEnt
|
|
|
100
100
|
*
|
|
101
101
|
* @param gridEntity The grid entity to remove.
|
|
102
102
|
* @param updateRoom Optional. Whether or not to update the room after the grid entity is removed.
|
|
103
|
-
*
|
|
103
|
+
* Default is true. This is generally a good idea because if the room is not updated, you will be
|
|
104
104
|
* unable to spawn another grid entity on the same tile until a frame has passed. However, doing
|
|
105
105
|
* this is expensive, since it involves a call to `Isaac.GetRoomEntities()`, so set it to false if
|
|
106
106
|
* you need to invoke this function multiple times.
|
package/dist/functions/npc.d.ts
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* @param npc The NPC to fire the projectile from.
|
|
7
7
|
* @param position The staring position of the projectile.
|
|
8
8
|
* @param velocity The starting velocity of the projectile.
|
|
9
|
-
* @param projectilesMode The mode of the projectile. Optional.
|
|
10
|
-
* `ProjectilesMode.ONE_PROJECTILE
|
|
11
|
-
* @param projectileParams The parameters of the projectile. Optional.
|
|
12
|
-
*
|
|
9
|
+
* @param projectilesMode The mode of the projectile. Optional. Default is
|
|
10
|
+
* `ProjectilesMode.ONE_PROJECTILE`.
|
|
11
|
+
* @param projectileParams The parameters of the projectile. Optional. Default is
|
|
12
|
+
* `ProjectileParams()`.
|
|
13
13
|
* @returns The fired projectile.
|
|
14
14
|
*/
|
|
15
15
|
export declare function fireProjectiles(npc: EntityNPC, position: Vector, velocity: Vector, projectilesMode?: ProjectilesMode, projectileParams?: ProjectileParams): EntityProjectile[];
|
|
@@ -183,7 +183,7 @@ export declare function getPlayerNumHitsRemaining(player: EntityPlayer): int;
|
|
|
183
183
|
* If this is not desired, use the `getAllPlayers` helper function instead.
|
|
184
184
|
*
|
|
185
185
|
* @param performCharacterExclusions Whether or not to exclude characters that are not directly
|
|
186
|
-
* controlled by the player (i.e. Esau & Tainted Soul).
|
|
186
|
+
* controlled by the player (i.e. Esau & Tainted Soul). Default is false.
|
|
187
187
|
*/
|
|
188
188
|
export declare function getPlayers(performCharacterExclusions?: boolean): EntityPlayer[];
|
|
189
189
|
/**
|
|
@@ -304,7 +304,7 @@ export declare function removeTrinketCostume(player: EntityPlayer, trinketType:
|
|
|
304
304
|
* @param activeSlot The slot to set.
|
|
305
305
|
* @param charge Optional. The argument of charges to set. If not specified, the item will be set
|
|
306
306
|
* with maximum charges.
|
|
307
|
-
* @param keepInPools Optional. Whether or not to remove the item from pools.
|
|
307
|
+
* @param keepInPools Optional. Whether or not to remove the item from pools. Default is false.
|
|
308
308
|
*/
|
|
309
309
|
export declare function setActiveItem(player: EntityPlayer, collectibleType: CollectibleType, activeSlot: ActiveSlot, charge?: int, keepInPools?: boolean): void;
|
|
310
310
|
/**
|
|
@@ -314,7 +314,7 @@ export declare function setActiveItem(player: EntityPlayer, collectibleType: Col
|
|
|
314
314
|
*
|
|
315
315
|
* @param player The player to apply or remove the blindfold state from.
|
|
316
316
|
* @param enabled Whether or not to apply or remove the blindfold.
|
|
317
|
-
* @param modifyCostume Optional. Whether to add or remove the blindfold costume.
|
|
317
|
+
* @param modifyCostume Optional. Whether to add or remove the blindfold costume. Default is true.
|
|
318
318
|
*/
|
|
319
319
|
export declare function setBlindfold(player: EntityPlayer, enabled: boolean, modifyCostume?: boolean): void;
|
|
320
320
|
/**
|
|
@@ -6,6 +6,7 @@ local ____exports = {}
|
|
|
6
6
|
local ____constants = require("constants")
|
|
7
7
|
local MAX_PLAYER_HEART_CONTAINERS = ____constants.MAX_PLAYER_HEART_CONTAINERS
|
|
8
8
|
function ____exports.removeAllPlayerHealth(self, player)
|
|
9
|
+
local character = player:GetPlayerType()
|
|
9
10
|
local goldenHearts = player:GetGoldenHearts()
|
|
10
11
|
local eternalHearts = player:GetEternalHearts()
|
|
11
12
|
local boneHearts = player:GetBoneHearts()
|
|
@@ -16,6 +17,13 @@ function ____exports.removeAllPlayerHealth(self, player)
|
|
|
16
17
|
player:AddBrokenHearts(brokenHearts * -1)
|
|
17
18
|
player:AddMaxHearts(MAX_PLAYER_HEART_CONTAINERS * -2, true)
|
|
18
19
|
player:AddSoulHearts(MAX_PLAYER_HEART_CONTAINERS * -2)
|
|
20
|
+
if character == PlayerType.PLAYER_THESOUL then
|
|
21
|
+
local forgotten = player:GetSubPlayer()
|
|
22
|
+
if forgotten ~= nil then
|
|
23
|
+
local forgottenBoneHearts = forgotten:GetBoneHearts()
|
|
24
|
+
forgotten:AddBoneHearts(forgottenBoneHearts * -1)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
19
27
|
end
|
|
20
28
|
function ____exports.getPlayerHealth(self, player)
|
|
21
29
|
local character = player:GetPlayerType()
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @param startingPosition The position to start searching from. If this position is not overlapping
|
|
10
10
|
* with anything, then it will be returned.
|
|
11
|
-
* @param avoidActiveEntities Optional.
|
|
11
|
+
* @param avoidActiveEntities Optional. Default is false.
|
|
12
12
|
*/
|
|
13
13
|
export declare function findFreePosition(startingPosition: Vector, avoidActiveEntities?: boolean): Vector;
|
|
14
14
|
/**
|
|
@@ -22,20 +22,20 @@ export declare function getCurrentRoomDescriptorReadOnly(): RoomDescriptorReadOn
|
|
|
22
22
|
/**
|
|
23
23
|
* Helper function to get the room data for the provided room.
|
|
24
24
|
*
|
|
25
|
-
* @param roomGridIndex Optional.
|
|
25
|
+
* @param roomGridIndex Optional. Default is the current room index.
|
|
26
26
|
*/
|
|
27
27
|
export declare function getRoomData(roomGridIndex?: int): RoomConfig | undefined;
|
|
28
28
|
/**
|
|
29
29
|
* Helper function for getting the type of the room with the given grid index.
|
|
30
30
|
*
|
|
31
|
-
* @param roomGridIndex Optional.
|
|
31
|
+
* @param roomGridIndex Optional. Default is the current room index.
|
|
32
32
|
* @returns The room data type. Returns -1 if the type was not found.
|
|
33
33
|
*/
|
|
34
34
|
export declare function getRoomType(roomGridIndex?: int): RoomType;
|
|
35
35
|
/**
|
|
36
36
|
* Helper function to get the descriptor for a room.
|
|
37
37
|
*
|
|
38
|
-
* @param roomGridIndex Optional.
|
|
38
|
+
* @param roomGridIndex Optional. Default is the current room index.
|
|
39
39
|
*/
|
|
40
40
|
export declare function getRoomDescriptor(roomGridIndex?: int): RoomDescriptor;
|
|
41
41
|
/**
|
|
@@ -78,13 +78,13 @@ export declare function getRoomItemPoolType(): ItemPoolType;
|
|
|
78
78
|
* Use this as an index for data structures that store data per room, since it is unique across
|
|
79
79
|
* different dimensions.
|
|
80
80
|
*
|
|
81
|
-
* @param roomGridIndex Optional.
|
|
81
|
+
* @param roomGridIndex Optional. Default is the current room index.
|
|
82
82
|
*/
|
|
83
83
|
export declare function getRoomListIndex(roomGridIndex?: int): int;
|
|
84
84
|
/**
|
|
85
85
|
* Helper function to get the name of the room as it appears in the STB/XML data.
|
|
86
86
|
*
|
|
87
|
-
* @param roomGridIndex Optional.
|
|
87
|
+
* @param roomGridIndex Optional. Default is the current room index.
|
|
88
88
|
* @returns The room name. Returns "Unknown" if the type was not found.
|
|
89
89
|
*/
|
|
90
90
|
export declare function getRoomName(roomGridIndex?: int): string;
|
|
@@ -93,7 +93,7 @@ export declare function getRoomName(roomGridIndex?: int): string;
|
|
|
93
93
|
* correspond to the first number in the filename of the XML/STB file. For example, a Depths room
|
|
94
94
|
* would have a stage ID of 7.
|
|
95
95
|
*
|
|
96
|
-
* @param roomGridIndex Optional.
|
|
96
|
+
* @param roomGridIndex Optional. Default is the current room index.
|
|
97
97
|
* @returns The room stage ID. Returns -1 if the stage ID was not found.
|
|
98
98
|
*/
|
|
99
99
|
export declare function getRoomStageID(roomGridIndex?: int): StageID;
|
|
@@ -103,7 +103,7 @@ export declare function getRoomStageID(roomGridIndex?: int): StageID;
|
|
|
103
103
|
* "00.special rooms.stb" file, an Angel Room with a sub-type of 0 will correspond to a normal Angel
|
|
104
104
|
* Room and a sub-type of 1 will correspond to an Angel Room shop for The Stairway.
|
|
105
105
|
*
|
|
106
|
-
* @param roomGridIndex Optional.
|
|
106
|
+
* @param roomGridIndex Optional. Default is the current room index.
|
|
107
107
|
* @returns The room sub-type. Returns -1 if the sub-type was not found.
|
|
108
108
|
*/
|
|
109
109
|
export declare function getRoomSubType(roomGridIndex?: int): int;
|
|
@@ -112,7 +112,7 @@ export declare function getRoomSubType(roomGridIndex?: int): int;
|
|
|
112
112
|
* variant as its identifier. For example, to go to Basement room #123, you would use a console
|
|
113
113
|
* command of `goto d.123` while on the Basement.
|
|
114
114
|
*
|
|
115
|
-
* @param roomGridIndex Optional.
|
|
115
|
+
* @param roomGridIndex Optional. Default is the current room index.
|
|
116
116
|
* @returns The room variant. Returns -1 if the variant was not found.
|
|
117
117
|
*/
|
|
118
118
|
export declare function getRoomVariant(roomGridIndex?: int): int;
|
|
@@ -121,7 +121,7 @@ export declare function getRoomVariant(roomGridIndex?: int): int;
|
|
|
121
121
|
* callback has fired (i.e. when entities are initializing and performing their first update). This
|
|
122
122
|
* is because the variable is only incremented immediately before the PostNewRoom callback fires.
|
|
123
123
|
*
|
|
124
|
-
* @param roomGridIndex Optional.
|
|
124
|
+
* @param roomGridIndex Optional. Default is the current room index.
|
|
125
125
|
*/
|
|
126
126
|
export declare function getRoomVisitedCount(roomGridIndex?: int): int;
|
|
127
127
|
/**
|
|
@@ -130,7 +130,7 @@ export declare function getRoomVisitedCount(roomGridIndex?: int): int;
|
|
|
130
130
|
*
|
|
131
131
|
* @param includeExtraDimensionalRooms Optional. On some floors (e.g. Downpour 2, Mines 2),
|
|
132
132
|
* extra-dimensional rooms are automatically be generated and can be seen when you iterate over the
|
|
133
|
-
* `RoomList`.
|
|
133
|
+
* `RoomList`. Default is false.
|
|
134
134
|
*/
|
|
135
135
|
export declare function getRooms(includeExtraDimensionalRooms?: boolean): RoomDescriptor[];
|
|
136
136
|
/**
|
|
@@ -205,14 +205,14 @@ export declare function isAllRoomsClear(onlyCheckRoomTypes?: RoomType[]): boolea
|
|
|
205
205
|
* Helper function to detect if the provided room was created by the Red Key item. Under the hood,
|
|
206
206
|
* this checks for the `RoomDescriptorFlag.FLAG_RED_ROOM` flag.
|
|
207
207
|
*
|
|
208
|
-
* @param roomGridIndex Optional.
|
|
208
|
+
* @param roomGridIndex Optional. Default is the current room index.
|
|
209
209
|
*/
|
|
210
210
|
export declare function isRedKeyRoom(roomGridIndex?: int): boolean;
|
|
211
211
|
/**
|
|
212
212
|
* Helper function to determine if the provided room is part of the floor layout. For
|
|
213
213
|
* example, Devil Rooms and the Mega Satan room are not considered to be inside the map.
|
|
214
214
|
*
|
|
215
|
-
* @param roomGridIndex Optional.
|
|
215
|
+
* @param roomGridIndex Optional. Default is the current room index.
|
|
216
216
|
*/
|
|
217
217
|
export declare function isRoomInsideMap(roomGridIndex?: int): boolean;
|
|
218
218
|
/**
|
package/dist/functions/set.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare function deleteSetsFromSet<T>(mainSet: Set<T>, ...setsToRemove: A
|
|
|
24
24
|
* Helper function to get a random element from the provided set.
|
|
25
25
|
*
|
|
26
26
|
* @param set The set to get an element from.
|
|
27
|
-
* @param seed Optional. The seed used to select the random element. `Random()
|
|
27
|
+
* @param seed Optional. The seed used to select the random element. Default is `Random()`.
|
|
28
28
|
* @param exceptions Optional. An array of elements to skip over if selected.
|
|
29
29
|
*/
|
|
30
30
|
export declare function getRandomSetElement<T>(set: Set<T> | ReadonlySet<T>, seed?: number, exceptions?: T[] | readonly T[]): T;
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @param collectibleType The collectible type to spawn.
|
|
8
8
|
* @param position The position to spawn the collectible at.
|
|
9
|
-
* @param seed Optional. Random()
|
|
9
|
+
* @param seed Optional. Default is `Random()`.
|
|
10
10
|
* @param options Optional. Set to true to make the collectible a "There's Options" style
|
|
11
|
-
* collectible.
|
|
11
|
+
* collectible. Default is false.
|
|
12
12
|
* @param forceFreeItem Optional. Set to true to disable the logic that gives the item a price for
|
|
13
|
-
* Tainted Keeper.
|
|
13
|
+
* Tainted Keeper. Default is false.
|
|
14
14
|
*/
|
|
15
15
|
export declare function spawnCollectible(collectibleType: CollectibleType | int, position: Vector, seed?: number, options?: boolean, forceFreeItem?: boolean): EntityPickup;
|
|
16
16
|
/**
|
|
@@ -49,7 +49,7 @@ export declare function isGoldenTrinket(trinketType: TrinketType | int): boolean
|
|
|
49
49
|
* @param player The player to smelt the trinkets to.
|
|
50
50
|
* @param trinketType The trinket type to smelt.
|
|
51
51
|
* @param numTrinkets Optional. If specified, will smelt the given number of trinkets. Use this to
|
|
52
|
-
* avoid calling this function multiple times.
|
|
52
|
+
* avoid calling this function multiple times. Default is 1.
|
|
53
53
|
*/
|
|
54
54
|
export declare function smeltTrinket(player: EntityPlayer, trinketType: TrinketType | int, numTrinkets?: number): void;
|
|
55
55
|
export declare function trinketHasCacheFlag(trinketType: TrinketType | int, cacheFlag: CacheFlag): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript-common",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.113",
|
|
4
4
|
"description": "Helper functions for IsaacScript mods",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"isaac",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
],
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@zamiell/typescript-to-lua": "^1.4.2",
|
|
29
|
-
"isaac-typescript-definitions": "^1.0.
|
|
29
|
+
"isaac-typescript-definitions": "^1.0.357",
|
|
30
30
|
"isaacscript-lint": "^1.0.84",
|
|
31
31
|
"isaacscript-tsconfig": "^1.1.8",
|
|
32
|
-
"typedoc": "^0.22.
|
|
32
|
+
"typedoc": "^0.22.13",
|
|
33
33
|
"typescript": "4.5.5"
|
|
34
34
|
}
|
|
35
35
|
}
|