isaacscript-common 1.0.508 → 1.0.512

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.
@@ -45,7 +45,7 @@ export declare function getRoomSafeGridIndex(): int;
45
45
  *
46
46
  * This function only searches through rooms in the current dimension.
47
47
  */
48
- export declare function getRoomGridIndexesForType(roomType: RoomType): Set<int>;
48
+ export declare function getRoomGridIndexesForType(roomType: RoomType): int[];
49
49
  /**
50
50
  * Helper function to get the item pool type for the current room. For example, this returns
51
51
  * `ItemPoolType.ItemPoolType.POOL_ANGEL` if you are in an Angel Room.
@@ -121,7 +121,11 @@ export declare function inDimension(dimension: Dimension): boolean;
121
121
  /** Helper function to determine if the current room shape is one of the four L room shapes. */
122
122
  export declare function inLRoom(): boolean;
123
123
  export declare function inGenesisRoom(): boolean;
124
- /** Helper function to determine whether or not the current room is the starting room of a floor. */
124
+ /**
125
+ * Helper function to determine whether or not the current room is the starting room of a floor.
126
+ * Only returns true for the starting room of the primary dimension (meaning that being in the
127
+ * starting room of the mirror world does not count).
128
+ */
125
129
  export declare function inStartingRoom(): boolean;
126
130
  /**
127
131
  * Helper function to determine whether or not the current room is part of the floor layout. For
@@ -94,13 +94,13 @@ end
94
94
  function ____exports.getRoomGridIndexesForType(self, roomType)
95
95
  local game = Game()
96
96
  local level = game:GetLevel()
97
- local roomGridIndexes = __TS__New(Set)
97
+ local roomGridIndexes = {}
98
98
  do
99
99
  local i = 0
100
100
  while i <= MAX_ROOM_INDEX do
101
101
  local room = level:GetRoomByIdx(i)
102
102
  if room ~= nil and room.Data ~= nil and room.Data.Type == roomType then
103
- roomGridIndexes:add(room.SafeGridIndex)
103
+ __TS__ArrayPush(roomGridIndexes, room.SafeGridIndex)
104
104
  end
105
105
  i = i + 1
106
106
  end
@@ -202,7 +202,7 @@ function ____exports.inStartingRoom(self)
202
202
  local level = game:GetLevel()
203
203
  local startingRoomGridIndex = level:GetStartingRoomIndex()
204
204
  local roomSafeGridIndex = ____exports.getRoomSafeGridIndex(nil)
205
- return roomSafeGridIndex == startingRoomGridIndex
205
+ return roomSafeGridIndex == startingRoomGridIndex and ____exports.inDimension(nil, 0)
206
206
  end
207
207
  function ____exports.isRoomInsideMap(self)
208
208
  local roomSafeGridIndex = ____exports.getRoomSafeGridIndex(nil)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.0.508",
3
+ "version": "1.0.512",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",
@@ -25,10 +25,10 @@
25
25
  "dist/**/*.d.ts"
26
26
  ],
27
27
  "devDependencies": {
28
- "isaac-typescript-definitions": "^1.0.292",
29
- "isaacscript-lint": "^1.0.69",
28
+ "isaac-typescript-definitions": "^1.0.293",
29
+ "isaacscript-lint": "^1.0.71",
30
30
  "typedoc": "^0.22.10",
31
- "typescript": "4.5.2",
32
- "typescript-to-lua": "^1.2.0"
31
+ "typescript": "4.4.4",
32
+ "typescript-to-lua": "1.1.1"
33
33
  }
34
34
  }