Skip to content

Commit ad79166

Browse files
authored
Merge pull request #66 from seancl/nuke-class
Add Nuke class
2 parents a384602 + ea9897b commit ad79166

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

dist/screeps.d.ts

+17
Original file line numberDiff line numberDiff line change
@@ -1246,6 +1246,23 @@ interface Mineral extends RoomObject {
12461246
*/
12471247
ticksToRegeneration: number;
12481248
}
1249+
/**
1250+
* A nuke landing position. This object cannot be removed or modified. You can find incoming nukes in the room using the FIND_NUKES constant.
1251+
*/
1252+
declare class Nuke extends RoomObject {
1253+
/**
1254+
* A unique object identificator. You can use Game.getObjectById method to retrieve an object instance by its id.
1255+
*/
1256+
id: string;
1257+
/**
1258+
* The name of the room where this nuke has been launched from.
1259+
*/
1260+
launchRoomName: string;
1261+
/**
1262+
* The remaining landing time.
1263+
*/
1264+
timeToLand: number;
1265+
}
12491266
/**
12501267
* Contains powerful methods for pathfinding in the game world. Support exists for custom navigation costs and paths which span multiple rooms.
12511268
* Additionally PathFinder can search for paths through rooms you can't see, although you won't be able to detect any dynamic obstacles like creeps or buildings.

src/nuke.ts

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* A nuke landing position. This object cannot be removed or modified. You can find incoming nukes in the room using the FIND_NUKES constant.
3+
*/
4+
declare class Nuke extends RoomObject {
5+
/**
6+
* A unique object identificator. You can use Game.getObjectById method to retrieve an object instance by its id.
7+
*/
8+
id: string;
9+
/**
10+
* The name of the room where this nuke has been launched from.
11+
*/
12+
launchRoomName: string;
13+
/**
14+
* The remaining landing time.
15+
*/
16+
timeToLand: number;
17+
}

0 commit comments

Comments
 (0)