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
@@ -14,7 +14,8 @@ declare type SecondArg<K, V, A extends unknown[]> = V | FactoryFunction<K, V, A>
14
14
  * When instantiating a new DefaultMap, you must specify either a default value or a function that
15
15
  * returns a default value.
16
16
  *
17
- * Example:
17
+ * For example:
18
+ *
18
19
  * ```ts
19
20
  * // Initializes a new empty DefaultMap with a default value of "foo"
20
21
  * const defaultMapWithPrimitive = new DefaultMap<string, string>("foo");
@@ -1,9 +1,6 @@
1
1
  /**
2
2
  * These are the custom callbacks available for use once the mod object has been upgraded. Also see
3
3
  * the [[`upgradeMod`]] function.
4
- *
5
- * For a better listing of all custom callbacks, check out the
6
- * [Function Signatures](https://isaacscript.github.io/docs/function-signatures#custom-callbacks).
7
4
  */
8
5
  export declare enum ModCallbackCustom {
9
6
  POST_BOMB_INIT_LATE = 0,
@@ -7,17 +7,21 @@ import { JSONRoom } from "../types/JSONRoom";
7
7
  *
8
8
  * This function is meant to be used in the PostNewRoom callback.
9
9
  *
10
- * @param jsonRoom The JSON room to deploy. In practice, this will be something like:
10
+ * For example:
11
+ *
11
12
  * ```ts
13
+ *
12
14
  * import customRooms from "./customRooms";
13
15
  *
14
16
  * const firstJSONRoom = customRooms.rooms.room[0];
15
17
  * deployJSONRoom(firstJSONRoom);
16
18
  * ```
19
+ *
20
+ * @param jsonRoom The JSON room to deploy. *
17
21
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
18
- * `RNG.Next` method will be called. Default is `getRandomSeed()`.
22
+ * `RNG.Next` method will be called. Default is `getRandomSeed()`.
19
23
  * @param verbose Optional. If specified, will write entries to the "log.txt" file that describe
20
- * what the function is doing. Default is false.
24
+ * what the function is doing. Default is false.
21
25
  */
22
26
  export declare function deployJSONRoom(jsonRoom: JSONRoom, seedOrRNG?: Seed | RNG, verbose?: boolean): void;
23
27
  /**
@@ -31,18 +35,21 @@ export declare function deployJSONRoom(jsonRoom: JSONRoom, seedOrRNG?: Seed | RN
31
35
  * properly account for each room weight using the algorithm from:
32
36
  * https://stackoverflow.com/questions/1761626/weighted-random-numbers
33
37
  *
34
- * @param jsonRooms An array of JSON rooms to randomly select from. In practice, this will be
35
- * something like:
38
+ * For example:
39
+ *
36
40
  * ```ts
37
41
  * import customRooms from "./customRooms";
38
42
  *
39
43
  * const jsonRooms = customRooms.rooms.room;
40
44
  * deployRandomJSONRoom(jsonRooms);
41
45
  * ```
46
+ *
47
+ * @param jsonRooms An array of JSON rooms to randomly select from. In practice, this will be
48
+ * something like.
42
49
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
43
- * `RNG.Next` method will be called. Default is `getRandomSeed()`.
50
+ * `RNG.Next` method will be called. Default is `getRandomSeed()`.
44
51
  * @param verbose Optional. If specified, will write entries to the "log.txt" file that describe
45
- * what the function is doing. Default is false.
52
+ * what the function is doing. Default is false.
46
53
  */
47
54
  export declare function deployRandomJSONRoom(jsonRooms: JSONRoom[], seedOrRNG?: Seed | RNG, verbose?: boolean): void;
48
55
  /**
@@ -52,7 +59,7 @@ export declare function deployRandomJSONRoom(jsonRooms: JSONRoom[], seedOrRNG?:
52
59
  * effects (1000), doors, and walls.
53
60
  *
54
61
  * @param fillWithDecorations Optional. Set to true to fill every grid tile with an invisible
55
- * decoration, which prevents vanilla entities in the room from respawning the next time that the
56
- * player enters. Default is false.
62
+ * decoration, which prevents vanilla entities in the room from
63
+ * respawning the next time that the player enters. Default is false.
57
64
  */
58
65
  export declare function emptyRoom(fillWithDecorations: boolean): void;
@@ -4,7 +4,7 @@ import { ButtonAction } from "isaac-typescript-definitions";
4
4
  * used one of the other helper functions to disable inputs.
5
5
  *
6
6
  * @param key The name of the mod feature that is requesting the enable/disable. This is needed so
7
- * that multiple mod features can work in tandem.
7
+ * that multiple mod features can work in tandem.
8
8
  */
9
9
  export declare function enableAllInputs(key: string): void;
10
10
  /**
@@ -14,7 +14,7 @@ export declare function enableAllInputs(key: string): void;
14
14
  * Use the [[`enableAllInputs`]] helper function to set things back to normal.
15
15
  *
16
16
  * @param key The name of the mod feature that is requesting the enable/disable. This is needed so
17
- * that multiple mod features can work in tandem.
17
+ * that multiple mod features can work in tandem.
18
18
  */
19
19
  export declare function disableAllInputs(key: string): void;
20
20
  /**
@@ -24,7 +24,7 @@ export declare function disableAllInputs(key: string): void;
24
24
  * Use the [[`enableAllInputs`]] helper function to set things back to normal.
25
25
  *
26
26
  * @param key The name of the mod feature that is requesting the enable/disable. This is needed so
27
- * that multiple mod features can work in tandem.
27
+ * that multiple mod features can work in tandem.
28
28
  * @param blacklist A set of ButtonActions to disallow.
29
29
  */
30
30
  export declare function enableAllInputsExceptFor(key: string, blacklist: Set<ButtonAction> | ReadonlySet<ButtonAction>): void;
@@ -35,7 +35,7 @@ export declare function enableAllInputsExceptFor(key: string, blacklist: Set<But
35
35
  * Use the [[`enableAllInputs`]] helper function to set things back to normal.
36
36
  *
37
37
  * @param key The name of the mod feature that is requesting the enable/disable. This is needed so
38
- * that multiple mod features can work in tandem.
38
+ * that multiple mod features can work in tandem.
39
39
  * @param whitelist A set of ButtonActions to allow.
40
40
  */
41
41
  export declare function disableAllInputsExceptFor(key: string, whitelist: Set<ButtonAction>): void;
@@ -47,7 +47,7 @@ export declare function disableAllInputsExceptFor(key: string, whitelist: Set<Bu
47
47
  * Use the [[`enableAllInputs`]] helper function to set things back to normal.
48
48
  *
49
49
  * @param key The name of the mod feature that is requesting the enable/disable. This is needed so
50
- * that multiple mod features can work in tandem.
50
+ * that multiple mod features can work in tandem.
51
51
  */
52
52
  export declare function disableMovementInputs(key: string): void;
53
53
  /**
@@ -57,6 +57,6 @@ export declare function disableMovementInputs(key: string): void;
57
57
  * Use the [[`enableAllInputs`]] helper function to set things back to normal.
58
58
  *
59
59
  * @param key The name of the mod feature that is requesting the enable/disable. This is needed so
60
- * that multiple mod features can work in tandem.
60
+ * that multiple mod features can work in tandem.
61
61
  */
62
62
  export declare function disableShootingInputs(key: string): void;
@@ -4,7 +4,7 @@
4
4
  * Use this function to set things back to normal after having used [[`disableAllSounds`]].
5
5
  *
6
6
  * @param key The name of the mod feature that is requesting the enable/disable. This is needed so
7
- * that multiple mod features can work in tandem.
7
+ * that multiple mod features can work in tandem.
8
8
  */
9
9
  export declare function enableAllSound(key: string): void;
10
10
  /**
@@ -13,6 +13,6 @@ export declare function enableAllSound(key: string): void;
13
13
  * Use the [[`enableAllSounds`]] helper function to set things back to normal.
14
14
  *
15
15
  * @param key The name of the mod feature that is requesting the enable/disable. This is needed so
16
- * that multiple mod features can work in tandem.
16
+ * that multiple mod features can work in tandem.
17
17
  */
18
18
  export declare function disableAllSound(key: string): void;
@@ -56,7 +56,7 @@ export declare function brokenHearts(params: string): void;
56
56
  /**
57
57
  * Gives the specified card. Accepts either the card sub-type or the partial name of the card.
58
58
  *
59
- * Example:
59
+ * For example:
60
60
  * - card 5 - Gives The Emperor.
61
61
  * - card spa - Gives 2 of Spades.
62
62
  */
@@ -71,7 +71,7 @@ export declare function chaosCardTears(): void;
71
71
  * Restart as the specified character. Accepts either the character sub-type or the partial name of
72
72
  * the character.
73
73
  *
74
- * Example:
74
+ * For example:
75
75
  * - character 2 - Restarts as Cain.
76
76
  * - character ta - Restarts as Tainted Azazel.
77
77
  */
@@ -224,9 +224,10 @@ export declare function oneHP(): void;
224
224
  * Gives a pill with the specified pill effect. Accepts either the effect ID or the partial name of
225
225
  * the effect.
226
226
  *
227
- * Example:
228
- * - pill 5 - Gives a Full Health pill.
229
- * - pill suns - Gives a Feels like I'm walking on sunshine! pill.
227
+ * For example:
228
+ *
229
+ * - `pill 5` - Gives a "Full Health" pill.
230
+ * - `pill suns` - Gives a "Feels like I'm walking on sunshine" pill.
230
231
  */
231
232
  export declare function pill(params: string): void;
232
233
  /** Spawns every pill on the ground, starting at the top-left-most tile. */
@@ -260,7 +261,7 @@ export declare function rottenHearts(params: string): void;
260
261
  /**
261
262
  * Alias for the "stage" command.
262
263
  *
263
- * Example:
264
+ * For example:
264
265
  * - s 3 - Warps to Caves 1.
265
266
  * - s 1c - Warps to Downpour 1.
266
267
  */
@@ -281,7 +282,7 @@ export declare function setCharges(params: string): void;
281
282
  /**
282
283
  * Moves the first player to the specified position.
283
284
  *
284
- * Example:
285
+ * For example:
285
286
  * - setposition 100 50
286
287
  */
287
288
  export declare function setPosition(params: string): void;
@@ -304,7 +305,7 @@ export declare function soulHearts(params: string): void;
304
305
  /**
305
306
  * Play the supplied sound effect.
306
307
  *
307
- * Example:
308
+ * For example:
308
309
  * - sound 1 - Plays the 1-Up sound effect.
309
310
  */
310
311
  export declare function sound(params: string): void;
@@ -337,7 +338,7 @@ export declare function up(params: string): void;
337
338
  * Warps to the specified room type. Accepts either the room type number or the partial name of the
338
339
  * room type.
339
340
  *
340
- * Example:
341
+ * For example:
341
342
  * - warp 5 - Warps to the first Boss Room on the floor, if any.
342
343
  * - warp tr - Warps to the first Treasure Room on the floor, if any.
343
344
  */
@@ -24,7 +24,8 @@ export declare function runInNRenderFrames(func: () => void, renderFrames: int):
24
24
  /**
25
25
  * Supply a function to run on the next PostUpdate callback.
26
26
  *
27
- * Example:
27
+ * For example:
28
+ *
28
29
  * ```ts
29
30
  * const NUM_EXPLODER_EXPLOSIONS = 5;
30
31
  *
@@ -71,14 +71,16 @@ import { SaveData } from "../../types/private/SaveData";
71
71
  * data.) For these cases, set a special key of "dontSave" alongside "run", "level", and so forth.
72
72
  *
73
73
  * @param key The name of the file or feature that is submitting data to be managed by the save data
74
- * manager. The save data manager will throw an error if the key is already registered.
74
+ * manager. The save data manager will throw an error if the key is already registered.
75
75
  * @param v An object that corresponds to the `SaveData` interface. The object is conventionally
76
- * called "v" for brevity. ("v" is short for "local variables").
76
+ * called "v" for brevity. ("v" is short for "local variables").
77
77
  * @param conditionalFunc An optional function to run upon saving this key to disk. For example,
78
- * this allows features to only save data to disk if the feature is enabled. Specify a value of `()
79
- * => false` to completely disable saving this feature to disk. This is useful if you are using data
80
- * that is not serializable, or you want to use the save data manager to automatically reset
81
- * variables on run/level/room, but not clutter the the "save#.dat" file with unnecessary keys.
78
+ * this allows features to only save data to disk if the feature is enabled.
79
+ * Specify a value of `() => false` to completely disable saving this feature
80
+ * to disk. This is useful if you are using data that is not serializable, or
81
+ * you want to use the save data manager to automatically reset variables on
82
+ * run/level/room, but not clutter the the "save#.dat" file with unnecessary
83
+ * keys.
82
84
  */
83
85
  export declare function saveDataManager(key: string, v: SaveData, conditionalFunc?: () => boolean): void;
84
86
  /**
@@ -5,7 +5,7 @@ import { FamiliarVariant } from "isaac-typescript-definitions";
5
5
  *
6
6
  * @param familiarVariant The familiar variant to blacklist.
7
7
  * @param familiarSubType The sub-type to blacklist. Optional. The default is to blacklist all
8
- * sub-types of the given variant.
8
+ * sub-types of the given variant.
9
9
  */
10
10
  export declare function setFamiliarNoSirenSteal(familiarVariant: FamiliarVariant | int, familiarSubType?: int): void;
11
11
  /**
@@ -49,14 +49,14 @@ export declare function combineArrays<T>(...arrays: Array<T[] | readonly T[]>):
49
49
  *
50
50
  * @param oldArray The array to copy.
51
51
  * @param numElements Optional. If specified, will only copy the first N elements. By default, the
52
- * entire array will be copied.
52
+ * entire array will be copied.
53
53
  */
54
54
  export declare function copyArray<T>(oldArray: T[] | readonly T[], numElements?: int): T[];
55
55
  export declare function emptyArray<T>(array: T[]): void;
56
56
  /**
57
57
  * Helper function to get an array containing the indexes of an array.
58
58
  *
59
- * For example, an array of `["Apple", "Banana"]` would return an array of: `[0, 1]`
59
+ * For example, an array of `["Apple", "Banana"]` would return an array of `[0, 1]`.
60
60
  */
61
61
  export declare function getArrayIndexes<T>(array: T[] | readonly T[]): int[];
62
62
  /**
@@ -70,7 +70,7 @@ export declare function getLastElement<T>(array: T[]): T | undefined;
70
70
  *
71
71
  * @param array The array to get an element from.
72
72
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
73
- * `RNG.Next` method will be called. Default is `getRandomSeed()`.
73
+ * `RNG.Next` method will be called. Default is `getRandomSeed()`.
74
74
  * @param exceptions Optional. An array of elements to skip over if selected.
75
75
  */
76
76
  export declare function getRandomArrayElement<T>(array: T[] | readonly T[], seedOrRNG?: Seed | RNG, exceptions?: T[] | readonly T[]): T;
@@ -80,7 +80,7 @@ export declare function getRandomArrayElement<T>(array: T[] | readonly T[], seed
80
80
  *
81
81
  * @param array The array to get an element from.
82
82
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
83
- * `RNG.Next` method will be called. Default is `getRandomSeed()`.
83
+ * `RNG.Next` method will be called. Default is `getRandomSeed()`.
84
84
  * @param exceptions Optional. An array of elements to skip over if selected.
85
85
  */
86
86
  export declare function getRandomArrayElementAndRemove<T>(array: T[], seedOrRNG?: Seed | RNG, exceptions?: T[] | readonly T[]): T;
@@ -89,13 +89,14 @@ export declare function getRandomArrayElementAndRemove<T>(array: T[], seedOrRNG?
89
89
  *
90
90
  * @param array The array to get the index from.
91
91
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
92
- * `RNG.Next` method will be called. Default is `getRandomSeed()`.
92
+ * `RNG.Next` method will be called. Default is `getRandomSeed()`.
93
93
  */
94
94
  export declare function getRandomArrayIndex<T>(array: T[] | readonly T[], seedOrRNG?: Seed | RNG): int;
95
95
  /**
96
96
  * Initializes an array with all elements containing the specified default value.
97
97
  *
98
- * Example:
98
+ * For example:
99
+ *
99
100
  * ```ts
100
101
  * const playerTransformations = initArray(false, PlayerForm.NUM_PLAYER_FORMS - 1);
101
102
  * ```
@@ -103,7 +104,7 @@ export declare function getRandomArrayIndex<T>(array: T[] | readonly T[], seedOr
103
104
  export declare function initArray<T>(defaultValue: T, size: int): T[];
104
105
  /**
105
106
  * Since Lua uses tables for every non-primitive data structure, it is non-trivial to determine if a
106
- * particular table is being used as an array. isArray returns true if:
107
+ * particular table is being used as an array. `isArray` returns true if:
107
108
  *
108
109
  * - the table contains all numerical indexes that are contiguous, starting at 1
109
110
  * - the table has no keys (i.e. an "empty" table)
@@ -124,7 +125,7 @@ export declare function isArrayInArray<T>(arrayToMatch: T[] | readonly T[], pare
124
125
  *
125
126
  * @param originalArray The array to shuffle.
126
127
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
127
- * `RNG.Next` method will be called. Default is `getRandomSeed()`.
128
+ * `RNG.Next` method will be called. Default is `getRandomSeed()`.
128
129
  */
129
130
  export declare function shuffleArray<T>(originalArray: T[] | readonly T[], seedOrRNG?: Seed | RNG): T[];
130
131
  /**
@@ -134,7 +135,7 @@ export declare function shuffleArray<T>(originalArray: T[] | readonly T[], seedO
134
135
  *
135
136
  * @param array The array to shuffle.
136
137
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
137
- * `RNG.Next` method will be called. Default is `getRandomSeed()`.
138
+ * `RNG.Next` method will be called. Default is `getRandomSeed()`.
138
139
  */
139
140
  export declare function shuffleArrayInPlace<T>(array: T[], seedOrRNG?: Seed | RNG): void;
140
141
  export declare function sumArray(array: number[] | readonly number[]): number;
@@ -5,6 +5,6 @@
5
5
  * This function is variadic, which means that you can supply as many as you want to benchmark.
6
6
  *
7
7
  * @returns An array containing the average time in milliseconds for each function. (This will also
8
- * be printed to the log.)
8
+ * be printed to the log.)
9
9
  */
10
10
  export declare function benchmark(numTrials: int, ...functions: Array<() => void>): int[];
@@ -2,7 +2,8 @@ import { Card, ItemConfigCardType } from "isaac-typescript-definitions";
2
2
  /**
3
3
  * Helper function to get a card description from a Card enum value.
4
4
  *
5
- * Example:
5
+ * For example:
6
+ *
6
7
  * ```ts
7
8
  * const card = Card.FOOL;
8
9
  * const cardDescription = getCardDescription(card); // cardDescription is "Where journey begins"
@@ -12,7 +13,8 @@ export declare function getCardDescription(card: Card | int): string;
12
13
  /**
13
14
  * Helper function to get a card name from a Card.
14
15
  *
15
- * Example:
16
+ * For example:
17
+ *
16
18
  * ```ts
17
19
  * const card = Card.FOOL;
18
20
  * const cardName = getCardName(card); // cardName is "0 - The Fool"
@@ -37,14 +39,14 @@ export declare function getCardsOfType(...cardTypes: ItemConfigCardType[]): Set<
37
39
  * runes/objects)
38
40
  *
39
41
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
40
- * `RNG.Next` method will be called. Default is `getRandomSeed()`.
42
+ * `RNG.Next` method will be called. Default is `getRandomSeed()`.
41
43
  * @param exceptions Optional. An array of cards to not select.
42
44
  */
43
45
  export declare function getRandomCard(seedOrRNG?: Seed | RNG, exceptions?: Card[]): Card;
44
46
  /**
45
47
  * @param cardType The card type that represents the pool of cards to select from.
46
48
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
47
- * `RNG.Next` method will be called. Default is `getRandomSeed()`.
49
+ * `RNG.Next` method will be called. Default is `getRandomSeed()`.
48
50
  * @param exceptions Optional. An array of cards to not select.
49
51
  */
50
52
  export declare function getRandomCardOfType(cardType: ItemConfigCardType, seedOrRNG?: Seed | RNG, exceptions?: Card[]): Card;
@@ -53,7 +55,7 @@ export declare function getRandomCardOfType(cardType: ItemConfigCardType, seedOr
53
55
  * Isaac, etc.). This will never return a Rune Shard.
54
56
  *
55
57
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
56
- * `RNG.Next` method will be called. Default is `getRandomSeed()`.
58
+ * `RNG.Next` method will be called. Default is `getRandomSeed()`.
57
59
  * @param exceptions Optional. An array of runes to not select.
58
60
  */
59
61
  export declare function getRandomRune(seedOrRNG?: Seed | RNG, exceptions?: Card[]): Card;
@@ -10,7 +10,8 @@ import { ActiveSlot } from "isaac-typescript-definitions";
10
10
  *
11
11
  * @param player The player to grant the charges to.
12
12
  * @param ignoreBigRoomDoubleCharge Optional. If set to true, it will treat the current room as a
13
- * 1x1 room for the purposes of calculating how much charge to grant. Default is false.
13
+ * 1x1 room for the purposes of calculating how much charge to
14
+ * grant. Default is false.
14
15
  */
15
16
  export declare function addRoomClearCharge(player: EntityPlayer, ignoreBigRoomDoubleCharge?: boolean): void;
16
17
  /**
@@ -25,7 +26,8 @@ export declare function addRoomClearCharge(player: EntityPlayer, ignoreBigRoomDo
25
26
  * @param player The player to grant the charges to.
26
27
  * @param activeSlot The active item slot to grant the charges to.
27
28
  * @param ignoreBigRoomDoubleCharge Optional. If set to true, it will treat the current room as a
28
- * 1x1 room for the purposes of calculating how much charge to grant. Default is false.
29
+ * 1x1 room for the purposes of calculating how much charge to
30
+ * grant. Default is false.
29
31
  */
30
32
  export declare function addRoomClearChargeToSlot(player: EntityPlayer, activeSlot: ActiveSlot, ignoreBigRoomDoubleCharge?: boolean): void;
31
33
  /**
@@ -38,7 +40,8 @@ export declare function addRoomClearChargeToSlot(player: EntityPlayer, activeSlo
38
40
  * - AAA Battery
39
41
  *
40
42
  * @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. Default is false.
43
+ * 1x1 room for the purposes of calculating how much charge to
44
+ * grant. Default is false.
42
45
  */
43
46
  export declare function addRoomClearCharges(ignoreBigRoomDoubleCharge?: boolean): void;
44
47
  /**
@@ -76,7 +76,8 @@ export declare function getCollectibleMaxCharges(collectibleType: CollectibleTyp
76
76
  * Helper function to get the name of a collectible. Returns "Unknown" if the provided collectible
77
77
  * type is not valid.
78
78
  *
79
- * Example:
79
+ * For example:
80
+ *
80
81
  * ```ts
81
82
  * const collectibleType = CollectibleType.SAD_ONION;
82
83
  * const collectibleName = getCollectibleName(collectibleType); // collectibleName is "Sad Onion"
@@ -93,7 +94,8 @@ export declare function getCollectibleQuality(collectibleType: CollectibleType |
93
94
  * Helper function to get the tags of a collectible (which is the composition of zero or more
94
95
  * `ItemConfigTag`). Returns 0 if the provided collectible type is not valid.
95
96
  *
96
- * Example:
97
+ * For example:
98
+ *
97
99
  * ```ts
98
100
  * const collectibleType = CollectibleType.SAD_ONION;
99
101
  * const itemConfigTags = getCollectibleTags(collectibleType); // itemConfigTags is "18350080"
@@ -155,8 +157,9 @@ export declare function setCollectibleEmpty(collectible: EntityPickup): void;
155
157
  *
156
158
  * @param collectible The collectible whose sprite you want to modify.
157
159
  * @param pngPath Equal to either the spritesheet path to load (e.g.
158
- * "gfx/items/collectibles/collectibles_001_thesadonion.png") or undefined. If undefined, the sprite
159
- * will be removed, making it appear like the collectible has already been taken by the player.
160
+ * "gfx/items/collectibles/collectibles_001_thesadonion.png") or undefined. If
161
+ * undefined, the sprite will be removed, making it appear like the collectible has
162
+ * already been taken by the player.
160
163
  */
161
164
  export declare function setCollectibleSprite(collectible: EntityPickup, pngPath: string | undefined): void;
162
165
  /**
@@ -14,7 +14,7 @@ export declare function colorEquals(color1: Color, color2: Color): boolean;
14
14
  * Helper function to copy a `Color` object.
15
15
  *
16
16
  * @param color The Color object to copy. In the case of deserialization, this will actually be a
17
- * Lua table instead of an instantiated Color class.
17
+ * Lua table instead of an instantiated Color class.
18
18
  * @param serializationType Default is `SerializationType.NONE`.
19
19
  */
20
20
  export declare function copyColor<C extends Color | SerializedColor, S extends SerializationType>(color: C, serializationType: S): CopyColorReturn[S];
@@ -22,7 +22,8 @@ import { SerializationType } from "../enums/SerializationType";
22
22
  *
23
23
  * @param value The primitive or object to copy.
24
24
  * @param serializationType Has 3 possible values. Can leave objects as-is, or can serialize objects
25
- * to Lua tables, or can deserialize Lua tables to objects. Default is `SerializationType.NONE`.
25
+ * to Lua tables, or can deserialize Lua tables to objects. Default is
26
+ * `SerializationType.NONE`.
26
27
  * @param traversalDescription Used to track the current key that we are operating on.
27
28
  */
28
29
  export declare function deepCopy(value: unknown, serializationType?: SerializationType, traversalDescription?: string): unknown;
@@ -15,7 +15,8 @@ export declare function countEntities(entityType?: EntityType | int, variant?: n
15
15
  * Given an array of entities, this helper function returns the closest one to a provided reference
16
16
  * entity.
17
17
  *
18
- * Example:
18
+ * For example:
19
+ *
19
20
  * ```ts
20
21
  * const player = Isaac.GetPlayer();
21
22
  * const gapers = getEntities(EntityType.GAPER);
@@ -31,7 +32,8 @@ export declare function getClosestEntityTo<T extends AnyEntity>(referenceEntity:
31
32
  * expensive but also more robust. (If a matching entity type is provided, then `Isaac.FindByType`
32
33
  * will be used instead.)
33
34
  *
34
- * Example:
35
+ * For example:
36
+ *
35
37
  * ```ts
36
38
  * // Make all of the entities in the room invisible
37
39
  * for (const entity of getEntities()) {
@@ -41,11 +43,12 @@ export declare function getClosestEntityTo<T extends AnyEntity>(referenceEntity:
41
43
  *
42
44
  * @param entityType Optional. If specified, will only return NPCs that match this entity type.
43
45
  * @param variant Optional. If specified, will only return NPCs that match this variant. Default is
44
- * -1. -1 matches every variant.
46
+ * -1. -1 matches every variant.
45
47
  * @param subType Optional. If specified, will only return NPCs that match this sub-type. Default is
46
- * -1. -1 matches every sub-type.
48
+ * -1. -1 matches every sub-type.
47
49
  * @param ignoreFriendly Optional. If set to true, it will exclude friendly NPCs from being
48
- * returned. Default is false. Will only be taken into account if `matchingEntityType` is specified.
50
+ * returned. Default is false. Will only be taken into account if
51
+ * `matchingEntityType` is specified.
49
52
  */
50
53
  export declare function getEntities(entityType?: EntityType | int, variant?: number, subType?: number, ignoreFriendly?: boolean): Entity[];
51
54
  /** Helper function to return a string containing the entity's type, variant, and sub-type. */
@@ -110,7 +113,7 @@ export declare function removeEntities(entities: Entity[], cap?: int): boolean;
110
113
  *
111
114
  * @param entity The entity to reroll.
112
115
  * @returns If the game failed to reroll the enemy, returns undefined. Otherwise, returns the
113
- * rerolled entity.
116
+ * rerolled entity.
114
117
  */
115
118
  export declare function rerollEnemy(entity: Entity): Entity | undefined;
116
119
  export declare function setEntityRandomColor(entity: Entity): void;
@@ -164,7 +164,7 @@ function ____exports.rerollEnemy(self, entity)
164
164
  local newEntities = ____exports.getEntities(nil)
165
165
  local filteredNewEntities = ____exports.getFilteredNewEntities(nil, oldEntities, newEntities)
166
166
  if #filteredNewEntities == 0 then
167
- error("Failed to find the new entity generated by the \"RerollEnemy\" method.")
167
+ error("Failed to find the new entity generated by the \"Game.RerollEnemy\" method.")
168
168
  end
169
169
  return filteredNewEntities[1]
170
170
  end
@@ -3,7 +3,8 @@ import { EntityTypeNonNPC } from "../types/EntityTypeNonNPC";
3
3
  /**
4
4
  * Helper function to get all of the `EntityType.BOMB` in the room.
5
5
  *
6
- * Example:
6
+ * For example:
7
+ *
7
8
  * ```ts
8
9
  * // Make all of the bombs in the room invisible
9
10
  * for (const bomb of getBombs()) {
@@ -15,7 +16,8 @@ export declare function getBombs(bombVariant?: BombVariant | int, subType?: numb
15
16
  /**
16
17
  * Helper function to get all of the `EntityType.EFFECT` in the room.
17
18
  *
18
- * Example:
19
+ * For example:
20
+ *
19
21
  * ```ts
20
22
  * // Make all of the effects in the room invisible
21
23
  * for (const effect of getEffects()) {
@@ -27,7 +29,8 @@ export declare function getEffects(effectVariant?: EffectVariant | int, subType?
27
29
  /**
28
30
  * Helper function to get all of the familiars in the room.
29
31
  *
30
- * Example:
32
+ * For example:
33
+ *
31
34
  * ```ts
32
35
  * // Make all of the familiars in the room invisible
33
36
  * for (const familiar of getFamiliars()) {
@@ -39,7 +42,8 @@ export declare function getFamiliars(familiarVariant?: FamiliarVariant | int, su
39
42
  /**
40
43
  * Helper function to get all of the `EntityType.KNIFE` in the room.
41
44
  *
42
- * Example:
45
+ * For example:
46
+ *
43
47
  * ```ts
44
48
  * // Make all of the knives in the room invisible
45
49
  * for (const knife of getKnives()) {
@@ -51,7 +55,8 @@ export declare function getKnives(knifeVariant?: KnifeVariant | int, subType?: n
51
55
  /**
52
56
  * Helper function to get all of the `EntityType.LASER` in the room.
53
57
  *
54
- * Example:
58
+ * For example:
59
+ *
55
60
  * ```ts
56
61
  * // Make all of the lasers in the room invisible
57
62
  * for (const laser of getLasers()) {
@@ -65,7 +70,8 @@ export declare function getNPCs(entityType?: EntityType | int, variant?: int, su
65
70
  /**
66
71
  * Helper function to get all of the pickups in the room.
67
72
  *
68
- * Example:
73
+ * For example:
74
+ *
69
75
  * ```ts
70
76
  * // Make all of the pickups in the room invisible
71
77
  * for (const pickup of getPickups()) {
@@ -77,7 +83,8 @@ export declare function getPickups(pickupVariant?: PickupVariant | int, subType?
77
83
  /**
78
84
  * Helper function to get all of the `EntityType.PROJECTILE` in the room.
79
85
  *
80
- * Example:
86
+ * For example:
87
+ *
81
88
  * ```ts
82
89
  * // Make all of the projectiles in the room invisible
83
90
  * for (const projectile of getProjectiles()) {
@@ -89,7 +96,8 @@ export declare function getProjectiles(projectileVariant?: ProjectileVariant | i
89
96
  /**
90
97
  * Helper function to get all of the `EntityType.SLOT` in the room.
91
98
  *
92
- * Example:
99
+ * For example:
100
+ *
93
101
  * ```ts
94
102
  * // Make all of the slots in the room invisible
95
103
  * for (const slot of getSlots()) {
@@ -101,7 +109,8 @@ export declare function getSlots(slotVariant?: SlotVariant | int, subType?: numb
101
109
  /**
102
110
  * Helper function to get all of the `EntityType.TEAR` in the room.
103
111
  *
104
- * Example:
112
+ * For example:
113
+ *
105
114
  * ```ts
106
115
  * // Make all of the tears in the room invisible
107
116
  * for (const tear of getTears()) {
@@ -132,7 +141,7 @@ export declare function removeAllEffects(effectVariant?: EffectVariant | int, su
132
141
  * Helper function to remove all of the familiars in the room.
133
142
  *
134
143
  * @param familiarVariant Optional. If specified, will only remove familiars that match this
135
- * variant.
144
+ * variant.
136
145
  * @param subType Optional. If specified, will only remove familiars that match this sub-type.
137
146
  * @param cap Optional. If specified, will only remove the given amount of familiars.
138
147
  * @returns True if one or more familiars were removed, false otherwise.
@@ -176,7 +185,7 @@ export declare function removeAllPickups(pickupVariant?: PickupVariant | int, su
176
185
  * Helper function to remove all of the `EntityType.PROJECTILE` in the room.
177
186
  *
178
187
  * @param projectileVariant Optional. If specified, will only remove projectiles that match this
179
- * variant.
188
+ * variant.
180
189
  * @param subType Optional. If specified, will only remove projectiles that match this sub-type.
181
190
  * @param cap Optional. If specified, will only remove the given amount of projectiles.
182
191
  * @returns True if one or more projectiles were removed, false otherwise.