isaacscript-common 21.6.2 → 21.6.3
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.
- package/dist/index.rollup.d.ts +5 -5
- package/dist/isaacscript-common.lua +7 -7
- package/dist/src/classes/features/other/CustomStages.lua +2 -2
- package/dist/src/functions/rooms.d.ts +5 -5
- package/dist/src/functions/rooms.d.ts.map +1 -1
- package/dist/src/functions/rooms.lua +8 -8
- package/package.json +1 -1
- package/src/classes/features/other/CustomStages.ts +1 -1
- package/src/functions/rooms.ts +5 -5
package/dist/index.rollup.d.ts
CHANGED
|
@@ -6104,17 +6104,17 @@ export declare function getRoomData(roomGridIndex?: int): RoomConfig | undefined
|
|
|
6104
6104
|
* @param roomType The type of room to retrieve.
|
|
6105
6105
|
* @param roomVariant The room variant to retrieve. (The room variant is the "ID" of the room in
|
|
6106
6106
|
* Basement Renovator.)
|
|
6107
|
-
* @param useSpecialRoomsForRoomTypeDefault Optional. Whether to use `s.default` as the prefix for
|
|
6108
|
-
* the `goto` command (instead of `d`). False by default. Set this
|
|
6109
|
-
* to true if you want to go to a special room of `RoomType.DEFAULT`
|
|
6110
|
-
* (1).
|
|
6111
6107
|
* @param cancelRoomTransition Optional. Whether to cancel the room transition by using the
|
|
6112
6108
|
* `Game.StartRoomTransition` method to travel to the same room. Default
|
|
6113
6109
|
* is true. Set this to false if you are getting the data for many rooms
|
|
6114
6110
|
* at the same time, and then use the `teleport` helper function when
|
|
6115
6111
|
* you are finished.
|
|
6112
|
+
* @param useSpecialRoomsForRoomTypeDefault Optional. Whether to use `s.default` as the prefix for
|
|
6113
|
+
* the `goto` command (instead of `d`). False by default. Set this
|
|
6114
|
+
* to true if you want to go to a special room of `RoomType.DEFAULT`
|
|
6115
|
+
* (1).
|
|
6116
6116
|
*/
|
|
6117
|
-
export declare function getRoomDataForTypeVariant(roomType: RoomType, roomVariant: int,
|
|
6117
|
+
export declare function getRoomDataForTypeVariant(roomType: RoomType, roomVariant: int, cancelRoomTransition?: boolean, useSpecialRoomsForRoomTypeDefault?: boolean): Readonly<RoomConfig> | undefined;
|
|
6118
6118
|
|
|
6119
6119
|
/**
|
|
6120
6120
|
* Helper function to get the descriptor for a room.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 21.6.
|
|
3
|
+
isaacscript-common 21.6.3
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -26534,13 +26534,13 @@ function ____exports.getNumRooms(self)
|
|
|
26534
26534
|
local rooms = ____exports.getRoomsInsideGrid(nil)
|
|
26535
26535
|
return #rooms
|
|
26536
26536
|
end
|
|
26537
|
-
function ____exports.getRoomDataForTypeVariant(self, roomType, roomVariant,
|
|
26538
|
-
if useSpecialRoomsForRoomTypeDefault == nil then
|
|
26539
|
-
useSpecialRoomsForRoomTypeDefault = false
|
|
26540
|
-
end
|
|
26537
|
+
function ____exports.getRoomDataForTypeVariant(self, roomType, roomVariant, cancelRoomTransition, useSpecialRoomsForRoomTypeDefault)
|
|
26541
26538
|
if cancelRoomTransition == nil then
|
|
26542
26539
|
cancelRoomTransition = true
|
|
26543
26540
|
end
|
|
26541
|
+
if useSpecialRoomsForRoomTypeDefault == nil then
|
|
26542
|
+
useSpecialRoomsForRoomTypeDefault = false
|
|
26543
|
+
end
|
|
26544
26544
|
local command = getGotoCommand(nil, roomType, roomVariant, useSpecialRoomsForRoomTypeDefault)
|
|
26545
26545
|
Isaac.ExecuteCommand(command)
|
|
26546
26546
|
local newRoomData = getRoomData(nil, GridRoom.DEBUG)
|
|
@@ -42833,8 +42833,8 @@ function CustomStages.prototype.setStageRoomsData(self, customStage, rng, verbos
|
|
|
42833
42833
|
nil,
|
|
42834
42834
|
roomType,
|
|
42835
42835
|
randomRoom.variant,
|
|
42836
|
-
|
|
42837
|
-
|
|
42836
|
+
false,
|
|
42837
|
+
true
|
|
42838
42838
|
)
|
|
42839
42839
|
if newRoomData == nil then
|
|
42840
42840
|
logError((("Failed to get the room data for room variant " .. tostring(randomRoom.variant)) .. " for custom stage: ") .. customStage.name)
|
|
@@ -294,8 +294,8 @@ function CustomStages.prototype.setStageRoomsData(self, customStage, rng, verbos
|
|
|
294
294
|
nil,
|
|
295
295
|
roomType,
|
|
296
296
|
randomRoom.variant,
|
|
297
|
-
|
|
298
|
-
|
|
297
|
+
false,
|
|
298
|
+
true
|
|
299
299
|
)
|
|
300
300
|
if newRoomData == nil then
|
|
301
301
|
logError((("Failed to get the room data for room variant " .. tostring(randomRoom.variant)) .. " for custom stage: ") .. customStage.name)
|
|
@@ -37,17 +37,17 @@ export declare function getReadOnlyRooms(): Array<Readonly<RoomDescriptor>>;
|
|
|
37
37
|
* @param roomType The type of room to retrieve.
|
|
38
38
|
* @param roomVariant The room variant to retrieve. (The room variant is the "ID" of the room in
|
|
39
39
|
* Basement Renovator.)
|
|
40
|
-
* @param useSpecialRoomsForRoomTypeDefault Optional. Whether to use `s.default` as the prefix for
|
|
41
|
-
* the `goto` command (instead of `d`). False by default. Set this
|
|
42
|
-
* to true if you want to go to a special room of `RoomType.DEFAULT`
|
|
43
|
-
* (1).
|
|
44
40
|
* @param cancelRoomTransition Optional. Whether to cancel the room transition by using the
|
|
45
41
|
* `Game.StartRoomTransition` method to travel to the same room. Default
|
|
46
42
|
* is true. Set this to false if you are getting the data for many rooms
|
|
47
43
|
* at the same time, and then use the `teleport` helper function when
|
|
48
44
|
* you are finished.
|
|
45
|
+
* @param useSpecialRoomsForRoomTypeDefault Optional. Whether to use `s.default` as the prefix for
|
|
46
|
+
* the `goto` command (instead of `d`). False by default. Set this
|
|
47
|
+
* to true if you want to go to a special room of `RoomType.DEFAULT`
|
|
48
|
+
* (1).
|
|
49
49
|
*/
|
|
50
|
-
export declare function getRoomDataForTypeVariant(roomType: RoomType, roomVariant: int,
|
|
50
|
+
export declare function getRoomDataForTypeVariant(roomType: RoomType, roomVariant: int, cancelRoomTransition?: boolean, useSpecialRoomsForRoomTypeDefault?: boolean): Readonly<RoomConfig> | undefined;
|
|
51
51
|
/**
|
|
52
52
|
* Helper function to get the item pool type for the current room. For example, this returns
|
|
53
53
|
* `ItemPoolType.ItemPoolType.POOL_ANGEL` if you are in an Angel Room.
|
|
@@ -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,EAEZ,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;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,GAAG,EAChB,
|
|
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,EAEZ,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;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAA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AACH,wBAAgB,WAAW,IAAI,OAAO,CASrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAWhE;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAWtC;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,SAAS,EAAE,QAAQ,EAAE,GAAG,OAAO,CAI5D;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAItC;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAItC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAMxC;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,kBAAkB,CAAC,EAAE,QAAQ,EAAE,GAAG,OAAO,CAgBxE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAWrC;AAED,iFAAiF;AACjF,wBAAgB,WAAW,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAG5D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,IAAI,CA8BrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAKvC"}
|
|
@@ -167,22 +167,22 @@ end
|
|
|
167
167
|
-- @param roomType The type of room to retrieve.
|
|
168
168
|
-- @param roomVariant The room variant to retrieve. (The room variant is the "ID" of the room in
|
|
169
169
|
-- Basement Renovator.)
|
|
170
|
-
-- @param useSpecialRoomsForRoomTypeDefault Optional. Whether to use `s.default` as the prefix for
|
|
171
|
-
-- the `goto` command (instead of `d`). False by default. Set this
|
|
172
|
-
-- to true if you want to go to a special room of `RoomType.DEFAULT`
|
|
173
|
-
-- (1).
|
|
174
170
|
-- @param cancelRoomTransition Optional. Whether to cancel the room transition by using the
|
|
175
171
|
-- `Game.StartRoomTransition` method to travel to the same room. Default
|
|
176
172
|
-- is true. Set this to false if you are getting the data for many rooms
|
|
177
173
|
-- at the same time, and then use the `teleport` helper function when
|
|
178
174
|
-- you are finished.
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
175
|
+
-- @param useSpecialRoomsForRoomTypeDefault Optional. Whether to use `s.default` as the prefix for
|
|
176
|
+
-- the `goto` command (instead of `d`). False by default. Set this
|
|
177
|
+
-- to true if you want to go to a special room of `RoomType.DEFAULT`
|
|
178
|
+
-- (1).
|
|
179
|
+
function ____exports.getRoomDataForTypeVariant(self, roomType, roomVariant, cancelRoomTransition, useSpecialRoomsForRoomTypeDefault)
|
|
183
180
|
if cancelRoomTransition == nil then
|
|
184
181
|
cancelRoomTransition = true
|
|
185
182
|
end
|
|
183
|
+
if useSpecialRoomsForRoomTypeDefault == nil then
|
|
184
|
+
useSpecialRoomsForRoomTypeDefault = false
|
|
185
|
+
end
|
|
186
186
|
local command = getGotoCommand(nil, roomType, roomVariant, useSpecialRoomsForRoomTypeDefault)
|
|
187
187
|
Isaac.ExecuteCommand(command)
|
|
188
188
|
local newRoomData = getRoomData(nil, GridRoom.DEBUG)
|
package/package.json
CHANGED
|
@@ -402,8 +402,8 @@ export class CustomStages extends Feature {
|
|
|
402
402
|
newRoomData = getRoomDataForTypeVariant(
|
|
403
403
|
roomType,
|
|
404
404
|
randomRoom.variant,
|
|
405
|
-
true, // The custom stage rooms are loaded inside of the "00.special rooms.stb" file.
|
|
406
405
|
false, // Since we are going to multiple rooms, we cancel the transition.
|
|
406
|
+
true, // The custom stage rooms are loaded inside of the "00.special rooms.stb" file.
|
|
407
407
|
);
|
|
408
408
|
if (newRoomData === undefined) {
|
|
409
409
|
logError(
|
package/src/functions/rooms.ts
CHANGED
|
@@ -126,21 +126,21 @@ export function getReadOnlyRooms(): Array<Readonly<RoomDescriptor>> {
|
|
|
126
126
|
* @param roomType The type of room to retrieve.
|
|
127
127
|
* @param roomVariant The room variant to retrieve. (The room variant is the "ID" of the room in
|
|
128
128
|
* Basement Renovator.)
|
|
129
|
-
* @param useSpecialRoomsForRoomTypeDefault Optional. Whether to use `s.default` as the prefix for
|
|
130
|
-
* the `goto` command (instead of `d`). False by default. Set this
|
|
131
|
-
* to true if you want to go to a special room of `RoomType.DEFAULT`
|
|
132
|
-
* (1).
|
|
133
129
|
* @param cancelRoomTransition Optional. Whether to cancel the room transition by using the
|
|
134
130
|
* `Game.StartRoomTransition` method to travel to the same room. Default
|
|
135
131
|
* is true. Set this to false if you are getting the data for many rooms
|
|
136
132
|
* at the same time, and then use the `teleport` helper function when
|
|
137
133
|
* you are finished.
|
|
134
|
+
* @param useSpecialRoomsForRoomTypeDefault Optional. Whether to use `s.default` as the prefix for
|
|
135
|
+
* the `goto` command (instead of `d`). False by default. Set this
|
|
136
|
+
* to true if you want to go to a special room of `RoomType.DEFAULT`
|
|
137
|
+
* (1).
|
|
138
138
|
*/
|
|
139
139
|
export function getRoomDataForTypeVariant(
|
|
140
140
|
roomType: RoomType,
|
|
141
141
|
roomVariant: int,
|
|
142
|
-
useSpecialRoomsForRoomTypeDefault = false,
|
|
143
142
|
cancelRoomTransition = true,
|
|
143
|
+
useSpecialRoomsForRoomTypeDefault = false,
|
|
144
144
|
): Readonly<RoomConfig> | undefined {
|
|
145
145
|
const command = getGotoCommand(
|
|
146
146
|
roomType,
|