@shipload/sdk 1.0.0-next.52 → 1.0.0-next.53
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 +3 -3
- package/lib/shipload.js +41 -23
- package/lib/shipload.js.map +1 -1
- package/lib/shipload.m.js +41 -23
- package/lib/shipload.m.js.map +1 -1
- package/package.json +1 -1
- package/src/data/capabilities.ts +7 -0
- package/src/data/capability-formulas.ts +5 -0
- package/src/data/recipes.json +12 -5
- package/src/derivation/capabilities.test.ts +24 -0
- package/src/derivation/capabilities.ts +4 -4
- package/src/derivation/capability-mappings.ts +2 -0
- package/src/nft/buildImmutableData.ts +6 -6
- package/src/nft/description.ts +6 -6
- package/src/scheduling/lanes.ts +4 -4
package/lib/shipload.m.js
CHANGED
|
@@ -4633,33 +4633,39 @@ var recipes = [
|
|
|
4633
4633
|
outputMass: 960000,
|
|
4634
4634
|
inputs: [
|
|
4635
4635
|
{
|
|
4636
|
-
itemId:
|
|
4636
|
+
itemId: 10006,
|
|
4637
4637
|
quantity: 300
|
|
4638
4638
|
},
|
|
4639
4639
|
{
|
|
4640
|
-
itemId:
|
|
4640
|
+
itemId: 10008,
|
|
4641
4641
|
quantity: 300
|
|
4642
4642
|
}
|
|
4643
4643
|
],
|
|
4644
4644
|
statSlots: [
|
|
4645
4645
|
{
|
|
4646
4646
|
sources: [
|
|
4647
|
+
{
|
|
4648
|
+
inputIndex: 0,
|
|
4649
|
+
statIndex: 2
|
|
4650
|
+
},
|
|
4647
4651
|
{
|
|
4648
4652
|
inputIndex: 1,
|
|
4649
|
-
statIndex:
|
|
4653
|
+
statIndex: 0
|
|
4650
4654
|
}
|
|
4651
4655
|
]
|
|
4652
4656
|
},
|
|
4653
4657
|
{
|
|
4654
4658
|
sources: [
|
|
4655
4659
|
{
|
|
4656
|
-
inputIndex:
|
|
4660
|
+
inputIndex: 1,
|
|
4657
4661
|
statIndex: 1
|
|
4658
4662
|
}
|
|
4659
4663
|
]
|
|
4660
4664
|
}
|
|
4661
4665
|
],
|
|
4662
4666
|
blendWeights: [
|
|
4667
|
+
1,
|
|
4668
|
+
1
|
|
4663
4669
|
]
|
|
4664
4670
|
},
|
|
4665
4671
|
{
|
|
@@ -16304,8 +16310,8 @@ const computeLoaderMass = (ins) => Math.max(200, 2000 - ins * 2);
|
|
|
16304
16310
|
const computeLoaderThrust = (pla) => 1 + idiv(pla * pla, 10000);
|
|
16305
16311
|
const computeCrafterSpeed = (rea) => 100 + idiv(rea * 4, 5);
|
|
16306
16312
|
const computeCrafterDrain = (fin) => Math.max(5000, 30000 - idiv(fin * 1000, 33));
|
|
16307
|
-
const computeBuilderSpeed = (
|
|
16308
|
-
const computeBuilderDrain = (
|
|
16313
|
+
const computeBuilderSpeed = (resonance) => 100 + idiv(resonance * 4, 5);
|
|
16314
|
+
const computeBuilderDrain = (fineness) => Math.max(5000, 30000 - idiv(fineness * 1000, 33));
|
|
16309
16315
|
const computeHaulerCapacity = (fin, tier) => Math.max(tier, tier + idiv(fin, 400));
|
|
16310
16316
|
const computeHaulerEfficiency = (con) => 2000 + con * 6;
|
|
16311
16317
|
const supportDrainTierPercent = (tier) => {
|
|
@@ -16426,9 +16432,9 @@ function formatModuleLine(slot, itemId, stats) {
|
|
|
16426
16432
|
break;
|
|
16427
16433
|
}
|
|
16428
16434
|
case MODULE_BUILDER: {
|
|
16429
|
-
const
|
|
16430
|
-
const
|
|
16431
|
-
out += ` Speed ${computeBuilderSpeed(
|
|
16435
|
+
const res = decodeStat(stats, 0);
|
|
16436
|
+
const fin = decodeStat(stats, 1);
|
|
16437
|
+
out += ` Speed ${computeBuilderSpeed(res)} Drain ${toWholeEnergy$1(computeBuilderDrain(fin))}`;
|
|
16432
16438
|
break;
|
|
16433
16439
|
}
|
|
16434
16440
|
case MODULE_STORAGE: {
|
|
@@ -16581,11 +16587,11 @@ function computeCrafterCapabilities(stats) {
|
|
|
16581
16587
|
};
|
|
16582
16588
|
}
|
|
16583
16589
|
function computeBuilderCapabilities(stats) {
|
|
16584
|
-
const
|
|
16585
|
-
const
|
|
16590
|
+
const resonance = stats.resonance;
|
|
16591
|
+
const fineness = stats.fineness;
|
|
16586
16592
|
return {
|
|
16587
|
-
speed: 100 + Math.floor((
|
|
16588
|
-
drain: Math.max(5000, 30000 - Math.floor((
|
|
16593
|
+
speed: 100 + Math.floor((resonance * 4) / 5),
|
|
16594
|
+
drain: Math.max(5000, 30000 - Math.floor((fineness * 1000) / 33)),
|
|
16589
16595
|
};
|
|
16590
16596
|
}
|
|
16591
16597
|
function computeHaulerCapabilities(stats, tier) {
|
|
@@ -17896,12 +17902,12 @@ function resolveLaneBuilder(modules, entityItemId, laneKey) {
|
|
|
17896
17902
|
if (item.moduleType !== 'builder')
|
|
17897
17903
|
throw new Error('lane module is not a builder');
|
|
17898
17904
|
const stats = BigInt(installed.stats.toString());
|
|
17899
|
-
const
|
|
17900
|
-
const
|
|
17905
|
+
const res = decodeStat(stats, 0);
|
|
17906
|
+
const fin = decodeStat(stats, 1);
|
|
17901
17907
|
const layout = getEntityLayout(entityItemId)?.slots ?? [];
|
|
17902
17908
|
const amp = getSlotAmp(layout, idx);
|
|
17903
|
-
const speed = applySlotMultiplier(computeBuilderSpeed(
|
|
17904
|
-
const drain = computeBuilderDrain(
|
|
17909
|
+
const speed = applySlotMultiplier(computeBuilderSpeed(res), amp);
|
|
17910
|
+
const drain = computeBuilderDrain(fin);
|
|
17905
17911
|
return { slotIndex: idx, speed, drain, outputPct: amp };
|
|
17906
17912
|
}
|
|
17907
17913
|
function resolveLaneLoader(modules, entityItemId, laneKey) {
|
|
@@ -19314,6 +19320,7 @@ const capabilityNames = [
|
|
|
19314
19320
|
'Gathering',
|
|
19315
19321
|
'Warp',
|
|
19316
19322
|
'Crafting',
|
|
19323
|
+
'Build',
|
|
19317
19324
|
'Launch',
|
|
19318
19325
|
'Hauling',
|
|
19319
19326
|
];
|
|
@@ -19359,6 +19366,12 @@ const capabilityAttributes = [
|
|
|
19359
19366
|
description: 'Energy consumed per second while crafting',
|
|
19360
19367
|
},
|
|
19361
19368
|
{ capability: 'Crafting', attribute: 'quality', description: 'Modifier on output quality' },
|
|
19369
|
+
{ capability: 'Build', attribute: 'speed', description: 'Build progress per second' },
|
|
19370
|
+
{
|
|
19371
|
+
capability: 'Build',
|
|
19372
|
+
attribute: 'drain',
|
|
19373
|
+
description: 'Energy consumed per second while building',
|
|
19374
|
+
},
|
|
19362
19375
|
{ capability: 'Launch', attribute: 'range', description: 'Maximum launch distance' },
|
|
19363
19376
|
{ capability: 'Launch', attribute: 'capacity', description: 'Maximum mass per launch' },
|
|
19364
19377
|
{ capability: 'Launch', attribute: 'drain', description: 'Energy consumed per launch' },
|
|
@@ -19416,6 +19429,10 @@ const SLOT_FORMULAS = {
|
|
|
19416
19429
|
0: { capability: 'Crafting', attribute: 'speed' },
|
|
19417
19430
|
1: { capability: 'Crafting', attribute: 'drain' },
|
|
19418
19431
|
},
|
|
19432
|
+
builder: {
|
|
19433
|
+
0: { capability: 'Build', attribute: 'speed' },
|
|
19434
|
+
1: { capability: 'Build', attribute: 'drain' },
|
|
19435
|
+
},
|
|
19419
19436
|
storage: {
|
|
19420
19437
|
0: { capability: 'Storage', attribute: 'capacity' },
|
|
19421
19438
|
1: { capability: 'Storage', attribute: 'capacity' },
|
|
@@ -19449,6 +19466,7 @@ const KIND_TO_ITEM_ID = {
|
|
|
19449
19466
|
gatherer: ITEM_GATHERER_T1,
|
|
19450
19467
|
loader: ITEM_LOADER_T1,
|
|
19451
19468
|
crafter: ITEM_CRAFTER_T1,
|
|
19469
|
+
builder: ITEM_BUILDER_T1,
|
|
19452
19470
|
storage: ITEM_STORAGE_T1,
|
|
19453
19471
|
hauler: ITEM_HAULER_T1,
|
|
19454
19472
|
warp: ITEM_WARP_T1,
|
|
@@ -20372,12 +20390,12 @@ function buildModuleImmutable(itemId, quantity, stats, originX, originY) {
|
|
|
20372
20390
|
break;
|
|
20373
20391
|
}
|
|
20374
20392
|
case MODULE_BUILDER: {
|
|
20375
|
-
const
|
|
20376
|
-
const
|
|
20377
|
-
base.push({ first: '
|
|
20378
|
-
base.push({ first: '
|
|
20379
|
-
base.push({ first: 'speed', second: ['uint16', computeBuilderSpeed(
|
|
20380
|
-
base.push({ first: 'drain', second: ['uint16', toWholeEnergy(computeBuilderDrain(
|
|
20393
|
+
const res = decodeStat(stats, 0);
|
|
20394
|
+
const fin = decodeStat(stats, 1);
|
|
20395
|
+
base.push({ first: 'resonance', second: ['uint16', res] });
|
|
20396
|
+
base.push({ first: 'fineness', second: ['uint16', fin] });
|
|
20397
|
+
base.push({ first: 'speed', second: ['uint16', computeBuilderSpeed(res)] });
|
|
20398
|
+
base.push({ first: 'drain', second: ['uint16', toWholeEnergy(computeBuilderDrain(fin))] });
|
|
20381
20399
|
break;
|
|
20382
20400
|
}
|
|
20383
20401
|
case MODULE_STORAGE: {
|