forked from Garethp/ScreepsAutocomplete
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Resource.js
42 lines (39 loc) · 928 Bytes
/
Resource.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
/**
* A dropped piece of resource.
* It will decay after a while if not picked up.
* Dropped resource pile decays for ceil(amount/1000) units per tick.
*
* @class
* @extends {RoomObject}
*
* @see {@link https://docs.screeps.com/api/#Resource}
*/
Resource = function() { };
Resource.prototype =
{
/**
* The amount of resource units containing.
*
* @see {@link https://docs.screeps.com/api/#Resource.amount}
*
* @type {number}
*/
amount: 0,
/**
* A unique object identificator.
* You can use Game.getObjectById method to retrieve an object instance by its id.
*
* @see {@link https://docs.screeps.com/api/#Resource.id}
*
* @type {string}
*/
id: "",
/**
* One of the RESOURCE_* constants.
*
* @see {@link https://docs.screeps.com/api/#Resource.resourceType}
*
* @type {string}
*/
resourceType: ""
};