isaacscript-common 9.6.0 → 9.8.1

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.
@@ -61,11 +61,11 @@ export declare function addRoomClearChargeToSlot(player: EntityPlayer, activeSlo
61
61
  * - The Battery
62
62
  * - AAA Battery
63
63
  *
64
- * @param ignoreBigRoomDoubleCharge Optional. If set to true, it will treat the current room as a
65
- * 1x1 room for the purposes of calculating how much charge to
66
- * grant. Default is false.
64
+ * @param bigRoomDoubleCharge Optional. If set to false, it will treat the current room as a 1x1
65
+ * room for the purposes of calculating how much charge to grant. Default
66
+ * is true.
67
67
  */
68
- export declare function addRoomClearCharges(ignoreBigRoomDoubleCharge?: boolean): void;
68
+ export declare function addRoomClearCharges(bigRoomDoubleCharge?: boolean): void;
69
69
  /**
70
70
  * Helper function to get the combined normal charge and the battery charge for the player's active
71
71
  * item. This is useful because you have to add these two values together when setting the active
@@ -1 +1 @@
1
- {"version":3,"file":"charge.d.ts","sourceRoot":"","sources":["../../src/functions/charge.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAIX,MAAM,8BAA8B,CAAC;AAMtC;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,UAAU,EACtB,UAAU,SAAI,EACd,eAAe,UAAO,GACrB,GAAG,CA2BL;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,EACpB,mBAAmB,UAAO,EAC1B,eAAe,UAAO,GACrB,IAAI,CAaN;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,UAAU,EACtB,mBAAmB,UAAO,EAC1B,eAAe,UAAO,GACrB,IAAI,CAMN;AAuED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,yBAAyB,UAAQ,GAAG,IAAI,CAI3E;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,UAAU,GACrB,GAAG,CAKL;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,UAAU,GACrB,OAAO,CAMT;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,UAAU,GACrB,IAAI,CAYN"}
1
+ {"version":3,"file":"charge.d.ts","sourceRoot":"","sources":["../../src/functions/charge.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAIX,MAAM,8BAA8B,CAAC;AAMtC;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,UAAU,EACtB,UAAU,SAAI,EACd,eAAe,UAAO,GACrB,GAAG,CA2BL;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,EACpB,mBAAmB,UAAO,EAC1B,eAAe,UAAO,GACrB,IAAI,CAaN;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,UAAU,EACtB,mBAAmB,UAAO,EAC1B,eAAe,UAAO,GACrB,IAAI,CAMN;AAuED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,mBAAmB,UAAO,GAAG,IAAI,CAIpE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,UAAU,GACrB,GAAG,CAKL;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,UAAU,GACrB,OAAO,CAMT;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,UAAU,GACrB,IAAI,CAYN"}
@@ -11,7 +11,7 @@ local sfxManager = ____cachedClasses.sfxManager
11
11
  local ____collectibles = require("functions.collectibles")
12
12
  local getCollectibleMaxCharges = ____collectibles.getCollectibleMaxCharges
13
13
  local ____playerIndex = require("functions.playerIndex")
14
- local getPlayers = ____playerIndex.getPlayers
14
+ local getAllPlayers = ____playerIndex.getAllPlayers
15
15
  local ____roomShape = require("functions.roomShape")
16
16
  local getRoomShapeCharges = ____roomShape.getRoomShapeCharges
17
17
  --- Helper function to add a charge to the player's active item. Will flash the HUD and play the
@@ -187,15 +187,15 @@ end
187
187
  -- - The Battery
188
188
  -- - AAA Battery
189
189
  --
190
- -- @param ignoreBigRoomDoubleCharge Optional. If set to true, it will treat the current room as a
191
- -- 1x1 room for the purposes of calculating how much charge to
192
- -- grant. Default is false.
193
- function ____exports.addRoomClearCharges(self, ignoreBigRoomDoubleCharge)
194
- if ignoreBigRoomDoubleCharge == nil then
195
- ignoreBigRoomDoubleCharge = false
196
- end
197
- for ____, player in ipairs(getPlayers(nil)) do
198
- ____exports.addRoomClearCharge(nil, player, ignoreBigRoomDoubleCharge)
190
+ -- @param bigRoomDoubleCharge Optional. If set to false, it will treat the current room as a 1x1
191
+ -- room for the purposes of calculating how much charge to grant. Default
192
+ -- is true.
193
+ function ____exports.addRoomClearCharges(self, bigRoomDoubleCharge)
194
+ if bigRoomDoubleCharge == nil then
195
+ bigRoomDoubleCharge = true
196
+ end
197
+ for ____, player in ipairs(getAllPlayers(nil)) do
198
+ ____exports.addRoomClearCharge(nil, player, bigRoomDoubleCharge)
199
199
  end
200
200
  end
201
201
  function ____exports.isActiveSlotDoubleCharged(self, player, activeSlot)
@@ -15,6 +15,13 @@ export declare function doorSlotToDoorSlotFlag(doorSlot: DoorSlot): DoorSlotFlag
15
15
  */
16
16
  export declare function doorSlotsToDoorSlotFlags(doorSlots: DoorSlot[] | readonly DoorSlot[] | Set<DoorSlot> | ReadonlySet<DoorSlot>): BitFlags<DoorSlotFlag>;
17
17
  export declare function getAngelRoomDoor(): GridEntityDoor | undefined;
18
+ /**
19
+ * Helper function to get the door that leads to the off-grid room that contains the hole to the
20
+ * Blue Womb.
21
+ *
22
+ * Returns undefined if the room has no Blue Womb doors.
23
+ */
24
+ export declare function getBlueWombDoor(): GridEntityDoor | undefined;
18
25
  export declare function getDevilRoomDoor(): GridEntityDoor | undefined;
19
26
  /**
20
27
  * If there is both a Devil Room and an Angel Room door, this function will return door with the
@@ -81,6 +88,7 @@ export declare function getRoomShapeDoorSlotCoordinates(roomShape: RoomShape, do
81
88
  /** Helper function to find unused door slots in the room that can be used to make custom doors. */
82
89
  export declare function getUnusedDoorSlots(): DoorSlot[];
83
90
  export declare function isAngelRoomDoor(door: GridEntityDoor): boolean;
91
+ export declare function isBlueWombDoor(door: GridEntityDoor): boolean;
84
92
  export declare function isDevilRoomDoor(door: GridEntityDoor): boolean;
85
93
  /** Helper function to see if a door slot could exist for a given room shape. */
86
94
  export declare function isDoorSlotInRoomShape(doorSlot: DoorSlot, roomShape: RoomShape): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"doors.d.ts","sourceRoot":"","sources":["../../src/functions/doors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,YAAY,EAIZ,SAAS,EACT,QAAQ,EACT,MAAM,8BAA8B,CAAC;AAmBtC,wBAAgB,aAAa,IAAI,IAAI,CAIpC;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAKxD;AAED,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,YAAY,GAAG,QAAQ,CAG3E;AAED,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,QAAQ,CAAC,YAAY,CAAC,GACpC,QAAQ,EAAE,CAWZ;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAEjE;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,GAAG,YAAY,CAEvE;AAED;;;GAGG;AAC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IAAI,EAAE,cAAc,GAAG,IAAI,CAGrD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,KAAK,EAAE,cAAc,EAAE,GAAG,IAAI,CAI5D"}
@@ -2,9 +2,9 @@ local ____lualib = require("lualib_bundle")
2
2
  local Set = ____lualib.Set
3
3
  local __TS__Spread = ____lualib.__TS__Spread
4
4
  local __TS__ArrayMap = ____lualib.__TS__ArrayMap
5
+ local __TS__ArrayFind = ____lualib.__TS__ArrayFind
5
6
  local __TS__New = ____lualib.__TS__New
6
7
  local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
7
- local __TS__ArrayFind = ____lualib.__TS__ArrayFind
8
8
  local __TS__Iterator = ____lualib.__TS__Iterator
9
9
  local ____exports = {}
10
10
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
@@ -70,16 +70,19 @@ function ____exports.getDoors(self, ...)
70
70
  do
71
71
  local door = room:GetDoor(doorSlot)
72
72
  if door == nil then
73
- goto __continue23
73
+ goto __continue25
74
74
  end
75
75
  if roomTypesSet.size == 0 or roomTypesSet:has(door.TargetRoomType) then
76
76
  doors[#doors + 1] = door
77
77
  end
78
78
  end
79
- ::__continue23::
79
+ ::__continue25::
80
80
  end
81
81
  return doors
82
82
  end
83
+ function ____exports.isBlueWombDoor(self, door)
84
+ return door.TargetRoomIndex == asNumber(nil, GridRoom.BLUE_WOMB)
85
+ end
83
86
  --- Helper function to check if the provided door leads to the "secret exit" off-grid room that takes
84
87
  -- you to the Repentance floor.
85
88
  function ____exports.isRepentanceDoor(self, door)
@@ -156,6 +159,17 @@ function ____exports.getAngelRoomDoor(self)
156
159
  end
157
160
  return ____temp_0
158
161
  end
162
+ --- Helper function to get the door that leads to the off-grid room that contains the hole to the
163
+ -- Blue Womb.
164
+ --
165
+ -- Returns undefined if the room has no Blue Womb doors.
166
+ function ____exports.getBlueWombDoor(self)
167
+ local doors = ____exports.getDoors(nil)
168
+ return __TS__ArrayFind(
169
+ doors,
170
+ function(____, door) return ____exports.isBlueWombDoor(nil, door) end
171
+ )
172
+ end
159
173
  function ____exports.getDevilRoomDoor(self)
160
174
  local devilRoomDoors = ____exports.getDoors(nil, RoomType.DEVIL)
161
175
  local ____temp_1
@@ -145,7 +145,13 @@ export declare function inMinibossRoomOf(minibossID: MinibossID): boolean;
145
145
  */
146
146
  export declare function inMirrorRoom(): boolean;
147
147
  /**
148
- * Helper function for checking if the room is a secret shop (from the Member Card collectible).
148
+ * Helper function for checking if the current room is a secret exit that leads to a Repentance
149
+ * floor.
150
+ */
151
+ export declare function inSecretExit(): boolean;
152
+ /**
153
+ * Helper function for checking if the current room is a secret shop (from the Member Card
154
+ * collectible).
149
155
  *
150
156
  * Secret shops are simply copies of normal shops, but with the backdrop of a secret room. In other
151
157
  * words, they will have the same room type, room variant, and room sub-type of a normal shop. Thus,
@@ -1 +1 @@
1
- {"version":3,"file":"rooms.d.ts","sourceRoot":"","sources":["../../src/functions/rooms.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EACZ,MAAM,EACN,SAAS,EAMT,YAAY,EACZ,UAAU,EAGV,QAAQ,EAGT,MAAM,8BAA8B,CAAC;AAkCtC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,aAAa,EAAE,GAAG,GAAG,IAAI,CAenD;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,GAAG,CAGjC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,IAAI,KAAK,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAiBlE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,GAAG,EAChB,oBAAoB,UAAO,GAC1B,QAAQ,CAAC,UAAU,CAAC,GAAG,SAAS,CAUlC;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,YAAY,CAOlD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,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AY,GAAG,IAAI,CAG5D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,IAAI,CA8BrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAKvC"}
@@ -335,7 +335,14 @@ function ____exports.inMirrorRoom(self)
335
335
  local roomSubType = getRoomSubType(nil)
336
336
  return roomType == RoomType.DEFAULT and (roomStageID == StageID.DOWNPOUR or roomStageID == StageID.DROSS) and roomSubType == asNumber(nil, DownpourRoomSubType.MIRROR)
337
337
  end
338
- --- Helper function for checking if the room is a secret shop (from the Member Card collectible).
338
+ --- Helper function for checking if the current room is a secret exit that leads to a Repentance
339
+ -- floor.
340
+ function ____exports.inSecretExit(self)
341
+ local roomGridIndex = getRoomGridIndex(nil)
342
+ return roomGridIndex == asNumber(nil, GridRoom.SECRET_EXIT)
343
+ end
344
+ --- Helper function for checking if the current room is a secret shop (from the Member Card
345
+ -- collectible).
339
346
  --
340
347
  -- Secret shops are simply copies of normal shops, but with the backdrop of a secret room. In other
341
348
  -- words, they will have the same room type, room variant, and room sub-type of a normal shop. Thus,
@@ -409,12 +416,12 @@ function ____exports.setRoomCleared(self)
409
416
  for ____, door in ipairs(getDoors(nil)) do
410
417
  do
411
418
  if isHiddenSecretRoomDoor(nil, door) then
412
- goto __continue49
419
+ goto __continue50
413
420
  end
414
421
  openDoorFast(nil, door)
415
422
  door.ExtraVisible = false
416
423
  end
417
- ::__continue49::
424
+ ::__continue50::
418
425
  end
419
426
  sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
420
427
  game:ShakeScreen(0)
package/dist/index.d.ts CHANGED
@@ -262,11 +262,11 @@ export declare function addRoomClearCharge(player: EntityPlayer, bigRoomDoubleCh
262
262
  * - The Battery
263
263
  * - AAA Battery
264
264
  *
265
- * @param ignoreBigRoomDoubleCharge Optional. If set to true, it will treat the current room as a
266
- * 1x1 room for the purposes of calculating how much charge to
267
- * grant. Default is false.
265
+ * @param bigRoomDoubleCharge Optional. If set to false, it will treat the current room as a 1x1
266
+ * room for the purposes of calculating how much charge to grant. Default
267
+ * is true.
268
268
  */
269
- export declare function addRoomClearCharges(ignoreBigRoomDoubleCharge?: boolean): void;
269
+ export declare function addRoomClearCharges(bigRoomDoubleCharge?: boolean): void;
270
270
 
271
271
  /**
272
272
  * Helper function to add a charge to one of a player's active items, emulating what happens when a
@@ -2402,6 +2402,14 @@ export declare function getAzazelBrimstoneDistance(playerOrTearHeight: EntityPla
2402
2402
  */
2403
2403
  export declare function getBatteries(batterySubType?: BatterySubType): EntityPickupBattery[];
2404
2404
 
2405
+ /**
2406
+ * Helper function to get the door that leads to the off-grid room that contains the hole to the
2407
+ * Blue Womb.
2408
+ *
2409
+ * Returns undefined if the room has no Blue Womb doors.
2410
+ */
2411
+ export declare function getBlueWombDoor(): GridEntityDoor | undefined;
2412
+
2405
2413
  /**
2406
2414
  * Helper function to get all of the bomb entities in the room. (Specifically, this refers to bomb
2407
2415
  * pickups, not the `EntityBomb` class.)
@@ -5472,7 +5480,14 @@ export declare function inMirrorRoom(): boolean;
5472
5480
  export declare function inRectangle(position: Vector, topLeft: Vector, bottomRight: Vector): boolean;
5473
5481
 
5474
5482
  /**
5475
- * Helper function for checking if the room is a secret shop (from the Member Card collectible).
5483
+ * Helper function for checking if the current room is a secret exit that leads to a Repentance
5484
+ * floor.
5485
+ */
5486
+ export declare function inSecretExit(): boolean;
5487
+
5488
+ /**
5489
+ * Helper function for checking if the current room is a secret shop (from the Member Card
5490
+ * collectible).
5476
5491
  *
5477
5492
  * Secret shops are simply copies of normal shops, but with the backdrop of a secret room. In other
5478
5493
  * words, they will have the same room type, room variant, and room sub-type of a normal shop. Thus,
@@ -5584,6 +5599,8 @@ export declare function isBitSet128(object: unknown): object is BitSet128;
5584
5599
  /** Returns true if the collectible has a red question mark sprite. */
5585
5600
  export declare function isBlindCollectible(collectible: EntityPickup): boolean;
5586
5601
 
5602
+ export declare function isBlueWombDoor(door: GridEntityDoor): boolean;
5603
+
5587
5604
  /** Helper function to detect if a variable is of type `EntityBomb`. */
5588
5605
  export declare function isBomb(variable: unknown): variable is EntityBomb;
5589
5606
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "9.6.0",
3
+ "version": "9.8.1",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -6,7 +6,7 @@ import {
6
6
  } from "isaac-typescript-definitions";
7
7
  import { game, sfxManager } from "../core/cachedClasses";
8
8
  import { getCollectibleMaxCharges } from "./collectibles";
9
- import { getPlayers } from "./playerIndex";
9
+ import { getAllPlayers } from "./playerIndex";
10
10
  import { getRoomShapeCharges } from "./roomShape";
11
11
 
12
12
  /**
@@ -203,13 +203,13 @@ function getChargesToAddWithAAAModifier(
203
203
  * - The Battery
204
204
  * - AAA Battery
205
205
  *
206
- * @param ignoreBigRoomDoubleCharge Optional. If set to true, it will treat the current room as a
207
- * 1x1 room for the purposes of calculating how much charge to
208
- * grant. Default is false.
206
+ * @param bigRoomDoubleCharge Optional. If set to false, it will treat the current room as a 1x1
207
+ * room for the purposes of calculating how much charge to grant. Default
208
+ * is true.
209
209
  */
210
- export function addRoomClearCharges(ignoreBigRoomDoubleCharge = false): void {
211
- for (const player of getPlayers()) {
212
- addRoomClearCharge(player, ignoreBigRoomDoubleCharge);
210
+ export function addRoomClearCharges(bigRoomDoubleCharge = true): void {
211
+ for (const player of getAllPlayers()) {
212
+ addRoomClearCharge(player, bigRoomDoubleCharge);
213
213
  }
214
214
  }
215
215
 
@@ -97,6 +97,17 @@ export function getAngelRoomDoor(): GridEntityDoor | undefined {
97
97
  return angelRoomDoors.length === 0 ? undefined : angelRoomDoors[0];
98
98
  }
99
99
 
100
+ /**
101
+ * Helper function to get the door that leads to the off-grid room that contains the hole to the
102
+ * Blue Womb.
103
+ *
104
+ * Returns undefined if the room has no Blue Womb doors.
105
+ */
106
+ export function getBlueWombDoor(): GridEntityDoor | undefined {
107
+ const doors = getDoors();
108
+ return doors.find((door) => isBlueWombDoor(door));
109
+ }
110
+
100
111
  export function getDevilRoomDoor(): GridEntityDoor | undefined {
101
112
  const devilRoomDoors = getDoors(RoomType.DEVIL);
102
113
  return devilRoomDoors.length === 0 ? undefined : devilRoomDoors[0];
@@ -262,6 +273,10 @@ export function isAngelRoomDoor(door: GridEntityDoor): boolean {
262
273
  return door.TargetRoomType === RoomType.ANGEL;
263
274
  }
264
275
 
276
+ export function isBlueWombDoor(door: GridEntityDoor): boolean {
277
+ return door.TargetRoomIndex === asNumber(GridRoom.BLUE_WOMB);
278
+ }
279
+
265
280
  export function isDevilRoomDoor(door: GridEntityDoor): boolean {
266
281
  return door.TargetRoomType === RoomType.DEVIL;
267
282
  }
@@ -445,7 +445,18 @@ export function inMirrorRoom(): boolean {
445
445
  }
446
446
 
447
447
  /**
448
- * Helper function for checking if the room is a secret shop (from the Member Card collectible).
448
+ * Helper function for checking if the current room is a secret exit that leads to a Repentance
449
+ * floor.
450
+ */
451
+ export function inSecretExit(): boolean {
452
+ const roomGridIndex = getRoomGridIndex();
453
+
454
+ return roomGridIndex === asNumber(GridRoom.SECRET_EXIT);
455
+ }
456
+
457
+ /**
458
+ * Helper function for checking if the current room is a secret shop (from the Member Card
459
+ * collectible).
449
460
  *
450
461
  * Secret shops are simply copies of normal shops, but with the backdrop of a secret room. In other
451
462
  * words, they will have the same room type, room variant, and room sub-type of a normal shop. Thus,