-
Notifications
You must be signed in to change notification settings - Fork 104
/
Order.js
66 lines (57 loc) · 1.35 KB
/
Order.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
54
55
56
57
58
59
60
61
62
63
64
65
66
Order = {
/**
* The unique order ID.
*
* @type {string}
*/
id: "",
/**
* The order creation time in game ticks.
*
* @type {number}
*/
created: 0,
/**
* Whether this order is active and visible to other players. An order can become non-active when the terminal doesn't have enough resources to sell or you are out of credits to buy.Whether this order is active and visible to other players. An order can become non-active when the terminal doesn't have enough resources to sell or you are out of credits to buy.
*
* @type {boolean}
*/
active: true,
/**
* Either ORDER_SELL or ORDER_BUY
*
* @type {ORDER_SELL|ORDER_BUY}
*/
type: 'sell',
/**
* Either one of the RESOURCE_* constants or SUBSCRIPTION_TOKEN
*
* @type {string|SUBSCRIPTION_TOKEN}
*/
resourceType: "",
/**
* The room where this order is placed.
* @type {string}
*/
roomName: "",
/**
* Currently available amount to trade.
* @type {number}
*/
amount: 0,
/**
* How many resources are left to trade via this order.
* @type {number}
*/
remainingAmount: 0,
/**
* Initial order amount.
* @type {number}
*/
totalAmount: 0,
/**
* Price
* @type {number}
*/
price: 0
};