@shipload/sdk 1.0.0-next.5 → 1.0.0-next.51
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/scan.d.ts +52 -0
- package/lib/scan.js +162 -0
- package/lib/scan.js.map +1 -0
- package/lib/scan.m.js +152 -0
- package/lib/scan.m.js.map +1 -0
- package/lib/shipload.d.ts +3167 -1353
- package/lib/shipload.js +13319 -5640
- package/lib/shipload.js.map +1 -1
- package/lib/shipload.m.js +13091 -5589
- package/lib/shipload.m.js.map +1 -1
- package/lib/testing.d.ts +1037 -0
- package/lib/testing.js +4363 -0
- package/lib/testing.js.map +1 -0
- package/lib/testing.m.js +4357 -0
- package/lib/testing.m.js.map +1 -0
- package/package.json +20 -2
- package/src/capabilities/craftable.ts +51 -0
- package/src/capabilities/crafting.test.ts +7 -0
- package/src/capabilities/crafting.ts +6 -7
- package/src/capabilities/gathering.test.ts +29 -0
- package/src/capabilities/gathering.ts +37 -19
- package/src/capabilities/index.ts +0 -1
- package/src/capabilities/modules.ts +22 -0
- package/src/capabilities/storage.ts +16 -1
- package/src/contracts/platform.ts +231 -3
- package/src/contracts/server.ts +1178 -511
- package/src/coordinates/address.ts +88 -0
- package/src/coordinates/constants.test.ts +15 -0
- package/src/coordinates/constants.ts +23 -0
- package/src/coordinates/index.ts +15 -0
- package/src/coordinates/memo.test.ts +47 -0
- package/src/coordinates/memo.ts +20 -0
- package/src/coordinates/permutation.ts +77 -0
- package/src/coordinates/regions.ts +48 -0
- package/src/coordinates/sectors.ts +115 -0
- package/src/data/capabilities.ts +31 -16
- package/src/data/capability-formulas.ts +21 -14
- package/src/data/catalog.ts +0 -5
- package/src/data/colors.ts +13 -47
- package/src/data/entities.json +154 -10
- package/src/data/item-ids.ts +31 -12
- package/src/data/items.json +192 -74
- package/src/data/kind-registry.json +131 -0
- package/src/data/kind-registry.ts +172 -0
- package/src/data/metadata.ts +166 -48
- package/src/data/recipes-runtime.ts +5 -23
- package/src/data/recipes.json +1003 -163
- package/src/derivation/build-methods.test.ts +13 -0
- package/src/derivation/build-methods.ts +48 -0
- package/src/derivation/capabilities.test.ts +151 -0
- package/src/derivation/capabilities.ts +527 -0
- package/src/derivation/capability-mappings.ts +58 -16
- package/src/derivation/crafting.ts +36 -33
- package/src/derivation/index.ts +28 -2
- package/src/derivation/recipe-usage.test.ts +81 -0
- package/src/derivation/recipe-usage.ts +141 -0
- package/src/derivation/reserve-regen.ts +34 -0
- package/src/derivation/resources.ts +98 -19
- package/src/derivation/rollups.test.ts +55 -0
- package/src/derivation/rollups.ts +56 -0
- package/src/derivation/stars.test.ts +67 -0
- package/src/derivation/stars.ts +25 -0
- package/src/derivation/stats.ts +6 -6
- package/src/derivation/stratum.ts +26 -22
- package/src/derivation/tiers.ts +40 -7
- package/src/derivation/upgrades.ts +14 -0
- package/src/derivation/wormhole.ts +141 -0
- package/src/entities/entity.ts +98 -0
- package/src/entities/gamestate.ts +3 -28
- package/src/entities/makers.ts +131 -134
- package/src/entities/slot-multiplier.ts +43 -0
- package/src/errors.ts +12 -16
- package/src/format.ts +26 -4
- package/src/index-module.ts +294 -34
- package/src/managers/actions.ts +616 -105
- package/src/managers/base.ts +6 -2
- package/src/managers/cluster.test.ts +39 -0
- package/src/managers/cluster.ts +53 -0
- package/src/managers/construction-types.ts +80 -0
- package/src/managers/construction.ts +412 -0
- package/src/managers/context.ts +29 -1
- package/src/managers/coordinates.ts +14 -0
- package/src/managers/entities.ts +27 -66
- package/src/managers/epochs.ts +40 -0
- package/src/managers/flatten-gather-plan.test.ts +80 -0
- package/src/managers/index.ts +20 -1
- package/src/managers/locations.ts +25 -29
- package/src/managers/nft.test.ts +14 -0
- package/src/managers/nft.ts +70 -0
- package/src/managers/players.ts +25 -0
- package/src/managers/plot.ts +122 -0
- package/src/nft/atomicassets.abi.json +1342 -0
- package/src/nft/atomicassets.ts +237 -0
- package/src/nft/atomicdata.ts +130 -0
- package/src/nft/buildImmutableData.ts +336 -0
- package/src/nft/description.ts +104 -36
- package/src/nft/index.ts +3 -0
- package/src/planner/index.ts +242 -0
- package/src/planner/planner.test.ts +325 -0
- package/src/resolution/describe-module.ts +43 -25
- package/src/resolution/display-name.ts +38 -10
- package/src/resolution/resolve-item.test.ts +48 -0
- package/src/resolution/resolve-item.ts +74 -47
- package/src/scan/index.ts +244 -0
- package/src/scan/scan-wasm.base64.ts +2 -0
- package/src/scheduling/accessor.ts +65 -23
- package/src/scheduling/availability.ts +108 -0
- package/src/scheduling/cancel.test.ts +348 -0
- package/src/scheduling/cancel.ts +209 -0
- package/src/scheduling/energy.ts +47 -0
- package/src/scheduling/idle-resolve.ts +45 -0
- package/src/scheduling/lane-core.ts +128 -0
- package/src/scheduling/lanes.test.ts +249 -0
- package/src/scheduling/lanes.ts +198 -0
- package/src/scheduling/projection.ts +210 -107
- package/src/scheduling/schedule.ts +240 -117
- package/src/scheduling/task-cargo.ts +46 -0
- package/src/scheduling/unwrap.test.ts +86 -0
- package/src/scheduling/unwrap.ts +190 -0
- package/src/shipload.ts +26 -1
- package/src/subscriptions/manager.cluster.test.ts +51 -0
- package/src/subscriptions/manager.ts +245 -172
- package/src/subscriptions/mappers.ts +5 -8
- package/src/subscriptions/types.ts +28 -3
- package/src/testing/catalog-hash.ts +19 -0
- package/src/testing/index.ts +2 -0
- package/src/testing/projection-parity.ts +167 -0
- package/src/travel/reach.ts +23 -0
- package/src/travel/route-planner.ts +277 -0
- package/src/travel/route-simulator.ts +174 -0
- package/src/travel/travel.ts +175 -118
- package/src/types/capabilities.ts +29 -6
- package/src/types/entity.ts +3 -3
- package/src/types/index.ts +0 -1
- package/src/types.ts +39 -14
- package/src/utils/cargo.test.ts +14 -0
- package/src/utils/cargo.ts +29 -0
- package/src/utils/display-name.ts +70 -0
- package/src/utils/system.ts +36 -24
- package/src/capabilities/loading.ts +0 -8
- package/src/entities/container.ts +0 -123
- package/src/entities/ship-deploy.ts +0 -295
- package/src/entities/ship.ts +0 -221
- package/src/entities/warehouse.ts +0 -127
- package/src/types/entity-traits.ts +0 -69
package/src/data/colors.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type {ResourceCategory} from '../types'
|
|
|
3
3
|
export const categoryColors: Record<ResourceCategory, string> = {
|
|
4
4
|
ore: '#C26D3F',
|
|
5
5
|
crystal: '#4ADBFF',
|
|
6
|
-
gas: '#
|
|
6
|
+
gas: '#B877FF',
|
|
7
7
|
regolith: '#C4A57B',
|
|
8
8
|
biomass: '#5A8B3E',
|
|
9
9
|
}
|
|
@@ -21,54 +21,20 @@ export const tierColors: Record<number, string> = {
|
|
|
21
21
|
10: '#ffffff',
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
// Rarity-tier names (badge labels). Kept disjoint from TIER_ADJECTIVES in
|
|
25
|
-
// types.ts (resource descriptors like "Pristine Ore") so the two vocabularies
|
|
26
|
-
// never collide at any tier.
|
|
27
|
-
export const tierLabels: Record<number, string> = {
|
|
28
|
-
1: 'Common',
|
|
29
|
-
2: 'Uncommon',
|
|
30
|
-
3: 'Rare',
|
|
31
|
-
4: 'Epic',
|
|
32
|
-
5: 'Legendary',
|
|
33
|
-
6: 'Mythic',
|
|
34
|
-
7: 'Divine',
|
|
35
|
-
8: 'Celestial',
|
|
36
|
-
9: 'Eternal',
|
|
37
|
-
10: 'Transcendent',
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export const categoryIcons: Record<ResourceCategory, string> = {
|
|
41
|
-
ore: '⬡',
|
|
42
|
-
crystal: '◈',
|
|
43
|
-
gas: '◎',
|
|
44
|
-
regolith: '■',
|
|
45
|
-
biomass: '❋',
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export type CategoryIconShape = 'hex' | 'diamond' | 'star' | 'circle' | 'square'
|
|
49
|
-
|
|
50
|
-
export const categoryIconShapes: Record<ResourceCategory, CategoryIconShape> = {
|
|
51
|
-
ore: 'hex',
|
|
52
|
-
crystal: 'diamond',
|
|
53
|
-
gas: 'circle',
|
|
54
|
-
regolith: 'square',
|
|
55
|
-
biomass: 'star',
|
|
56
|
-
}
|
|
57
|
-
|
|
58
24
|
export const componentIcon = '▣'
|
|
59
25
|
export const moduleIcon = '⬢'
|
|
60
26
|
|
|
61
27
|
export const itemAbbreviations: Record<number, string> = {
|
|
62
|
-
10001: '
|
|
63
|
-
10002: '
|
|
64
|
-
10003: '
|
|
65
|
-
10004: '
|
|
66
|
-
10005: '
|
|
67
|
-
10006: '
|
|
68
|
-
10007: '
|
|
69
|
-
10008: '
|
|
70
|
-
10009: '
|
|
71
|
-
10010: '
|
|
28
|
+
10001: 'PL',
|
|
29
|
+
10002: 'FR',
|
|
30
|
+
10003: 'PC',
|
|
31
|
+
10004: 'RS',
|
|
32
|
+
10005: 'BM',
|
|
33
|
+
10006: 'SN',
|
|
34
|
+
10007: 'PM',
|
|
35
|
+
10008: 'CR',
|
|
36
|
+
10009: 'RX',
|
|
37
|
+
10010: 'RE',
|
|
72
38
|
10100: 'EN',
|
|
73
39
|
10101: 'GN',
|
|
74
40
|
10102: 'EX',
|
|
@@ -80,7 +46,7 @@ export const itemAbbreviations: Record<number, string> = {
|
|
|
80
46
|
10200: 'CT',
|
|
81
47
|
10201: 'SH',
|
|
82
48
|
10202: 'WH',
|
|
83
|
-
20001: '
|
|
84
|
-
20002: '
|
|
49
|
+
20001: 'PL',
|
|
50
|
+
20002: 'FR',
|
|
85
51
|
20200: 'CT',
|
|
86
52
|
}
|
package/src/data/entities.json
CHANGED
|
@@ -7,19 +7,29 @@
|
|
|
7
7
|
"entityItemId": 10201,
|
|
8
8
|
"slots": [
|
|
9
9
|
{
|
|
10
|
-
"type": "any"
|
|
10
|
+
"type": "any",
|
|
11
|
+
"outputPct": 80,
|
|
12
|
+
"maxTier": 1
|
|
11
13
|
},
|
|
12
14
|
{
|
|
13
|
-
"type": "any"
|
|
15
|
+
"type": "any",
|
|
16
|
+
"outputPct": 80,
|
|
17
|
+
"maxTier": 1
|
|
14
18
|
},
|
|
15
19
|
{
|
|
16
|
-
"type": "any"
|
|
20
|
+
"type": "any",
|
|
21
|
+
"outputPct": 80,
|
|
22
|
+
"maxTier": 1
|
|
17
23
|
},
|
|
18
24
|
{
|
|
19
|
-
"type": "any"
|
|
25
|
+
"type": "any",
|
|
26
|
+
"outputPct": 80,
|
|
27
|
+
"maxTier": 1
|
|
20
28
|
},
|
|
21
29
|
{
|
|
22
|
-
"type": "any"
|
|
30
|
+
"type": "any",
|
|
31
|
+
"outputPct": 80,
|
|
32
|
+
"maxTier": 1
|
|
23
33
|
}
|
|
24
34
|
]
|
|
25
35
|
},
|
|
@@ -27,24 +37,158 @@
|
|
|
27
37
|
"entityItemId": 10202,
|
|
28
38
|
"slots": [
|
|
29
39
|
{
|
|
30
|
-
"type": "loader"
|
|
40
|
+
"type": "loader",
|
|
41
|
+
"outputPct": 100,
|
|
42
|
+
"maxTier": 1
|
|
31
43
|
},
|
|
32
44
|
{
|
|
33
|
-
"type": "storage"
|
|
45
|
+
"type": "storage",
|
|
46
|
+
"outputPct": 100,
|
|
47
|
+
"maxTier": 1
|
|
34
48
|
},
|
|
35
49
|
{
|
|
36
|
-
"type": "storage"
|
|
50
|
+
"type": "storage",
|
|
51
|
+
"outputPct": 100,
|
|
52
|
+
"maxTier": 1
|
|
37
53
|
},
|
|
38
54
|
{
|
|
39
|
-
"type": "storage"
|
|
55
|
+
"type": "storage",
|
|
56
|
+
"outputPct": 100,
|
|
57
|
+
"maxTier": 1
|
|
40
58
|
},
|
|
41
59
|
{
|
|
42
|
-
"type": "storage"
|
|
60
|
+
"type": "storage",
|
|
61
|
+
"outputPct": 100,
|
|
62
|
+
"maxTier": 1
|
|
43
63
|
}
|
|
44
64
|
]
|
|
45
65
|
},
|
|
66
|
+
{
|
|
67
|
+
"entityItemId": 10203,
|
|
68
|
+
"slots": [
|
|
69
|
+
{
|
|
70
|
+
"type": "generator",
|
|
71
|
+
"outputPct": 200,
|
|
72
|
+
"maxTier": 1
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"type": "gatherer",
|
|
76
|
+
"outputPct": 200,
|
|
77
|
+
"maxTier": 1
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"entityItemId": 10204,
|
|
83
|
+
"slots": [
|
|
84
|
+
{
|
|
85
|
+
"type": "generator",
|
|
86
|
+
"outputPct": 200,
|
|
87
|
+
"maxTier": 1
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"type": "crafter",
|
|
91
|
+
"outputPct": 200,
|
|
92
|
+
"maxTier": 1
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"entityItemId": 10205,
|
|
98
|
+
"slots": [
|
|
99
|
+
{
|
|
100
|
+
"type": "generator",
|
|
101
|
+
"outputPct": 200,
|
|
102
|
+
"maxTier": 1
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"type": "launcher",
|
|
106
|
+
"outputPct": 200,
|
|
107
|
+
"maxTier": 1
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"entityItemId": 10206,
|
|
113
|
+
"slots": [
|
|
114
|
+
{
|
|
115
|
+
"type": "storage",
|
|
116
|
+
"outputPct": 100,
|
|
117
|
+
"maxTier": 1
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"type": "storage",
|
|
121
|
+
"outputPct": 100,
|
|
122
|
+
"maxTier": 1
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"type": "storage",
|
|
126
|
+
"outputPct": 100,
|
|
127
|
+
"maxTier": 1
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"entityItemId": 10207,
|
|
133
|
+
"slots": []
|
|
134
|
+
},
|
|
46
135
|
{
|
|
47
136
|
"entityItemId": 20200,
|
|
48
137
|
"slots": []
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"entityItemId": 20210,
|
|
141
|
+
"slots": [
|
|
142
|
+
{
|
|
143
|
+
"type": "engine",
|
|
144
|
+
"outputPct": 100,
|
|
145
|
+
"maxTier": 2
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"type": "generator",
|
|
149
|
+
"outputPct": 100,
|
|
150
|
+
"maxTier": 2
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"type": "gatherer",
|
|
154
|
+
"outputPct": 100,
|
|
155
|
+
"maxTier": 2
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"type": "gatherer",
|
|
159
|
+
"outputPct": 100,
|
|
160
|
+
"maxTier": 2
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"type": "any",
|
|
164
|
+
"outputPct": 80,
|
|
165
|
+
"maxTier": 1
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"entityItemId": 20211,
|
|
171
|
+
"slots": [
|
|
172
|
+
{
|
|
173
|
+
"type": "engine",
|
|
174
|
+
"outputPct": 100,
|
|
175
|
+
"maxTier": 2
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"type": "generator",
|
|
179
|
+
"outputPct": 100,
|
|
180
|
+
"maxTier": 2
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"type": "hauler",
|
|
184
|
+
"outputPct": 100,
|
|
185
|
+
"maxTier": 2
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"type": "hauler",
|
|
189
|
+
"outputPct": 100,
|
|
190
|
+
"maxTier": 2
|
|
191
|
+
}
|
|
192
|
+
]
|
|
49
193
|
}
|
|
50
194
|
]
|
package/src/data/item-ids.ts
CHANGED
|
@@ -50,16 +50,16 @@ export const ITEM_BIOMASS_T7 = 507
|
|
|
50
50
|
export const ITEM_BIOMASS_T8 = 508
|
|
51
51
|
export const ITEM_BIOMASS_T9 = 509
|
|
52
52
|
export const ITEM_BIOMASS_T10 = 510
|
|
53
|
-
export const
|
|
54
|
-
export const
|
|
55
|
-
export const
|
|
56
|
-
export const
|
|
57
|
-
export const
|
|
58
|
-
export const
|
|
59
|
-
export const
|
|
60
|
-
export const
|
|
61
|
-
export const
|
|
62
|
-
export const
|
|
53
|
+
export const ITEM_PLATE = 10001
|
|
54
|
+
export const ITEM_FRAME = 10002
|
|
55
|
+
export const ITEM_PLASMA_CELL = 10003
|
|
56
|
+
export const ITEM_RESONATOR = 10004
|
|
57
|
+
export const ITEM_BEAM = 10005
|
|
58
|
+
export const ITEM_SENSOR = 10006
|
|
59
|
+
export const ITEM_POLYMER = 10007
|
|
60
|
+
export const ITEM_CERAMIC = 10008
|
|
61
|
+
export const ITEM_REACTOR = 10009
|
|
62
|
+
export const ITEM_RESIN = 10010
|
|
63
63
|
export const ITEM_ENGINE_T1 = 10100
|
|
64
64
|
export const ITEM_GENERATOR_T1 = 10101
|
|
65
65
|
export const ITEM_GATHERER_T1 = 10102
|
|
@@ -68,9 +68,28 @@ export const ITEM_CRAFTER_T1 = 10104
|
|
|
68
68
|
export const ITEM_STORAGE_T1 = 10105
|
|
69
69
|
export const ITEM_HAULER_T1 = 10106
|
|
70
70
|
export const ITEM_WARP_T1 = 10107
|
|
71
|
+
export const ITEM_BATTERY_T1 = 10108
|
|
72
|
+
export const ITEM_LAUNCHER_T1 = 10109
|
|
71
73
|
export const ITEM_CONTAINER_T1_PACKED = 10200
|
|
72
74
|
export const ITEM_SHIP_T1_PACKED = 10201
|
|
73
75
|
export const ITEM_WAREHOUSE_T1_PACKED = 10202
|
|
74
|
-
export const
|
|
75
|
-
export const
|
|
76
|
+
export const ITEM_EXTRACTOR_T1_PACKED = 10203
|
|
77
|
+
export const ITEM_FACTORY_T1_PACKED = 10204
|
|
78
|
+
export const ITEM_MASS_DRIVER_T1_PACKED = 10205
|
|
79
|
+
export const ITEM_MASS_CATCHER_T1_PACKED = 10206
|
|
80
|
+
export const ITEM_HUB_T1_PACKED = 10207
|
|
81
|
+
export const ITEM_PLATE_T2 = 20001
|
|
82
|
+
export const ITEM_FRAME_T2 = 20002
|
|
83
|
+
export const ITEM_PLASMA_CELL_T2 = 20003
|
|
84
|
+
export const ITEM_RESONATOR_T2 = 20004
|
|
85
|
+
export const ITEM_BEAM_T2 = 20005
|
|
86
|
+
export const ITEM_SENSOR_T2 = 20006
|
|
87
|
+
export const ITEM_POLYMER_T2 = 20007
|
|
88
|
+
export const ITEM_CERAMIC_T2 = 20008
|
|
89
|
+
export const ITEM_REACTOR_T2 = 20009
|
|
90
|
+
export const ITEM_RESIN_T2 = 20010
|
|
91
|
+
export const ITEM_GATHERER_T2 = 20102
|
|
92
|
+
export const ITEM_HAULER_T2 = 20106
|
|
76
93
|
export const ITEM_CONTAINER_T2_PACKED = 20200
|
|
94
|
+
export const ITEM_PROSPECTOR_T2_PACKED = 20210
|
|
95
|
+
export const ITEM_HAULER_SHIP_T2_PACKED = 20211
|