forked from Garethp/ScreepsAutocomplete
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSource.js
53 lines (46 loc) · 784 Bytes
/
Source.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
* An energy source object. Can be harvested by creeps with a WORK body part.
*
* @class
* @constructor
*/
Source = function () {
};
Source.prototype = {
/**
* A unique object identificator.
*
* @type string
*/
id: "",
/**
* The link to the Room object of this structure.
*
* @type Room
*/
room: null,
/**
* An object representing the position of this structure in the room.
*
* @type RoomPosition
*/
pos: null,
/**
* The remaining amount of energy.
*
* @type number
*/
energy: 0,
/**
* The total amount of energy in the source. Equals to 3000 in most cases.
*
* @type number
*/
energyCapacity: 0,
/**
* The remaining time after which the source will be refilled.
*
* @type number
*/
ticksToRegeneration: 0
};