node-ts-screeps-api 0.0.11 → 0.0.13

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.
@@ -78,4 +78,11 @@ export declare class RawApi<T extends AuthType> {
78
78
  type: string;
79
79
  }];
80
80
  }>;
81
+ getWorldSize(args: {
82
+ shard: string;
83
+ }): Promise<{
84
+ ok: number;
85
+ width: number;
86
+ height: number;
87
+ }>;
81
88
  }
@@ -75,7 +75,33 @@ export interface Controller extends BasicRoomObject {
75
75
  export interface Portal extends BasicRoomObject {
76
76
  type: "portal";
77
77
  destination: {
78
+ /**
79
+ * 表示目的地room。
80
+ *
81
+ * @type {string}
82
+ */
78
83
  room: string;
79
- shard: string;
84
+ /**
85
+ * 表示目的地shard,如果没有则目的地为同shard位置。
86
+ *
87
+ * @type {string}
88
+ */
89
+ shard?: string;
80
90
  };
91
+ /**
92
+ * portal的过期时间。
93
+ *
94
+ * 当到达该时间时,该属性消失,portal会增加一个decayTime属性,表示过期的Game.time。
95
+ *
96
+ * @type {number}
97
+ * @memberof Portal
98
+ */
99
+ unstableDate?: number;
100
+ /**
101
+ * portal过期的Game.time。
102
+ *
103
+ * @type {number}
104
+ * @memberof Portal
105
+ */
106
+ decayTime?: number;
81
107
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-ts-screeps-api",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "node-ts-screeps-api",
5
5
  "main": "dist/index.js",
6
6
  "typings": "./dist/src/index.d.ts",
@@ -81,7 +81,33 @@ export interface Controller extends BasicRoomObject {
81
81
  export interface Portal extends BasicRoomObject {
82
82
  type: "portal";
83
83
  destination: {
84
+ /**
85
+ * 表示目的地room。
86
+ *
87
+ * @type {string}
88
+ */
84
89
  room: string;
85
- shard: string;
90
+ /**
91
+ * 表示目的地shard,如果没有则目的地为同shard位置。
92
+ *
93
+ * @type {string}
94
+ */
95
+ shard?: string;
86
96
  };
97
+ /**
98
+ * portal的过期时间。
99
+ *
100
+ * 当到达该时间时,该属性消失,portal会增加一个decayTime属性,表示过期的Game.time。
101
+ *
102
+ * @type {number}
103
+ * @memberof Portal
104
+ */
105
+ unstableDate?: number;
106
+ /**
107
+ * portal过期的Game.time。
108
+ *
109
+ * @type {number}
110
+ * @memberof Portal
111
+ */
112
+ decayTime?: number;
87
113
  }