isaacscript-common 26.5.0 → 26.6.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.
- package/dist/index.rollup.d.ts +7 -1
- package/dist/isaacscript-common.lua +7 -3
- package/dist/src/classes/features/other/RoomHistory.d.ts +7 -1
- package/dist/src/classes/features/other/RoomHistory.d.ts.map +1 -1
- package/dist/src/classes/features/other/RoomHistory.lua +6 -2
- package/package.json +1 -1
- package/src/classes/features/other/RoomHistory.ts +11 -1
package/dist/index.rollup.d.ts
CHANGED
|
@@ -13691,6 +13691,12 @@ export declare function roomGridIndexToXY(roomGridIndex: int): [x: int, y: int];
|
|
|
13691
13691
|
|
|
13692
13692
|
declare class RoomHistory extends Feature {
|
|
13693
13693
|
private postNewRoomEarly;
|
|
13694
|
+
/**
|
|
13695
|
+
* Helper function to manually delete the last room description from the internal array. This is
|
|
13696
|
+
* useful if a mod needs to send the player to a room temporarily and the room should not count as
|
|
13697
|
+
* the player having traveled to that room.
|
|
13698
|
+
*/
|
|
13699
|
+
deleteLastRoomDescription(): void;
|
|
13694
13700
|
/**
|
|
13695
13701
|
* Helper function to get the total number of rooms that the player has entered thus far on the
|
|
13696
13702
|
* run. (Re-entering the same room will increment the number returned.)
|
|
@@ -13727,7 +13733,7 @@ declare class RoomHistory extends Feature {
|
|
|
13727
13733
|
*/
|
|
13728
13734
|
getLatestRoomDescription(): Readonly<RoomDescription> | undefined;
|
|
13729
13735
|
/** Helper function to detect if the player is on the first room of the room. */
|
|
13730
|
-
|
|
13736
|
+
inFirstRoom(): boolean;
|
|
13731
13737
|
/**
|
|
13732
13738
|
* Helper function to detect if the game is in the state where the room index has changed to a new
|
|
13733
13739
|
* 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.6.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -32425,6 +32425,9 @@ function RoomHistory.prototype.____constructor(self)
|
|
|
32425
32425
|
end
|
|
32426
32426
|
self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_EARLY, self.postNewRoomEarly}}
|
|
32427
32427
|
end
|
|
32428
|
+
function RoomHistory.prototype.deleteLastRoomDescription(self)
|
|
32429
|
+
table.remove(v.run.roomHistory)
|
|
32430
|
+
end
|
|
32428
32431
|
function RoomHistory.prototype.getNumRoomsEntered(self)
|
|
32429
32432
|
return #v.run.roomHistory
|
|
32430
32433
|
end
|
|
@@ -32445,7 +32448,7 @@ end
|
|
|
32445
32448
|
function RoomHistory.prototype.getLatestRoomDescription(self)
|
|
32446
32449
|
return getLastElement(nil, v.run.roomHistory)
|
|
32447
32450
|
end
|
|
32448
|
-
function RoomHistory.prototype.
|
|
32451
|
+
function RoomHistory.prototype.inFirstRoom(self)
|
|
32449
32452
|
return #v.run.roomHistory == 1
|
|
32450
32453
|
end
|
|
32451
32454
|
function RoomHistory.prototype.isLeavingRoom(self)
|
|
@@ -32462,11 +32465,12 @@ function RoomHistory.prototype.isLeavingRoom(self)
|
|
|
32462
32465
|
end
|
|
32463
32466
|
return startSeedString ~= latestRoomDescription.startSeedString or stage ~= latestRoomDescription.stage or stageType ~= latestRoomDescription.stageType or roomListIndex ~= latestRoomDescription.roomListIndex or roomVisitedCount ~= latestRoomDescription.roomVisitedCount
|
|
32464
32467
|
end
|
|
32468
|
+
__TS__Decorate({Exported}, RoomHistory.prototype, "deleteLastRoomDescription", true)
|
|
32465
32469
|
__TS__Decorate({Exported}, RoomHistory.prototype, "getNumRoomsEntered", true)
|
|
32466
32470
|
__TS__Decorate({Exported}, RoomHistory.prototype, "getRoomHistory", true)
|
|
32467
32471
|
__TS__Decorate({Exported}, RoomHistory.prototype, "getPreviousRoomDescription", true)
|
|
32468
32472
|
__TS__Decorate({Exported}, RoomHistory.prototype, "getLatestRoomDescription", true)
|
|
32469
|
-
__TS__Decorate({Exported}, RoomHistory.prototype, "
|
|
32473
|
+
__TS__Decorate({Exported}, RoomHistory.prototype, "inFirstRoom", true)
|
|
32470
32474
|
__TS__Decorate({Exported}, RoomHistory.prototype, "isLeavingRoom", true)
|
|
32471
32475
|
return ____exports
|
|
32472
32476
|
end,
|
|
@@ -3,6 +3,12 @@ import { RoomDescription } from "../../../interfaces/RoomDescription";
|
|
|
3
3
|
import { Feature } from "../../private/Feature";
|
|
4
4
|
export declare class RoomHistory extends Feature {
|
|
5
5
|
private postNewRoomEarly;
|
|
6
|
+
/**
|
|
7
|
+
* Helper function to manually delete the last room description from the internal array. This is
|
|
8
|
+
* useful if a mod needs to send the player to a room temporarily and the room should not count as
|
|
9
|
+
* the player having traveled to that room.
|
|
10
|
+
*/
|
|
11
|
+
deleteLastRoomDescription(): void;
|
|
6
12
|
/**
|
|
7
13
|
* Helper function to get the total number of rooms that the player has entered thus far on the
|
|
8
14
|
* run. (Re-entering the same room will increment the number returned.)
|
|
@@ -39,7 +45,7 @@ export declare class RoomHistory extends Feature {
|
|
|
39
45
|
*/
|
|
40
46
|
getLatestRoomDescription(): Readonly<RoomDescription> | undefined;
|
|
41
47
|
/** Helper function to detect if the player is on the first room of the room. */
|
|
42
|
-
|
|
48
|
+
inFirstRoom(): boolean;
|
|
43
49
|
/**
|
|
44
50
|
* Helper function to detect if the game is in the state where the room index has changed to a new
|
|
45
51
|
* 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,gFAAgF;IAEzE,WAAW,IAAI,OAAO;IAI7B;;;;;;;;;;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;;;;OAIG;IAEI,yBAAyB,IAAI,IAAI;IAIxC;;;;;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"}
|
|
@@ -66,6 +66,9 @@ function RoomHistory.prototype.____constructor(self)
|
|
|
66
66
|
end
|
|
67
67
|
self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_EARLY, self.postNewRoomEarly}}
|
|
68
68
|
end
|
|
69
|
+
function RoomHistory.prototype.deleteLastRoomDescription(self)
|
|
70
|
+
table.remove(v.run.roomHistory)
|
|
71
|
+
end
|
|
69
72
|
function RoomHistory.prototype.getNumRoomsEntered(self)
|
|
70
73
|
return #v.run.roomHistory
|
|
71
74
|
end
|
|
@@ -86,7 +89,7 @@ end
|
|
|
86
89
|
function RoomHistory.prototype.getLatestRoomDescription(self)
|
|
87
90
|
return getLastElement(nil, v.run.roomHistory)
|
|
88
91
|
end
|
|
89
|
-
function RoomHistory.prototype.
|
|
92
|
+
function RoomHistory.prototype.inFirstRoom(self)
|
|
90
93
|
return #v.run.roomHistory == 1
|
|
91
94
|
end
|
|
92
95
|
function RoomHistory.prototype.isLeavingRoom(self)
|
|
@@ -103,10 +106,11 @@ function RoomHistory.prototype.isLeavingRoom(self)
|
|
|
103
106
|
end
|
|
104
107
|
return startSeedString ~= latestRoomDescription.startSeedString or stage ~= latestRoomDescription.stage or stageType ~= latestRoomDescription.stageType or roomListIndex ~= latestRoomDescription.roomListIndex or roomVisitedCount ~= latestRoomDescription.roomVisitedCount
|
|
105
108
|
end
|
|
109
|
+
__TS__Decorate({Exported}, RoomHistory.prototype, "deleteLastRoomDescription", true)
|
|
106
110
|
__TS__Decorate({Exported}, RoomHistory.prototype, "getNumRoomsEntered", true)
|
|
107
111
|
__TS__Decorate({Exported}, RoomHistory.prototype, "getRoomHistory", true)
|
|
108
112
|
__TS__Decorate({Exported}, RoomHistory.prototype, "getPreviousRoomDescription", true)
|
|
109
113
|
__TS__Decorate({Exported}, RoomHistory.prototype, "getLatestRoomDescription", true)
|
|
110
|
-
__TS__Decorate({Exported}, RoomHistory.prototype, "
|
|
114
|
+
__TS__Decorate({Exported}, RoomHistory.prototype, "inFirstRoom", true)
|
|
111
115
|
__TS__Decorate({Exported}, RoomHistory.prototype, "isLeavingRoom", true)
|
|
112
116
|
return ____exports
|
package/package.json
CHANGED
|
@@ -69,6 +69,16 @@ export class RoomHistory extends Feature {
|
|
|
69
69
|
v.run.roomHistory.push(roomDescription);
|
|
70
70
|
};
|
|
71
71
|
|
|
72
|
+
/**
|
|
73
|
+
* Helper function to manually delete the last room description from the internal array. This is
|
|
74
|
+
* useful if a mod needs to send the player to a room temporarily and the room should not count as
|
|
75
|
+
* the player having traveled to that room.
|
|
76
|
+
*/
|
|
77
|
+
@Exported
|
|
78
|
+
public deleteLastRoomDescription(): void {
|
|
79
|
+
v.run.roomHistory.pop();
|
|
80
|
+
}
|
|
81
|
+
|
|
72
82
|
/**
|
|
73
83
|
* Helper function to get the total number of rooms that the player has entered thus far on the
|
|
74
84
|
* run. (Re-entering the same room will increment the number returned.)
|
|
@@ -135,7 +145,7 @@ export class RoomHistory extends Feature {
|
|
|
135
145
|
|
|
136
146
|
/** Helper function to detect if the player is on the first room of the room. */
|
|
137
147
|
@Exported
|
|
138
|
-
public
|
|
148
|
+
public inFirstRoom(): boolean {
|
|
139
149
|
return v.run.roomHistory.length === 1;
|
|
140
150
|
}
|
|
141
151
|
|