isaacscript-common 2.0.11 → 2.0.12

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.
Files changed (49) hide show
  1. package/dist/classes/DefaultMap.d.ts +2 -1
  2. package/dist/enums/ModCallbackCustom.d.ts +0 -3
  3. package/dist/features/deployJSONRoom.d.ts +16 -9
  4. package/dist/features/disableInputs.d.ts +6 -6
  5. package/dist/features/disableSound.d.ts +2 -2
  6. package/dist/features/extraConsoleCommands/commands.d.ts +10 -9
  7. package/dist/features/runInNFrames.d.ts +2 -1
  8. package/dist/features/saveDataManager/exports.d.ts +8 -6
  9. package/dist/features/sirenHelpers.d.ts +1 -1
  10. package/dist/functions/array.d.ts +10 -9
  11. package/dist/functions/benchmark.d.ts +1 -1
  12. package/dist/functions/cards.d.ts +7 -5
  13. package/dist/functions/charge.d.ts +6 -3
  14. package/dist/functions/collectibles.d.ts +7 -4
  15. package/dist/functions/color.d.ts +1 -1
  16. package/dist/functions/deepCopy.d.ts +2 -1
  17. package/dist/functions/entity.d.ts +9 -6
  18. package/dist/functions/entity.lua +1 -1
  19. package/dist/functions/entitySpecific.d.ts +20 -11
  20. package/dist/functions/enums.d.ts +6 -5
  21. package/dist/functions/enums.lua +1 -1
  22. package/dist/functions/familiars.d.ts +5 -5
  23. package/dist/functions/flag.d.ts +6 -2
  24. package/dist/functions/flying.d.ts +1 -1
  25. package/dist/functions/gridEntity.d.ts +13 -8
  26. package/dist/functions/kColor.d.ts +1 -1
  27. package/dist/functions/map.d.ts +2 -1
  28. package/dist/functions/math.d.ts +1 -1
  29. package/dist/functions/npc.d.ts +2 -2
  30. package/dist/functions/pickups.d.ts +2 -2
  31. package/dist/functions/pills.d.ts +2 -1
  32. package/dist/functions/player.d.ts +2 -2
  33. package/dist/functions/playerIndex.d.ts +2 -1
  34. package/dist/functions/positionVelocity.d.ts +9 -5
  35. package/dist/functions/random.d.ts +7 -5
  36. package/dist/functions/rng.d.ts +1 -1
  37. package/dist/functions/rooms.d.ts +5 -4
  38. package/dist/functions/set.d.ts +1 -1
  39. package/dist/functions/spawnCollectible.d.ts +4 -4
  40. package/dist/functions/transformations.d.ts +2 -1
  41. package/dist/functions/trinketGive.d.ts +1 -1
  42. package/dist/functions/trinkets.d.ts +7 -4
  43. package/dist/functions/ui.d.ts +2 -2
  44. package/dist/functions/utils.d.ts +4 -2
  45. package/dist/functions/vector.d.ts +1 -1
  46. package/dist/types/CollectibleIndex.d.ts +2 -1
  47. package/dist/types/PlayerIndex.d.ts +2 -1
  48. package/dist/upgradeMod.d.ts +2 -4
  49. package/package.json +3 -2
@@ -55,19 +55,20 @@ export declare function getEnumLength<T>(transpiledEnum: T): int;
55
55
  export declare function getEnumValues<T>(transpiledEnum: T): Array<T[keyof T]>;
56
56
  export declare function getLastEnumValue<T>(transpiledEnum: T): T[keyof T];
57
57
  /**
58
- * Helper function to get a random element from the provided enum.
58
+ * Helper function to get a random value from the provided enum.
59
59
  *
60
- * @param transpiledEnum The enum to get an element from.
60
+ * @param transpiledEnum The enum to get the value from.
61
61
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
62
- * `RNG.Next` method will be called. Default is `getRandomSeed()`.
62
+ * `RNG.Next` method will be called. Default is `getRandomSeed()`.
63
63
  * @param exceptions Optional. An array of elements to skip over if selected.
64
64
  */
65
- export declare function getRandomEnumElement<T>(transpiledEnum: T, seedOrRNG?: Seed | RNG, exceptions?: Array<T[keyof T]> | ReadonlyArray<T[keyof T]>): T[keyof T];
65
+ export declare function getRandomEnumValue<T>(transpiledEnum: T, seedOrRNG?: Seed | RNG, exceptions?: Array<T[keyof T]> | ReadonlyArray<T[keyof T]>): T[keyof T];
66
66
  /**
67
67
  * Helper function to check every value of a custom enum for -1. This is helpful as a run-time check
68
68
  * because many methods of the Isaac class return -1 if they fail.
69
69
  *
70
- * Example:
70
+ * For example:
71
+ *
71
72
  * ```ts
72
73
  * enum EntityTypeCustom {
73
74
  * FOO = Isaac.GetEntityTypeByName("Foo"),
@@ -63,7 +63,7 @@ function ____exports.getLastEnumValue(self, transpiledEnum)
63
63
  end
64
64
  return lastElement
65
65
  end
66
- function ____exports.getRandomEnumElement(self, transpiledEnum, seedOrRNG, exceptions)
66
+ function ____exports.getRandomEnumValue(self, transpiledEnum, seedOrRNG, exceptions)
67
67
  if seedOrRNG == nil then
68
68
  seedOrRNG = getRandomSeed(nil)
69
69
  end
@@ -22,11 +22,11 @@
22
22
  * @param player The player that owns the familiars.
23
23
  * @param collectibleType The collectible type of the collectible associated with this familiar.
24
24
  * @param targetCount The number of familiars that should exist. This function will add or remove
25
- * familiars until it matches the target count.
25
+ * familiars until it matches the target count.
26
26
  * @param familiarVariant The variant of the familiar to spawn or remove.
27
27
  * @param familiarSubType Optional. The sub-type of the familiar to spawn or remove. If not
28
- * specified, it will search for existing familiars of all sub-types, and spawn new familiars with a
29
- * sub-type of 0.
28
+ * specified, it will search for existing familiars of all sub-types, and
29
+ * spawn new familiars with a sub-type of 0.
30
30
  */
31
31
  export declare function checkFamiliar(player: EntityPlayer, collectibleType: int, targetCount: int, familiarVariant: int, familiarSubType?: int): void;
32
32
  /**
@@ -53,8 +53,8 @@ export declare function checkFamiliar(player: EntityPlayer, collectibleType: int
53
53
  * @param collectibleType The collectible type of the collectible associated with this familiar.
54
54
  * @param familiarVariant The variant of the familiar to spawn or remove.
55
55
  * @param familiarSubType Optional. The sub-type of the familiar to spawn or remove. If not
56
- * specified, it will search for existing familiars of all sub-types, and spawn new familiars with a
57
- * sub-type of 0.
56
+ * specified, it will search for existing familiars of all sub-types, and
57
+ * spawn new familiars with a sub-type of 0.
58
58
  */
59
59
  export declare function checkFamiliarFromCollectibles(player: EntityPlayer, collectibleType: int, familiarVariant: int, familiarSubType?: int): void;
60
60
  export declare function isFamiliarThatShootsPlayerTears(familiar: EntityFamiliar): boolean;
@@ -5,6 +5,7 @@ import { DamageFlag } from "isaac-typescript-definitions";
5
5
  * This is a variadic function, so pass as many flags as you want to add.
6
6
  *
7
7
  * Example 1:
8
+ *
8
9
  * ```ts
9
10
  * // Give the player spectral tears
10
11
  * const player = Isaac.GetPlayer();
@@ -12,6 +13,7 @@ import { DamageFlag } from "isaac-typescript-definitions";
12
13
  * ```
13
14
  *
14
15
  * Example 2:
16
+ *
15
17
  * ```ts
16
18
  * // Give the player spectral and homing tears
17
19
  * const player = Isaac.GetPlayer();
@@ -51,7 +53,8 @@ export declare function getFlagName<T extends BitFlag | BitFlag128>(flag: BitFla
51
53
  * This is a variadic function, so pass as many flags as you want to check for. If passed multiple
52
54
  * flags, it will only return true if all of the flags are set.
53
55
  *
54
- * Example:
56
+ * For example:
57
+ *
55
58
  * ```ts
56
59
  * const player = Isaac.GetPlayer();
57
60
  * if (hasFlag(player.TearFlags, TearFlags.TEAR_SPECTRAL) {
@@ -81,7 +84,8 @@ export declare function isSelfDamage(damageFlags: DamageFlag | BitFlags<DamageFl
81
84
  *
82
85
  * This is a variadic function, so pass as many flags as you want to remove.
83
86
  *
84
- * Example:
87
+ * For example:
88
+ *
85
89
  * ```ts
86
90
  * // Remove spectral tears from the player, if present
87
91
  * const player = Isaac.GetPlayer();
@@ -7,7 +7,7 @@ import { CollectibleType } from "isaac-typescript-definitions";
7
7
  * Vessel should be checked for via the `hasFlyingTemporaryEffect` function.
8
8
  *
9
9
  * @param pruneConditionalItems Whether or not collectibles that only grant flight conditionally
10
- * should be included in the set (like Empty Vessel).
10
+ * should be included in the set (like Empty Vessel).
11
11
  */
12
12
  export declare function getFlyingCollectibles(pruneConditionalItems: boolean): Set<CollectibleType | int>;
13
13
  /**
@@ -19,14 +19,16 @@ export declare function getCollidingEntitiesWithGridEntity(gridEntity: GridEntit
19
19
  * Use this function with no arguments to get every grid entity, or specify a variadic amount of
20
20
  * arguments to match specific grid entity types.
21
21
  *
22
- * Example:
22
+ * For example:
23
+ *
23
24
  * ```ts
24
25
  * for (const gridEntity of getGridEntities()) {
25
26
  * print(gridEntity.GetType())
26
27
  * }
27
28
  * ```
28
29
  *
29
- * Example:
30
+ * For example:
31
+ *
30
32
  * ```ts
31
33
  * const rocks = getGridEntities(
32
34
  * GridEntityType.ROCK,
@@ -77,7 +79,8 @@ export declare function isPostBossVoidPortal(gridEntity: GridEntity): boolean;
77
79
  * Helper function to all grid entities in the room except for ones matching the grid entity types
78
80
  * provided.
79
81
  *
80
- * Example:
82
+ * For example:
83
+ *
81
84
  * ```ts
82
85
  * removeAllGridEntitiesExceptFor(
83
86
  * GridEntityType.WALL,
@@ -92,7 +95,8 @@ export declare function removeAllGridExcept(...gridEntityTypes: GridEntityType[]
92
95
  * Helper function to remove all of the grid entities in the room that match the grid entity types
93
96
  * provided.
94
97
  *
95
- * Example:
98
+ * For example:
99
+ *
96
100
  * ```ts
97
101
  * removeAllMatchingGridEntities(
98
102
  * GridEntityType.ROCK,
@@ -109,10 +113,11 @@ export declare function removeAllMatchingGridEntities(...gridEntityType: GridEnt
109
113
  *
110
114
  * @param gridEntity The grid entity to remove.
111
115
  * @param updateRoom Optional. Whether or not to update the room after the grid entity is removed.
112
- * Default is true. This is generally a good idea because if the room is not updated, you will be
113
- * unable to spawn another grid entity on the same tile until a frame has passed. However, doing
114
- * this is expensive, since it involves a call to `Isaac.GetRoomEntities`, so set it to false if you
115
- * need to invoke this function multiple times.
116
+ * Default is true. This is generally a good idea because if the room is not
117
+ * updated, you will be unable to spawn another grid entity on the same tile until
118
+ * a frame has passed. However, doing this is expensive, since it involves a call
119
+ * to `Isaac.GetRoomEntities`, so set it to false if you need to invoke this
120
+ * function multiple times.
116
121
  */
117
122
  export declare function removeGrid(gridEntity: GridEntity, updateRoom?: boolean): void;
118
123
  /**
@@ -13,7 +13,7 @@ interface CopyKColorReturn {
13
13
  * Helper function to copy a `KColor` object.
14
14
  *
15
15
  * @param kColor The KColor object to copy. In the case of deserialization, this will actually be a
16
- * Lua table instead of an instantiated KColor class.
16
+ * Lua table instead of an instantiated KColor class.
17
17
  * @param serializationType Default is `SerializationType.NONE`.
18
18
  */
19
19
  export declare function copyKColor<K extends KColor | SerializedKColor, S extends SerializationType>(kColor: K, serializationType: S): CopyKColorReturn[S];
@@ -5,7 +5,8 @@ export declare function copyMap<K, V>(oldMap: Map<K, V>): Map<K, V>;
5
5
  * purposes of this function, both search text and map keys are converted to lowercase before
6
6
  * attempting to find a match.
7
7
  *
8
- * Example:
8
+ * For example:
9
+ *
9
10
  * ```ts
10
11
  * const map = new <string, number>Map([
11
12
  * ["foo", 123],
@@ -10,7 +10,7 @@ export declare function getAngleDifference(angle1: float, angle2: float): float;
10
10
  * @param xMultiplier An optional multiplier to get the points around an oval. Default is 1.
11
11
  * @param yMultiplier An optional multiplier to get the points around an oval. Default is 1.
12
12
  * @param initialDirection By default, the first point on the circle will be on the top center, but
13
- * this can be optionally changed by specifying this argument.
13
+ * this can be optionally changed by specifying this argument.
14
14
  */
15
15
  export declare function getCircleDiscretizedPoints(centerPos: Vector, radius: float, numPoints: int, xMultiplier?: number, yMultiplier?: number, initialDirection?: Direction): Vector[];
16
16
  /**
@@ -7,9 +7,9 @@ import { EntityType, ProjectilesMode } from "isaac-typescript-definitions";
7
7
  * @param position The staring position of the projectile.
8
8
  * @param velocity The starting velocity of the projectile.
9
9
  * @param projectilesMode The mode of the projectile. Optional. Default is
10
- * `ProjectilesMode.ONE_PROJECTILE`.
10
+ * `ProjectilesMode.ONE_PROJECTILE`.
11
11
  * @param projectileParams The parameters of the projectile. Optional. Default is
12
- * `ProjectileParams()`.
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[];
@@ -54,7 +54,7 @@ export declare function removeAllCoins(coinSubType?: CoinSubType | int, cap?: in
54
54
  * Helper function to remove all of the collectibles in the room.
55
55
  *
56
56
  * @param collectibleType Optional. If specified, will only remove collectibles that match this
57
- * collectible type.
57
+ * collectible type.
58
58
  * @param cap Optional. If specified, will only remove the given amount of collectibles.
59
59
  * @returns True if one or more collectibles were removed, false otherwise.
60
60
  */
@@ -95,7 +95,7 @@ export declare function removeAllSacks(sackSubType?: SackSubType | int, cap?: in
95
95
  * Helper function to remove all of the trinkets in the room.
96
96
  *
97
97
  * @param trinketType Optional. If specified, will only remove trinkets that match this trinket
98
- * type.
98
+ * type.
99
99
  * @param cap Optional. If specified, will only remove the given amount of trinkets.
100
100
  * @returns True if one or more trinkets were removed, false otherwise.
101
101
  */
@@ -27,7 +27,8 @@ export declare function getPillEffectClass(pillEffect: PillEffect | int): ItemCo
27
27
  /**
28
28
  * Helper function to get a pill effect name from a PillEffect enum value.
29
29
  *
30
- * Example:
30
+ * For example:
31
+ *
31
32
  * ```ts
32
33
  * const pillEffect = PillEffect.BAD_GAS;
33
34
  * const pillEffectName = getPillEffectName(pillEffect); // trinketName is "Bad Gas"
@@ -28,7 +28,7 @@ export declare function anyPlayerHasTrinket(trinketType: TrinketType | int): boo
28
28
  */
29
29
  export declare function anyPlayerIs(...matchingCharacters: Array<PlayerType | int>): boolean;
30
30
  /**
31
- * Helper function to determine if a player will destroy a rock/pot/skull/etc. if they walk over it.
31
+ * Helper function to determine if a player will destroy a rock/pot/skull if they walk over it.
32
32
  *
33
33
  * The following situations allow for this to be true:
34
34
  * - the player has Leo (collectible 302)
@@ -268,7 +268,7 @@ export declare function removeTrinketCostume(player: EntityPlayer, trinketType:
268
268
  * @param collectibleType The collectible type of the item to give.
269
269
  * @param activeSlot The slot to set.
270
270
  * @param charge Optional. The argument of charges to set. If not specified, the item will be set
271
- * with maximum charges.
271
+ * with maximum charges.
272
272
  * @param keepInPools Optional. Whether or not to remove the item from pools. Default is false.
273
273
  */
274
274
  export declare function setActiveItem(player: EntityPlayer, collectibleType: CollectibleType, activeSlot: ActiveSlot, charge?: int, keepInPools?: boolean): void;
@@ -51,7 +51,8 @@ export declare function getPlayerIndexVanilla(playerToFind: EntityPlayer): int |
51
51
  * If this is not desired, use the `getAllPlayers` helper function instead.
52
52
  *
53
53
  * @param performCharacterExclusions Whether or not to exclude characters that are not directly
54
- * controlled by the player (i.e. Esau & Tainted Soul). Default is false.
54
+ * controlled by the player (i.e. Esau & Tainted Soul). Default is
55
+ * false.
55
56
  */
56
57
  export declare function getPlayers(performCharacterExclusions?: boolean): EntityPlayer[];
57
58
  /**
@@ -10,7 +10,7 @@ export declare function anyPlayerCloserThan(position: Vector, distance: float):
10
10
  * specific situations.
11
11
  *
12
12
  * @param startingPosition The position to start searching from. If this position is not overlapping
13
- * with anything, then it will be returned.
13
+ * with anything, then it will be returned.
14
14
  * @param avoidActiveEntities Optional. Default is false.
15
15
  */
16
16
  export declare function findFreePosition(startingPosition: Vector, avoidActiveEntities?: boolean): Vector;
@@ -20,7 +20,8 @@ export declare function findFreePosition(startingPosition: Vector, avoidActiveEn
20
20
  * This is useful for rewinding entity positions at a later time. Also see `setEntityPositions`.
21
21
  *
22
22
  * @param entities Optional. If provided, will only get the positions of the provided entities. Use
23
- * this with cached entities to avoid invoking the `Isaac.GetRoomEntities` method multiple times.
23
+ * this with cached entities to avoid invoking the `Isaac.GetRoomEntities` method
24
+ * multiple times.
24
25
  */
25
26
  export declare function getEntityPositions(entities?: Entity[]): Map<PtrHash, Vector>;
26
27
  /**
@@ -29,7 +30,8 @@ export declare function getEntityPositions(entities?: Entity[]): Map<PtrHash, Ve
29
30
  * This is useful for rewinding entity velocities at a later time. Also see `setEntityVelocities`.
30
31
  *
31
32
  * @param entities Optional. If provided, will only get the velocities of the provided entities. Use
32
- * this with cached entities to avoid invoking the `Isaac.GetRoomEntities` method multiple times.
33
+ * this with cached entities to avoid invoking the `Isaac.GetRoomEntities` method
34
+ * multiple times.
33
35
  */
34
36
  export declare function getEntityVelocities(entities?: Entity[]): Map<PtrHash, Vector>;
35
37
  /**
@@ -42,7 +44,8 @@ export declare function getEntityVelocities(entities?: Entity[]): Map<PtrHash, V
42
44
  *
43
45
  * @param entityPositions The map providing the positions for every entity.
44
46
  * @param entities Optional. If provided, will only set the positions of the provided entities. Use
45
- * this with cached entities to avoid invoking the `Isaac.GetRoomEntities` method multiple times.
47
+ * this with cached entities to avoid invoking the `Isaac.GetRoomEntities` method
48
+ * multiple times.
46
49
  */
47
50
  export declare function setEntityPositions(entityPositions: Map<PtrHash, Vector>, entities?: Entity[]): void;
48
51
  /**
@@ -55,6 +58,7 @@ export declare function setEntityPositions(entityPositions: Map<PtrHash, Vector>
55
58
  *
56
59
  * @param entityVelocities The map providing the velocities for every entity.
57
60
  * @param entities Optional. If provided, will only set the velocities of the provided entities. Use
58
- * this with cached entities to avoid invoking the `Isaac.GetRoomEntities` method multiple times.
61
+ * this with cached entities to avoid invoking the `Isaac.GetRoomEntities` method
62
+ * multiple times.
59
63
  */
60
64
  export declare function setEntityVelocities(entityVelocities: Map<PtrHash, Vector>, entities?: Entity[]): void;
@@ -4,13 +4,14 @@
4
4
  * high end. (This is because the `RNG.RandomFloat` method will never return a value of exactly 1.)
5
5
  *
6
6
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
7
- * `RNG.Next` method will be called. Default is `getRandomSeed()`.
7
+ * `RNG.Next` method will be called. Default is `getRandomSeed()`.
8
8
  */
9
9
  export declare function getRandom(seedOrRNG?: Seed | RNG): float;
10
10
  /**
11
11
  * This returns a random float between min and max.
12
12
  *
13
- * Example:
13
+ * For example:
14
+ *
14
15
  * ```ts
15
16
  * const realNumberBetweenOneAndThree = getRandomFloat(1, 3);
16
17
  * ```
@@ -18,7 +19,7 @@ export declare function getRandom(seedOrRNG?: Seed | RNG): float;
18
19
  * @param min The lower bound for the random number (inclusive).
19
20
  * @param max The upper bound for the random number (exclusive).
20
21
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
21
- * `RNG.Next` method will be called. Default is `getRandomSeed()`.
22
+ * `RNG.Next` method will be called. Default is `getRandomSeed()`.
22
23
  */
23
24
  export declare function getRandomFloat(min: int, max: int, seedOrRNG?: Seed | RNG): float;
24
25
  /**
@@ -27,7 +28,8 @@ export declare function getRandomFloat(min: int, max: int, seedOrRNG?: Seed | RN
27
28
  * Note that this function will invoke the `Next` method on the `RNG` object before returning the
28
29
  * random number.
29
30
  *
30
- * Example:
31
+ * For example:
32
+ *
31
33
  * ```ts
32
34
  * const oneTwoOrThree = getRandomInt(1, 3);
33
35
  * ```
@@ -35,6 +37,6 @@ export declare function getRandomFloat(min: int, max: int, seedOrRNG?: Seed | RN
35
37
  * @param min The lower bound for the random number (inclusive).
36
38
  * @param max The upper bound for the random number (inclusive).
37
39
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
38
- * `RNG.Next` method will be called. Default is `getRandomSeed()`.
40
+ * `RNG.Next` method will be called. Default is `getRandomSeed()`.
39
41
  */
40
42
  export declare function getRandomInt(min: int, max: int, seedOrRNG?: Seed | RNG): int;
@@ -13,7 +13,7 @@ interface CopyRNGReturn {
13
13
  * Helper function to copy an `RNG` object.
14
14
  *
15
15
  * @param rng The RNG object to copy. In the case of deserialization, this will actually be a Lua
16
- * table instead of an instantiated RNG class.
16
+ * table instead of an instantiated RNG class.
17
17
  * @param serializationType Default is `SerializationType.NONE`.
18
18
  */
19
19
  export declare function copyRNG<R extends RNG | SerializedRNG, S extends SerializationType>(rng: R, serializationType: S): CopyRNGReturn[S];
@@ -41,8 +41,9 @@ export declare function getRoomTypeName(roomType: RoomType): string;
41
41
  * the list.
42
42
  *
43
43
  * @param includeExtraDimensionalRooms Optional. On some floors (e.g. Downpour 2, Mines 2),
44
- * extra-dimensional rooms are automatically be generated and can be seen when you iterate over the
45
- * `RoomList`. Default is false.
44
+ * extra-dimensional rooms are automatically be generated and
45
+ * can be seen when you iterate over the `RoomList`. Default is
46
+ * false.
46
47
  */
47
48
  export declare function getRooms(includeExtraDimensionalRooms?: boolean): RoomDescriptor[];
48
49
  /**
@@ -113,8 +114,8 @@ export declare function inStartingRoom(): boolean;
113
114
  * This function will only check rooms in the current dimension.
114
115
  *
115
116
  * @param onlyCheckRoomTypes Optional. A whitelist of room types. If specified, room types not in
116
- * the array will be ignored. If not specified, then all rooms will be checked. Undefined by
117
- * default.
117
+ * the array will be ignored. If not specified, then all rooms will be
118
+ * checked. Undefined by default.
118
119
  */
119
120
  export declare function isAllRoomsClear(onlyCheckRoomTypes?: RoomType[]): boolean;
120
121
  export declare function isDoorSlotValidAtGridIndex(doorSlot: DoorSlot, roomGridIndex: int): boolean;
@@ -26,7 +26,7 @@ export declare function deleteSetsFromSet<T>(mainSet: Set<T>, ...setsToRemove: A
26
26
  *
27
27
  * @param set The set to get an element from.
28
28
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
29
- * `RNG.Next` method will be called. Default is `getRandomSeed()`.
29
+ * `RNG.Next` method will be called. Default is `getRandomSeed()`.
30
30
  * @param exceptions Optional. An array of elements to skip over if selected.
31
31
  */
32
32
  export declare function getRandomSetElement<T>(set: Set<T> | ReadonlySet<T>, seedOrRNG?: Seed | RNG, exceptions?: T[] | readonly T[]): T;
@@ -8,11 +8,11 @@ import { CollectibleType } from "isaac-typescript-definitions";
8
8
  * @param collectibleType The collectible type to spawn.
9
9
  * @param position The position to spawn the collectible at.
10
10
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
11
- * `RNG.Next` method will be called. Default is `getRandomSeed()`.
11
+ * `RNG.Next` method will be called. Default is `getRandomSeed()`.
12
12
  * @param options Optional. Set to true to make the collectible a "There's Options" style
13
- * collectible. Default is false.
13
+ * collectible. Default is false.
14
14
  * @param forceFreeItem Optional. Set to true to disable the logic that gives the item a price for
15
- * Tainted Keeper. Default is false.
15
+ * Tainted Keeper. Default is false.
16
16
  */
17
17
  export declare function spawnCollectible(collectibleType: CollectibleType | int, position: Vector, seedOrRNG?: Seed | RNG, options?: boolean, forceFreeItem?: boolean): EntityPickup;
18
18
  /**
@@ -25,6 +25,6 @@ export declare function spawnCollectible(collectibleType: CollectibleType | int,
25
25
  *
26
26
  * @param position The position to spawn the empty collectible at.
27
27
  * @param seedOrRNG The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
28
- * `RNG.Next` method will be called. Default is `getRandomSeed()`.
28
+ * `RNG.Next` method will be called. Default is `getRandomSeed()`.
29
29
  */
30
30
  export declare function spawnEmptyCollectible(position: Vector, seedOrRNG?: Seed | RNG): EntityPickup;
@@ -17,7 +17,8 @@ export declare function getPlayerTransformations(player: EntityPlayer): Set<Play
17
17
  /**
18
18
  * Helper function to get a transformation name from a PlayerForm enum.
19
19
  *
20
- * Example:
20
+ * For example:
21
+ *
21
22
  * ```ts
22
23
  * const transformationName = getTransformationName(PlayerForm.LORD_OF_THE_FLIES);
23
24
  * // transformationName is "Beelzebub"
@@ -14,7 +14,7 @@ export declare function giveTrinketsBack(player: EntityPlayer, trinketSituation:
14
14
  * @param player The player to smelt the trinkets to.
15
15
  * @param trinketType The trinket type to smelt.
16
16
  * @param numTrinkets Optional. If specified, will smelt the given number of trinkets. Use this to
17
- * avoid calling this function multiple times. Default is 1.
17
+ * avoid calling this function multiple times. Default is 1.
18
18
  */
19
19
  export declare function smeltTrinket(player: EntityPlayer, trinketType: TrinketType | int, numTrinkets?: number): void;
20
20
  /**
@@ -9,7 +9,8 @@ export declare function getGoldenTrinketType(trinketType: TrinketType | int): Tr
9
9
  /**
10
10
  * Returns the slot number corresponding to where a trinket can be safely inserted.
11
11
  *
12
- * Example:
12
+ * For example:
13
+ *
13
14
  * ```ts
14
15
  * const player = Isaac.GetPlayer();
15
16
  * const trinketSlot = getOpenTrinketSlotNum(player);
@@ -29,7 +30,8 @@ export declare function getTrinketDescription(trinketType: TrinketType | int): s
29
30
  * Helper function to get the name of a trinket. Returns "Unknown" if the provided trinket type is
30
31
  * not valid.
31
32
  *
32
- * Example:
33
+ * For example:
34
+ *
33
35
  * ```ts
34
36
  * const trinketType = TrinketType.SWALLOWED_PENNY;
35
37
  * const trinketName = getTrinketName(trinketType); // trinketName is "Swallowed Penny"
@@ -53,8 +55,9 @@ export declare function isGoldenTrinket(trinketType: TrinketType | int): boolean
53
55
  *
54
56
  * @param trinket The trinket whose sprite you want to modify.
55
57
  * @param pngPath Equal to either the spritesheet path to load (e.g.
56
- * "gfx/items/collectibles/collectibles_001_thesadonion.png") or undefined. If undefined, the sprite
57
- * will be removed, making it appear like the collectible has already been taken by the player.
58
+ * "gfx/items/collectibles/collectibles_001_thesadonion.png") or undefined. If
59
+ * undefined, the sprite will be removed, making it appear like the collectible has
60
+ * already been taken by the player.
58
61
  */
59
62
  export declare function setTrinketSprite(trinket: EntityPickup, pngPath: string | undefined): void;
60
63
  export declare function trinketHasCacheFlag(trinketType: TrinketType | int, cacheFlag: CacheFlag): boolean;
@@ -6,8 +6,8 @@
6
6
  * offset setting so that mods can render UI elements to the screen in the correct position.
7
7
  *
8
8
  * @returns If the user does not have Mod Config Menu enabled, or does not have this option set,
9
- * then this function will return `Vector.Zero.` Otherwise, it will return a Vector that represents
10
- * a HUD offset that should be added to the position of a UI element.
9
+ * then this function will return `Vector.Zero.` Otherwise, it will return a Vector that
10
+ * represents a HUD offset that should be added to the position of a UI element.
11
11
  */
12
12
  export declare function getHUDOffsetVector(): Vector;
13
13
  /**
@@ -4,7 +4,8 @@
4
4
  *
5
5
  * Very useful to be future-safe against people adding values to a type or an enum.
6
6
  *
7
- * Example:
7
+ * For example:
8
+ *
8
9
  * ```ts
9
10
  * enum Situation {
10
11
  * ONE,
@@ -80,7 +81,8 @@ export declare function printEnabled(enabled: boolean, description: string): voi
80
81
  /**
81
82
  * Helper function to repeat code N times. This is faster to type and cleaner than using a for loop.
82
83
  *
83
- * Example:
84
+ * For example:
85
+ *
84
86
  * ```ts
85
87
  * const player = Isaac.GetPlayer();
86
88
  * repeat(10, () => {
@@ -13,7 +13,7 @@ interface CopyVectorReturn {
13
13
  * Helper function to copy a `Vector` object.
14
14
  *
15
15
  * @param vector The vector to copy. In the case of deserialization, this will actually be a Lua
16
- * table instead of an instantiated Vector class.
16
+ * table instead of an instantiated Vector class.
17
17
  * @param serializationType Default is `SerializationType.NONE`.
18
18
  */
19
19
  export declare function copyVector<V extends Vector | SerializedVector, S extends SerializationType>(vector: V, serializationType: S): CopyVectorReturn[S];
@@ -3,7 +3,8 @@
3
3
  * [[`getCollectibleIndex`]] function. Mods can signify that data structures handle collectibles by
4
4
  * using this type.
5
5
  *
6
- * Example:
6
+ * For example:
7
+ *
7
8
  * ```ts
8
9
  * const collectiblesNameMap = new Map<CollectibleIndex, string>();
9
10
  * ```
@@ -3,7 +3,8 @@
3
3
  * PlayerIndex is a specific type of string; see the documentation for the [[`getPlayerIndex`]]
4
4
  * function. Mods can signify that data structures handle `EntityPlayer` by using this type.
5
5
  *
6
- * Example:
6
+ * For example:
7
+ *
7
8
  * ```ts
8
9
  * const playersNameMap = new Map<PlayerIndex, string>();
9
10
  * ```
@@ -3,7 +3,8 @@ import { ModUpgraded } from "./classes/ModUpgraded";
3
3
  /**
4
4
  * Use this function to enable the custom features and callbacks provided by `isaacscript-common`.
5
5
  *
6
- * Example:
6
+ * For example:
7
+ *
7
8
  * ```ts
8
9
  * const modVanilla = RegisterMod("My Mod", 1);
9
10
  * const mod = upgradeMod(modVanilla);
@@ -15,9 +16,6 @@ import { ModUpgraded } from "./classes/ModUpgraded";
15
16
  * mod.AddCallbackCustom(ModCallbackCustom.POST_ITEM_PICKUP, postItemPickup);
16
17
  * ```
17
18
  *
18
- * For a list of all custom callbacks, check out the
19
- * [Function Signatures](https://isaacscript.github.io/docs/function-signatures#custom-callbacks).
20
- *
21
19
  * @param modVanilla The mod object returned by the `RegisterMod` function.
22
20
  * @returns The upgraded mod object.
23
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",
@@ -28,9 +28,10 @@
28
28
  "isaac-typescript-definitions": "^2.0.14"
29
29
  },
30
30
  "devDependencies": {
31
- "isaacscript-lint": "^1.0.145",
31
+ "isaacscript-lint": "^1.0.150",
32
32
  "isaacscript-spell": "^1.0.3",
33
33
  "isaacscript-tsconfig": "^1.1.16",
34
+ "npm-check-updates": "^13.0.1",
34
35
  "ts-node": "^10.7.0",
35
36
  "typedoc": "^0.22.15",
36
37
  "typescript": "^4.6.4",