-
Notifications
You must be signed in to change notification settings - Fork 106
/
Copy pathOrder.js
73 lines (63 loc) · 1.54 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
67
68
69
70
71
72
73
Order = {
/**
* The unique order ID.
*
* @type {string}
*/
id: "",
/**
* The order creation time in game ticks.
*
* @type {number}
*/
created: 0,
/**
* The order creation time in milliseconds since UNIX epoch time.
*
* @type {number}
*/
createdTimestamp: 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|undefined}
*/
active: true,
/**
* Either ORDER_SELL or ORDER_BUY.
*
* @type {string|ORDER_SELL|ORDER_BUY}
*/
type: 'sell',
/**
* Either one of the RESOURCE_* constants or one of account-bound resources.
*
* @type {string}
*/
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|undefined}
*/
totalAmount: 0,
/**
* The current price per unit.
* @type {number}
*/
price: 0
};