@shipload/sdk 0.7.0 → 2.0.0-rc1
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.
- package/lib/shipload.d.ts +1651 -226
- package/lib/shipload.js +4960 -1972
- package/lib/shipload.js.map +1 -1
- package/lib/shipload.m.js +4789 -1941
- package/lib/shipload.m.js.map +1 -1
- package/package.json +5 -4
- package/src/contracts/platform.ts +30 -30
- package/src/contracts/server.ts +635 -253
- package/src/data/goods.json +23 -0
- package/src/data/syllables.json +1184 -0
- package/src/entities/cargo-utils.ts +47 -0
- package/src/entities/entity-inventory.ts +39 -0
- package/src/entities/gamestate.ts +152 -0
- package/src/entities/location.ts +241 -0
- package/src/entities/player.ts +287 -0
- package/src/entities/ship.ts +559 -0
- package/src/entities/warehouse.ts +205 -0
- package/src/errors.ts +46 -9
- package/src/index-module.ts +119 -7
- package/src/managers/actions.ts +168 -0
- package/src/managers/base.ts +25 -0
- package/src/managers/context.ts +104 -0
- package/src/managers/entities.ts +86 -0
- package/src/managers/epochs.ts +47 -0
- package/src/managers/index.ts +9 -0
- package/src/managers/locations.ts +103 -0
- package/src/managers/players.ts +13 -0
- package/src/managers/trades.ts +119 -0
- package/src/market/goods.ts +31 -0
- package/src/{market.ts → market/market.ts} +32 -37
- package/src/{rolls.ts → market/rolls.ts} +3 -3
- package/src/{epoch.ts → scheduling/epoch.ts} +1 -1
- package/src/scheduling/projection.ts +218 -0
- package/src/scheduling/schedule.ts +155 -0
- package/src/shipload.ts +39 -157
- package/src/trading/collect.ts +939 -0
- package/src/trading/deal.ts +208 -0
- package/src/trading/trade.ts +203 -0
- package/src/travel/travel.ts +425 -0
- package/src/types.ts +60 -25
- package/src/utils/system.ts +27 -0
- package/src/goods.ts +0 -124
- package/src/ship.ts +0 -36
- package/src/state.ts +0 -0
- package/src/syllables.ts +0 -1184
- package/src/system.ts +0 -36
- package/src/travel.ts +0 -259
- /package/src/{hash.ts → utils/hash.ts} +0 -0
|
@@ -19,98 +19,98 @@ export namespace Types {
|
|
|
19
19
|
@Struct.type('cleartable')
|
|
20
20
|
export class cleartable extends Struct {
|
|
21
21
|
@Struct.field(Name)
|
|
22
|
-
table_name
|
|
22
|
+
declare table_name: Name
|
|
23
23
|
@Struct.field(Name, {optional: true})
|
|
24
|
-
scope?: Name
|
|
24
|
+
declare scope?: Name
|
|
25
25
|
@Struct.field(UInt64, {optional: true})
|
|
26
|
-
max_rows?: UInt64
|
|
26
|
+
declare max_rows?: UInt64
|
|
27
27
|
}
|
|
28
28
|
@Struct.type('company_row')
|
|
29
29
|
export class company_row extends Struct {
|
|
30
30
|
@Struct.field(Name)
|
|
31
|
-
account
|
|
31
|
+
declare account: Name
|
|
32
32
|
@Struct.field('string')
|
|
33
|
-
name
|
|
33
|
+
declare name: string
|
|
34
34
|
}
|
|
35
35
|
@Struct.type('enable')
|
|
36
36
|
export class enable extends Struct {
|
|
37
37
|
@Struct.field('bool')
|
|
38
|
-
enabled
|
|
38
|
+
declare enabled: boolean
|
|
39
39
|
}
|
|
40
40
|
@Struct.type('enablegame')
|
|
41
41
|
export class enablegame extends Struct {
|
|
42
42
|
@Struct.field(Name)
|
|
43
|
-
contract
|
|
43
|
+
declare contract: Name
|
|
44
44
|
@Struct.field('bool')
|
|
45
|
-
enabled
|
|
45
|
+
declare enabled: boolean
|
|
46
46
|
}
|
|
47
47
|
@Struct.type('foundcompany')
|
|
48
48
|
export class foundcompany extends Struct {
|
|
49
49
|
@Struct.field(Name)
|
|
50
|
-
account
|
|
50
|
+
declare account: Name
|
|
51
51
|
@Struct.field('string')
|
|
52
|
-
name
|
|
52
|
+
declare name: string
|
|
53
53
|
}
|
|
54
54
|
@Struct.type('game_config')
|
|
55
55
|
export class game_config extends Struct {
|
|
56
56
|
@Struct.field(Checksum256)
|
|
57
|
-
seed
|
|
57
|
+
declare seed: Checksum256
|
|
58
58
|
@Struct.field(UInt32)
|
|
59
|
-
epochtime
|
|
59
|
+
declare epochtime: UInt32
|
|
60
60
|
@Struct.field(TimePointSec)
|
|
61
|
-
start
|
|
61
|
+
declare start: TimePointSec
|
|
62
62
|
@Struct.field(TimePointSec)
|
|
63
|
-
end
|
|
63
|
+
declare end: TimePointSec
|
|
64
64
|
}
|
|
65
65
|
@Struct.type('game_meta')
|
|
66
66
|
export class game_meta extends Struct {
|
|
67
67
|
@Struct.field('string')
|
|
68
|
-
name
|
|
68
|
+
declare name: string
|
|
69
69
|
@Struct.field('string')
|
|
70
|
-
description
|
|
70
|
+
declare description: string
|
|
71
71
|
@Struct.field('string')
|
|
72
|
-
url
|
|
72
|
+
declare url: string
|
|
73
73
|
@Struct.field('string')
|
|
74
|
-
version
|
|
74
|
+
declare version: string
|
|
75
75
|
}
|
|
76
76
|
@Struct.type('game_state')
|
|
77
77
|
export class game_state extends Struct {
|
|
78
78
|
@Struct.field('bool')
|
|
79
|
-
enabled
|
|
79
|
+
declare enabled: boolean
|
|
80
80
|
}
|
|
81
81
|
@Struct.type('game_row')
|
|
82
82
|
export class game_row extends Struct {
|
|
83
83
|
@Struct.field(Name)
|
|
84
|
-
contract
|
|
84
|
+
declare contract: Name
|
|
85
85
|
@Struct.field(game_config)
|
|
86
|
-
config
|
|
86
|
+
declare config: game_config
|
|
87
87
|
@Struct.field(game_meta)
|
|
88
|
-
meta
|
|
88
|
+
declare meta: game_meta
|
|
89
89
|
@Struct.field(game_state)
|
|
90
|
-
state
|
|
90
|
+
declare state: game_state
|
|
91
91
|
}
|
|
92
92
|
@Struct.type('startgame')
|
|
93
93
|
export class startgame extends Struct {
|
|
94
94
|
@Struct.field(Name)
|
|
95
|
-
contract
|
|
95
|
+
declare contract: Name
|
|
96
96
|
@Struct.field(game_config)
|
|
97
|
-
config
|
|
97
|
+
declare config: game_config
|
|
98
98
|
@Struct.field(game_meta)
|
|
99
|
-
meta
|
|
99
|
+
declare meta: game_meta
|
|
100
100
|
@Struct.field(game_state)
|
|
101
|
-
state
|
|
101
|
+
declare state: game_state
|
|
102
102
|
}
|
|
103
103
|
@Struct.type('state_row')
|
|
104
104
|
export class state_row extends Struct {
|
|
105
105
|
@Struct.field('bool')
|
|
106
|
-
enabled
|
|
106
|
+
declare enabled: boolean
|
|
107
107
|
}
|
|
108
108
|
@Struct.type('updategame')
|
|
109
109
|
export class updategame extends Struct {
|
|
110
110
|
@Struct.field(Name)
|
|
111
|
-
contract
|
|
111
|
+
declare contract: Name
|
|
112
112
|
@Struct.field(game_meta)
|
|
113
|
-
meta
|
|
113
|
+
declare meta: game_meta
|
|
114
114
|
}
|
|
115
115
|
@Struct.type('wipe')
|
|
116
116
|
export class wipe extends Struct {}
|