isaacscript-common 29.0.0 → 29.1.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.
@@ -4870,9 +4870,12 @@ export declare function getDirectionName(direction: Direction): string | undefin
4870
4870
  export declare function getDoorEnterPosition(door: GridEntityDoor): Readonly<Vector>;
4871
4871
 
4872
4872
  /**
4873
- * Helper function to get all of the doors in the room. By default, it will return every door. You
4874
- * can optionally specify one or more room types to return only the doors that match the specified
4875
- * room types.
4873
+ * Helper function to get all of the doors in the room. By default, it will return every door.
4874
+ *
4875
+ * You can optionally specify one or more room types to return only the doors that match the
4876
+ * specified room types.
4877
+ *
4878
+ * @allowEmptyVariadic
4876
4879
  */
4877
4880
  export declare function getDoors(...roomTypes: RoomType[]): GridEntityDoor[];
4878
4881
 
@@ -5192,6 +5195,8 @@ export declare function getGotoCommand(roomType: RoomType, roomVariant: int, use
5192
5195
  * GridEntityType.ROCK_TINTED,
5193
5196
  * );
5194
5197
  * ```
5198
+ *
5199
+ * @allowEmptyVariadic
5195
5200
  */
5196
5201
  export declare function getGridEntities(...gridEntityTypes: GridEntityType[]): GridEntity[];
5197
5202
 
@@ -5212,6 +5217,8 @@ export declare function getGridEntitiesInRadius(targetPosition: Vector, radius:
5212
5217
  *
5213
5218
  * Use this function with no arguments to get every grid entity, or specify a variadic amount of
5214
5219
  * arguments to match specific grid entity types.
5220
+ *
5221
+ * @allowEmptyVariadic
5215
5222
  */
5216
5223
  export declare function getGridEntitiesMap(...gridEntityTypes: GridEntityType[]): Map<int, GridEntity>;
5217
5224
 
@@ -12840,7 +12847,7 @@ export declare function onDarkRoom(): boolean;
12840
12847
  export declare const ONE_BY_ONE_ROOM_GRID_SIZE = 135;
12841
12848
 
12842
12849
  /**
12843
- * Helper function to check if the current room matches one of the given stages. This uses the
12850
+ * Helper function to check if the current stage matches one of the given stages. This uses the
12844
12851
  * `getEffectiveStage` helper function so that the Repentance floors are correctly adjusted.
12845
12852
  *
12846
12853
  * This function is variadic, which means you can pass as many stages as you want to match for.
@@ -12881,14 +12888,20 @@ export declare function onSetSeed(): boolean;
12881
12888
  export declare function onSheol(): boolean;
12882
12889
 
12883
12890
  /**
12884
- * Helper function to check if the current room matches one of the given stages.
12891
+ * Helper function to check if the current stage matches one of the given stages.
12885
12892
  *
12886
12893
  * This function is variadic, which means you can pass as many stages as you want to match for.
12887
12894
  */
12888
12895
  export declare function onStage(...stages: LevelStage[]): boolean;
12889
12896
 
12897
+ /** Helper function to check if the current stage is equal to or higher than the given stage. */
12898
+ export declare function onStageOrHigher(stage: LevelStage): boolean;
12899
+
12900
+ /** Helper function to check if the current stage is equal to or higher than the given stage. */
12901
+ export declare function onStageOrLower(stage: LevelStage): boolean;
12902
+
12890
12903
  /**
12891
- * Helper function to check if the current room matches one of the given stage types.
12904
+ * Helper function to check if the current stage matches one of the given stage types.
12892
12905
  *
12893
12906
  * This function is variadic, which means you can pass as many room types as you want to match for.
12894
12907
  */
@@ -13735,6 +13748,7 @@ export declare function removeAllCrawlSpaces(crawlSpaceVariant?: CrawlSpaceVaria
13735
13748
  * specified room types.
13736
13749
  *
13737
13750
  * @returns The number of doors removed.
13751
+ * @allowEmptyVariadic
13738
13752
  */
13739
13753
  export declare function removeAllDoors(...roomTypes: RoomType[]): int;
13740
13754
 
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 29.0.0
3
+ isaacscript-common 29.1.1
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -27067,6 +27067,16 @@ function ____exports.onStage(self, ...)
27067
27067
  function(____, stage) return stage == thisStage end
27068
27068
  )
27069
27069
  end
27070
+ function ____exports.onStageOrHigher(self, stage)
27071
+ local level = game:GetLevel()
27072
+ local thisStage = level:GetStage()
27073
+ return thisStage >= stage
27074
+ end
27075
+ function ____exports.onStageOrLower(self, stage)
27076
+ local level = game:GetLevel()
27077
+ local thisStage = level:GetStage()
27078
+ return thisStage <= stage
27079
+ end
27070
27080
  function ____exports.onStageType(self, ...)
27071
27081
  local stageTypes = {...}
27072
27082
  local level = game:GetLevel()
@@ -56,9 +56,12 @@ export declare function getDoorSlotEnterPositionOffset(doorSlot: DoorSlot): Read
56
56
  /** Helper function to get the possible door slots that can exist for a given room shape. */
57
57
  export declare function getDoorSlotsForRoomShape(roomShape: RoomShape): ReadonlySet<DoorSlot>;
58
58
  /**
59
- * Helper function to get all of the doors in the room. By default, it will return every door. You
60
- * can optionally specify one or more room types to return only the doors that match the specified
61
- * room types.
59
+ * Helper function to get all of the doors in the room. By default, it will return every door.
60
+ *
61
+ * You can optionally specify one or more room types to return only the doors that match the
62
+ * specified room types.
63
+ *
64
+ * @allowEmptyVariadic
62
65
  */
63
66
  export declare function getDoors(...roomTypes: RoomType[]): GridEntityDoor[];
64
67
  /**
@@ -165,6 +168,7 @@ export declare function openDoorFast(door: GridEntityDoor): void;
165
168
  * specified room types.
166
169
  *
167
170
  * @returns The number of doors removed.
171
+ * @allowEmptyVariadic
168
172
  */
169
173
  export declare function removeAllDoors(...roomTypes: RoomType[]): int;
170
174
  /** Helper function to remove a single door. */
@@ -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,EAKZ,SAAS,EACT,QAAQ,EACT,MAAM,8BAA8B,CAAC;AAuBtC,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;AA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;GAOG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAUnD;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAMnC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAKvD;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,GAAG,SAAS,EAAE,QAAQ,EAAE,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"}
@@ -65,9 +65,12 @@ end
65
65
  function ____exports.getDoorSlotsForRoomShape(self, roomShape)
66
66
  return ROOM_SHAPE_TO_DOOR_SLOTS[roomShape]
67
67
  end
68
- --- Helper function to get all of the doors in the room. By default, it will return every door. You
69
- -- can optionally specify one or more room types to return only the doors that match the specified
70
- -- room types.
68
+ --- Helper function to get all of the doors in the room. By default, it will return every door.
69
+ --
70
+ -- You can optionally specify one or more room types to return only the doors that match the
71
+ -- specified room types.
72
+ --
73
+ -- @allowEmptyVariadic
71
74
  function ____exports.getDoors(self, ...)
72
75
  local roomTypes = {...}
73
76
  local room = game:GetRoom()
@@ -390,6 +393,7 @@ end
390
393
  -- specified room types.
391
394
  --
392
395
  -- @returns The number of doors removed.
396
+ -- @allowEmptyVariadic
393
397
  function ____exports.removeAllDoors(self, ...)
394
398
  local doors = ____exports.getDoors(nil, ...)
395
399
  ____exports.removeDoors(
@@ -46,6 +46,8 @@ export declare function getConstituentsFromGridEntityID(gridEntityID: GridEntity
46
46
  * GridEntityType.ROCK_TINTED,
47
47
  * );
48
48
  * ```
49
+ *
50
+ * @allowEmptyVariadic
49
51
  */
50
52
  export declare function getGridEntities(...gridEntityTypes: GridEntityType[]): GridEntity[];
51
53
  /**
@@ -63,6 +65,8 @@ export declare function getGridEntitiesInRadius(targetPosition: Vector, radius:
63
65
  *
64
66
  * Use this function with no arguments to get every grid entity, or specify a variadic amount of
65
67
  * arguments to match specific grid entity types.
68
+ *
69
+ * @allowEmptyVariadic
66
70
  */
67
71
  export declare function getGridEntitiesMap(...gridEntityTypes: GridEntityType[]): Map<int, GridEntity>;
68
72
  /** Helper function to get the top left and bottom right corners of a given grid entity. */
@@ -1 +1 @@
1
- {"version":3,"file":"gridEntities.d.ts","sourceRoot":"","sources":["../../../src/functions/gridEntities.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,cAAc,EACd,iBAAiB,EAIlB,MAAM,8BAA8B,CAAC;AAStC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAgCrD;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,iBAAiB,EAAE,iBAAiB,EACpC,oBAAoB,EAAE,GAAG,GACxB,CAAC,cAAc,EAAE,GAAG,CAAC,GAAG,SAAS,CAqBnC;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,GAAG,EAAE,CAKzC;AAED;;;;;;GAMG;AACH,wBAAgB,kCAAkC,CAChD,UAAU,EAAE,UAAU,GACrB,MAAM,EAAE,CAoBV;AAED,qFAAqF;AACrF,wBAAgB,+BAA+B,CAC7C,YAAY,EAAE,YAAY,GACzB,CAAC,cAAc,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,CAAC,CAyBhD;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,eAAe,CAC7B,GAAG,eAAe,EAAE,cAAc,EAAE,GACnC,UAAU,EAAE,CAYd;AAgBD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,eAAe,EAAE,cAAc,EAAE,GACnC,UAAU,EAAE,CAYd;AAED,uFAAuF;AACvF,wBAAgB,uBAAuB,CACrC,cAAc,EAAE,MAAM,EAC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c,CAAC,gBAAgB,EAAE,GAAG,GAAG,IAAI,CA4B1D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,cAAc,EAAE,cAAc,EAC9B,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAExB;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,GAAG,EACZ,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAgCxB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,GAAG,GAAG,UAAU,GAAG,SAAS,CAkBtE"}
@@ -242,6 +242,8 @@ end
242
242
  -- GridEntityType.ROCK_TINTED,
243
243
  -- );
244
244
  -- ```
245
+ --
246
+ -- @allowEmptyVariadic
245
247
  function ____exports.getGridEntities(self, ...)
246
248
  local gridEntityTypes = {...}
247
249
  local gridEntities = getAllGridEntities(nil)
@@ -318,6 +320,8 @@ end
318
320
  --
319
321
  -- Use this function with no arguments to get every grid entity, or specify a variadic amount of
320
322
  -- arguments to match specific grid entity types.
323
+ --
324
+ -- @allowEmptyVariadic
321
325
  function ____exports.getGridEntitiesMap(self, ...)
322
326
  local gridEntities = ____exports.getGridEntities(nil, ...)
323
327
  local gridEntityMap = __TS__New(Map)
@@ -69,7 +69,7 @@ export declare function onCathedral(): boolean;
69
69
  export declare function onChest(): boolean;
70
70
  export declare function onDarkRoom(): boolean;
71
71
  /**
72
- * Helper function to check if the current room matches one of the given stages. This uses the
72
+ * Helper function to check if the current stage matches one of the given stages. This uses the
73
73
  * `getEffectiveStage` helper function so that the Repentance floors are correctly adjusted.
74
74
  *
75
75
  * This function is variadic, which means you can pass as many stages as you want to match for.
@@ -98,13 +98,17 @@ export declare function onFirstFloor(): boolean;
98
98
  export declare function onRepentanceStage(): boolean;
99
99
  export declare function onSheol(): boolean;
100
100
  /**
101
- * Helper function to check if the current room matches one of the given stages.
101
+ * Helper function to check if the current stage matches one of the given stages.
102
102
  *
103
103
  * This function is variadic, which means you can pass as many stages as you want to match for.
104
104
  */
105
105
  export declare function onStage(...stages: LevelStage[]): boolean;
106
+ /** Helper function to check if the current stage is equal to or higher than the given stage. */
107
+ export declare function onStageOrHigher(stage: LevelStage): boolean;
108
+ /** Helper function to check if the current stage is equal to or higher than the given stage. */
109
+ export declare function onStageOrLower(stage: LevelStage): boolean;
106
110
  /**
107
- * Helper function to check if the current room matches one of the given stage types.
111
+ * Helper function to check if the current stage matches one of the given stage types.
108
112
  *
109
113
  * This function is variadic, which means you can pass as many room types as you want to match for.
110
114
  */
@@ -1 +1 @@
1
- {"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../../../src/functions/stage.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,QAAQ,EACR,OAAO,EACP,SAAS,EACV,MAAM,8BAA8B,CAAC;AAUtC;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CA6B/D;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CAmBzE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,UAAU,CAS9C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,CAAC,EAAE,UAAU,EAClB,SAAS,CAAC,EAAE,SAAS,GACpB,MAAM,CAaR;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,GAAG,EAChB,iCAAiC,UAAQ,GACxC,MAAM,CAOR;AAED,6CAA6C;AAC7C,wBAAgB,QAAQ,IAAI,UAAU,CAIrC;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAa7E;AAED,iDAAiD;A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,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAE9D"}
@@ -179,7 +179,7 @@ function ____exports.onDarkRoom(self)
179
179
  local stageType = level:GetStageType()
180
180
  return stage == LevelStage.DARK_ROOM_CHEST and stageType == StageType.ORIGINAL
181
181
  end
182
- --- Helper function to check if the current room matches one of the given stages. This uses the
182
+ --- Helper function to check if the current stage matches one of the given stages. This uses the
183
183
  -- `getEffectiveStage` helper function so that the Repentance floors are correctly adjusted.
184
184
  --
185
185
  -- This function is variadic, which means you can pass as many stages as you want to match for.
@@ -217,7 +217,7 @@ function ____exports.onSheol(self)
217
217
  local stageType = level:GetStageType()
218
218
  return stage == LevelStage.SHEOL_CATHEDRAL and stageType == StageType.ORIGINAL
219
219
  end
220
- --- Helper function to check if the current room matches one of the given stages.
220
+ --- Helper function to check if the current stage matches one of the given stages.
221
221
  --
222
222
  -- This function is variadic, which means you can pass as many stages as you want to match for.
223
223
  function ____exports.onStage(self, ...)
@@ -229,7 +229,19 @@ function ____exports.onStage(self, ...)
229
229
  function(____, stage) return stage == thisStage end
230
230
  )
231
231
  end
232
- --- Helper function to check if the current room matches one of the given stage types.
232
+ --- Helper function to check if the current stage is equal to or higher than the given stage.
233
+ function ____exports.onStageOrHigher(self, stage)
234
+ local level = game:GetLevel()
235
+ local thisStage = level:GetStage()
236
+ return thisStage >= stage
237
+ end
238
+ --- Helper function to check if the current stage is equal to or higher than the given stage.
239
+ function ____exports.onStageOrLower(self, stage)
240
+ local level = game:GetLevel()
241
+ local thisStage = level:GetStage()
242
+ return thisStage <= stage
243
+ end
244
+ --- Helper function to check if the current stage matches one of the given stage types.
233
245
  --
234
246
  -- This function is variadic, which means you can pass as many room types as you want to match for.
235
247
  function ____exports.onStageType(self, ...)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "29.0.0",
3
+ "version": "29.1.1",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -183,9 +183,12 @@ export function getDoorSlotsForRoomShape(
183
183
  }
184
184
 
185
185
  /**
186
- * Helper function to get all of the doors in the room. By default, it will return every door. You
187
- * can optionally specify one or more room types to return only the doors that match the specified
188
- * room types.
186
+ * Helper function to get all of the doors in the room. By default, it will return every door.
187
+ *
188
+ * You can optionally specify one or more room types to return only the doors that match the
189
+ * specified room types.
190
+ *
191
+ * @allowEmptyVariadic
189
192
  */
190
193
  export function getDoors(...roomTypes: RoomType[]): GridEntityDoor[] {
191
194
  const room = game.GetRoom();
@@ -491,6 +494,7 @@ export function openDoorFast(door: GridEntityDoor): void {
491
494
  * specified room types.
492
495
  *
493
496
  * @returns The number of doors removed.
497
+ * @allowEmptyVariadic
494
498
  */
495
499
  export function removeAllDoors(...roomTypes: RoomType[]): int {
496
500
  const doors = getDoors(...roomTypes);
@@ -175,6 +175,8 @@ export function getConstituentsFromGridEntityID(
175
175
  * GridEntityType.ROCK_TINTED,
176
176
  * );
177
177
  * ```
178
+ *
179
+ * @allowEmptyVariadic
178
180
  */
179
181
  export function getGridEntities(
180
182
  ...gridEntityTypes: GridEntityType[]
@@ -281,6 +283,8 @@ export function getGridEntitiesInRadius(
281
283
  *
282
284
  * Use this function with no arguments to get every grid entity, or specify a variadic amount of
283
285
  * arguments to match specific grid entity types.
286
+ *
287
+ * @allowEmptyVariadic
284
288
  */
285
289
  export function getGridEntitiesMap(
286
290
  ...gridEntityTypes: GridEntityType[]
@@ -218,7 +218,7 @@ function mergeSerializedTable(
218
218
  let oldValue = oldTable.get(key) as LuaMap<AnyNotNil, unknown>;
219
219
  if (!isTable(oldValue)) {
220
220
  // The child table does not exist on the old table. However, we still need to copy over
221
- // the new table, because we need to handle data types like "Foo | null". Thus, set up a
221
+ // the new table, because we need to handle data types like `Foo | null`. Thus, set up a
222
222
  // blank sub-table on the old table, and continue to recursively merge.
223
223
  oldValue = new LuaMap();
224
224
  oldTable.set(key, oldValue);
@@ -239,7 +239,7 @@ export function onDarkRoom(): boolean {
239
239
  }
240
240
 
241
241
  /**
242
- * Helper function to check if the current room matches one of the given stages. This uses the
242
+ * Helper function to check if the current stage matches one of the given stages. This uses the
243
243
  * `getEffectiveStage` helper function so that the Repentance floors are correctly adjusted.
244
244
  *
245
245
  * This function is variadic, which means you can pass as many stages as you want to match for.
@@ -306,7 +306,7 @@ export function onSheol(): boolean {
306
306
  }
307
307
 
308
308
  /**
309
- * Helper function to check if the current room matches one of the given stages.
309
+ * Helper function to check if the current stage matches one of the given stages.
310
310
  *
311
311
  * This function is variadic, which means you can pass as many stages as you want to match for.
312
312
  */
@@ -316,8 +316,22 @@ export function onStage(...stages: LevelStage[]): boolean {
316
316
  return stages.some((stage) => stage === thisStage);
317
317
  }
318
318
 
319
+ /** Helper function to check if the current stage is equal to or higher than the given stage. */
320
+ export function onStageOrHigher(stage: LevelStage): boolean {
321
+ const level = game.GetLevel();
322
+ const thisStage = level.GetStage();
323
+ return thisStage >= stage;
324
+ }
325
+
326
+ /** Helper function to check if the current stage is equal to or higher than the given stage. */
327
+ export function onStageOrLower(stage: LevelStage): boolean {
328
+ const level = game.GetLevel();
329
+ const thisStage = level.GetStage();
330
+ return thisStage <= stage;
331
+ }
332
+
319
333
  /**
320
- * Helper function to check if the current room matches one of the given stage types.
334
+ * Helper function to check if the current stage matches one of the given stage types.
321
335
  *
322
336
  * This function is variadic, which means you can pass as many room types as you want to match for.
323
337
  */