isaacscript-common 26.5.1 → 26.6.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 +6 -0
- package/dist/isaacscript-common.lua +5 -1
- package/dist/src/classes/features/other/RoomHistory.d.ts +6 -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 +2 -2
- package/src/classes/features/other/RoomHistory.ts +10 -0
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.)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 26.
|
|
3
|
+
isaacscript-common 26.6.1
|
|
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
|
|
@@ -32462,6 +32465,7 @@ 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)
|
|
@@ -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.)
|
|
@@ -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
|
|
@@ -103,6 +106,7 @@ 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)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript-common",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.6.1",
|
|
4
4
|
"description": "Helper functions and features for IsaacScript mods.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"isaac",
|
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
"main": "dist/src/index",
|
|
23
23
|
"types": "dist/index.rollup.d.ts",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"isaac-typescript-definitions": "^12.0.
|
|
25
|
+
"isaac-typescript-definitions": "^12.0.2"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -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.)
|