isaacscript-common 2.0.11 → 2.0.14

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 (103) hide show
  1. package/dist/callbacks/subscriptions/postBombInitLate.d.ts +1 -1
  2. package/dist/callbacks/subscriptions/postCollectibleInitFirst.d.ts +1 -1
  3. package/dist/callbacks/subscriptions/postEffectInitLate.d.ts +1 -1
  4. package/dist/callbacks/subscriptions/postFamiliarInitLate.d.ts +1 -1
  5. package/dist/callbacks/subscriptions/postHolyMantleRemoved.d.ts +2 -2
  6. package/dist/callbacks/subscriptions/postItemDischarged.d.ts +2 -2
  7. package/dist/callbacks/subscriptions/postItemPickup.d.ts +1 -1
  8. package/dist/callbacks/subscriptions/postKnifeInitLate.d.ts +1 -1
  9. package/dist/callbacks/subscriptions/postLaserInitLate.d.ts +1 -1
  10. package/dist/callbacks/subscriptions/postNPCInitLate.d.ts +1 -1
  11. package/dist/callbacks/subscriptions/postNPCStateChanged.d.ts +1 -1
  12. package/dist/callbacks/subscriptions/postPEffectUpdateReordered.d.ts +2 -2
  13. package/dist/callbacks/subscriptions/postPickupCollect.d.ts +1 -1
  14. package/dist/callbacks/subscriptions/postPickupInitLate.d.ts +1 -1
  15. package/dist/callbacks/subscriptions/postPlayerChangeType.d.ts +1 -1
  16. package/dist/callbacks/subscriptions/postProjectileInitLate.d.ts +1 -1
  17. package/dist/callbacks/subscriptions/postPurchase.d.ts +1 -1
  18. package/dist/callbacks/subscriptions/postTearInitLate.d.ts +1 -1
  19. package/dist/callbacks/subscriptions/postTearInitVeryLate.d.ts +1 -1
  20. package/dist/callbacks/subscriptions/postTrinketBreak.d.ts +2 -2
  21. package/dist/callbacks/subscriptions/preItemPickup.d.ts +1 -1
  22. package/dist/classes/DefaultMap.d.ts +2 -1
  23. package/dist/constants.d.ts +16 -7
  24. package/dist/constants.lua +2 -2
  25. package/dist/enums/ModCallbackCustom.d.ts +0 -3
  26. package/dist/features/characterHealthConversion.d.ts +1 -1
  27. package/dist/features/characterStats.d.ts +1 -1
  28. package/dist/features/deployJSONRoom.d.ts +16 -9
  29. package/dist/features/deployJSONRoom.lua +2 -2
  30. package/dist/features/disableInputs.d.ts +6 -6
  31. package/dist/features/disableSound.d.ts +2 -2
  32. package/dist/features/extraConsoleCommands/commands.d.ts +12 -9
  33. package/dist/features/extraConsoleCommands/commands.lua +14 -0
  34. package/dist/features/extraConsoleCommands/init.lua +1 -0
  35. package/dist/features/preventCollectibleRotate.d.ts +1 -1
  36. package/dist/features/runInNFrames.d.ts +2 -1
  37. package/dist/features/saveDataManager/exports.d.ts +8 -6
  38. package/dist/features/sirenHelpers.d.ts +2 -2
  39. package/dist/functions/array.d.ts +10 -9
  40. package/dist/functions/benchmark.d.ts +1 -1
  41. package/dist/functions/boss.d.ts +3 -3
  42. package/dist/functions/cards.d.ts +10 -8
  43. package/dist/functions/character.d.ts +10 -10
  44. package/dist/functions/charge.d.ts +6 -3
  45. package/dist/functions/collectibleCacheFlag.d.ts +2 -2
  46. package/dist/functions/collectibleSet.d.ts +1 -1
  47. package/dist/functions/collectibleTag.d.ts +3 -3
  48. package/dist/functions/collectibles.d.ts +22 -19
  49. package/dist/functions/collectibles.lua +2 -1
  50. package/dist/functions/color.d.ts +1 -1
  51. package/dist/functions/deepCopy.d.ts +2 -1
  52. package/dist/functions/entity.d.ts +16 -13
  53. package/dist/functions/entity.lua +1 -1
  54. package/dist/functions/entitySpecific.d.ts +58 -49
  55. package/dist/functions/enums.d.ts +6 -5
  56. package/dist/functions/enums.lua +1 -1
  57. package/dist/functions/familiars.d.ts +5 -5
  58. package/dist/functions/familiars.lua +1 -1
  59. package/dist/functions/flag.d.ts +6 -2
  60. package/dist/functions/flying.d.ts +4 -4
  61. package/dist/functions/gridEntity.d.ts +15 -10
  62. package/dist/functions/gridEntity.lua +0 -4
  63. package/dist/functions/kColor.d.ts +1 -1
  64. package/dist/functions/level.d.ts +1 -0
  65. package/dist/functions/level.lua +29 -0
  66. package/dist/functions/log.d.ts +2 -2
  67. package/dist/functions/map.d.ts +2 -1
  68. package/dist/functions/math.d.ts +8 -1
  69. package/dist/functions/math.lua +6 -0
  70. package/dist/functions/npc.d.ts +3 -3
  71. package/dist/functions/pickups.d.ts +26 -26
  72. package/dist/functions/pills.d.ts +5 -4
  73. package/dist/functions/player.d.ts +19 -19
  74. package/dist/functions/playerIndex.d.ts +2 -1
  75. package/dist/functions/positionVelocity.d.ts +9 -5
  76. package/dist/functions/random.d.ts +7 -5
  77. package/dist/functions/rng.d.ts +1 -1
  78. package/dist/functions/rooms.d.ts +29 -5
  79. package/dist/functions/rooms.lua +56 -21
  80. package/dist/functions/run.d.ts +1 -1
  81. package/dist/functions/set.d.ts +1 -1
  82. package/dist/functions/spawnCollectible.d.ts +5 -5
  83. package/dist/functions/transformations.d.ts +4 -3
  84. package/dist/functions/trinketCacheFlag.d.ts +2 -2
  85. package/dist/functions/trinketGive.d.ts +3 -3
  86. package/dist/functions/trinketSet.d.ts +1 -1
  87. package/dist/functions/trinkets.d.ts +12 -9
  88. package/dist/functions/trinkets.lua +2 -2
  89. package/dist/functions/ui.d.ts +2 -2
  90. package/dist/functions/utils.d.ts +4 -2
  91. package/dist/functions/vector.d.ts +1 -1
  92. package/dist/index.d.ts +1 -0
  93. package/dist/index.lua +8 -0
  94. package/dist/objects/roomShapeToDoorSlots.d.ts +1 -1
  95. package/dist/objects/roomShapeToDoorSlotsToGridIndexDelta.lua +3 -3
  96. package/dist/sets/mineShaftRoomSubTypesSet.d.ts +2 -0
  97. package/dist/sets/mineShaftRoomSubTypesSet.lua +14 -0
  98. package/dist/types/CollectibleIndex.d.ts +2 -1
  99. package/dist/types/PickingUpItem.d.ts +1 -1
  100. package/dist/types/PlayerIndex.d.ts +2 -1
  101. package/dist/types/TrinketSituation.d.ts +3 -3
  102. package/dist/upgradeMod.d.ts +2 -4
  103. package/package.json +4 -3
@@ -1,5 +1,5 @@
1
1
  import { BombVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostBombInitRegisterParameters = [
3
3
  callback: (bomb: EntityBomb) => void,
4
- bombVariant?: BombVariant | int
4
+ bombVariant?: BombVariant
5
5
  ];
@@ -1,5 +1,5 @@
1
1
  import { CollectibleType } from "isaac-typescript-definitions";
2
2
  export declare type PostCollectibleInitFirstRegisterParameters = [
3
3
  callback: (collectible: EntityPickup) => void,
4
- collectibleType?: CollectibleType | int
4
+ collectibleType?: CollectibleType
5
5
  ];
@@ -1,5 +1,5 @@
1
1
  import { EffectVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostEffectInitLateRegisterParameters = [
3
3
  callback: (effect: EntityEffect) => void,
4
- effectVariant?: EffectVariant | int
4
+ effectVariant?: EffectVariant
5
5
  ];
@@ -1,5 +1,5 @@
1
1
  import { FamiliarVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostFamiliarInitLateRegisterParameters = [
3
3
  callback: (familiar: EntityFamiliar) => void,
4
- familiarVariant?: FamiliarVariant | int
4
+ familiarVariant?: FamiliarVariant
5
5
  ];
@@ -1,6 +1,6 @@
1
1
  import { PlayerType, PlayerVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostHolyMantleRemovedRegisterParameters = [
3
3
  callback: (player: EntityPlayer, oldNumHolyMantles: int, newNumHolyMantles: int) => void,
4
- playerVariant?: PlayerVariant | int,
5
- character?: PlayerType | int
4
+ playerVariant?: PlayerVariant,
5
+ character?: PlayerType
6
6
  ];
@@ -1,5 +1,5 @@
1
1
  import { ActiveSlot, CollectibleType } from "isaac-typescript-definitions";
2
2
  export declare type PostItemDischargedRegisterParameters = [
3
- callback: (player: EntityPlayer, collectibleType: CollectibleType | int, activeSlot: ActiveSlot) => void,
4
- collectibleType?: CollectibleType | int
3
+ callback: (player: EntityPlayer, collectibleType: CollectibleType, activeSlot: ActiveSlot) => void,
4
+ collectibleType?: CollectibleType
5
5
  ];
@@ -3,5 +3,5 @@ import { PickingUpItem } from "../../types/PickingUpItem";
3
3
  export declare type PostItemPickupRegisterParameters = [
4
4
  callback: (player: EntityPlayer, pickingUpItem: PickingUpItem) => void,
5
5
  itemType?: ItemType,
6
- itemID?: CollectibleType | TrinketType | int
6
+ itemID?: CollectibleType | TrinketType
7
7
  ];
@@ -1,5 +1,5 @@
1
1
  import { KnifeVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostKnifeInitLateRegisterParameters = [
3
3
  callback: (knife: EntityKnife) => void,
4
- knifeVariant?: KnifeVariant | int
4
+ knifeVariant?: KnifeVariant
5
5
  ];
@@ -1,5 +1,5 @@
1
1
  import { LaserVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostLaserInitLateRegisterParameters = [
3
3
  callback: (laser: EntityLaser) => void,
4
- laserVariant?: LaserVariant | int
4
+ laserVariant?: LaserVariant
5
5
  ];
@@ -1,5 +1,5 @@
1
1
  import { EntityType } from "isaac-typescript-definitions";
2
2
  export declare type PostNPCInitLateRegisterParameters = [
3
3
  callback: (npc: EntityNPC) => void,
4
- entityType?: EntityType | int
4
+ entityType?: EntityType
5
5
  ];
@@ -1,6 +1,6 @@
1
1
  import { EntityType } from "isaac-typescript-definitions";
2
2
  export declare type PostNPCStateChangedRegisterParameters = [
3
3
  callback: (npc: EntityNPC, previousState: int, currentState: int) => void,
4
- entityType?: EntityType | int,
4
+ entityType?: EntityType,
5
5
  variant?: int
6
6
  ];
@@ -1,6 +1,6 @@
1
1
  import { PlayerType, PlayerVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostPEffectUpdateReorderedRegisterParameters = [
3
3
  callback: (player: EntityPlayer) => void,
4
- playerVariant?: PlayerVariant | int,
5
- character?: PlayerType | int
4
+ playerVariant?: PlayerVariant,
5
+ character?: PlayerType
6
6
  ];
@@ -1,5 +1,5 @@
1
1
  import { PickupVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostPickupCollectRegisterParameters = [
3
3
  callback: (pickup: EntityPickup, player: EntityPlayer) => void,
4
- pickupVariant?: PickupVariant | int
4
+ pickupVariant?: PickupVariant
5
5
  ];
@@ -1,5 +1,5 @@
1
1
  import { PickupVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostPickupInitLateRegisterParameters = [
3
3
  callback: (pickup: EntityPickup) => void,
4
- pickupVariant?: PickupVariant | int
4
+ pickupVariant?: PickupVariant
5
5
  ];
@@ -1,4 +1,4 @@
1
1
  import { PlayerType } from "isaac-typescript-definitions";
2
2
  export declare type PostPlayerChangeTypeRegisterParameters = [
3
- callback: (player: EntityPlayer, oldCharacter: PlayerType | int, newCharacter: PlayerType | int) => void
3
+ callback: (player: EntityPlayer, oldCharacter: PlayerType, newCharacter: PlayerType) => void
4
4
  ];
@@ -1,5 +1,5 @@
1
1
  import { ProjectileVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostProjectileInitLateRegisterParameters = [
3
3
  callback: (projectile: EntityProjectile) => void,
4
- projectileVariant?: ProjectileVariant | int
4
+ projectileVariant?: ProjectileVariant
5
5
  ];
@@ -1,6 +1,6 @@
1
1
  import { PickupVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostPurchaseRegisterParameters = [
3
3
  callback: (player: EntityPlayer, pickup: EntityPickup) => void,
4
- pickupVariant?: PickupVariant | int,
4
+ pickupVariant?: PickupVariant,
5
5
  pickupSubType?: int
6
6
  ];
@@ -1,5 +1,5 @@
1
1
  import { TearVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostTearInitLateRegisterParameters = [
3
3
  callback: (tear: EntityTear) => void,
4
- tearVariant?: TearVariant | int
4
+ tearVariant?: TearVariant
5
5
  ];
@@ -1,5 +1,5 @@
1
1
  import { TearVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostTearInitVeryLateRegisterParameters = [
3
3
  callback: (tear: EntityTear) => void,
4
- tearVariant?: TearVariant | int
4
+ tearVariant?: TearVariant
5
5
  ];
@@ -1,5 +1,5 @@
1
1
  import { TrinketType } from "isaac-typescript-definitions";
2
2
  export declare type PostTrinketBreakRegisterParameters = [
3
- callback: (player: EntityPlayer, trinketType: TrinketType | int) => void,
4
- trinketType?: TrinketType | int
3
+ callback: (player: EntityPlayer, trinketType: TrinketType) => void,
4
+ trinketType?: TrinketType
5
5
  ];
@@ -3,5 +3,5 @@ import { PickingUpItem } from "../../types/PickingUpItem";
3
3
  export declare type PreItemPickupRegisterParameters = [
4
4
  callback: (player: EntityPlayer, pickingUpItem: PickingUpItem) => void,
5
5
  itemType?: ItemType,
6
- itemID?: CollectibleType | TrinketType | int
6
+ itemID?: CollectibleType | TrinketType
7
7
  ];
@@ -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");
@@ -35,8 +35,23 @@ export declare const FIRST_GLITCHED_COLLECTIBLE_TYPE: number;
35
35
  export declare const GAME_FRAMES_PER_SECOND = 30;
36
36
  export declare const GRID_INDEX_CENTER_OF_1X1_ROOM = 67;
37
37
  export declare const ISAAC_FRAMES_PER_SECOND = 60;
38
+ /**
39
+ * The floor is represented by a 13x13 grid. Room indexes start at 0. The first column is
40
+ * represented by grid indexes 0, 13, 26, and so on.
41
+ */
38
42
  export declare const LEVEL_GRID_COLUMN_HEIGHT = 13;
39
- export declare const LEVEL_GRID_ROW_LENGTH = 13;
43
+ /**
44
+ * The floor is represented by a 13x13 grid. Room indexes start at 0. The first row is represented
45
+ * by grid indexes from 0 to 12. The second row is represented by grid indexes from 13 to 25, and so
46
+ * on.
47
+ */
48
+ export declare const LEVEL_GRID_ROW_WIDTH = 13;
49
+ /**
50
+ * The floor is represented by a 13x13 grid. Room indexes start at 0. The first row is represented
51
+ * by grid indexes from 0 to 12. The second row is represented by grid indexes from 13 to 25, and so
52
+ * on. The maximum room index possible is 168. (It is not 169 because we start at 0 instead of 1.)
53
+ */
54
+ export declare const MAX_LEVEL_GRID_INDEX = 168;
40
55
  /**
41
56
  * The game has a limit on the number of currently spawned familiars and will refuse to spawn any
42
57
  * more if it reaches the limit. Blue flies and blue spiders have a lower priority and will be
@@ -55,12 +70,6 @@ export declare const MAX_PLAYER_HEART_CONTAINERS = 18;
55
70
  */
56
71
  export declare const MAX_PLAYER_SPEED_IN_UNITS = 9.8;
57
72
  export declare const MAX_PLAYER_TRINKET_SLOTS: number;
58
- /**
59
- * The floor is represented by a 13x13 grid. Room indexes start at 0. The first row is represented
60
- * by grid indexes from 0 to 12. The second row is represented by grid indexes from 13 to 25, and so
61
- * on. The maximum room index possible is 168. (It is not 169 because we start at 0 instead of 1.)
62
- */
63
- export declare const MAX_ROOM_INDEX = 168;
64
73
  export declare const MAX_ROOM_TYPE: RoomType;
65
74
  /**
66
75
  * The maximum speed stat that a player can have. Any additional speed beyond this will not take
@@ -22,13 +22,13 @@ ____exports.GAME_FRAMES_PER_SECOND = 30
22
22
  ____exports.GRID_INDEX_CENTER_OF_1X1_ROOM = 67
23
23
  ____exports.ISAAC_FRAMES_PER_SECOND = 60
24
24
  ____exports.LEVEL_GRID_COLUMN_HEIGHT = 13
25
- ____exports.LEVEL_GRID_ROW_LENGTH = 13
25
+ ____exports.LEVEL_GRID_ROW_WIDTH = 13
26
+ ____exports.MAX_LEVEL_GRID_INDEX = 168
26
27
  ____exports.MAX_NUM_FAMILIARS = 64
27
28
  ____exports.MAX_NUM_INPUTS = 4
28
29
  ____exports.MAX_PLAYER_HEART_CONTAINERS = 18
29
30
  ____exports.MAX_PLAYER_SPEED_IN_UNITS = 9.8
30
31
  ____exports.MAX_PLAYER_TRINKET_SLOTS = getEnumLength(nil, TrinketSlot)
31
- ____exports.MAX_ROOM_INDEX = 168
32
32
  ____exports.MAX_ROOM_TYPE = getLastEnumValue(nil, RoomType)
33
33
  ____exports.MAX_SPEED_STAT = 2
34
34
  ____exports.MAX_STAGE = getLastEnumValue(nil, LevelStage)
@@ -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,
@@ -6,5 +6,5 @@ declare type ConversionHeartSubType = HeartSubType.SOUL | HeartSubType.BLACK;
6
6
  *
7
7
  * Call this function once at the beginning of your mod to declare the health conversion type.
8
8
  */
9
- export declare function registerCharacterHealthConversion(playerType: PlayerType | int, conversionHeartSubType: ConversionHeartSubType): void;
9
+ export declare function registerCharacterHealthConversion(playerType: PlayerType, conversionHeartSubType: ConversionHeartSubType): void;
10
10
  export {};
@@ -16,4 +16,4 @@ import { CacheFlag, PlayerType } from "isaac-typescript-definitions";
16
16
  * Note that the format for the `CacheFlag.FIRE_DELAY` value should be in the tears stat format, not
17
17
  * the `MaxFireDelay` format.
18
18
  */
19
- export declare function registerCharacterStats(playerType: PlayerType | int, statMap: Map<CacheFlag, number> | ReadonlyMap<CacheFlag, number>): void;
19
+ export declare function registerCharacterStats(playerType: PlayerType, statMap: Map<CacheFlag, number> | ReadonlyMap<CacheFlag, number>): void;
@@ -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;
@@ -228,9 +228,9 @@ function spawnAllEntities(self, jsonRoom, rng, verbose)
228
228
  log("Leaving the room cleared since there were no battle NPCs spawned.")
229
229
  end
230
230
  end
231
- function spawnGridEntityForJSONRoom(self, xmlEntityType, xmlEntityVariant, x, y)
231
+ function spawnGridEntityForJSONRoom(self, gridEntityXMLType, gridEntityXMLVariant, x, y)
232
232
  local room = game:GetRoom()
233
- local gridEntityTuple = convertXMLGridEntityType(nil, xmlEntityType, xmlEntityVariant)
233
+ local gridEntityTuple = convertXMLGridEntityType(nil, gridEntityXMLType, gridEntityXMLVariant)
234
234
  if gridEntityTuple == nil then
235
235
  return nil
236
236
  end
@@ -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
  */
@@ -207,6 +207,8 @@ export declare function listGridAll(params: string): void;
207
207
  export declare function lowHP(): void;
208
208
  /** Alias for "debug 9". */
209
209
  export declare function luck(): void;
210
+ /** Completely reveals the entire map, including the Ultra Secret Room. */
211
+ export declare function map(): void;
210
212
  /**
211
213
  * Gives a heart container. Provide a number to give a custom amount of heart containers. (You can
212
214
  * use negative numbers to remove heart containers.)
@@ -224,9 +226,10 @@ export declare function oneHP(): void;
224
226
  * Gives a pill with the specified pill effect. Accepts either the effect ID or the partial name of
225
227
  * the effect.
226
228
  *
227
- * Example:
228
- * - pill 5 - Gives a Full Health pill.
229
- * - pill suns - Gives a Feels like I'm walking on sunshine! pill.
229
+ * For example:
230
+ *
231
+ * - `pill 5` - Gives a "Full Health" pill.
232
+ * - `pill suns` - Gives a "Feels like I'm walking on sunshine" pill.
230
233
  */
231
234
  export declare function pill(params: string): void;
232
235
  /** Spawns every pill on the ground, starting at the top-left-most tile. */
@@ -260,7 +263,7 @@ export declare function rottenHearts(params: string): void;
260
263
  /**
261
264
  * Alias for the "stage" command.
262
265
  *
263
- * Example:
266
+ * For example:
264
267
  * - s 3 - Warps to Caves 1.
265
268
  * - s 1c - Warps to Downpour 1.
266
269
  */
@@ -281,7 +284,7 @@ export declare function setCharges(params: string): void;
281
284
  /**
282
285
  * Moves the first player to the specified position.
283
286
  *
284
- * Example:
287
+ * For example:
285
288
  * - setposition 100 50
286
289
  */
287
290
  export declare function setPosition(params: string): void;
@@ -304,7 +307,7 @@ export declare function soulHearts(params: string): void;
304
307
  /**
305
308
  * Play the supplied sound effect.
306
309
  *
307
- * Example:
310
+ * For example:
308
311
  * - sound 1 - Plays the 1-Up sound effect.
309
312
  */
310
313
  export declare function sound(params: string): void;
@@ -337,7 +340,7 @@ export declare function up(params: string): void;
337
340
  * Warps to the specified room type. Accepts either the room type number or the partial name of the
338
341
  * room type.
339
342
  *
340
- * Example:
343
+ * For example:
341
344
  * - warp 5 - Warps to the first Boss Room on the floor, if any.
342
345
  * - warp tr - Warps to the first Treasure Room on the floor, if any.
343
346
  */
@@ -10,6 +10,7 @@ local CacheFlag = ____isaac_2Dtypescript_2Ddefinitions.CacheFlag
10
10
  local Card = ____isaac_2Dtypescript_2Ddefinitions.Card
11
11
  local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
12
12
  local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
13
+ local DisplayFlag = ____isaac_2Dtypescript_2Ddefinitions.DisplayFlag
13
14
  local GameStateFlag = ____isaac_2Dtypescript_2Ddefinitions.GameStateFlag
14
15
  local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
15
16
  local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
@@ -18,6 +19,7 @@ local ____cachedClasses = require("cachedClasses")
18
19
  local game = ____cachedClasses.game
19
20
  local sfxManager = ____cachedClasses.sfxManager
20
21
  local ____constants = require("constants")
22
+ local MAX_LEVEL_GRID_INDEX = ____constants.MAX_LEVEL_GRID_INDEX
21
23
  local MAX_ROOM_TYPE = ____constants.MAX_ROOM_TYPE
22
24
  local MAX_STAGE = ____constants.MAX_STAGE
23
25
  local MAX_VANILLA_CHARACTER = ____constants.MAX_VANILLA_CHARACTER
@@ -35,6 +37,8 @@ local getNPCs = ____entitySpecific.getNPCs
35
37
  local ____enums = require("functions.enums")
36
38
  local getEnumValues = ____enums.getEnumValues
37
39
  local getLastEnumValue = ____enums.getLastEnumValue
40
+ local ____flag = require("functions.flag")
41
+ local addFlag = ____flag.addFlag
38
42
  local ____log = require("functions.log")
39
43
  local logEffects = ____log.logEffects
40
44
  local logRoom = ____log.logRoom
@@ -64,6 +68,7 @@ local restart = ____run.restart
64
68
  local ____trinkets = require("functions.trinkets")
65
69
  local getGoldenTrinketType = ____trinkets.getGoldenTrinketType
66
70
  local ____utils = require("functions.utils")
71
+ local irange = ____utils.irange
67
72
  local printConsole = ____utils.printConsole
68
73
  local printEnabled = ____utils.printEnabled
69
74
  local ____cardMap = require("maps.cardMap")
@@ -513,6 +518,15 @@ end
513
518
  function ____exports.luck(self)
514
519
  Isaac.ExecuteCommand("debug 9")
515
520
  end
521
+ function ____exports.map(self)
522
+ local level = game:GetLevel()
523
+ local displayFlags = addFlag(nil, DisplayFlag.VISIBLE, DisplayFlag.SHADOW, DisplayFlag.SHOW_ICON)
524
+ for ____, roomGridIndex in ipairs(irange(nil, MAX_LEVEL_GRID_INDEX)) do
525
+ local roomDesc = level:GetRoomByIdx(roomGridIndex)
526
+ roomDesc.DisplayFlags = displayFlags
527
+ end
528
+ level:UpdateVisibility()
529
+ end
516
530
  function ____exports.maxHearts(self, params)
517
531
  addHeart(nil, params, HealthType.MAX_HEARTS)
518
532
  end
@@ -174,6 +174,7 @@ commandFunctionsMap:set("listgrid", commands.listGrid)
174
174
  commandFunctionsMap:set("listgridall", commands.listGridAll)
175
175
  commandFunctionsMap:set("lowhp", commands.lowHP)
176
176
  commandFunctionsMap:set("luck", commands.luck)
177
+ commandFunctionsMap:set("map", commands.map)
177
178
  commandFunctionsMap:set("maxhearts", commands.maxHearts)
178
179
  commandFunctionsMap:set("mh", commands.mh)
179
180
  commandFunctionsMap:set("miniboss", commands.miniboss)
@@ -8,4 +8,4 @@ import { CollectibleType } from "isaac-typescript-definitions";
8
8
  * It is required to pass the intended collectible type to this function since it is possible for
9
9
  * collectibles to rotate on the first frame that they are spawned.
10
10
  */
11
- export declare function preventCollectibleRotate(collectible: EntityPickup, collectibleType: CollectibleType | int): void;
11
+ export declare function preventCollectibleRotate(collectible: EntityPickup, collectibleType: CollectibleType): void;
@@ -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,9 +5,9 @@ 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
- export declare function setFamiliarNoSirenSteal(familiarVariant: FamiliarVariant | int, familiarSubType?: int): void;
10
+ export declare function setFamiliarNoSirenSteal(familiarVariant: FamiliarVariant, familiarSubType?: int): void;
11
11
  /**
12
12
  * Helper function to check if the Siren boss has stolen a familiar. Some familiars may need to
13
13
  * behave differently when under The Siren's control (e.g. if they auto-target enemies).