isaacscript-common 26.4.0 → 26.5.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.
- package/dist/index.rollup.d.ts +2 -0
- package/dist/isaacscript-common.lua +5 -1
- package/dist/src/classes/features/other/RoomHistory.d.ts +2 -0
- package/dist/src/classes/features/other/RoomHistory.d.ts.map +1 -1
- package/dist/src/classes/features/other/RoomHistory.lua +4 -0
- package/package.json +1 -1
- package/src/classes/features/other/RoomHistory.ts +6 -0
package/dist/index.rollup.d.ts
CHANGED
|
@@ -13726,6 +13726,8 @@ declare class RoomHistory extends Feature {
|
|
|
13726
13726
|
* In order to use this function, you must upgrade your mod with `ISCFeature.ROOM_HISTORY`.
|
|
13727
13727
|
*/
|
|
13728
13728
|
getLatestRoomDescription(): Readonly<RoomDescription> | undefined;
|
|
13729
|
+
/** Helper function to detect if the player is on the first room of the room. */
|
|
13730
|
+
inFirstRoom(): boolean;
|
|
13729
13731
|
/**
|
|
13730
13732
|
* Helper function to detect if the game is in the state where the room index has changed to a new
|
|
13731
13733
|
* room, but the entities from the previous room are currently in the process of despawning. (At
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 26.
|
|
3
|
+
isaacscript-common 26.5.1
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -32445,6 +32445,9 @@ end
|
|
|
32445
32445
|
function RoomHistory.prototype.getLatestRoomDescription(self)
|
|
32446
32446
|
return getLastElement(nil, v.run.roomHistory)
|
|
32447
32447
|
end
|
|
32448
|
+
function RoomHistory.prototype.inFirstRoom(self)
|
|
32449
|
+
return #v.run.roomHistory == 1
|
|
32450
|
+
end
|
|
32448
32451
|
function RoomHistory.prototype.isLeavingRoom(self)
|
|
32449
32452
|
local level = game:GetLevel()
|
|
32450
32453
|
local stage = level:GetStage()
|
|
@@ -32463,6 +32466,7 @@ __TS__Decorate({Exported}, RoomHistory.prototype, "getNumRoomsEntered", true)
|
|
|
32463
32466
|
__TS__Decorate({Exported}, RoomHistory.prototype, "getRoomHistory", true)
|
|
32464
32467
|
__TS__Decorate({Exported}, RoomHistory.prototype, "getPreviousRoomDescription", true)
|
|
32465
32468
|
__TS__Decorate({Exported}, RoomHistory.prototype, "getLatestRoomDescription", true)
|
|
32469
|
+
__TS__Decorate({Exported}, RoomHistory.prototype, "inFirstRoom", true)
|
|
32466
32470
|
__TS__Decorate({Exported}, RoomHistory.prototype, "isLeavingRoom", true)
|
|
32467
32471
|
return ____exports
|
|
32468
32472
|
end,
|
|
@@ -38,6 +38,8 @@ export declare class RoomHistory extends Feature {
|
|
|
38
38
|
* In order to use this function, you must upgrade your mod with `ISCFeature.ROOM_HISTORY`.
|
|
39
39
|
*/
|
|
40
40
|
getLatestRoomDescription(): Readonly<RoomDescription> | undefined;
|
|
41
|
+
/** Helper function to detect if the player is on the first room of the room. */
|
|
42
|
+
inFirstRoom(): boolean;
|
|
41
43
|
/**
|
|
42
44
|
* Helper function to detect if the game is in the state where the room index has changed to a new
|
|
43
45
|
* room, but the entities from the previous room are currently in the process of despawning. (At
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoomHistory.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/RoomHistory.ts"],"names":[],"mappings":";AAcA,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAQhD,qBAAa,WAAY,SAAQ,OAAO;IActC,OAAO,CAAC,gBAAgB,CAgCtB;IAEF;;;;;OAKG;IAEI,kBAAkB,IAAI,GAAG;IAIhC;;;;;OAKG;IAEI,cAAc,IAAI,aAAa,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IAIjE;;;;;;;OAOG;IAEI,0BAA0B,IAAI,QAAQ,CAAC,eAAe,CAAC;IAiB9D;;;;;;;;;;OAUG;IAEI,wBAAwB,IAAI,QAAQ,CAAC,eAAe,CAAC,GAAG,SAAS;IAIxE;;;;;;;;;;OAUG;IAEI,aAAa,IAAI,OAAO;CAwBhC"}
|
|
1
|
+
{"version":3,"file":"RoomHistory.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/RoomHistory.ts"],"names":[],"mappings":";AAcA,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAQhD,qBAAa,WAAY,SAAQ,OAAO;IActC,OAAO,CAAC,gBAAgB,CAgCtB;IAEF;;;;;OAKG;IAEI,kBAAkB,IAAI,GAAG;IAIhC;;;;;OAKG;IAEI,cAAc,IAAI,aAAa,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IAIjE;;;;;;;OAOG;IAEI,0BAA0B,IAAI,QAAQ,CAAC,eAAe,CAAC;IAiB9D;;;;;;;;;;OAUG;IAEI,wBAAwB,IAAI,QAAQ,CAAC,eAAe,CAAC,GAAG,SAAS;IAIxE,gFAAgF;IAEzE,WAAW,IAAI,OAAO;IAI7B;;;;;;;;;;OAUG;IAEI,aAAa,IAAI,OAAO;CAwBhC"}
|
|
@@ -86,6 +86,9 @@ end
|
|
|
86
86
|
function RoomHistory.prototype.getLatestRoomDescription(self)
|
|
87
87
|
return getLastElement(nil, v.run.roomHistory)
|
|
88
88
|
end
|
|
89
|
+
function RoomHistory.prototype.inFirstRoom(self)
|
|
90
|
+
return #v.run.roomHistory == 1
|
|
91
|
+
end
|
|
89
92
|
function RoomHistory.prototype.isLeavingRoom(self)
|
|
90
93
|
local level = game:GetLevel()
|
|
91
94
|
local stage = level:GetStage()
|
|
@@ -104,5 +107,6 @@ __TS__Decorate({Exported}, RoomHistory.prototype, "getNumRoomsEntered", true)
|
|
|
104
107
|
__TS__Decorate({Exported}, RoomHistory.prototype, "getRoomHistory", true)
|
|
105
108
|
__TS__Decorate({Exported}, RoomHistory.prototype, "getPreviousRoomDescription", true)
|
|
106
109
|
__TS__Decorate({Exported}, RoomHistory.prototype, "getLatestRoomDescription", true)
|
|
110
|
+
__TS__Decorate({Exported}, RoomHistory.prototype, "inFirstRoom", true)
|
|
107
111
|
__TS__Decorate({Exported}, RoomHistory.prototype, "isLeavingRoom", true)
|
|
108
112
|
return ____exports
|
package/package.json
CHANGED
|
@@ -133,6 +133,12 @@ export class RoomHistory extends Feature {
|
|
|
133
133
|
return getLastElement(v.run.roomHistory);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
+
/** Helper function to detect if the player is on the first room of the room. */
|
|
137
|
+
@Exported
|
|
138
|
+
public inFirstRoom(): boolean {
|
|
139
|
+
return v.run.roomHistory.length === 1;
|
|
140
|
+
}
|
|
141
|
+
|
|
136
142
|
/**
|
|
137
143
|
* Helper function to detect if the game is in the state where the room index has changed to a new
|
|
138
144
|
* room, but the entities from the previous room are currently in the process of despawning. (At
|