You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -443,6 +324,8 @@ declare var LOOK_FLAGS: string;
443
324
declarevarLOOK_CONSTRUCTION_SITES: string;
444
325
declarevarLOOK_NUKES: string;
445
326
declarevarLOOK_TERRAIN: string;
327
+
declarevarORDER_SELL: string;
328
+
declarevarORDER_BUY: string;
446
329
/**
447
330
* A site of a structure which is currently under construction.
448
331
*/
@@ -817,7 +700,7 @@ interface Game {
817
700
* @param id The unique identificator.
818
701
* @returns an object instance or null if it cannot be found.
819
702
*/
820
-
getObjectById<T>(id: string): T;
703
+
getObjectById<T>(id: string): T|null;
821
704
/**
822
705
* Send a custom message at your profile email. This way, you can set up notifications to yourself on any occasion within the game. You can schedule up to 20 notifications during one game tick. Not available in the Simulation Room.
823
706
* @param message Custom text which will be sent in the message. Maximum length is 1000 characters.
@@ -1131,6 +1074,23 @@ interface Mineral extends RoomObject {
1131
1074
*/
1132
1075
ticksToRegeneration: number;
1133
1076
}
1077
+
/**
1078
+
* A nuke landing position. This object cannot be removed or modified. You can find incoming nukes in the room using the FIND_NUKES constant.
1079
+
*/
1080
+
declareclassNukeextendsRoomObject{
1081
+
/**
1082
+
* A unique object identificator. You can use Game.getObjectById method to retrieve an object instance by its id.
1083
+
*/
1084
+
id: string;
1085
+
/**
1086
+
* The name of the room where this nuke has been launched from.
1087
+
*/
1088
+
launchRoomName: string;
1089
+
/**
1090
+
* The remaining landing time.
1091
+
*/
1092
+
timeToLand: number;
1093
+
}
1134
1094
/**
1135
1095
* Contains powerful methods for pathfinding in the game world. Support exists for custom navigation costs and paths which span multiple rooms.
1136
1096
* 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.
@@ -1478,7 +1438,7 @@ declare class Room {
1478
1438
/**
1479
1439
* The Controller structure of this room, if present, otherwise undefined.
1480
1440
*/
1481
-
controller: Controller;
1441
+
controller: Controller|undefined;
1482
1442
/**
1483
1443
* Total amount of energy available in all spawns and extensions in the room.
1484
1444
*/
@@ -1503,15 +1463,15 @@ declare class Room {
1503
1463
/**
1504
1464
* The Storage structure of this room, if present, otherwise undefined.
1505
1465
*/
1506
-
storage: StructureStorage;
1466
+
storage: StructureStorage|undefined;
1507
1467
/**
1508
1468
* An object with survival game info if available
1509
1469
*/
1510
-
survivalInfo: SurvivalGameInfo;
1470
+
survivalInfo: SurvivalGameInfo|undefined;
1511
1471
/**
1512
1472
* The Terminal structure of this room, if present, otherwise undefined.
1513
1473
*/
1514
-
terminal: Terminal;
1474
+
terminal: Terminal|undefined;
1515
1475
/**
1516
1476
* Create new ConstructionSite at the specified location.
1517
1477
* @param x The X position.
@@ -1555,7 +1515,7 @@ declare class Room {
1555
1515
* @returns An array with the objects found.
1556
1516
*/
1557
1517
find<T>(type: number,opts?: {
1558
-
filter: any|string;
1518
+
filter: Object|Function|string;
1559
1519
}): T[];
1560
1520
/**
1561
1521
* Find the exit direction en route to another room.
@@ -1578,7 +1538,7 @@ declare class Room {
1578
1538
* @param y The Y position.
1579
1539
* @returns A RoomPosition object or null if it cannot be obtained.
0 commit comments