isaacscript-common 29.11.0 → 30.0.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.
@@ -14455,8 +14455,8 @@ export declare interface RoomDescription {
14455
14455
  export declare function roomExists(roomGridIndex: int): boolean;
14456
14456
 
14457
14457
  /**
14458
- * Helper function to get the coordinates of a given grid index. The floor is represented by a 13x13
14459
- * grid.
14458
+ * Helper function to get the coordinates of a given room grid index. The floor is represented by a
14459
+ * 13x13 grid.
14460
14460
  *
14461
14461
  * - Since the starting room is in the center, the starting room grid index of 84 is equal to
14462
14462
  * coordinates of (6, 6).
@@ -14465,7 +14465,7 @@ export declare function roomExists(roomGridIndex: int): boolean;
14465
14465
  * - The bottom-left grid index of 156 is equal to coordinates of: (0, 12)
14466
14466
  * - The bottom-right grid index of 168 is equal to coordinates of: (12, 12)
14467
14467
  */
14468
- export declare function roomGridIndexToXY(roomGridIndex: int): [x: int, y: int];
14468
+ export declare function roomGridIndexToVector(roomGridIndex: int): Vector;
14469
14469
 
14470
14470
  declare class RoomHistory extends Feature {
14471
14471
  private postNewRoomEarly;
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 29.11.0
3
+ isaacscript-common 30.0.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -47417,10 +47417,10 @@ function ____exports.newRoom(self, seedOrRNG)
47417
47417
  end
47418
47418
  return newRoomGridIndex
47419
47419
  end
47420
- function ____exports.roomGridIndexToXY(self, roomGridIndex)
47420
+ function ____exports.roomGridIndexToVector(self, roomGridIndex)
47421
47421
  local x = roomGridIndex % LEVEL_GRID_ROW_WIDTH
47422
47422
  local y = math.floor(roomGridIndex / LEVEL_GRID_ROW_WIDTH)
47423
- return {x, y}
47423
+ return Vector(x, y)
47424
47424
  end
47425
47425
  return ____exports
47426
47426
  end,
@@ -189,8 +189,8 @@ export declare function newRoom(seedOrRNG?: Seed | RNG): int | undefined;
189
189
  */
190
190
  export declare function roomExists(roomGridIndex: int): boolean;
191
191
  /**
192
- * Helper function to get the coordinates of a given grid index. The floor is represented by a 13x13
193
- * grid.
192
+ * Helper function to get the coordinates of a given room grid index. The floor is represented by a
193
+ * 13x13 grid.
194
194
  *
195
195
  * - Since the starting room is in the center, the starting room grid index of 84 is equal to
196
196
  * coordinates of (6, 6).
@@ -199,5 +199,5 @@ export declare function roomExists(roomGridIndex: int): boolean;
199
199
  * - The bottom-left grid index of 156 is equal to coordinates of: (0, 12)
200
200
  * - The bottom-right grid index of 168 is equal to coordinates of: (12, 12)
201
201
  */
202
- export declare function roomGridIndexToXY(roomGridIndex: int): [x: int, y: int];
202
+ export declare function roomGridIndexToVector(roomGridIndex: int): Vector;
203
203
  //# sourceMappingURL=levelGrid.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"levelGrid.d.ts","sourceRoot":"","sources":["../../../src/functions/levelGrid.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAEL,QAAQ,EAKR,SAAS,EACT,QAAQ,EACT,MAAM,8BAA8B,CAAC;AA+BtC;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,EAAE,CAK7E;AAED;;;;;;GAMG;AACH,wBAAgB,qCAAqC,CACnD,aAAa,CAAC,EAAE,GAAG,GAClB,GAAG,EAAE,CAKP;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,EAAE,CAerE;AAED,0FAA0F;AAC1F,wBAAgB,qBAAqB,IAAI,GAAG,EAAE,CAG7C;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,GAAE,IAAI,GAAG,GAAqB,GAErC,CAAC,qBAAqB,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,EAAE,GAAG,CAAC,GACvE,SAAS,CAOZ;A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AAG,CAAC,CAa5B;AAED;;;;;;GAMG;AACH,wBAAgB,0CAA0C,CACxD,iBAAiB,EAAE,GAAG,EACtB,SAAS,EAAE,SAAS,GACnB,WAAW,CAAC,QAAQ,EAAE,GAAG,CAAC,CAa5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,OAAO,CAKtD;AAED,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,GAAG,GACjB,OAAO,CAGT;AAED,wBAAgB,oCAAoC,CAClD,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,GAAG,GACjB,OAAO,CAqBT;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,OAAO,CAGzD;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,OAAO,CAM7D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,OAAO,CAAC,SAAS,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,SAAS,CAkD/D;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,aAAa,EAAE,GAAG,GAAG,OAAO,CAGtD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,GAAG,GAAG,MAAM,CAKhE"}
@@ -406,8 +406,8 @@ function ____exports.newRoom(self, seedOrRNG)
406
406
  end
407
407
  return newRoomGridIndex
408
408
  end
409
- --- Helper function to get the coordinates of a given grid index. The floor is represented by a 13x13
410
- -- grid.
409
+ --- Helper function to get the coordinates of a given room grid index. The floor is represented by a
410
+ -- 13x13 grid.
411
411
  --
412
412
  -- - Since the starting room is in the center, the starting room grid index of 84 is equal to
413
413
  -- coordinates of (6, 6).
@@ -415,9 +415,9 @@ end
415
415
  -- - The top-right grid index of 12 is equal to coordinates of: (0, 0)
416
416
  -- - The bottom-left grid index of 156 is equal to coordinates of: (0, 12)
417
417
  -- - The bottom-right grid index of 168 is equal to coordinates of: (12, 12)
418
- function ____exports.roomGridIndexToXY(self, roomGridIndex)
418
+ function ____exports.roomGridIndexToVector(self, roomGridIndex)
419
419
  local x = roomGridIndex % LEVEL_GRID_ROW_WIDTH
420
420
  local y = math.floor(roomGridIndex / LEVEL_GRID_ROW_WIDTH)
421
- return {x, y}
421
+ return Vector(x, y)
422
422
  end
423
423
  return ____exports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "29.11.0",
3
+ "version": "30.0.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -542,8 +542,8 @@ export function roomExists(roomGridIndex: int): boolean {
542
542
  }
543
543
 
544
544
  /**
545
- * Helper function to get the coordinates of a given grid index. The floor is represented by a 13x13
546
- * grid.
545
+ * Helper function to get the coordinates of a given room grid index. The floor is represented by a
546
+ * 13x13 grid.
547
547
  *
548
548
  * - Since the starting room is in the center, the starting room grid index of 84 is equal to
549
549
  * coordinates of (6, 6).
@@ -552,9 +552,9 @@ export function roomExists(roomGridIndex: int): boolean {
552
552
  * - The bottom-left grid index of 156 is equal to coordinates of: (0, 12)
553
553
  * - The bottom-right grid index of 168 is equal to coordinates of: (12, 12)
554
554
  */
555
- export function roomGridIndexToXY(roomGridIndex: int): [x: int, y: int] {
555
+ export function roomGridIndexToVector(roomGridIndex: int): Vector {
556
556
  const x = roomGridIndex % LEVEL_GRID_ROW_WIDTH;
557
557
  const y = Math.floor(roomGridIndex / LEVEL_GRID_ROW_WIDTH);
558
558
 
559
- return [x, y];
559
+ return Vector(x, y);
560
560
  }