@shipload/sdk 1.0.0-next.65 → 1.0.0-next.67
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 +786 -321
- package/lib/shipload.js +2731 -1305
- package/lib/shipload.js.map +1 -1
- package/lib/shipload.m.js +2644 -1286
- package/lib/shipload.m.js.map +1 -1
- package/lib/testing.d.ts +223 -146
- package/lib/testing.js +907 -563
- package/lib/testing.js.map +1 -1
- package/lib/testing.m.js +907 -563
- package/lib/testing.m.js.map +1 -1
- package/package.json +1 -1
- package/src/capabilities/crafting.test.ts +51 -6
- package/src/capabilities/crafting.ts +19 -4
- package/src/capabilities/gathering.ts +2 -2
- package/src/capabilities/storage.test.ts +26 -0
- package/src/capabilities/storage.ts +6 -6
- package/src/contracts/fund.ts +79 -2
- package/src/contracts/platform.ts +10 -1
- package/src/contracts/server.ts +521 -330
- package/src/data/charters.json +325 -127
- package/src/data/entities.json +29 -24
- package/src/data/items.json +114 -114
- package/src/data/kind-registry.json +3 -3
- package/src/data/kind-registry.ts +5 -0
- package/src/data/metadata.ts +9 -2
- package/src/data/recipes.json +56 -95
- package/src/derivation/build-methods.test.ts +59 -1
- package/src/derivation/build-methods.ts +2 -0
- package/src/derivation/capabilities.ts +7 -7
- package/src/derivation/strata.ts +5 -3
- package/src/derivation/tiers.ts +5 -5
- package/src/entity/hydrate.test.ts +156 -0
- package/src/entity/hydrate.ts +86 -0
- package/src/errors.ts +9 -0
- package/src/format.ts +15 -13
- package/src/index-module.ts +32 -5
- package/src/influence/ballot.test.ts +103 -0
- package/src/influence/ballot.ts +98 -0
- package/src/influence/charter-metadata.test.ts +136 -0
- package/src/influence/charter-metadata.ts +236 -0
- package/src/influence/charters.test.ts +51 -65
- package/src/influence/charters.ts +70 -40
- package/src/influence/civic-shuttle.test.ts +159 -0
- package/src/influence/civic-shuttle.ts +115 -0
- package/src/influence/civic.test.ts +287 -0
- package/src/influence/civic.ts +269 -0
- package/src/influence/constants.ts +30 -9
- package/src/influence/decomp.ts +15 -15
- package/src/influence/duration.ts +42 -6
- package/src/influence/index.ts +59 -6
- package/src/influence/influence.test.ts +76 -9
- package/src/influence/valuation.ts +17 -17
- package/src/managers/actions.ts +99 -37
- package/src/managers/base.ts +4 -0
- package/src/managers/context.ts +3 -1
- package/src/managers/epochs.ts +32 -1
- package/src/managers/index.ts +4 -2
- package/src/managers/influence.test.ts +18 -20
- package/src/managers/influence.ts +137 -84
- package/src/managers/jobs.test.ts +2 -2
- package/src/managers/jobs.ts +4 -4
- package/src/nft/description.ts +10 -11
- package/src/planner/index.ts +54 -0
- package/src/planner/planner.test.ts +127 -2
- package/src/resolution/display-name.ts +1 -1
- package/src/scheduling/availability.test.ts +113 -0
- package/src/scheduling/availability.ts +48 -8
- package/src/scheduling/epoch.ts +1 -0
- package/src/scheduling/jobs.ts +1 -1
- package/src/scheduling/projection.ts +2 -16
- package/src/scheduling/task-cargo.test.ts +62 -1
- package/src/scheduling/task-cargo.ts +25 -10
- package/src/scheduling/task-effects.test.ts +35 -0
- package/src/scheduling/task-effects.ts +34 -0
- package/src/scheduling/unwrap.test.ts +3 -3
- package/src/scheduling/unwrap.ts +3 -3
- package/src/shipload.ts +22 -3
- package/src/travel/reach.test.ts +86 -0
- package/src/travel/reach.ts +23 -10
- package/src/travel/route-build.test.ts +63 -0
- package/src/travel/route-build.ts +60 -0
- package/src/travel/travel.ts +2 -1
- package/src/types.ts +6 -2
- package/src/utils/hash.ts +18 -2
- package/src/utils/system.ts +6 -1
|
@@ -73,21 +73,21 @@
|
|
|
73
73
|
{
|
|
74
74
|
"kind": "workshop",
|
|
75
75
|
"classification": "PlanetaryStructure",
|
|
76
|
-
"capabilityFlags":
|
|
76
|
+
"capabilityFlags": 0,
|
|
77
77
|
"zCoord": 0,
|
|
78
78
|
"defaultLabel": "Workshop"
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
"kind": "builddock",
|
|
82
82
|
"classification": "OrbitalStructure",
|
|
83
|
-
"capabilityFlags":
|
|
83
|
+
"capabilityFlags": 0,
|
|
84
84
|
"zCoord": 0,
|
|
85
85
|
"defaultLabel": "Construction Dock"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
"kind": "depot",
|
|
89
89
|
"classification": "PlanetaryStructure",
|
|
90
|
-
"capabilityFlags":
|
|
90
|
+
"capabilityFlags": 32,
|
|
91
91
|
"zCoord": 0,
|
|
92
92
|
"defaultLabel": "Depot"
|
|
93
93
|
}
|
|
@@ -6,6 +6,7 @@ export const CAP_UNDEPLOY = 0x02
|
|
|
6
6
|
export const CAP_DEMOLISH = 0x04
|
|
7
7
|
export const CAP_CATCH = 0x08
|
|
8
8
|
export const CAP_MODULES = 0x10
|
|
9
|
+
export const CAP_STORE_CARGO = 0x20
|
|
9
10
|
|
|
10
11
|
export enum EntityClass {
|
|
11
12
|
OrbitalVessel = 0,
|
|
@@ -126,6 +127,10 @@ export function canCatch(kind: NameType | EntityTypeName): boolean {
|
|
|
126
127
|
return kindCan(kind, CAP_CATCH)
|
|
127
128
|
}
|
|
128
129
|
|
|
130
|
+
export function canStoreCargo(kind: NameType | EntityTypeName): boolean {
|
|
131
|
+
return kindCan(kind, CAP_STORE_CARGO)
|
|
132
|
+
}
|
|
133
|
+
|
|
129
134
|
export function getEntityClass(kind: NameType | EntityTypeName): EntityClass {
|
|
130
135
|
const m = KIND_META.get(nameKey(kind))
|
|
131
136
|
if (!m) throw new Error(`Entity type has no class: ${nameKey(kind)}`)
|
package/src/data/metadata.ts
CHANGED
|
@@ -334,7 +334,7 @@ export const itemMetadata: Record<number, ItemMetadata> = {
|
|
|
334
334
|
},
|
|
335
335
|
10219: {
|
|
336
336
|
name: 'Depot',
|
|
337
|
-
description: 'Planetary storage facility with
|
|
337
|
+
description: 'Planetary storage facility with two shuttle bays and four cargo slots.',
|
|
338
338
|
color: '#EAB308',
|
|
339
339
|
},
|
|
340
340
|
|
|
@@ -497,7 +497,14 @@ export const entityMetadata: Record<number, EntityMetadata> = {
|
|
|
497
497
|
},
|
|
498
498
|
10209: {moduleSlotLabels: ['Power Core', 'Assembly Arm']},
|
|
499
499
|
10219: {
|
|
500
|
-
moduleSlotLabels: [
|
|
500
|
+
moduleSlotLabels: [
|
|
501
|
+
'Shuttle Bay',
|
|
502
|
+
'Shuttle Bay',
|
|
503
|
+
'Cargo Hold',
|
|
504
|
+
'Cargo Hold',
|
|
505
|
+
'Cargo Hold',
|
|
506
|
+
'Cargo Hold',
|
|
507
|
+
],
|
|
501
508
|
},
|
|
502
509
|
11212: {moduleSlotLabels: ['Power Core', 'Engine', 'Limpet Bay']},
|
|
503
510
|
11213: {moduleSlotLabels: ['Power Core', 'Engine', 'Auxiliary System', 'Limpet Bay']},
|
package/src/data/recipes.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
3
|
"outputItemId": 10001,
|
|
4
|
-
"outputMass":
|
|
4
|
+
"outputMass": 40,
|
|
5
5
|
"inputs": [
|
|
6
6
|
{
|
|
7
7
|
"itemId": 101,
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"outputItemId": 10002,
|
|
41
|
-
"outputMass":
|
|
41
|
+
"outputMass": 40,
|
|
42
42
|
"inputs": [
|
|
43
43
|
{
|
|
44
44
|
"itemId": 401,
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
"outputItemId": 10003,
|
|
90
|
-
"outputMass":
|
|
90
|
+
"outputMass": 40,
|
|
91
91
|
"inputs": [
|
|
92
92
|
{
|
|
93
93
|
"itemId": 301,
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
},
|
|
125
125
|
{
|
|
126
126
|
"outputItemId": 10004,
|
|
127
|
-
"outputMass":
|
|
127
|
+
"outputMass": 40,
|
|
128
128
|
"inputs": [
|
|
129
129
|
{
|
|
130
130
|
"itemId": 201,
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
},
|
|
166
166
|
{
|
|
167
167
|
"outputItemId": 10005,
|
|
168
|
-
"outputMass":
|
|
168
|
+
"outputMass": 40,
|
|
169
169
|
"inputs": [
|
|
170
170
|
{
|
|
171
171
|
"itemId": 101,
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
208
|
"outputItemId": 10006,
|
|
209
|
-
"outputMass":
|
|
209
|
+
"outputMass": 40,
|
|
210
210
|
"inputs": [
|
|
211
211
|
{
|
|
212
212
|
"itemId": 201,
|
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
},
|
|
244
244
|
{
|
|
245
245
|
"outputItemId": 10007,
|
|
246
|
-
"outputMass":
|
|
246
|
+
"outputMass": 40,
|
|
247
247
|
"inputs": [
|
|
248
248
|
{
|
|
249
249
|
"itemId": 501,
|
|
@@ -280,7 +280,7 @@
|
|
|
280
280
|
},
|
|
281
281
|
{
|
|
282
282
|
"outputItemId": 10008,
|
|
283
|
-
"outputMass":
|
|
283
|
+
"outputMass": 40,
|
|
284
284
|
"inputs": [
|
|
285
285
|
{
|
|
286
286
|
"itemId": 401,
|
|
@@ -309,7 +309,7 @@
|
|
|
309
309
|
},
|
|
310
310
|
{
|
|
311
311
|
"outputItemId": 10009,
|
|
312
|
-
"outputMass":
|
|
312
|
+
"outputMass": 40,
|
|
313
313
|
"inputs": [
|
|
314
314
|
{
|
|
315
315
|
"itemId": 301,
|
|
@@ -358,7 +358,7 @@
|
|
|
358
358
|
},
|
|
359
359
|
{
|
|
360
360
|
"outputItemId": 10010,
|
|
361
|
-
"outputMass":
|
|
361
|
+
"outputMass": 40,
|
|
362
362
|
"inputs": [
|
|
363
363
|
{
|
|
364
364
|
"itemId": 501,
|
|
@@ -399,7 +399,7 @@
|
|
|
399
399
|
},
|
|
400
400
|
{
|
|
401
401
|
"outputItemId": 10100,
|
|
402
|
-
"outputMass":
|
|
402
|
+
"outputMass": 9600,
|
|
403
403
|
"inputs": [
|
|
404
404
|
{
|
|
405
405
|
"itemId": 10003,
|
|
@@ -434,7 +434,7 @@
|
|
|
434
434
|
},
|
|
435
435
|
{
|
|
436
436
|
"outputItemId": 10101,
|
|
437
|
-
"outputMass":
|
|
437
|
+
"outputMass": 9600,
|
|
438
438
|
"inputs": [
|
|
439
439
|
{
|
|
440
440
|
"itemId": 10004,
|
|
@@ -469,7 +469,7 @@
|
|
|
469
469
|
},
|
|
470
470
|
{
|
|
471
471
|
"outputItemId": 10102,
|
|
472
|
-
"outputMass":
|
|
472
|
+
"outputMass": 9600,
|
|
473
473
|
"inputs": [
|
|
474
474
|
{
|
|
475
475
|
"itemId": 10005,
|
|
@@ -521,7 +521,7 @@
|
|
|
521
521
|
},
|
|
522
522
|
{
|
|
523
523
|
"outputItemId": 10103,
|
|
524
|
-
"outputMass":
|
|
524
|
+
"outputMass": 9600,
|
|
525
525
|
"inputs": [
|
|
526
526
|
{
|
|
527
527
|
"itemId": 10007,
|
|
@@ -556,7 +556,7 @@
|
|
|
556
556
|
},
|
|
557
557
|
{
|
|
558
558
|
"outputItemId": 10104,
|
|
559
|
-
"outputMass":
|
|
559
|
+
"outputMass": 9600,
|
|
560
560
|
"inputs": [
|
|
561
561
|
{
|
|
562
562
|
"itemId": 10009,
|
|
@@ -596,7 +596,7 @@
|
|
|
596
596
|
},
|
|
597
597
|
{
|
|
598
598
|
"outputItemId": 10105,
|
|
599
|
-
"outputMass":
|
|
599
|
+
"outputMass": 9600,
|
|
600
600
|
"inputs": [
|
|
601
601
|
{
|
|
602
602
|
"itemId": 10001,
|
|
@@ -645,7 +645,7 @@
|
|
|
645
645
|
},
|
|
646
646
|
{
|
|
647
647
|
"outputItemId": 10106,
|
|
648
|
-
"outputMass":
|
|
648
|
+
"outputMass": 9600,
|
|
649
649
|
"inputs": [
|
|
650
650
|
{
|
|
651
651
|
"itemId": 10004,
|
|
@@ -693,7 +693,7 @@
|
|
|
693
693
|
},
|
|
694
694
|
{
|
|
695
695
|
"outputItemId": 10107,
|
|
696
|
-
"outputMass":
|
|
696
|
+
"outputMass": 9600,
|
|
697
697
|
"inputs": [
|
|
698
698
|
{
|
|
699
699
|
"itemId": 10004,
|
|
@@ -725,7 +725,7 @@
|
|
|
725
725
|
},
|
|
726
726
|
{
|
|
727
727
|
"outputItemId": 10108,
|
|
728
|
-
"outputMass":
|
|
728
|
+
"outputMass": 9600,
|
|
729
729
|
"inputs": [
|
|
730
730
|
{
|
|
731
731
|
"itemId": 10003,
|
|
@@ -774,7 +774,7 @@
|
|
|
774
774
|
},
|
|
775
775
|
{
|
|
776
776
|
"outputItemId": 10110,
|
|
777
|
-
"outputMass":
|
|
777
|
+
"outputMass": 9600,
|
|
778
778
|
"inputs": [
|
|
779
779
|
{
|
|
780
780
|
"itemId": 10006,
|
|
@@ -814,7 +814,7 @@
|
|
|
814
814
|
},
|
|
815
815
|
{
|
|
816
816
|
"outputItemId": 10200,
|
|
817
|
-
"outputMass":
|
|
817
|
+
"outputMass": 19000,
|
|
818
818
|
"inputs": [
|
|
819
819
|
{
|
|
820
820
|
"itemId": 10001,
|
|
@@ -863,7 +863,7 @@
|
|
|
863
863
|
},
|
|
864
864
|
{
|
|
865
865
|
"outputItemId": 10202,
|
|
866
|
-
"outputMass":
|
|
866
|
+
"outputMass": 32000,
|
|
867
867
|
"inputs": [
|
|
868
868
|
{
|
|
869
869
|
"itemId": 10001,
|
|
@@ -912,7 +912,7 @@
|
|
|
912
912
|
},
|
|
913
913
|
{
|
|
914
914
|
"outputItemId": 10203,
|
|
915
|
-
"outputMass":
|
|
915
|
+
"outputMass": 19000,
|
|
916
916
|
"inputs": [
|
|
917
917
|
{
|
|
918
918
|
"itemId": 10008,
|
|
@@ -951,7 +951,7 @@
|
|
|
951
951
|
},
|
|
952
952
|
{
|
|
953
953
|
"outputItemId": 10204,
|
|
954
|
-
"outputMass":
|
|
954
|
+
"outputMass": 19000,
|
|
955
955
|
"inputs": [
|
|
956
956
|
{
|
|
957
957
|
"itemId": 10008,
|
|
@@ -990,7 +990,7 @@
|
|
|
990
990
|
},
|
|
991
991
|
{
|
|
992
992
|
"outputItemId": 10207,
|
|
993
|
-
"outputMass":
|
|
993
|
+
"outputMass": 24000,
|
|
994
994
|
"inputs": [
|
|
995
995
|
{
|
|
996
996
|
"itemId": 10005,
|
|
@@ -1016,48 +1016,9 @@
|
|
|
1016
1016
|
],
|
|
1017
1017
|
"blendWeights": []
|
|
1018
1018
|
},
|
|
1019
|
-
{
|
|
1020
|
-
"outputItemId": 10209,
|
|
1021
|
-
"outputMass": 1900000,
|
|
1022
|
-
"inputs": [
|
|
1023
|
-
{
|
|
1024
|
-
"itemId": 10001,
|
|
1025
|
-
"quantity": 600
|
|
1026
|
-
},
|
|
1027
|
-
{
|
|
1028
|
-
"itemId": 10003,
|
|
1029
|
-
"quantity": 600
|
|
1030
|
-
}
|
|
1031
|
-
],
|
|
1032
|
-
"statSlots": [
|
|
1033
|
-
{
|
|
1034
|
-
"sources": [
|
|
1035
|
-
{
|
|
1036
|
-
"inputIndex": 0,
|
|
1037
|
-
"statIndex": 0
|
|
1038
|
-
}
|
|
1039
|
-
]
|
|
1040
|
-
},
|
|
1041
|
-
{
|
|
1042
|
-
"sources": [
|
|
1043
|
-
{
|
|
1044
|
-
"inputIndex": 0,
|
|
1045
|
-
"statIndex": 1
|
|
1046
|
-
}
|
|
1047
|
-
]
|
|
1048
|
-
},
|
|
1049
|
-
{
|
|
1050
|
-
"sources": []
|
|
1051
|
-
},
|
|
1052
|
-
{
|
|
1053
|
-
"sources": []
|
|
1054
|
-
}
|
|
1055
|
-
],
|
|
1056
|
-
"blendWeights": []
|
|
1057
|
-
},
|
|
1058
1019
|
{
|
|
1059
1020
|
"outputItemId": 10210,
|
|
1060
|
-
"outputMass":
|
|
1021
|
+
"outputMass": 16000,
|
|
1061
1022
|
"inputs": [
|
|
1062
1023
|
{
|
|
1063
1024
|
"itemId": 10001,
|
|
@@ -1126,7 +1087,7 @@
|
|
|
1126
1087
|
},
|
|
1127
1088
|
{
|
|
1128
1089
|
"outputItemId": 10211,
|
|
1129
|
-
"outputMass":
|
|
1090
|
+
"outputMass": 24000,
|
|
1130
1091
|
"inputs": [
|
|
1131
1092
|
{
|
|
1132
1093
|
"itemId": 10005,
|
|
@@ -1220,7 +1181,7 @@
|
|
|
1220
1181
|
},
|
|
1221
1182
|
{
|
|
1222
1183
|
"outputItemId": 10212,
|
|
1223
|
-
"outputMass":
|
|
1184
|
+
"outputMass": 24000,
|
|
1224
1185
|
"inputs": [
|
|
1225
1186
|
{
|
|
1226
1187
|
"itemId": 10005,
|
|
@@ -1314,7 +1275,7 @@
|
|
|
1314
1275
|
},
|
|
1315
1276
|
{
|
|
1316
1277
|
"outputItemId": 10213,
|
|
1317
|
-
"outputMass":
|
|
1278
|
+
"outputMass": 24000,
|
|
1318
1279
|
"inputs": [
|
|
1319
1280
|
{
|
|
1320
1281
|
"itemId": 10005,
|
|
@@ -1408,7 +1369,7 @@
|
|
|
1408
1369
|
},
|
|
1409
1370
|
{
|
|
1410
1371
|
"outputItemId": 10214,
|
|
1411
|
-
"outputMass":
|
|
1372
|
+
"outputMass": 24000,
|
|
1412
1373
|
"inputs": [
|
|
1413
1374
|
{
|
|
1414
1375
|
"itemId": 10005,
|
|
@@ -1502,7 +1463,7 @@
|
|
|
1502
1463
|
},
|
|
1503
1464
|
{
|
|
1504
1465
|
"outputItemId": 10215,
|
|
1505
|
-
"outputMass":
|
|
1466
|
+
"outputMass": 24000,
|
|
1506
1467
|
"inputs": [
|
|
1507
1468
|
{
|
|
1508
1469
|
"itemId": 10005,
|
|
@@ -1596,7 +1557,7 @@
|
|
|
1596
1557
|
},
|
|
1597
1558
|
{
|
|
1598
1559
|
"outputItemId": 10218,
|
|
1599
|
-
"outputMass":
|
|
1560
|
+
"outputMass": 24000,
|
|
1600
1561
|
"inputs": [
|
|
1601
1562
|
{
|
|
1602
1563
|
"itemId": 10005,
|
|
@@ -1690,7 +1651,7 @@
|
|
|
1690
1651
|
},
|
|
1691
1652
|
{
|
|
1692
1653
|
"outputItemId": 11001,
|
|
1693
|
-
"outputMass":
|
|
1654
|
+
"outputMass": 48,
|
|
1694
1655
|
"inputs": [
|
|
1695
1656
|
{
|
|
1696
1657
|
"itemId": 102,
|
|
@@ -1727,7 +1688,7 @@
|
|
|
1727
1688
|
},
|
|
1728
1689
|
{
|
|
1729
1690
|
"outputItemId": 11002,
|
|
1730
|
-
"outputMass":
|
|
1691
|
+
"outputMass": 48,
|
|
1731
1692
|
"inputs": [
|
|
1732
1693
|
{
|
|
1733
1694
|
"itemId": 402,
|
|
@@ -1776,7 +1737,7 @@
|
|
|
1776
1737
|
},
|
|
1777
1738
|
{
|
|
1778
1739
|
"outputItemId": 11003,
|
|
1779
|
-
"outputMass":
|
|
1740
|
+
"outputMass": 48,
|
|
1780
1741
|
"inputs": [
|
|
1781
1742
|
{
|
|
1782
1743
|
"itemId": 302,
|
|
@@ -1813,7 +1774,7 @@
|
|
|
1813
1774
|
},
|
|
1814
1775
|
{
|
|
1815
1776
|
"outputItemId": 11004,
|
|
1816
|
-
"outputMass":
|
|
1777
|
+
"outputMass": 48,
|
|
1817
1778
|
"inputs": [
|
|
1818
1779
|
{
|
|
1819
1780
|
"itemId": 202,
|
|
@@ -1854,7 +1815,7 @@
|
|
|
1854
1815
|
},
|
|
1855
1816
|
{
|
|
1856
1817
|
"outputItemId": 11005,
|
|
1857
|
-
"outputMass":
|
|
1818
|
+
"outputMass": 48,
|
|
1858
1819
|
"inputs": [
|
|
1859
1820
|
{
|
|
1860
1821
|
"itemId": 102,
|
|
@@ -1895,7 +1856,7 @@
|
|
|
1895
1856
|
},
|
|
1896
1857
|
{
|
|
1897
1858
|
"outputItemId": 11006,
|
|
1898
|
-
"outputMass":
|
|
1859
|
+
"outputMass": 48,
|
|
1899
1860
|
"inputs": [
|
|
1900
1861
|
{
|
|
1901
1862
|
"itemId": 202,
|
|
@@ -1932,7 +1893,7 @@
|
|
|
1932
1893
|
},
|
|
1933
1894
|
{
|
|
1934
1895
|
"outputItemId": 11007,
|
|
1935
|
-
"outputMass":
|
|
1896
|
+
"outputMass": 48,
|
|
1936
1897
|
"inputs": [
|
|
1937
1898
|
{
|
|
1938
1899
|
"itemId": 502,
|
|
@@ -1969,7 +1930,7 @@
|
|
|
1969
1930
|
},
|
|
1970
1931
|
{
|
|
1971
1932
|
"outputItemId": 11008,
|
|
1972
|
-
"outputMass":
|
|
1933
|
+
"outputMass": 48,
|
|
1973
1934
|
"inputs": [
|
|
1974
1935
|
{
|
|
1975
1936
|
"itemId": 402,
|
|
@@ -1998,7 +1959,7 @@
|
|
|
1998
1959
|
},
|
|
1999
1960
|
{
|
|
2000
1961
|
"outputItemId": 11009,
|
|
2001
|
-
"outputMass":
|
|
1962
|
+
"outputMass": 48,
|
|
2002
1963
|
"inputs": [
|
|
2003
1964
|
{
|
|
2004
1965
|
"itemId": 302,
|
|
@@ -2047,7 +2008,7 @@
|
|
|
2047
2008
|
},
|
|
2048
2009
|
{
|
|
2049
2010
|
"outputItemId": 11010,
|
|
2050
|
-
"outputMass":
|
|
2011
|
+
"outputMass": 48,
|
|
2051
2012
|
"inputs": [
|
|
2052
2013
|
{
|
|
2053
2014
|
"itemId": 502,
|
|
@@ -2088,7 +2049,7 @@
|
|
|
2088
2049
|
},
|
|
2089
2050
|
{
|
|
2090
2051
|
"outputItemId": 11100,
|
|
2091
|
-
"outputMass":
|
|
2052
|
+
"outputMass": 15360,
|
|
2092
2053
|
"inputs": [
|
|
2093
2054
|
{
|
|
2094
2055
|
"itemId": 11003,
|
|
@@ -2129,7 +2090,7 @@
|
|
|
2129
2090
|
},
|
|
2130
2091
|
{
|
|
2131
2092
|
"outputItemId": 11101,
|
|
2132
|
-
"outputMass":
|
|
2093
|
+
"outputMass": 15360,
|
|
2133
2094
|
"inputs": [
|
|
2134
2095
|
{
|
|
2135
2096
|
"itemId": 11004,
|
|
@@ -2170,7 +2131,7 @@
|
|
|
2170
2131
|
},
|
|
2171
2132
|
{
|
|
2172
2133
|
"outputItemId": 11102,
|
|
2173
|
-
"outputMass":
|
|
2134
|
+
"outputMass": 15360,
|
|
2174
2135
|
"inputs": [
|
|
2175
2136
|
{
|
|
2176
2137
|
"itemId": 11005,
|
|
@@ -2227,7 +2188,7 @@
|
|
|
2227
2188
|
},
|
|
2228
2189
|
{
|
|
2229
2190
|
"outputItemId": 11103,
|
|
2230
|
-
"outputMass":
|
|
2191
|
+
"outputMass": 15360,
|
|
2231
2192
|
"inputs": [
|
|
2232
2193
|
{
|
|
2233
2194
|
"itemId": 11007,
|
|
@@ -2268,7 +2229,7 @@
|
|
|
2268
2229
|
},
|
|
2269
2230
|
{
|
|
2270
2231
|
"outputItemId": 11104,
|
|
2271
|
-
"outputMass":
|
|
2232
|
+
"outputMass": 15360,
|
|
2272
2233
|
"inputs": [
|
|
2273
2234
|
{
|
|
2274
2235
|
"itemId": 11009,
|
|
@@ -2313,7 +2274,7 @@
|
|
|
2313
2274
|
},
|
|
2314
2275
|
{
|
|
2315
2276
|
"outputItemId": 11105,
|
|
2316
|
-
"outputMass":
|
|
2277
|
+
"outputMass": 15360,
|
|
2317
2278
|
"inputs": [
|
|
2318
2279
|
{
|
|
2319
2280
|
"itemId": 11001,
|
|
@@ -2382,7 +2343,7 @@
|
|
|
2382
2343
|
},
|
|
2383
2344
|
{
|
|
2384
2345
|
"outputItemId": 11106,
|
|
2385
|
-
"outputMass":
|
|
2346
|
+
"outputMass": 15360,
|
|
2386
2347
|
"inputs": [
|
|
2387
2348
|
{
|
|
2388
2349
|
"itemId": 11004,
|
|
@@ -2439,7 +2400,7 @@
|
|
|
2439
2400
|
},
|
|
2440
2401
|
{
|
|
2441
2402
|
"outputItemId": 11107,
|
|
2442
|
-
"outputMass":
|
|
2403
|
+
"outputMass": 15360,
|
|
2443
2404
|
"inputs": [
|
|
2444
2405
|
{
|
|
2445
2406
|
"itemId": 11004,
|
|
@@ -2472,7 +2433,7 @@
|
|
|
2472
2433
|
},
|
|
2473
2434
|
{
|
|
2474
2435
|
"outputItemId": 11108,
|
|
2475
|
-
"outputMass":
|
|
2436
|
+
"outputMass": 15360,
|
|
2476
2437
|
"inputs": [
|
|
2477
2438
|
{
|
|
2478
2439
|
"itemId": 11003,
|
|
@@ -2541,7 +2502,7 @@
|
|
|
2541
2502
|
},
|
|
2542
2503
|
{
|
|
2543
2504
|
"outputItemId": 11110,
|
|
2544
|
-
"outputMass":
|
|
2505
|
+
"outputMass": 15360,
|
|
2545
2506
|
"inputs": [
|
|
2546
2507
|
{
|
|
2547
2508
|
"itemId": 11006,
|
|
@@ -2586,7 +2547,7 @@
|
|
|
2586
2547
|
},
|
|
2587
2548
|
{
|
|
2588
2549
|
"outputItemId": 11200,
|
|
2589
|
-
"outputMass":
|
|
2550
|
+
"outputMass": 31000,
|
|
2590
2551
|
"inputs": [
|
|
2591
2552
|
{
|
|
2592
2553
|
"itemId": 11001,
|
|
@@ -2656,7 +2617,7 @@
|
|
|
2656
2617
|
},
|
|
2657
2618
|
{
|
|
2658
2619
|
"outputItemId": 11212,
|
|
2659
|
-
"outputMass":
|
|
2620
|
+
"outputMass": 43200,
|
|
2660
2621
|
"inputs": [
|
|
2661
2622
|
{
|
|
2662
2623
|
"itemId": 11001,
|
|
@@ -2750,7 +2711,7 @@
|
|
|
2750
2711
|
},
|
|
2751
2712
|
{
|
|
2752
2713
|
"outputItemId": 11213,
|
|
2753
|
-
"outputMass":
|
|
2714
|
+
"outputMass": 57600,
|
|
2754
2715
|
"inputs": [
|
|
2755
2716
|
{
|
|
2756
2717
|
"itemId": 11005,
|
|
@@ -2844,7 +2805,7 @@
|
|
|
2844
2805
|
},
|
|
2845
2806
|
{
|
|
2846
2807
|
"outputItemId": 11214,
|
|
2847
|
-
"outputMass":
|
|
2808
|
+
"outputMass": 57600,
|
|
2848
2809
|
"inputs": [
|
|
2849
2810
|
{
|
|
2850
2811
|
"itemId": 11005,
|
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
import {describe, expect, test} from 'bun:test'
|
|
2
2
|
import {availableBuildMethods} from './build-methods'
|
|
3
|
-
import {
|
|
3
|
+
import {getItems} from '../data/catalog'
|
|
4
|
+
import {
|
|
5
|
+
CAP_UNDEPLOY,
|
|
6
|
+
CAP_WRAP,
|
|
7
|
+
EntityClass,
|
|
8
|
+
getKindMeta,
|
|
9
|
+
getTemplateMeta,
|
|
10
|
+
} from '../data/kind-registry'
|
|
11
|
+
import {getRecipe} from '../data/recipes-runtime'
|
|
12
|
+
import {
|
|
13
|
+
ITEM_DEPOT_T1_PACKED,
|
|
14
|
+
ITEM_HUB_T1_PACKED,
|
|
15
|
+
ITEM_WAREHOUSE_T1_PACKED,
|
|
16
|
+
ITEM_WORKSHOP_T1_PACKED,
|
|
17
|
+
} from '../data/item-ids'
|
|
18
|
+
|
|
19
|
+
function planetaryStructures(): {itemId: number; capabilityFlags: number}[] {
|
|
20
|
+
const out: {itemId: number; capabilityFlags: number}[] = []
|
|
21
|
+
for (const item of getItems()) {
|
|
22
|
+
const template = getTemplateMeta(item.id)
|
|
23
|
+
if (!template) continue
|
|
24
|
+
const kindMeta = getKindMeta(template.kind)
|
|
25
|
+
if (kindMeta?.classification !== EntityClass.PlanetaryStructure) continue
|
|
26
|
+
out.push({itemId: item.id, capabilityFlags: kindMeta.capabilityFlags})
|
|
27
|
+
}
|
|
28
|
+
return out
|
|
29
|
+
}
|
|
4
30
|
|
|
5
31
|
describe('availableBuildMethods', () => {
|
|
6
32
|
test('orbital structures build via craft+deploy or plot', () => {
|
|
@@ -10,4 +36,36 @@ describe('availableBuildMethods', () => {
|
|
|
10
36
|
test('hub is craft+deploy only — excluded from the plot path', () => {
|
|
11
37
|
expect(availableBuildMethods(ITEM_HUB_T1_PACKED)).toEqual(['craft+deploy'])
|
|
12
38
|
})
|
|
39
|
+
|
|
40
|
+
test('planetary structures are charter-granted and carry no build method', () => {
|
|
41
|
+
expect(availableBuildMethods(ITEM_WORKSHOP_T1_PACKED)).toEqual([])
|
|
42
|
+
expect(availableBuildMethods(ITEM_DEPOT_T1_PACKED)).toEqual([])
|
|
43
|
+
})
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
describe('planetary structures are civic hulls', () => {
|
|
47
|
+
test('the registry classifies the Workshop and the Depot hulls as planetary', () => {
|
|
48
|
+
const ids = planetaryStructures().map((s) => s.itemId)
|
|
49
|
+
expect(ids).toContain(ITEM_WORKSHOP_T1_PACKED)
|
|
50
|
+
expect(ids).toContain(ITEM_DEPOT_T1_PACKED)
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
test('no planetary structure has a recipe', () => {
|
|
54
|
+
for (const structure of planetaryStructures()) {
|
|
55
|
+
expect(getRecipe(structure.itemId)).toBeUndefined()
|
|
56
|
+
}
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
test('the Workshop and the Depot kinds are still classified planetary', () => {
|
|
60
|
+
for (const kind of ['workshop', 'depot']) {
|
|
61
|
+
expect(getKindMeta(kind)?.classification).toBe(EntityClass.PlanetaryStructure)
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
test('no planetary-structure kind can wrap or undeploy', () => {
|
|
66
|
+
for (const kind of ['workshop', 'depot']) {
|
|
67
|
+
const meta = getKindMeta(kind)!
|
|
68
|
+
expect(meta.capabilityFlags & (CAP_WRAP | CAP_UNDEPLOY)).toBe(0)
|
|
69
|
+
}
|
|
70
|
+
})
|
|
13
71
|
})
|
|
@@ -15,6 +15,8 @@ export function availableBuildMethods(itemId: number): BuildMethod[] {
|
|
|
15
15
|
const kindMeta = getKindMeta(template.kind)
|
|
16
16
|
if (!kindMeta) return ['craft+deploy']
|
|
17
17
|
|
|
18
|
+
if (kindMeta.classification === EntityClass.PlanetaryStructure) return []
|
|
19
|
+
|
|
18
20
|
if (
|
|
19
21
|
kindMeta.classification === EntityClass.OrbitalStructure &&
|
|
20
22
|
!kindMeta.kind.equals(ENTITY_HUB)
|