isaacscript-common 39.3.2 → 39.4.0

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.
@@ -5801,6 +5801,14 @@ export declare function getMapPartialMatch<T>(searchText: string, map: ReadonlyM
5801
5801
  */
5802
5802
  export declare function getMatchingGridEntities(gridEntityType: GridEntityType, variant: int): GridEntity[];
5803
5803
 
5804
+ /**
5805
+ * Helper function to get the door that leads to the Mega Satan Boss Room. (In vanilla, the door
5806
+ * will only appear in the starting room of The Chest / Dark Room.)
5807
+ *
5808
+ * Returns undefined if the room has no Mega Satan doors.
5809
+ */
5810
+ export declare function getMegaSatanDoor(): GridEntityDoor | undefined;
5811
+
5804
5812
  /**
5805
5813
  * Helper function to get the movement actions that the specified `ControllerIndex` is currently
5806
5814
  * pressing down. This returns an array because a player can be holding down more than one movement
@@ -8800,6 +8808,12 @@ export declare function isLRoomShape(roomShape: RoomShape): boolean;
8800
8808
  */
8801
8809
  export declare function isLuaDebugEnabled(): boolean;
8802
8810
 
8811
+ /**
8812
+ * Helper function to check if the provided door is the one that leads to the Mega Satan Boss Room.
8813
+ * (In vanilla, the door will only appear in the starting room of The Chest / Dark Room.)
8814
+ */
8815
+ export declare function isMegaSatanDoor(door: GridEntityDoor): boolean;
8816
+
8803
8817
  /**
8804
8818
  * Helper function to determine if the index of the provided room is equal to `GridRoom.MEGA_SATAN`.
8805
8819
  */
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 39.3.2
3
+ isaacscript-common 39.4.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -23069,6 +23069,9 @@ end
23069
23069
  function ____exports.isBlueWombDoor(self, door)
23070
23070
  return door.TargetRoomIndex == asNumber(nil, GridRoom.BLUE_WOMB)
23071
23071
  end
23072
+ function ____exports.isMegaSatanDoor(self, door)
23073
+ return door.TargetRoomIndex == asNumber(nil, GridRoom.MEGA_SATAN)
23074
+ end
23072
23075
  function ____exports.isRepentanceDoor(self, door)
23073
23076
  return door.TargetRoomIndex == asNumber(nil, GridRoom.SECRET_EXIT)
23074
23077
  end
@@ -23181,6 +23184,13 @@ function ____exports.getDoorsToRoomIndex(self, ...)
23181
23184
  function(____, door) return roomGridIndexesSet:has(door.TargetRoomIndex) end
23182
23185
  )
23183
23186
  end
23187
+ function ____exports.getMegaSatanDoor(self)
23188
+ local doors = ____exports.getDoors(nil)
23189
+ return __TS__ArrayFind(
23190
+ doors,
23191
+ function(____, door) return ____exports.isMegaSatanDoor(nil, door) end
23192
+ )
23193
+ end
23184
23194
  function ____exports.getOppositeDoorSlot(self, doorSlot)
23185
23195
  return OPPOSITE_DOOR_SLOTS[doorSlot]
23186
23196
  end
@@ -38702,6 +38712,9 @@ function ModdedElementSets.prototype.lazyInit(self)
38702
38712
  self:lazyInitCardTypes()
38703
38713
  end
38704
38714
  function ModdedElementSets.prototype.lazyInitVanillaCollectibleTypes(self)
38715
+ if #self.vanillaCollectibleTypesArray > 0 then
38716
+ return
38717
+ end
38705
38718
  local vanillaCollectibleTypeRange = getVanillaCollectibleTypeRange(nil)
38706
38719
  for ____, collectibleType in ipairs(vanillaCollectibleTypeRange) do
38707
38720
  local itemConfigItem = itemConfig:GetCollectible(collectibleType)
@@ -38732,6 +38745,9 @@ function ModdedElementSets.prototype.lazyInitModdedCollectibleTypes(self)
38732
38745
  end
38733
38746
  end
38734
38747
  function ModdedElementSets.prototype.lazyInitVanillaTrinketTypes(self)
38748
+ if #self.vanillaTrinketTypesArray > 0 then
38749
+ return
38750
+ end
38735
38751
  local vanillaTrinketTypeRange = getVanillaTrinketTypeRange(nil)
38736
38752
  for ____, trinketType in ipairs(vanillaTrinketTypeRange) do
38737
38753
  local itemConfigItem = itemConfig:GetTrinket(trinketType)
@@ -38762,6 +38778,9 @@ function ModdedElementSets.prototype.lazyInitModdedTrinketTypes(self)
38762
38778
  end
38763
38779
  end
38764
38780
  function ModdedElementSets.prototype.lazyInitVanillaCardTypes(self)
38781
+ if #self.vanillaCardTypesArray > 0 then
38782
+ return
38783
+ end
38765
38784
  local vanillaCardTypes = getVanillaCardTypes(nil)
38766
38785
  for ____, cardType in ipairs(vanillaCardTypes) do
38767
38786
  local itemConfigCard = itemConfig:GetCard(cardType)
@@ -38802,7 +38821,7 @@ function ModdedElementSets.prototype.lazyInitTagToCollectibleTypesMap(self)
38802
38821
  for ____, itemConfigTag in ipairs(ITEM_CONFIG_TAG_VALUES) do
38803
38822
  do
38804
38823
  if not collectibleHasTag(nil, collectibleType, itemConfigTag) then
38805
- goto __continue39
38824
+ goto __continue42
38806
38825
  end
38807
38826
  local collectibleTypesSet = self.tagToCollectibleTypesMap:get(itemConfigTag)
38808
38827
  if collectibleTypesSet == nil then
@@ -38811,7 +38830,7 @@ function ModdedElementSets.prototype.lazyInitTagToCollectibleTypesMap(self)
38811
38830
  end
38812
38831
  collectibleTypesSet:add(collectibleType)
38813
38832
  end
38814
- ::__continue39::
38833
+ ::__continue42::
38815
38834
  end
38816
38835
  end
38817
38836
  end
@@ -38868,7 +38887,7 @@ function ModdedElementSets.prototype.lazyInitEdenCollectibleTypesSet(self)
38868
38887
  for ____, collectibleType in ipairs(self:getCollectibleArray()) do
38869
38888
  do
38870
38889
  if isHiddenCollectible(nil, collectibleType) or collectibleHasTag(nil, collectibleType, ItemConfigTag.NO_EDEN) then
38871
- goto __continue63
38890
+ goto __continue66
38872
38891
  end
38873
38892
  if isActiveCollectible(nil, collectibleType) then
38874
38893
  self.edenActiveCollectibleTypesSet:add(collectibleType)
@@ -38877,7 +38896,7 @@ function ModdedElementSets.prototype.lazyInitEdenCollectibleTypesSet(self)
38877
38896
  self.edenPassiveCollectibleTypesSet:add(collectibleType)
38878
38897
  end
38879
38898
  end
38880
- ::__continue63::
38899
+ ::__continue66::
38881
38900
  end
38882
38901
  end
38883
38902
  function ModdedElementSets.prototype.lazyInitCardTypes(self)
@@ -39185,32 +39204,32 @@ function ModdedElementSets.prototype.getTrinketsWithCacheFlag(self, cacheFlag)
39185
39204
  end
39186
39205
  __TS__DecorateLegacy({Exported}, ModdedElementSets.prototype, "getTrinketsWithCacheFlag", true)
39187
39206
  function ModdedElementSets.prototype.getVanillaCardArray(self)
39188
- self:lazyInit()
39207
+ self:lazyInitVanillaCardTypes()
39189
39208
  return self.vanillaCardTypesArray
39190
39209
  end
39191
39210
  __TS__DecorateLegacy({Exported}, ModdedElementSets.prototype, "getVanillaCardArray", true)
39192
39211
  function ModdedElementSets.prototype.getVanillaCardSet(self)
39193
- self:lazyInit()
39212
+ self:lazyInitVanillaCardTypes()
39194
39213
  return self.vanillaCardTypesSet
39195
39214
  end
39196
39215
  __TS__DecorateLegacy({Exported}, ModdedElementSets.prototype, "getVanillaCardSet", true)
39197
39216
  function ModdedElementSets.prototype.getVanillaCollectibleArray(self)
39198
- self:lazyInit()
39217
+ self:lazyInitVanillaCollectibleTypes()
39199
39218
  return self.vanillaCollectibleTypesArray
39200
39219
  end
39201
39220
  __TS__DecorateLegacy({Exported}, ModdedElementSets.prototype, "getVanillaCollectibleArray", true)
39202
39221
  function ModdedElementSets.prototype.getVanillaCollectibleSet(self)
39203
- self:lazyInit()
39222
+ self:lazyInitVanillaCollectibleTypes()
39204
39223
  return self.vanillaCollectibleTypesSet
39205
39224
  end
39206
39225
  __TS__DecorateLegacy({Exported}, ModdedElementSets.prototype, "getVanillaCollectibleSet", true)
39207
39226
  function ModdedElementSets.prototype.getVanillaTrinketArray(self)
39208
- self:lazyInit()
39227
+ self:lazyInitVanillaTrinketTypes()
39209
39228
  return self.vanillaTrinketTypesArray
39210
39229
  end
39211
39230
  __TS__DecorateLegacy({Exported}, ModdedElementSets.prototype, "getVanillaTrinketArray", true)
39212
39231
  function ModdedElementSets.prototype.getVanillaTrinketSet(self)
39213
- self:lazyInit()
39232
+ self:lazyInitVanillaTrinketTypes()
39214
39233
  return self.vanillaTrinketTypesSet
39215
39234
  end
39216
39235
  __TS__DecorateLegacy({Exported}, ModdedElementSets.protot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AE,GAAG,SAAS,eAAe,EAAO,GAC9D,eAAe;IASlB;;;;;;;;;;;;OAYG;IAEI,+BAA+B,CACpC,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,UAAU,GAAE,eAAe,EAAE,GAAG,SAAS,eAAe,EAAO,GAC9D,eAAe;IASlB;;;;;;;;;;OAUG;IAEI,eAAe,IAAI,SAAS,WAAW,EAAE;IAKhD;;;;;;;;;;OAUG;IAEI,aAAa,IAAI,WAAW,CAAC,WAAW,CAAC;IAKhD;;;;;;;;OAQG;IAEI,wBAAwB,CAC7B,SAAS,EAAE,SAAS,GACnB,WAAW,CAAC,WAAW,CAAC;IAW3B;;;;;;;OAOG;IAEI,mBAAmB,IAAI,SAAS,QAAQ,EAAE;IAKjD;;;;;;;OAOG;IAEI,iBAAiB,IAAI,WAAW,CAAC,QAAQ,CAAC;IAKjD;;;;;;;OAOG;IAEI,0BAA0B,IAAI,SAAS,eAAe,EAAE;IAK/D;;;;;;;OAOG;IAEI,wBAAwB,IAAI,WAAW,CAAC,eAAe,CAAC;IAK/D;;;;;;;OAOG;IAEI,sBAAsB,IAAI,SAAS,WAAW,EAAE;IAKvD;;;;;;;OAOG;IAEI,oBAAoB,IAAI,WAAW,CAAC,WAAW,CAAC;CAIxD"}
@@ -134,6 +134,9 @@ function ModdedElementSets.prototype.lazyInit(self)
134
134
  self:lazyInitCardTypes()
135
135
  end
136
136
  function ModdedElementSets.prototype.lazyInitVanillaCollectibleTypes(self)
137
+ if #self.vanillaCollectibleTypesArray > 0 then
138
+ return
139
+ end
137
140
  local vanillaCollectibleTypeRange = getVanillaCollectibleTypeRange(nil)
138
141
  for ____, collectibleType in ipairs(vanillaCollectibleTypeRange) do
139
142
  local itemConfigItem = itemConfig:GetCollectible(collectibleType)
@@ -164,6 +167,9 @@ function ModdedElementSets.prototype.lazyInitModdedCollectibleTypes(self)
164
167
  end
165
168
  end
166
169
  function ModdedElementSets.prototype.lazyInitVanillaTrinketTypes(self)
170
+ if #self.vanillaTrinketTypesArray > 0 then
171
+ return
172
+ end
167
173
  local vanillaTrinketTypeRange = getVanillaTrinketTypeRange(nil)
168
174
  for ____, trinketType in ipairs(vanillaTrinketTypeRange) do
169
175
  local itemConfigItem = itemConfig:GetTrinket(trinketType)
@@ -194,6 +200,9 @@ function ModdedElementSets.prototype.lazyInitModdedTrinketTypes(self)
194
200
  end
195
201
  end
196
202
  function ModdedElementSets.prototype.lazyInitVanillaCardTypes(self)
203
+ if #self.vanillaCardTypesArray > 0 then
204
+ return
205
+ end
197
206
  local vanillaCardTypes = getVanillaCardTypes(nil)
198
207
  for ____, cardType in ipairs(vanillaCardTypes) do
199
208
  local itemConfigCard = itemConfig:GetCard(cardType)
@@ -234,7 +243,7 @@ function ModdedElementSets.prototype.lazyInitTagToCollectibleTypesMap(self)
234
243
  for ____, itemConfigTag in ipairs(ITEM_CONFIG_TAG_VALUES) do
235
244
  do
236
245
  if not collectibleHasTag(nil, collectibleType, itemConfigTag) then
237
- goto __continue39
246
+ goto __continue42
238
247
  end
239
248
  local collectibleTypesSet = self.tagToCollectibleTypesMap:get(itemConfigTag)
240
249
  if collectibleTypesSet == nil then
@@ -243,7 +252,7 @@ function ModdedElementSets.prototype.lazyInitTagToCollectibleTypesMap(self)
243
252
  end
244
253
  collectibleTypesSet:add(collectibleType)
245
254
  end
246
- ::__continue39::
255
+ ::__continue42::
247
256
  end
248
257
  end
249
258
  end
@@ -300,7 +309,7 @@ function ModdedElementSets.prototype.lazyInitEdenCollectibleTypesSet(self)
300
309
  for ____, collectibleType in ipairs(self:getCollectibleArray()) do
301
310
  do
302
311
  if isHiddenCollectible(nil, collectibleType) or collectibleHasTag(nil, collectibleType, ItemConfigTag.NO_EDEN) then
303
- goto __continue63
312
+ goto __continue66
304
313
  end
305
314
  if isActiveCollectible(nil, collectibleType) then
306
315
  self.edenActiveCollectibleTypesSet:add(collectibleType)
@@ -309,7 +318,7 @@ function ModdedElementSets.prototype.lazyInitEdenCollectibleTypesSet(self)
309
318
  self.edenPassiveCollectibleTypesSet:add(collectibleType)
310
319
  end
311
320
  end
312
- ::__continue63::
321
+ ::__continue66::
313
322
  end
314
323
  end
315
324
  function ModdedElementSets.prototype.lazyInitCardTypes(self)
@@ -617,32 +626,32 @@ function ModdedElementSets.prototype.getTrinketsWithCacheFlag(self, cacheFlag)
617
626
  end
618
627
  __TS__DecorateLegacy({Exported}, ModdedElementSets.prototype, "getTrinketsWithCacheFlag", true)
619
628
  function ModdedElementSets.prototype.getVanillaCardArray(self)
620
- self:lazyInit()
629
+ self:lazyInitVanillaCardTypes()
621
630
  return self.vanillaCardTypesArray
622
631
  end
623
632
  __TS__DecorateLegacy({Exported}, ModdedElementSets.prototype, "getVanillaCardArray", true)
624
633
  function ModdedElementSets.prototype.getVanillaCardSet(self)
625
- self:lazyInit()
634
+ self:lazyInitVanillaCardTypes()
626
635
  return self.vanillaCardTypesSet
627
636
  end
628
637
  __TS__DecorateLegacy({Exported}, ModdedElementSets.prototype, "getVanillaCardSet", true)
629
638
  function ModdedElementSets.prototype.getVanillaCollectibleArray(self)
630
- self:lazyInit()
639
+ self:lazyInitVanillaCollectibleTypes()
631
640
  return self.vanillaCollectibleTypesArray
632
641
  end
633
642
  __TS__DecorateLegacy({Exported}, ModdedElementSets.prototype, "getVanillaCollectibleArray", true)
634
643
  function ModdedElementSets.prototype.getVanillaCollectibleSet(self)
635
- self:lazyInit()
644
+ self:lazyInitVanillaCollectibleTypes()
636
645
  return self.vanillaCollectibleTypesSet
637
646
  end
638
647
  __TS__DecorateLegacy({Exported}, ModdedElementSets.prototype, "getVanillaCollectibleSet", true)
639
648
  function ModdedElementSets.prototype.getVanillaTrinketArray(self)
640
- self:lazyInit()
649
+ self:lazyInitVanillaTrinketTypes()
641
650
  return self.vanillaTrinketTypesArray
642
651
  end
643
652
  __TS__DecorateLegacy({Exported}, ModdedElementSets.prototype, "getVanillaTrinketArray", true)
644
653
  function ModdedElementSets.prototype.getVanillaTrinketSet(self)
645
- self:lazyInit()
654
+ self:lazyInitVanillaTrinketTypes()
646
655
  return self.vanillaTrinketTypesSet
647
656
  end
648
657
  __TS__DecorateLegacy({Exported}, ModdedElementSets.prototype, "getVanillaTrinketSet", true)
@@ -72,6 +72,13 @@ export declare function getDoors(...roomTypes: RoomType[]): GridEntityDoor[];
72
72
  * that match any of the N room grid indexes.
73
73
  */
74
74
  export declare function getDoorsToRoomIndex(...roomGridIndex: int[]): GridEntityDoor[];
75
+ /**
76
+ * Helper function to get the door that leads to the Mega Satan Boss Room. (In vanilla, the door
77
+ * will only appear in the starting room of The Chest / Dark Room.)
78
+ *
79
+ * Returns undefined if the room has no Mega Satan doors.
80
+ */
81
+ export declare function getMegaSatanDoor(): GridEntityDoor | undefined;
75
82
  export declare function getOppositeDoorSlot(doorSlot: DoorSlot): DoorSlot | undefined;
76
83
  /**
77
84
  * Helper function to get the door that leads to the "secret exit" off-grid room that takes you to
@@ -150,6 +157,11 @@ export declare function isDoorToMines(door: GridEntityDoor): boolean;
150
157
  */
151
158
  export declare function isDoorToMomsHeart(door: GridEntityDoor): boolean;
152
159
  export declare function isHiddenSecretRoomDoor(door: GridEntityDoor): boolean;
160
+ /**
161
+ * Helper function to check if the provided door is the one that leads to the Mega Satan Boss Room.
162
+ * (In vanilla, the door will only appear in the starting room of The Chest / Dark Room.)
163
+ */
164
+ export declare function isMegaSatanDoor(door: GridEntityDoor): boolean;
153
165
  /**
154
166
  * Helper function to check if the provided door leads to the "secret exit" off-grid room that takes
155
167
  * you to the Repentance floor.
@@ -1 +1 @@
1
- {"version":3,"file":"doors.d.ts","sourceRoot":"","sources":["../../../src/functions/doors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EACZ,SAAS,EACV,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,QAAQ,EAKR,QAAQ,EACT,MAAM,8BAA8B,CAAC;AAuBtC,wBAAgB,aAAa,IAAI,IAAI,CAIpC;AAED;;;GAGG;AACH,wBAAgB,aAAa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,GAAG,GAAG,CAK5D;AAED,+CAA+C;AAC/C,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAGrD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,KAAK,EAAE,cAAc,EAAE,GAAG,IAAI,CAI5D"}
@@ -103,6 +103,11 @@ end
103
103
  function ____exports.isBlueWombDoor(self, door)
104
104
  return door.TargetRoomIndex == asNumber(nil, GridRoom.BLUE_WOMB)
105
105
  end
106
+ --- Helper function to check if the provided door is the one that leads to the Mega Satan Boss Room.
107
+ -- (In vanilla, the door will only appear in the starting room of The Chest / Dark Room.)
108
+ function ____exports.isMegaSatanDoor(self, door)
109
+ return door.TargetRoomIndex == asNumber(nil, GridRoom.MEGA_SATAN)
110
+ end
106
111
  --- Helper function to check if the provided door leads to the "secret exit" off-grid room that takes
107
112
  -- you to the Repentance floor.
108
113
  function ____exports.isRepentanceDoor(self, door)
@@ -254,6 +259,17 @@ function ____exports.getDoorsToRoomIndex(self, ...)
254
259
  function(____, door) return roomGridIndexesSet:has(door.TargetRoomIndex) end
255
260
  )
256
261
  end
262
+ --- Helper function to get the door that leads to the Mega Satan Boss Room. (In vanilla, the door
263
+ -- will only appear in the starting room of The Chest / Dark Room.)
264
+ --
265
+ -- Returns undefined if the room has no Mega Satan doors.
266
+ function ____exports.getMegaSatanDoor(self)
267
+ local doors = ____exports.getDoors(nil)
268
+ return __TS__ArrayFind(
269
+ doors,
270
+ function(____, door) return ____exports.isMegaSatanDoor(nil, door) end
271
+ )
272
+ end
257
273
  function ____exports.getOppositeDoorSlot(self, doorSlot)
258
274
  return OPPOSITE_DOOR_SLOTS[doorSlot]
259
275
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "39.3.2",
3
+ "version": "39.4.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -170,6 +170,10 @@ export class ModdedElementSets extends Feature {
170
170
  }
171
171
 
172
172
  private lazyInitVanillaCollectibleTypes() {
173
+ if (this.vanillaCollectibleTypesArray.length > 0) {
174
+ return;
175
+ }
176
+
173
177
  const vanillaCollectibleTypeRange = getVanillaCollectibleTypeRange();
174
178
  for (const collectibleType of vanillaCollectibleTypeRange) {
175
179
  // Vanilla collectible types are not contiguous, so we must check every value. (There are
@@ -204,6 +208,10 @@ export class ModdedElementSets extends Feature {
204
208
  }
205
209
 
206
210
  private lazyInitVanillaTrinketTypes() {
211
+ if (this.vanillaTrinketTypesArray.length > 0) {
212
+ return;
213
+ }
214
+
207
215
  const vanillaTrinketTypeRange = getVanillaTrinketTypeRange();
208
216
  for (const trinketType of vanillaTrinketTypeRange) {
209
217
  // Vanilla trinket types are not contiguous, so we must check every value. (The only gap is 47
@@ -238,6 +246,10 @@ export class ModdedElementSets extends Feature {
238
246
  }
239
247
 
240
248
  private lazyInitVanillaCardTypes() {
249
+ if (this.vanillaCardTypesArray.length > 0) {
250
+ return;
251
+ }
252
+
241
253
  const vanillaCardTypes = getVanillaCardTypes();
242
254
  for (const cardType of vanillaCardTypes) {
243
255
  // Vanilla card types are contiguous, but we check every value just to be safe (and so that
@@ -1150,7 +1162,7 @@ export class ModdedElementSets extends Feature {
1150
1162
  */
1151
1163
  @Exported
1152
1164
  public getVanillaCardArray(): readonly CardType[] {
1153
- this.lazyInit();
1165
+ this.lazyInitVanillaCardTypes();
1154
1166
  return this.vanillaCardTypesArray;
1155
1167
  }
1156
1168
 
@@ -1164,7 +1176,7 @@ export class ModdedElementSets extends Feature {
1164
1176
  */
1165
1177
  @Exported
1166
1178
  public getVanillaCardSet(): ReadonlySet<CardType> {
1167
- this.lazyInit();
1179
+ this.lazyInitVanillaCardTypes();
1168
1180
  return this.vanillaCardTypesSet;
1169
1181
  }
1170
1182
 
@@ -1178,7 +1190,7 @@ export class ModdedElementSets extends Feature {
1178
1190
  */
1179
1191
  @Exported
1180
1192
  public getVanillaCollectibleArray(): readonly CollectibleType[] {
1181
- this.lazyInit();
1193
+ this.lazyInitVanillaCollectibleTypes();
1182
1194
  return this.vanillaCollectibleTypesArray;
1183
1195
  }
1184
1196
 
@@ -1192,7 +1204,7 @@ export class ModdedElementSets extends Feature {
1192
1204
  */
1193
1205
  @Exported
1194
1206
  public getVanillaCollectibleSet(): ReadonlySet<CollectibleType> {
1195
- this.lazyInit();
1207
+ this.lazyInitVanillaCollectibleTypes();
1196
1208
  return this.vanillaCollectibleTypesSet;
1197
1209
  }
1198
1210
 
@@ -1206,7 +1218,7 @@ export class ModdedElementSets extends Feature {
1206
1218
  */
1207
1219
  @Exported
1208
1220
  public getVanillaTrinketArray(): readonly TrinketType[] {
1209
- this.lazyInit();
1221
+ this.lazyInitVanillaTrinketTypes();
1210
1222
  return this.vanillaTrinketTypesArray;
1211
1223
  }
1212
1224
 
@@ -1220,7 +1232,7 @@ export class ModdedElementSets extends Feature {
1220
1232
  */
1221
1233
  @Exported
1222
1234
  public getVanillaTrinketSet(): ReadonlySet<TrinketType> {
1223
- this.lazyInit();
1235
+ this.lazyInitVanillaTrinketTypes();
1224
1236
  return this.vanillaTrinketTypesSet;
1225
1237
  }
1226
1238
  }
@@ -234,6 +234,17 @@ export function getDoorsToRoomIndex(...roomGridIndex: int[]): GridEntityDoor[] {
234
234
  return doors.filter((door) => roomGridIndexesSet.has(door.TargetRoomIndex));
235
235
  }
236
236
 
237
+ /**
238
+ * Helper function to get the door that leads to the Mega Satan Boss Room. (In vanilla, the door
239
+ * will only appear in the starting room of The Chest / Dark Room.)
240
+ *
241
+ * Returns undefined if the room has no Mega Satan doors.
242
+ */
243
+ export function getMegaSatanDoor(): GridEntityDoor | undefined {
244
+ const doors = getDoors();
245
+ return doors.find((door) => isMegaSatanDoor(door));
246
+ }
247
+
237
248
  export function getOppositeDoorSlot(doorSlot: DoorSlot): DoorSlot | undefined {
238
249
  return OPPOSITE_DOOR_SLOTS[doorSlot];
239
250
  }
@@ -454,6 +465,14 @@ export function isHiddenSecretRoomDoor(door: GridEntityDoor): boolean {
454
465
  return isSecretRoomDoor(door) && animation === "Hidden";
455
466
  }
456
467
 
468
+ /**
469
+ * Helper function to check if the provided door is the one that leads to the Mega Satan Boss Room.
470
+ * (In vanilla, the door will only appear in the starting room of The Chest / Dark Room.)
471
+ */
472
+ export function isMegaSatanDoor(door: GridEntityDoor): boolean {
473
+ return door.TargetRoomIndex === asNumber(GridRoom.MEGA_SATAN);
474
+ }
475
+
457
476
  /**
458
477
  * Helper function to check if the provided door leads to the "secret exit" off-grid room that takes
459
478
  * you to the Repentance floor.