@shipload/sdk 1.0.0-next.20 → 1.0.0-next.22
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 +25 -1
- package/lib/shipload.js +186 -22
- package/lib/shipload.js.map +1 -1
- package/lib/shipload.m.js +186 -23
- package/lib/shipload.m.js.map +1 -1
- package/package.json +1 -1
- package/src/index-module.ts +4 -0
- package/src/managers/construction-types.ts +21 -0
- package/src/managers/construction.ts +159 -15
- package/src/managers/index.ts +2 -0
- package/src/scheduling/energy.ts +41 -0
- package/src/scheduling/projection.ts +10 -11
package/lib/shipload.m.js
CHANGED
|
@@ -10722,6 +10722,72 @@ class ConstructionManager extends BaseManager {
|
|
|
10722
10722
|
}
|
|
10723
10723
|
return out.sort((a, b) => a.estimatedDuration.value - b.estimatedDuration.value);
|
|
10724
10724
|
}
|
|
10725
|
+
inboundTransfersTo(plotId, entities, now) {
|
|
10726
|
+
return this.inboundTransfersByTarget(entities, now).get(plotId.toString()) ?? [];
|
|
10727
|
+
}
|
|
10728
|
+
inboundTransfersByTarget(entities, now) {
|
|
10729
|
+
const buckets = new Map();
|
|
10730
|
+
const nowMs = now.getTime();
|
|
10731
|
+
for (const entity of entities) {
|
|
10732
|
+
const schedule = entity.schedule;
|
|
10733
|
+
if (!schedule)
|
|
10734
|
+
continue;
|
|
10735
|
+
const entityIdStr = entity.id.toString();
|
|
10736
|
+
const sourceName = entity.entity_name || entityIdStr;
|
|
10737
|
+
const startedMs = schedule.started.toDate().getTime();
|
|
10738
|
+
let cumulativeSec = 0;
|
|
10739
|
+
for (const task of schedule.tasks) {
|
|
10740
|
+
cumulativeSec += task.duration.toNumber();
|
|
10741
|
+
if (!isTransferTask(task))
|
|
10742
|
+
continue;
|
|
10743
|
+
if (!task.entitytarget)
|
|
10744
|
+
continue;
|
|
10745
|
+
const projectedEndMs = startedMs + cumulativeSec * 1000;
|
|
10746
|
+
if (projectedEndMs < nowMs)
|
|
10747
|
+
continue;
|
|
10748
|
+
const targetIdStr = task.entitytarget.entity_id.toString();
|
|
10749
|
+
const etaSeconds = Math.max(0, Math.round((projectedEndMs - nowMs) / 1000));
|
|
10750
|
+
let perTarget = buckets.get(targetIdStr);
|
|
10751
|
+
if (!perTarget) {
|
|
10752
|
+
perTarget = new Map();
|
|
10753
|
+
buckets.set(targetIdStr, perTarget);
|
|
10754
|
+
}
|
|
10755
|
+
for (const c of task.cargo) {
|
|
10756
|
+
const itemId = c.item_id.toNumber();
|
|
10757
|
+
const quantity = c.quantity.toNumber();
|
|
10758
|
+
if (quantity === 0)
|
|
10759
|
+
continue;
|
|
10760
|
+
const key = `${entityIdStr}#${itemId}`;
|
|
10761
|
+
const existing = perTarget.get(key);
|
|
10762
|
+
if (existing) {
|
|
10763
|
+
existing.quantity += quantity;
|
|
10764
|
+
existing.etaSeconds = Math.min(existing.etaSeconds, etaSeconds);
|
|
10765
|
+
}
|
|
10766
|
+
else {
|
|
10767
|
+
perTarget.set(key, {
|
|
10768
|
+
sourceEntityId: entity.id,
|
|
10769
|
+
sourceEntityType: entity.type,
|
|
10770
|
+
sourceName,
|
|
10771
|
+
itemId,
|
|
10772
|
+
quantity,
|
|
10773
|
+
etaSeconds,
|
|
10774
|
+
});
|
|
10775
|
+
}
|
|
10776
|
+
}
|
|
10777
|
+
}
|
|
10778
|
+
}
|
|
10779
|
+
const out = new Map();
|
|
10780
|
+
for (const [targetId, perTarget] of buckets) {
|
|
10781
|
+
out.set(targetId, Array.from(perTarget.values()));
|
|
10782
|
+
}
|
|
10783
|
+
return out;
|
|
10784
|
+
}
|
|
10785
|
+
reservationsFrom(sourceEntityId, entities) {
|
|
10786
|
+
const source = entities.find((e) => e.id.equals(sourceEntityId));
|
|
10787
|
+
if (!source)
|
|
10788
|
+
return [];
|
|
10789
|
+
return reservationsOf(source);
|
|
10790
|
+
}
|
|
10725
10791
|
estimateFinalizeDuration(target, crafterSpeed) {
|
|
10726
10792
|
return calc_craft_duration(crafterSpeed, target.progress.massRequired);
|
|
10727
10793
|
}
|
|
@@ -10732,26 +10798,49 @@ class ConstructionManager extends BaseManager {
|
|
|
10732
10798
|
function coordsEqual(a, b) {
|
|
10733
10799
|
return a.x.equals(b.x) && a.y.equals(b.y);
|
|
10734
10800
|
}
|
|
10735
|
-
function
|
|
10736
|
-
const
|
|
10801
|
+
function moduleKey(module) {
|
|
10802
|
+
const installed = module.installed;
|
|
10803
|
+
if (!installed)
|
|
10804
|
+
return `${module.type.toNumber()}:empty`;
|
|
10805
|
+
return `${module.type.toNumber()}:${installed.item_id.toNumber()}:${installed.stats.toString()}`;
|
|
10806
|
+
}
|
|
10807
|
+
function sourceStackKey(cargo) {
|
|
10808
|
+
return `${cargo.item_id.toNumber()}#${cargo.stats.toString()}#${(cargo.modules ?? [])
|
|
10809
|
+
.map(moduleKey)
|
|
10810
|
+
.join(',')}`;
|
|
10811
|
+
}
|
|
10812
|
+
function matchRelevantCargo(entity, target, cargo, reservedByItem) {
|
|
10813
|
+
const needsByItemId = new Map(target.progress.rows.filter((row) => row.missing > 0).map((row) => [row.itemId, row]));
|
|
10814
|
+
const remainingReserved = new Map(reservedByItem);
|
|
10815
|
+
const out = [];
|
|
10737
10816
|
for (const c of cargo) {
|
|
10738
10817
|
if (!c.entity_id.equals(entity.id))
|
|
10739
10818
|
continue;
|
|
10740
|
-
const
|
|
10741
|
-
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
if (
|
|
10819
|
+
const itemId = c.item_id.toNumber();
|
|
10820
|
+
const need = needsByItemId.get(itemId);
|
|
10821
|
+
if (!need)
|
|
10822
|
+
continue;
|
|
10823
|
+
const gross = c.quantity.toNumber();
|
|
10824
|
+
if (gross === 0)
|
|
10746
10825
|
continue;
|
|
10747
|
-
const
|
|
10826
|
+
const reservedRemaining = remainingReserved.get(itemId) ?? 0;
|
|
10827
|
+
const reserved = Math.min(gross, reservedRemaining);
|
|
10828
|
+
const available = gross - reserved;
|
|
10829
|
+
if (reserved > 0) {
|
|
10830
|
+
remainingReserved.set(itemId, reservedRemaining - reserved);
|
|
10831
|
+
}
|
|
10748
10832
|
if (available === 0)
|
|
10749
10833
|
continue;
|
|
10750
10834
|
out.push({
|
|
10751
|
-
|
|
10752
|
-
|
|
10835
|
+
key: sourceStackKey(c),
|
|
10836
|
+
rowId: c.id,
|
|
10837
|
+
itemId,
|
|
10838
|
+
item: getItem(itemId),
|
|
10839
|
+
stats: c.stats,
|
|
10840
|
+
modules: c.modules ?? [],
|
|
10753
10841
|
available,
|
|
10754
|
-
plotNeeds:
|
|
10842
|
+
plotNeeds: need.missing,
|
|
10843
|
+
reserved,
|
|
10755
10844
|
});
|
|
10756
10845
|
}
|
|
10757
10846
|
return out;
|
|
@@ -10766,7 +10855,8 @@ function partitionSources(target, entities, cargo) {
|
|
|
10766
10855
|
continue;
|
|
10767
10856
|
if (!coordsEqual(entity.coordinates, target.coordinates))
|
|
10768
10857
|
continue;
|
|
10769
|
-
const
|
|
10858
|
+
const reserved = reservedByItemFor(entity);
|
|
10859
|
+
const relevant = matchRelevantCargo(entity, target, cargo, reserved);
|
|
10770
10860
|
if (relevant.length === 0)
|
|
10771
10861
|
continue;
|
|
10772
10862
|
const loaderCount = entity.loaders?.quantity.toNumber() ?? 0;
|
|
@@ -10786,6 +10876,50 @@ function partitionSources(target, entities, cargo) {
|
|
|
10786
10876
|
}
|
|
10787
10877
|
return { eligible, unreachable };
|
|
10788
10878
|
}
|
|
10879
|
+
function isTransferTask(task) {
|
|
10880
|
+
const type = task.type.toNumber();
|
|
10881
|
+
return type === TaskType.LOAD || type === TaskType.UNLOAD;
|
|
10882
|
+
}
|
|
10883
|
+
function reservationsOf(source) {
|
|
10884
|
+
if (!source.schedule)
|
|
10885
|
+
return [];
|
|
10886
|
+
const out = new Map();
|
|
10887
|
+
for (const task of source.schedule.tasks) {
|
|
10888
|
+
if (!isTransferTask(task))
|
|
10889
|
+
continue;
|
|
10890
|
+
if (!task.entitytarget)
|
|
10891
|
+
continue;
|
|
10892
|
+
const targetType = task.entitytarget.entity_type;
|
|
10893
|
+
const targetId = task.entitytarget.entity_id;
|
|
10894
|
+
for (const c of task.cargo) {
|
|
10895
|
+
const itemId = c.item_id.toNumber();
|
|
10896
|
+
const quantity = c.quantity.toNumber();
|
|
10897
|
+
if (quantity === 0)
|
|
10898
|
+
continue;
|
|
10899
|
+
const key = `${targetId.toString()}#${itemId}`;
|
|
10900
|
+
const existing = out.get(key);
|
|
10901
|
+
if (existing) {
|
|
10902
|
+
existing.quantity += quantity;
|
|
10903
|
+
}
|
|
10904
|
+
else {
|
|
10905
|
+
out.set(key, {
|
|
10906
|
+
targetEntityId: targetId,
|
|
10907
|
+
targetEntityType: targetType,
|
|
10908
|
+
itemId,
|
|
10909
|
+
quantity,
|
|
10910
|
+
});
|
|
10911
|
+
}
|
|
10912
|
+
}
|
|
10913
|
+
}
|
|
10914
|
+
return Array.from(out.values());
|
|
10915
|
+
}
|
|
10916
|
+
function reservedByItemFor(source) {
|
|
10917
|
+
const out = new Map();
|
|
10918
|
+
for (const r of reservationsOf(source)) {
|
|
10919
|
+
out.set(r.itemId, (out.get(r.itemId) ?? 0) + r.quantity);
|
|
10920
|
+
}
|
|
10921
|
+
return out;
|
|
10922
|
+
}
|
|
10789
10923
|
|
|
10790
10924
|
function totalCargoMass(cargo) {
|
|
10791
10925
|
return cargo.reduce((sum, c) => {
|
|
@@ -11094,25 +11228,20 @@ function applyRechargeTask(projected, _task, options) {
|
|
|
11094
11228
|
}
|
|
11095
11229
|
}
|
|
11096
11230
|
function applyFlightTask(projected, task, options) {
|
|
11097
|
-
if (!task.coordinates
|
|
11231
|
+
if (!task.coordinates)
|
|
11098
11232
|
return;
|
|
11099
|
-
const origin = projected.location;
|
|
11100
11233
|
const destination = Coordinates.from(task.coordinates);
|
|
11101
|
-
const distance = distanceBetweenCoordinates(origin, task.coordinates);
|
|
11102
|
-
const energyUsage = distance.dividing(PRECISION$1).multiplying(projected.engines.drain);
|
|
11103
11234
|
if (options.complete) {
|
|
11104
|
-
projected
|
|
11105
|
-
? UInt16.from(projected.energy.subtracting(energyUsage))
|
|
11106
|
-
: UInt16.from(0);
|
|
11235
|
+
applyEnergyCost(projected, task);
|
|
11107
11236
|
projected.location = destination;
|
|
11108
11237
|
}
|
|
11109
11238
|
else if (options.progress !== undefined) {
|
|
11110
|
-
const interpolated = lerp$1(
|
|
11239
|
+
const interpolated = lerp$1(projected.location, destination, options.progress);
|
|
11111
11240
|
projected.location = Coordinates.from({
|
|
11112
11241
|
x: Math.round(interpolated.x),
|
|
11113
11242
|
y: Math.round(interpolated.y),
|
|
11114
11243
|
});
|
|
11115
|
-
const partialEnergy = UInt64.from(Math.floor(Number(
|
|
11244
|
+
const partialEnergy = UInt64.from(Math.floor(Number(task.energy_cost ?? 0) * options.progress));
|
|
11116
11245
|
projected.energy = projected.energy.gt(partialEnergy)
|
|
11117
11246
|
? UInt16.from(projected.energy.subtracting(partialEnergy))
|
|
11118
11247
|
: UInt16.from(0);
|
|
@@ -11171,6 +11300,7 @@ function applyTask(projected, task) {
|
|
|
11171
11300
|
applyRechargeTask(projected, task, { complete: true });
|
|
11172
11301
|
break;
|
|
11173
11302
|
case TaskType.TRAVEL:
|
|
11303
|
+
case TaskType.WARP:
|
|
11174
11304
|
applyFlightTask(projected, task, { complete: true });
|
|
11175
11305
|
break;
|
|
11176
11306
|
case TaskType.LOAD:
|
|
@@ -11323,6 +11453,7 @@ function projectEntityAt(entity, now) {
|
|
|
11323
11453
|
applyRechargeTask(projected, task, { complete: taskComplete, progress });
|
|
11324
11454
|
break;
|
|
11325
11455
|
case TaskType.TRAVEL:
|
|
11456
|
+
case TaskType.WARP:
|
|
11326
11457
|
applyFlightTask(projected, task, { complete: taskComplete, progress });
|
|
11327
11458
|
break;
|
|
11328
11459
|
case TaskType.LOAD:
|
|
@@ -11389,6 +11520,38 @@ function taskCargoChanges(task) {
|
|
|
11389
11520
|
}
|
|
11390
11521
|
}
|
|
11391
11522
|
|
|
11523
|
+
function energyAtTime(entity, now) {
|
|
11524
|
+
const projected = createProjectedEntity(entity);
|
|
11525
|
+
const capacity = projected.generator ? Number(projected.generator.capacity) : undefined;
|
|
11526
|
+
const clamp = (value) => {
|
|
11527
|
+
const floored = Math.max(0, value);
|
|
11528
|
+
return capacity !== undefined ? Math.min(capacity, floored) : floored;
|
|
11529
|
+
};
|
|
11530
|
+
let running = Number(projected.energy);
|
|
11531
|
+
const tasks = entity.schedule?.tasks;
|
|
11532
|
+
if (!tasks || tasks.length === 0)
|
|
11533
|
+
return clamp(running);
|
|
11534
|
+
const activeIndex = currentTaskIndex(entity, now);
|
|
11535
|
+
const activeProgress = currentTaskProgressFloat(entity, now);
|
|
11536
|
+
for (let i = 0; i < tasks.length; i++) {
|
|
11537
|
+
const complete = isTaskComplete(entity, i, now);
|
|
11538
|
+
if (!complete && i !== activeIndex)
|
|
11539
|
+
break;
|
|
11540
|
+
const fraction = complete ? 1 : activeProgress;
|
|
11541
|
+
if (tasks[i].type.toNumber() === TaskType.RECHARGE) {
|
|
11542
|
+
if (capacity !== undefined) {
|
|
11543
|
+
running = complete ? capacity : running + (capacity - running) * fraction;
|
|
11544
|
+
}
|
|
11545
|
+
}
|
|
11546
|
+
else {
|
|
11547
|
+
const cost = Number(tasks[i].energy_cost ?? 0);
|
|
11548
|
+
running -= cost * fraction;
|
|
11549
|
+
}
|
|
11550
|
+
running = clamp(running);
|
|
11551
|
+
}
|
|
11552
|
+
return clamp(running);
|
|
11553
|
+
}
|
|
11554
|
+
|
|
11392
11555
|
function canMove(e) {
|
|
11393
11556
|
return 'engines' in e && 'generator' in e && 'energy' in e;
|
|
11394
11557
|
}
|
|
@@ -13088,5 +13251,5 @@ function describeItem(resolved, opts) {
|
|
|
13088
13251
|
return `${tier} ${resolved.name} · ${mass}`;
|
|
13089
13252
|
}
|
|
13090
13253
|
|
|
13091
|
-
export { ALL_ENTITY_TYPES, ATOMICASSETS_ACCOUNT, ActionsManager, BASE_ORBITAL_MASS, BLEND_INPUTS_MUST_MATCH, BLEND_REQUIRES_MULTIPLE, BLEND_STAT_LESS_NOT_SUPPORTED, CANCEL_CONTAINS_GROUPED_TASK, CANCEL_PAIRED_HAS_PENDING, CAP_DEMOLISH, CAP_MODULES, CAP_UNDEPLOY, CAP_WRAP, CATEGORY_LABELS, COMMIT_ALREADY_SET, COMMIT_CANNOT_MATCH, COMMIT_NOT_SET, COMPANY_NOT_FOUND, COMPONENT_TIER_PREFIXES, CONTAINER_NOT_FOUND, CONTAINER_Z, CRAFT_ENERGY_DIVISOR, CRAFT_EXCEEDS_ENERGY_CAPACITY, CRAFT_NOT_ENOUGH_ENERGY, ConstructionManager, Coordinates, DEPLOY_ENTITY_HAS_SCHEDULE, DEPTH_THRESHOLD_T1, DEPTH_THRESHOLD_T2, DEPTH_THRESHOLD_T3, DEPTH_THRESHOLD_T4, DEPTH_THRESHOLD_T5, DESTINATION_CAPACITY_EXCEEDED, ENTITY_ALREADY_THERE, ENTITY_CAPACITY_EXCEEDED, ENTITY_CARGO_NOT_LOADED, ENTITY_CARGO_NOT_OWNED, ENTITY_CONTAINER, ENTITY_EXTRACTOR, ENTITY_FACTORY, ENTITY_INVALID_CARGO, ENTITY_INVALID_DESTINATION, ENTITY_INVALID_TRAVEL_DURATION, ENTITY_NEXUS, ENTITY_NOT_ENOUGH_ENERGY, ENTITY_NOT_ENOUGH_ENERGY_CAPACITY, ENTITY_NO_CRAFTER, ENTITY_SHIP, ENTITY_WAREHOUSE, EPOCH_NON_ZERO, EPOCH_NOT_READY, ERROR_SYSTEM_ALREADY_INITIALIZED, ERROR_SYSTEM_DISABLED, ERROR_SYSTEM_NOT_INITIALIZED, EntitiesManager, Entity, EntityClass, EntityInventory, EpochsManager, GAME_NOT_FOUND, GAME_SEED_NOT_SET, GATHERER_DEPTH_MAX_TIER, GATHERER_DEPTH_TABLE, GATHER_EXCEEDS_ENERGY_CAPACITY, GATHER_NOT_ENOUGH_ENERGY, GROUP_DUPLICATE_ENTITY, GROUP_EMPTY, GROUP_ENTITY_NOT_MOVABLE, GROUP_HAUL_CAPACITY_EXCEEDED, GROUP_NOT_FOUND, GROUP_NOT_SAME_LOCATION, GROUP_NOT_SAME_OWNER, GROUP_NO_THRUST, GameState, INSUFFICIENT_BALANCE, INSUFFICIENT_ITEM_QUANTITY, INSUFFICIENT_ITEM_SUPPLY, INVALID_AMOUNT, ITEM_BATTERY_T1, ITEM_BEAM, ITEM_BIOMASS_T1, ITEM_BIOMASS_T10, ITEM_BIOMASS_T2, ITEM_BIOMASS_T3, ITEM_BIOMASS_T4, ITEM_BIOMASS_T5, ITEM_BIOMASS_T6, ITEM_BIOMASS_T7, ITEM_BIOMASS_T8, ITEM_BIOMASS_T9, ITEM_CERAMIC, ITEM_CONTAINER_T1_PACKED, ITEM_CONTAINER_T2_PACKED, ITEM_CRAFTER_T1, ITEM_CRYSTAL_T1, ITEM_CRYSTAL_T10, ITEM_CRYSTAL_T2, ITEM_CRYSTAL_T3, ITEM_CRYSTAL_T4, ITEM_CRYSTAL_T5, ITEM_CRYSTAL_T6, ITEM_CRYSTAL_T7, ITEM_CRYSTAL_T8, ITEM_CRYSTAL_T9, ITEM_DOES_NOT_EXIST, ITEM_EMITTER, ITEM_ENGINE_T1, ITEM_EXTRACTOR_T1_PACKED, ITEM_FACTORY_T1_PACKED, ITEM_FRAME, ITEM_FRAME_T2, ITEM_GAS_T1, ITEM_GAS_T10, ITEM_GAS_T2, ITEM_GAS_T3, ITEM_GAS_T4, ITEM_GAS_T5, ITEM_GAS_T6, ITEM_GAS_T7, ITEM_GAS_T8, ITEM_GAS_T9, ITEM_GATHERER_T1, ITEM_GENERATOR_T1, ITEM_HAULER_T1, ITEM_LOADER_T1, ITEM_NOT_AVAILABLE_AT_LOCATION, ITEM_NOT_DEPLOYABLE, ITEM_NOT_PACKED_ENTITY, ITEM_ORE_T1, ITEM_ORE_T10, ITEM_ORE_T2, ITEM_ORE_T3, ITEM_ORE_T4, ITEM_ORE_T5, ITEM_ORE_T6, ITEM_ORE_T7, ITEM_ORE_T8, ITEM_ORE_T9, ITEM_PLASMA_CELL, ITEM_PLATE, ITEM_PLATE_T2, ITEM_POLYMER, ITEM_REACTOR, ITEM_REGOLITH_T1, ITEM_REGOLITH_T10, ITEM_REGOLITH_T2, ITEM_REGOLITH_T3, ITEM_REGOLITH_T4, ITEM_REGOLITH_T5, ITEM_REGOLITH_T6, ITEM_REGOLITH_T7, ITEM_REGOLITH_T8, ITEM_REGOLITH_T9, ITEM_RESONATOR, ITEM_SENSOR, ITEM_SHIP_T1_PACKED, ITEM_STORAGE_T1, ITEM_TYPE_COMPONENT, ITEM_TYPE_ENTITY, ITEM_TYPE_MODULE, ITEM_TYPE_RESOURCE, ITEM_WAREHOUSE_T1_PACKED, ITEM_WARP_T1, InventoryAccessor, LOCATION_MAX_DEPTH, LOCATION_MIN_DEPTH, Location, LocationType, LocationsManager, MAX_ORBITAL_ALTITUDE, MIN_ORBITAL_ALTITUDE, MIN_TRANSFER_DISTANCE, MODULE_ANY, MODULE_BATTERY, MODULE_CARGO_NOT_FOUND, MODULE_CRAFTER, MODULE_ENGINE, MODULE_ENTITY_BUSY, MODULE_GATHERER, MODULE_GENERATOR, MODULE_HAULER, MODULE_LAUNCHER, MODULE_LOADER, MODULE_NOT_MODULE, MODULE_SLOT_EMPTY, MODULE_SLOT_INVALID, MODULE_SLOT_OCCUPIED, MODULE_STORAGE, MODULE_TIER_PREFIXES, MODULE_TYPE_MISMATCH, MODULE_WARP, index as NFT, NO_SCHEDULE, NftManager, PLANETARY_STRUCTURE_Z, PLANET_SUBTYPE_GAS_GIANT, PLANET_SUBTYPE_ICY, PLANET_SUBTYPE_INDUSTRIAL, PLANET_SUBTYPE_OCEAN, PLANET_SUBTYPE_ROCKY, PLANET_SUBTYPE_TERRESTRIAL, PLAYER_ALREADY_JOINED, PLAYER_NOT_FOUND, PLAYER_NOT_JOINED, PRECISION$1 as PRECISION, platform as PlatformContract, Types$1 as PlatformTypes, Player, PlayersManager, RECIPE_INPUTS_EXCESS, RECIPE_INPUTS_INSUFFICIENT, RECIPE_INPUTS_INVALID, RECIPE_INPUTS_MIXED, RECIPE_NOT_FOUND, REQUIRES_MORE_THAN_ONE, REQUIRES_POSITIVE_VALUE, RESERVE_TIERS, RESOLVE_COUNT_EXCEEDS_COMPLETED, RESOURCE_TIER_ADJECTIVES, SHIPLOAD_COLLECTION, SHIP_ALREADY_TRAVELING, SHIP_CANNOT_BUY_TRAVELING, SHIP_CANNOT_CANCEL_TASK, SHIP_CANNOT_UPDATE_TRAVELING, SHIP_NOT_ARRIVED, SHIP_NOT_FOUND, SHIP_NOT_IDLE, SHIP_NOT_OWNED, SHIP_NO_COMPLETED_TASKS, SHIP_NO_TASKS_TO_CANCEL, SLOT_FORMULAS, ScheduleAccessor, server as ServerContract, Types as ServerTypes, Shipload, SubscriptionsManager, TIER_ROLL_MAX, TRAVEL_MAX_DURATION, TaskCancelable, TaskType, WAREHOUSE_ALREADY_AT_LOCATION, WAREHOUSE_NOT_FOUND, WARP_HAS_CARGO, WARP_HAS_SCHEDULE, WARP_NOT_FULL_ENERGY, WARP_NO_CAPABILITY, WARP_OUT_OF_RANGE, WebSocketConnection, YIELD_FRACTION_DEEP, YIELD_FRACTION_SHALLOW, allBuildableItems, allPlotBuildableItems, availableBuildMethods, availableCapacity, availableCapacityFromMass, baseName, blendCargoStacks, blendComponentStacks, blendCrossGroup, blendStacks, buildComponentImmutable, buildEntityDescription, buildEntityImmutable, buildImmutableData, buildMintAssetAction, buildModuleImmutable, buildResourceImmutable, calcCargoItemMass, calcCargoMass, calcEnergyUsage, calcLoadDuration, calcStacksMass, calc_acceleration, calc_craft_duration, calc_craft_energy, calc_energyusage, calc_flighttime, calc_gather_duration, calc_gather_energy, calc_gather_rate, calc_loader_acceleration, calc_loader_flighttime, calc_orbital_altitude, calc_rechargetime, calc_ship_acceleration, calc_ship_flighttime, calc_ship_mass, calc_ship_rechargetime, calc_transfer_duration, calculateFlightTime, calculateLoadTimeBreakdown, calculateRefuelingTime, calculateTransferTime, canMove, capabilityAttributes, capabilityNames, capsHasCrafter, capsHasGatherer, capsHasHauler, capsHasLoaders, capsHasMass, capsHasMovement, capsHasStorage, cargoItem, cargoItemToStack, cargoRef, cargoUtils, categoryColors, categoryFromIndex, categoryIconShapes, categoryIcons, categoryLabel, categoryLabelFromIndex, componentIcon, computeBaseCapacity, computeBaseCapacityShip, computeBaseCapacityWarehouse, computeBaseHullmass, computeComponentStats, computeContainerCapabilities, computeContainerT2Capabilities, computeCraftedOutputStats, computeCrafterCapabilities, computeCrafterDrain, computeCrafterSpeed, computeEngineCapabilities, computeEngineDrain, computeEngineThrust, computeEntityCapabilities, computeEntityStats, computeGathererCapabilities, computeGathererDepth, computeGathererDrain, computeGathererYield, computeGeneratorCap, computeGeneratorCapabilities, computeGeneratorRech, computeHaulPenalty, computeHaulerCapabilities, computeHaulerCapacity, computeHaulerDrain$1 as computeHaulerDrain, computeHaulerEfficiency, computeInputMass, computeLoaderCapabilities, computeLoaderMass, computeLoaderThrust, computeNftImageUrl, computeShipHullCapabilities, computeStorageCapabilities, computeWarehouseHullCapabilities, computeWarpCapabilities, computeWarpRange, coordsToLocationId, createInventoryAccessor, createProjectedEntity, createScheduleAccessor, decodeAtomicAsset, decodeCraftedItemStats, decodeStat, decodeStats, Shipload as default, deriveLocation, deriveLocationSize, deriveLocationStatic, deriveResourceStats, deriveStatMappings, deriveStrata, deriveStratum, describeItem, describeModule, describeModuleForItem, describeModuleForSlot, deserializeAsset, deserializeAtomicData, deserializeComponent, deserializeEntity, deserializeModule, deserializeResource, displayName, distanceBetweenCoordinates, distanceBetweenPoints, easeFlightProgress, encodeGatheredCargoStats, encodeStats, energyPercent, entityDisplayName, estimateDealTravelTime, estimateTravelTime, fetchAtomicAssetsForOwner, fetchAtomicSchemas, filterByBuildMethod, findNearbyPlanets, flightSpeedFactor, formatLocation, formatMass, formatMassDelta, formatMassScaled, formatModuleLine, formatTier, gathererDepthForTier, getCapabilityAttributes, getCategoryInfo, getComponents, getCurrentEpoch, getDepthThreshold, getDestinationLocation, getEffectiveReserve, getEligibleResources, getEntityClass, getEntityItems, getEntityLayout, getEpochInfo, getFlightOrigin, getInterpolatedPosition, getItem, getItems, getKindMeta, getLocationCandidates, getLocationProfile, getLocationType, getLocationTypeName, getModuleCapabilityType, getModules, getPackedEntityType, getPlanetSubtype, getPlanetSubtypes, getPositionAt, getRecipe, getResourceTier, getResourceWeight, getResources, getStatDefinitions, getStatMappings, getStatMappingsForCapability, getStatMappingsForStat, getStatName, getSystemName, getTemplateMeta, hasEnergy, hasEnergyForDistance, hasGatherer, hasLoaders, hasMass, hasSchedule, hasSpace, hasSpaceForMass, hasStorage, hasSystem, hash, hash512, interpolateFlightPosition, isBuildable, isContainer, isCraftedItem, isExtractor, isFactory, isFull, isFullFromMass, isGatherableLocation, isInvertedAttribute, isLocationBuildable, isModuleItem, isNexus, isPlot, isPlotBuildable, isRelatedItem, isShip, isSubscriptionsDebugEnabled, isWarehouse, itemAbbreviations, itemCategory, itemIds, itemOffset, itemTier, itemTypeCode, kindCan, lerp$1 as lerp, makeEntity, mapEntity, maxTravelDistance, mergeStacks, moduleAccepts, moduleDisplayName, moduleIcon, moduleSlotTypeToCode, needsRecharge, parseWireEntity, projectEntity, projectEntityAt, projectFromCurrentState, projectFromCurrentStateAt, readCommonBase, removeFromStacks, renderDescription, resolveItem, resolveItemCategory, resolveStats, rollTier, rollWithinTier, rotation, schedule, setSubscriptionsDebug, stackKey, stackToCargoItem, stacksEqual, taskCargoChanges, tierAdjective, tierColors, tierOfReserve, toLocation, typeLabel, validateSchedule, yieldThresholdAt };
|
|
13254
|
+
export { ALL_ENTITY_TYPES, ATOMICASSETS_ACCOUNT, ActionsManager, BASE_ORBITAL_MASS, BLEND_INPUTS_MUST_MATCH, BLEND_REQUIRES_MULTIPLE, BLEND_STAT_LESS_NOT_SUPPORTED, CANCEL_CONTAINS_GROUPED_TASK, CANCEL_PAIRED_HAS_PENDING, CAP_DEMOLISH, CAP_MODULES, CAP_UNDEPLOY, CAP_WRAP, CATEGORY_LABELS, COMMIT_ALREADY_SET, COMMIT_CANNOT_MATCH, COMMIT_NOT_SET, COMPANY_NOT_FOUND, COMPONENT_TIER_PREFIXES, CONTAINER_NOT_FOUND, CONTAINER_Z, CRAFT_ENERGY_DIVISOR, CRAFT_EXCEEDS_ENERGY_CAPACITY, CRAFT_NOT_ENOUGH_ENERGY, ConstructionManager, Coordinates, DEPLOY_ENTITY_HAS_SCHEDULE, DEPTH_THRESHOLD_T1, DEPTH_THRESHOLD_T2, DEPTH_THRESHOLD_T3, DEPTH_THRESHOLD_T4, DEPTH_THRESHOLD_T5, DESTINATION_CAPACITY_EXCEEDED, ENTITY_ALREADY_THERE, ENTITY_CAPACITY_EXCEEDED, ENTITY_CARGO_NOT_LOADED, ENTITY_CARGO_NOT_OWNED, ENTITY_CONTAINER, ENTITY_EXTRACTOR, ENTITY_FACTORY, ENTITY_INVALID_CARGO, ENTITY_INVALID_DESTINATION, ENTITY_INVALID_TRAVEL_DURATION, ENTITY_NEXUS, ENTITY_NOT_ENOUGH_ENERGY, ENTITY_NOT_ENOUGH_ENERGY_CAPACITY, ENTITY_NO_CRAFTER, ENTITY_SHIP, ENTITY_WAREHOUSE, EPOCH_NON_ZERO, EPOCH_NOT_READY, ERROR_SYSTEM_ALREADY_INITIALIZED, ERROR_SYSTEM_DISABLED, ERROR_SYSTEM_NOT_INITIALIZED, EntitiesManager, Entity, EntityClass, EntityInventory, EpochsManager, GAME_NOT_FOUND, GAME_SEED_NOT_SET, GATHERER_DEPTH_MAX_TIER, GATHERER_DEPTH_TABLE, GATHER_EXCEEDS_ENERGY_CAPACITY, GATHER_NOT_ENOUGH_ENERGY, GROUP_DUPLICATE_ENTITY, GROUP_EMPTY, GROUP_ENTITY_NOT_MOVABLE, GROUP_HAUL_CAPACITY_EXCEEDED, GROUP_NOT_FOUND, GROUP_NOT_SAME_LOCATION, GROUP_NOT_SAME_OWNER, GROUP_NO_THRUST, GameState, INSUFFICIENT_BALANCE, INSUFFICIENT_ITEM_QUANTITY, INSUFFICIENT_ITEM_SUPPLY, INVALID_AMOUNT, ITEM_BATTERY_T1, ITEM_BEAM, ITEM_BIOMASS_T1, ITEM_BIOMASS_T10, ITEM_BIOMASS_T2, ITEM_BIOMASS_T3, ITEM_BIOMASS_T4, ITEM_BIOMASS_T5, ITEM_BIOMASS_T6, ITEM_BIOMASS_T7, ITEM_BIOMASS_T8, ITEM_BIOMASS_T9, ITEM_CERAMIC, ITEM_CONTAINER_T1_PACKED, ITEM_CONTAINER_T2_PACKED, ITEM_CRAFTER_T1, ITEM_CRYSTAL_T1, ITEM_CRYSTAL_T10, ITEM_CRYSTAL_T2, ITEM_CRYSTAL_T3, ITEM_CRYSTAL_T4, ITEM_CRYSTAL_T5, ITEM_CRYSTAL_T6, ITEM_CRYSTAL_T7, ITEM_CRYSTAL_T8, ITEM_CRYSTAL_T9, ITEM_DOES_NOT_EXIST, ITEM_EMITTER, ITEM_ENGINE_T1, ITEM_EXTRACTOR_T1_PACKED, ITEM_FACTORY_T1_PACKED, ITEM_FRAME, ITEM_FRAME_T2, ITEM_GAS_T1, ITEM_GAS_T10, ITEM_GAS_T2, ITEM_GAS_T3, ITEM_GAS_T4, ITEM_GAS_T5, ITEM_GAS_T6, ITEM_GAS_T7, ITEM_GAS_T8, ITEM_GAS_T9, ITEM_GATHERER_T1, ITEM_GENERATOR_T1, ITEM_HAULER_T1, ITEM_LOADER_T1, ITEM_NOT_AVAILABLE_AT_LOCATION, ITEM_NOT_DEPLOYABLE, ITEM_NOT_PACKED_ENTITY, ITEM_ORE_T1, ITEM_ORE_T10, ITEM_ORE_T2, ITEM_ORE_T3, ITEM_ORE_T4, ITEM_ORE_T5, ITEM_ORE_T6, ITEM_ORE_T7, ITEM_ORE_T8, ITEM_ORE_T9, ITEM_PLASMA_CELL, ITEM_PLATE, ITEM_PLATE_T2, ITEM_POLYMER, ITEM_REACTOR, ITEM_REGOLITH_T1, ITEM_REGOLITH_T10, ITEM_REGOLITH_T2, ITEM_REGOLITH_T3, ITEM_REGOLITH_T4, ITEM_REGOLITH_T5, ITEM_REGOLITH_T6, ITEM_REGOLITH_T7, ITEM_REGOLITH_T8, ITEM_REGOLITH_T9, ITEM_RESONATOR, ITEM_SENSOR, ITEM_SHIP_T1_PACKED, ITEM_STORAGE_T1, ITEM_TYPE_COMPONENT, ITEM_TYPE_ENTITY, ITEM_TYPE_MODULE, ITEM_TYPE_RESOURCE, ITEM_WAREHOUSE_T1_PACKED, ITEM_WARP_T1, InventoryAccessor, LOCATION_MAX_DEPTH, LOCATION_MIN_DEPTH, Location, LocationType, LocationsManager, MAX_ORBITAL_ALTITUDE, MIN_ORBITAL_ALTITUDE, MIN_TRANSFER_DISTANCE, MODULE_ANY, MODULE_BATTERY, MODULE_CARGO_NOT_FOUND, MODULE_CRAFTER, MODULE_ENGINE, MODULE_ENTITY_BUSY, MODULE_GATHERER, MODULE_GENERATOR, MODULE_HAULER, MODULE_LAUNCHER, MODULE_LOADER, MODULE_NOT_MODULE, MODULE_SLOT_EMPTY, MODULE_SLOT_INVALID, MODULE_SLOT_OCCUPIED, MODULE_STORAGE, MODULE_TIER_PREFIXES, MODULE_TYPE_MISMATCH, MODULE_WARP, index as NFT, NO_SCHEDULE, NftManager, PLANETARY_STRUCTURE_Z, PLANET_SUBTYPE_GAS_GIANT, PLANET_SUBTYPE_ICY, PLANET_SUBTYPE_INDUSTRIAL, PLANET_SUBTYPE_OCEAN, PLANET_SUBTYPE_ROCKY, PLANET_SUBTYPE_TERRESTRIAL, PLAYER_ALREADY_JOINED, PLAYER_NOT_FOUND, PLAYER_NOT_JOINED, PRECISION$1 as PRECISION, platform as PlatformContract, Types$1 as PlatformTypes, Player, PlayersManager, RECIPE_INPUTS_EXCESS, RECIPE_INPUTS_INSUFFICIENT, RECIPE_INPUTS_INVALID, RECIPE_INPUTS_MIXED, RECIPE_NOT_FOUND, REQUIRES_MORE_THAN_ONE, REQUIRES_POSITIVE_VALUE, RESERVE_TIERS, RESOLVE_COUNT_EXCEEDS_COMPLETED, RESOURCE_TIER_ADJECTIVES, SHIPLOAD_COLLECTION, SHIP_ALREADY_TRAVELING, SHIP_CANNOT_BUY_TRAVELING, SHIP_CANNOT_CANCEL_TASK, SHIP_CANNOT_UPDATE_TRAVELING, SHIP_NOT_ARRIVED, SHIP_NOT_FOUND, SHIP_NOT_IDLE, SHIP_NOT_OWNED, SHIP_NO_COMPLETED_TASKS, SHIP_NO_TASKS_TO_CANCEL, SLOT_FORMULAS, ScheduleAccessor, server as ServerContract, Types as ServerTypes, Shipload, SubscriptionsManager, TIER_ROLL_MAX, TRAVEL_MAX_DURATION, TaskCancelable, TaskType, WAREHOUSE_ALREADY_AT_LOCATION, WAREHOUSE_NOT_FOUND, WARP_HAS_CARGO, WARP_HAS_SCHEDULE, WARP_NOT_FULL_ENERGY, WARP_NO_CAPABILITY, WARP_OUT_OF_RANGE, WebSocketConnection, YIELD_FRACTION_DEEP, YIELD_FRACTION_SHALLOW, allBuildableItems, allPlotBuildableItems, availableBuildMethods, availableCapacity, availableCapacityFromMass, baseName, blendCargoStacks, blendComponentStacks, blendCrossGroup, blendStacks, buildComponentImmutable, buildEntityDescription, buildEntityImmutable, buildImmutableData, buildMintAssetAction, buildModuleImmutable, buildResourceImmutable, calcCargoItemMass, calcCargoMass, calcEnergyUsage, calcLoadDuration, calcStacksMass, calc_acceleration, calc_craft_duration, calc_craft_energy, calc_energyusage, calc_flighttime, calc_gather_duration, calc_gather_energy, calc_gather_rate, calc_loader_acceleration, calc_loader_flighttime, calc_orbital_altitude, calc_rechargetime, calc_ship_acceleration, calc_ship_flighttime, calc_ship_mass, calc_ship_rechargetime, calc_transfer_duration, calculateFlightTime, calculateLoadTimeBreakdown, calculateRefuelingTime, calculateTransferTime, canMove, capabilityAttributes, capabilityNames, capsHasCrafter, capsHasGatherer, capsHasHauler, capsHasLoaders, capsHasMass, capsHasMovement, capsHasStorage, cargoItem, cargoItemToStack, cargoRef, cargoUtils, categoryColors, categoryFromIndex, categoryIconShapes, categoryIcons, categoryLabel, categoryLabelFromIndex, componentIcon, computeBaseCapacity, computeBaseCapacityShip, computeBaseCapacityWarehouse, computeBaseHullmass, computeComponentStats, computeContainerCapabilities, computeContainerT2Capabilities, computeCraftedOutputStats, computeCrafterCapabilities, computeCrafterDrain, computeCrafterSpeed, computeEngineCapabilities, computeEngineDrain, computeEngineThrust, computeEntityCapabilities, computeEntityStats, computeGathererCapabilities, computeGathererDepth, computeGathererDrain, computeGathererYield, computeGeneratorCap, computeGeneratorCapabilities, computeGeneratorRech, computeHaulPenalty, computeHaulerCapabilities, computeHaulerCapacity, computeHaulerDrain$1 as computeHaulerDrain, computeHaulerEfficiency, computeInputMass, computeLoaderCapabilities, computeLoaderMass, computeLoaderThrust, computeNftImageUrl, computeShipHullCapabilities, computeStorageCapabilities, computeWarehouseHullCapabilities, computeWarpCapabilities, computeWarpRange, coordsToLocationId, createInventoryAccessor, createProjectedEntity, createScheduleAccessor, decodeAtomicAsset, decodeCraftedItemStats, decodeStat, decodeStats, Shipload as default, deriveLocation, deriveLocationSize, deriveLocationStatic, deriveResourceStats, deriveStatMappings, deriveStrata, deriveStratum, describeItem, describeModule, describeModuleForItem, describeModuleForSlot, deserializeAsset, deserializeAtomicData, deserializeComponent, deserializeEntity, deserializeModule, deserializeResource, displayName, distanceBetweenCoordinates, distanceBetweenPoints, easeFlightProgress, encodeGatheredCargoStats, encodeStats, energyAtTime, energyPercent, entityDisplayName, estimateDealTravelTime, estimateTravelTime, fetchAtomicAssetsForOwner, fetchAtomicSchemas, filterByBuildMethod, findNearbyPlanets, flightSpeedFactor, formatLocation, formatMass, formatMassDelta, formatMassScaled, formatModuleLine, formatTier, gathererDepthForTier, getCapabilityAttributes, getCategoryInfo, getComponents, getCurrentEpoch, getDepthThreshold, getDestinationLocation, getEffectiveReserve, getEligibleResources, getEntityClass, getEntityItems, getEntityLayout, getEpochInfo, getFlightOrigin, getInterpolatedPosition, getItem, getItems, getKindMeta, getLocationCandidates, getLocationProfile, getLocationType, getLocationTypeName, getModuleCapabilityType, getModules, getPackedEntityType, getPlanetSubtype, getPlanetSubtypes, getPositionAt, getRecipe, getResourceTier, getResourceWeight, getResources, getStatDefinitions, getStatMappings, getStatMappingsForCapability, getStatMappingsForStat, getStatName, getSystemName, getTemplateMeta, hasEnergy, hasEnergyForDistance, hasGatherer, hasLoaders, hasMass, hasSchedule, hasSpace, hasSpaceForMass, hasStorage, hasSystem, hash, hash512, interpolateFlightPosition, isBuildable, isContainer, isCraftedItem, isExtractor, isFactory, isFull, isFullFromMass, isGatherableLocation, isInvertedAttribute, isLocationBuildable, isModuleItem, isNexus, isPlot, isPlotBuildable, isRelatedItem, isShip, isSubscriptionsDebugEnabled, isWarehouse, itemAbbreviations, itemCategory, itemIds, itemOffset, itemTier, itemTypeCode, kindCan, lerp$1 as lerp, makeEntity, mapEntity, maxTravelDistance, mergeStacks, moduleAccepts, moduleDisplayName, moduleIcon, moduleSlotTypeToCode, needsRecharge, parseWireEntity, projectEntity, projectEntityAt, projectFromCurrentState, projectFromCurrentStateAt, readCommonBase, removeFromStacks, renderDescription, resolveItem, resolveItemCategory, resolveStats, rollTier, rollWithinTier, rotation, schedule, setSubscriptionsDebug, stackKey, stackToCargoItem, stacksEqual, taskCargoChanges, tierAdjective, tierColors, tierOfReserve, toLocation, typeLabel, validateSchedule, yieldThresholdAt };
|
|
13092
13255
|
//# sourceMappingURL=shipload.m.js.map
|