@shipload/sdk 1.0.0-next.4 → 1.0.0-next.6
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 +197 -92
- package/lib/shipload.js +672 -64
- package/lib/shipload.js.map +1 -1
- package/lib/shipload.m.js +664 -64
- package/lib/shipload.m.js.map +1 -1
- package/package.json +1 -1
- package/src/contracts/server.ts +54 -1
- package/src/data/colors.ts +1 -0
- package/src/data/items.json +245 -0
- package/src/data/metadata.ts +44 -1
- package/src/derivation/index.ts +1 -0
- package/src/derivation/resources.ts +116 -37
- package/src/entities/container.ts +15 -0
- package/src/entities/ship-deploy.ts +42 -6
- package/src/entities/ship.ts +17 -0
- package/src/entities/warehouse.ts +8 -0
- package/src/index-module.ts +24 -15
- package/src/managers/actions.ts +24 -1
- package/src/nft/description.ts +21 -2
- package/src/resolution/resolve-item.ts +9 -5
- package/src/scheduling/accessor.ts +4 -0
- package/src/scheduling/projection.ts +8 -0
- package/src/scheduling/schedule.ts +15 -1
- package/src/subscriptions/manager.ts +37 -1
- package/src/travel/travel.ts +58 -1
- package/src/types.ts +4 -0
- package/src/utils/system.ts +21 -8
package/lib/shipload.d.ts
CHANGED
|
@@ -289,6 +289,8 @@ declare namespace Types {
|
|
|
289
289
|
capacity: UInt32;
|
|
290
290
|
cargomass: UInt32;
|
|
291
291
|
schedule?: schedule;
|
|
292
|
+
stats: UInt64;
|
|
293
|
+
item_id: UInt16;
|
|
292
294
|
}
|
|
293
295
|
class craft extends Struct {
|
|
294
296
|
entity_type: Name;
|
|
@@ -308,6 +310,10 @@ declare namespace Types {
|
|
|
308
310
|
x: Int64;
|
|
309
311
|
y: Int64;
|
|
310
312
|
}
|
|
313
|
+
class demolish extends Struct {
|
|
314
|
+
entity_type: Name;
|
|
315
|
+
entity_id: UInt64;
|
|
316
|
+
}
|
|
311
317
|
class deploy extends Struct {
|
|
312
318
|
entity_type: Name;
|
|
313
319
|
id: UInt64;
|
|
@@ -731,6 +737,7 @@ declare namespace Types {
|
|
|
731
737
|
hauler?: hauler_stats;
|
|
732
738
|
modules: module_entry[];
|
|
733
739
|
schedule?: schedule;
|
|
740
|
+
item_id: UInt16;
|
|
734
741
|
}
|
|
735
742
|
class spawncargo extends Struct {
|
|
736
743
|
entity_id: UInt64;
|
|
@@ -797,6 +804,12 @@ declare namespace Types {
|
|
|
797
804
|
game_config_type: game_config;
|
|
798
805
|
stratum_remaining_type: stratum_remaining;
|
|
799
806
|
}
|
|
807
|
+
class undeploy extends Struct {
|
|
808
|
+
host_type: Name;
|
|
809
|
+
host_id: UInt64;
|
|
810
|
+
target_type: Name;
|
|
811
|
+
target_id: UInt64;
|
|
812
|
+
}
|
|
800
813
|
class warehouse_row extends Struct {
|
|
801
814
|
id: UInt64;
|
|
802
815
|
owner: Name;
|
|
@@ -809,6 +822,7 @@ declare namespace Types {
|
|
|
809
822
|
loaders?: loader_stats;
|
|
810
823
|
modules: module_entry[];
|
|
811
824
|
schedule?: schedule;
|
|
825
|
+
item_id: UInt16;
|
|
812
826
|
}
|
|
813
827
|
class warp extends Struct {
|
|
814
828
|
entity_type: Name;
|
|
@@ -827,6 +841,10 @@ declare namespace Types {
|
|
|
827
841
|
cargo_id: UInt64;
|
|
828
842
|
quantity: UInt64;
|
|
829
843
|
}
|
|
844
|
+
class wrapentity extends Struct {
|
|
845
|
+
entity_type: Name;
|
|
846
|
+
entity_id: UInt64;
|
|
847
|
+
}
|
|
830
848
|
}
|
|
831
849
|
declare const TableMap: {
|
|
832
850
|
cargo: typeof Types.cargo_row;
|
|
@@ -983,6 +1001,10 @@ declare namespace ActionParams {
|
|
|
983
1001
|
x: Int64Type;
|
|
984
1002
|
y: Int64Type;
|
|
985
1003
|
}
|
|
1004
|
+
interface demolish {
|
|
1005
|
+
entity_type: NameType;
|
|
1006
|
+
entity_id: UInt64Type;
|
|
1007
|
+
}
|
|
986
1008
|
interface deploy {
|
|
987
1009
|
entity_type: NameType;
|
|
988
1010
|
id: UInt64Type;
|
|
@@ -1150,6 +1172,12 @@ declare namespace ActionParams {
|
|
|
1150
1172
|
y: Int64Type;
|
|
1151
1173
|
recharge: boolean;
|
|
1152
1174
|
}
|
|
1175
|
+
interface undeploy {
|
|
1176
|
+
host_type: NameType;
|
|
1177
|
+
host_id: UInt64Type;
|
|
1178
|
+
target_type: NameType;
|
|
1179
|
+
target_id: UInt64Type;
|
|
1180
|
+
}
|
|
1153
1181
|
interface warp {
|
|
1154
1182
|
entity_type: NameType;
|
|
1155
1183
|
id: UInt64Type;
|
|
@@ -1167,6 +1195,10 @@ declare namespace ActionParams {
|
|
|
1167
1195
|
cargo_id: UInt64Type;
|
|
1168
1196
|
quantity: UInt64Type;
|
|
1169
1197
|
}
|
|
1198
|
+
interface wrapentity {
|
|
1199
|
+
entity_type: NameType;
|
|
1200
|
+
entity_id: UInt64Type;
|
|
1201
|
+
}
|
|
1170
1202
|
}
|
|
1171
1203
|
interface ActionNameParams {
|
|
1172
1204
|
addmodule: ActionParams.addmodule;
|
|
@@ -1181,6 +1213,7 @@ interface ActionNameParams {
|
|
|
1181
1213
|
configlog: ActionParams.configlog;
|
|
1182
1214
|
craft: ActionParams.craft;
|
|
1183
1215
|
createentity: ActionParams.createentity;
|
|
1216
|
+
demolish: ActionParams.demolish;
|
|
1184
1217
|
deploy: ActionParams.deploy;
|
|
1185
1218
|
descentity: ActionParams.descentity;
|
|
1186
1219
|
enable: ActionParams.enable;
|
|
@@ -1224,15 +1257,18 @@ interface ActionNameParams {
|
|
|
1224
1257
|
spawnseeded: ActionParams.spawnseeded;
|
|
1225
1258
|
transfer: ActionParams.transfer;
|
|
1226
1259
|
travel: ActionParams.travel;
|
|
1260
|
+
undeploy: ActionParams.undeploy;
|
|
1227
1261
|
warp: ActionParams.warp;
|
|
1228
1262
|
wipe: ActionParams.wipe;
|
|
1229
1263
|
wipesequence: ActionParams.wipesequence;
|
|
1230
1264
|
wrap: ActionParams.wrap;
|
|
1265
|
+
wrapentity: ActionParams.wrapentity;
|
|
1231
1266
|
}
|
|
1232
1267
|
type ActionNames = keyof ActionNameParams;
|
|
1233
1268
|
interface ActionReturnValues {
|
|
1234
1269
|
cancel: Types.cancel_results;
|
|
1235
1270
|
craft: Types.task_results;
|
|
1271
|
+
demolish: Types.task_results;
|
|
1236
1272
|
deploy: Types.task_results;
|
|
1237
1273
|
descentity: string;
|
|
1238
1274
|
gather: Types.task_results;
|
|
@@ -1265,8 +1301,10 @@ interface ActionReturnValues {
|
|
|
1265
1301
|
resolve: Types.resolve_results;
|
|
1266
1302
|
transfer: Types.task_results;
|
|
1267
1303
|
travel: Types.task_results;
|
|
1304
|
+
undeploy: Types.task_results;
|
|
1268
1305
|
warp: Types.task_results;
|
|
1269
1306
|
wrap: Types.task_results;
|
|
1307
|
+
wrapentity: Types.task_results;
|
|
1270
1308
|
}
|
|
1271
1309
|
type ActionReturnNames = keyof ActionReturnValues;
|
|
1272
1310
|
declare class Contract extends Contract$2 {
|
|
@@ -1431,13 +1469,17 @@ declare enum TaskType {
|
|
|
1431
1469
|
CRAFT = 7,
|
|
1432
1470
|
DEPLOY = 8,
|
|
1433
1471
|
WRAP = 9,
|
|
1434
|
-
UNWRAP = 10
|
|
1472
|
+
UNWRAP = 10,
|
|
1473
|
+
UNDEPLOY = 11,
|
|
1474
|
+
WRAP_ENTITY = 12,
|
|
1475
|
+
DEMOLISH = 13
|
|
1435
1476
|
}
|
|
1436
1477
|
declare enum LocationType {
|
|
1437
1478
|
EMPTY = 0,
|
|
1438
1479
|
PLANET = 1,
|
|
1439
1480
|
ASTEROID = 2,
|
|
1440
|
-
NEBULA = 3
|
|
1481
|
+
NEBULA = 3,
|
|
1482
|
+
ICE_FIELD = 4
|
|
1441
1483
|
}
|
|
1442
1484
|
declare enum TaskCancelable {
|
|
1443
1485
|
NEVER = 0,
|
|
@@ -1726,10 +1768,10 @@ declare function deriveStrata(coords: CoordinatesType, gameSeed: Checksum256Type
|
|
|
1726
1768
|
declare function deriveLocationSize(loc: Types.location_static): number;
|
|
1727
1769
|
|
|
1728
1770
|
declare const DEPTH_THRESHOLD_T1 = 0;
|
|
1729
|
-
declare const DEPTH_THRESHOLD_T2 =
|
|
1730
|
-
declare const DEPTH_THRESHOLD_T3 =
|
|
1731
|
-
declare const DEPTH_THRESHOLD_T4 =
|
|
1732
|
-
declare const DEPTH_THRESHOLD_T5 =
|
|
1771
|
+
declare const DEPTH_THRESHOLD_T2 = 1500;
|
|
1772
|
+
declare const DEPTH_THRESHOLD_T3 = 5000;
|
|
1773
|
+
declare const DEPTH_THRESHOLD_T4 = 12000;
|
|
1774
|
+
declare const DEPTH_THRESHOLD_T5 = 22000;
|
|
1733
1775
|
declare const LOCATION_MIN_DEPTH = 500;
|
|
1734
1776
|
declare const LOCATION_MAX_DEPTH = 65535;
|
|
1735
1777
|
declare const PLANET_SUBTYPE_GAS_GIANT = 0;
|
|
@@ -1741,6 +1783,11 @@ declare const PLANET_SUBTYPE_INDUSTRIAL = 5;
|
|
|
1741
1783
|
declare function getDepthThreshold(tier: number): number;
|
|
1742
1784
|
declare function getResourceTier(itemId: number): number;
|
|
1743
1785
|
declare function getResourceWeight(itemId: number, stratum: number): number;
|
|
1786
|
+
interface LocationProfileEntry {
|
|
1787
|
+
category: number;
|
|
1788
|
+
maxTier: number;
|
|
1789
|
+
}
|
|
1790
|
+
declare function getLocationProfile(locationType: number, subtype: number): LocationProfileEntry[];
|
|
1744
1791
|
declare function getLocationCandidates(locationType: number, subtype: number): number[];
|
|
1745
1792
|
declare function getEligibleResources(locationType: number, subtype: number, stratum: number): number[];
|
|
1746
1793
|
|
|
@@ -1853,7 +1900,7 @@ declare class EpochsManager extends BaseManager {
|
|
|
1853
1900
|
}
|
|
1854
1901
|
|
|
1855
1902
|
type EntityRefInput = {
|
|
1856
|
-
entityType:
|
|
1903
|
+
entityType: NameType;
|
|
1857
1904
|
entityId: UInt64Type;
|
|
1858
1905
|
};
|
|
1859
1906
|
declare class ActionsManager extends BaseManager {
|
|
@@ -1873,6 +1920,9 @@ declare class ActionsManager extends BaseManager {
|
|
|
1873
1920
|
addmodule(entityType: EntityTypeName, entityId: UInt64Type, moduleIndex: number, moduleCargoId: UInt64Type, targetCargoId?: UInt64Type): Action;
|
|
1874
1921
|
rmmodule(entityType: EntityTypeName, entityId: UInt64Type, moduleIndex: number, targetCargoId?: UInt64Type): Action;
|
|
1875
1922
|
wrap(owner: NameType, entityType: EntityTypeName, entityId: UInt64Type, cargoId: UInt64Type, quantity: UInt64Type): Action;
|
|
1923
|
+
undeploy(host: EntityRefInput, target: EntityRefInput): Action;
|
|
1924
|
+
wrapEntity(entity: EntityRefInput): Action;
|
|
1925
|
+
demolish(entity: EntityRefInput): Action;
|
|
1876
1926
|
joinGame(account: NameType, companyName: string): Action[];
|
|
1877
1927
|
}
|
|
1878
1928
|
|
|
@@ -1981,6 +2031,104 @@ type ErrorMessage = {
|
|
|
1981
2031
|
};
|
|
1982
2032
|
type ServerMessage = AckMessage | SnapshotMessage | UpdateMessage | BoundsDeltaMessage | EventMessage | EventCatchupCompleteMessage | PongMessage | ErrorMessage;
|
|
1983
2033
|
|
|
2034
|
+
/**
|
|
2035
|
+
* Travel calculations for ship movement, energy usage, and flight times.
|
|
2036
|
+
*
|
|
2037
|
+
* Functions prefixed with `calc_` are contract-parity functions that mirror
|
|
2038
|
+
* the C++ implementation in the server contract (schedule.cpp, ship.cpp).
|
|
2039
|
+
* These use snake_case intentionally to match the contract naming convention
|
|
2040
|
+
* and signal that they must produce identical results to the on-chain code.
|
|
2041
|
+
*
|
|
2042
|
+
* Functions prefixed with `calculate` are higher-level SDK helpers that may
|
|
2043
|
+
* combine multiple contract calculations for convenience.
|
|
2044
|
+
*/
|
|
2045
|
+
|
|
2046
|
+
declare function calc_orbital_altitude(mass: number): number;
|
|
2047
|
+
declare function distanceBetweenCoordinates(origin: ActionParams.Type.coordinates, destination: ActionParams.Type.coordinates): UInt64;
|
|
2048
|
+
declare function distanceBetweenPoints(x1: Int64Type, y1: Int64Type, x2: Int64Type, y2: Int64Type): UInt64;
|
|
2049
|
+
declare function lerp(origin: ActionParams.Type.coordinates, destination: ActionParams.Type.coordinates, time: number): ActionParams.Type.coordinates;
|
|
2050
|
+
interface FloatPosition {
|
|
2051
|
+
x: number;
|
|
2052
|
+
y: number;
|
|
2053
|
+
}
|
|
2054
|
+
declare function easeFlightProgress(t: number): number;
|
|
2055
|
+
declare function flightSpeedFactor(t: number): number;
|
|
2056
|
+
declare function interpolateFlightPosition(origin: {
|
|
2057
|
+
x: Int64Type | number;
|
|
2058
|
+
y: Int64Type | number;
|
|
2059
|
+
}, destination: {
|
|
2060
|
+
x: Int64Type | number;
|
|
2061
|
+
y: Int64Type | number;
|
|
2062
|
+
}, taskProgress: number, options?: {
|
|
2063
|
+
easing?: 'physics' | 'linear';
|
|
2064
|
+
}): FloatPosition;
|
|
2065
|
+
declare function getInterpolatedPosition(entity: HasScheduleAndLocation, taskIndex: number, taskProgress: number): FloatPosition;
|
|
2066
|
+
declare function rotation(origin: ActionParams.Type.coordinates, destination: ActionParams.Type.coordinates): number;
|
|
2067
|
+
declare function findNearbyPlanets(seed: Checksum256, origin: ActionParams.Type.coordinates, maxDistance?: UInt64Type): Distance[];
|
|
2068
|
+
declare function calc_rechargetime(capacity: UInt32Type, energy: UInt32Type, recharge: UInt32Type): UInt32;
|
|
2069
|
+
declare function calc_ship_rechargetime(ship: ShipLike): UInt32;
|
|
2070
|
+
declare function calc_flighttime(distance: UInt64Type, acceleration: number): UInt32;
|
|
2071
|
+
declare function calc_loader_flighttime(ship: ShipLike, mass: UInt64, altitude?: number): UInt32;
|
|
2072
|
+
declare function calc_loader_acceleration(ship: ShipLike, mass: UInt64): number;
|
|
2073
|
+
declare function calc_ship_flighttime(ship: ShipLike, mass: UInt64, distance: UInt64): UInt32;
|
|
2074
|
+
declare function calc_ship_acceleration(ship: ShipLike, mass: UInt64): number;
|
|
2075
|
+
declare function calc_acceleration(thrust: number, mass: number): number;
|
|
2076
|
+
declare function calc_ship_mass(ship: ShipLike, cargos: CargoMassInfo[]): UInt64;
|
|
2077
|
+
declare function calc_energyusage(distance: UInt64Type, drain: UInt32Type): UInt32;
|
|
2078
|
+
declare function calculateTransferTime(ship: ShipLike, cargos: CargoMassInfo[], quantities?: Map<number, number>): UInt32;
|
|
2079
|
+
declare function calculateRefuelingTime(ship: ShipLike): UInt32;
|
|
2080
|
+
declare function calculateFlightTime(ship: ShipLike, cargos: CargoMassInfo[], distance: UInt64Type): UInt32;
|
|
2081
|
+
interface LoadTimeBreakdown {
|
|
2082
|
+
unloadTime: number;
|
|
2083
|
+
loadTime: number;
|
|
2084
|
+
totalTime: number;
|
|
2085
|
+
unloadMass: number;
|
|
2086
|
+
loadMass: number;
|
|
2087
|
+
}
|
|
2088
|
+
declare function calculateLoadTimeBreakdown(ship: ShipLike, cargos: CargoMassInfo[], loadQuantities?: Map<number, number>, unloadQuantities?: Map<number, number>): LoadTimeBreakdown;
|
|
2089
|
+
interface EstimatedTravelTime {
|
|
2090
|
+
flightTime: UInt32;
|
|
2091
|
+
rechargeTime: UInt32;
|
|
2092
|
+
loadTime: UInt32;
|
|
2093
|
+
unloadTime: UInt32;
|
|
2094
|
+
total: UInt32;
|
|
2095
|
+
}
|
|
2096
|
+
interface EstimateTravelTimeOptions {
|
|
2097
|
+
needsRecharge?: boolean;
|
|
2098
|
+
loadMass?: UInt32Type;
|
|
2099
|
+
unloadMass?: UInt32Type;
|
|
2100
|
+
}
|
|
2101
|
+
declare function estimateTravelTime(ship: ShipLike, travelMass: UInt64Type, distance: UInt64Type, options?: EstimateTravelTimeOptions): EstimatedTravelTime;
|
|
2102
|
+
declare function estimateDealTravelTime(ship: ShipLike, shipMass: UInt64Type, distance: UInt64Type, loadMass: UInt32Type): UInt32;
|
|
2103
|
+
declare function hasEnergyForDistance(ship: ShipLike, distance: UInt64Type): boolean;
|
|
2104
|
+
interface TransferEntity {
|
|
2105
|
+
location: {
|
|
2106
|
+
z?: {
|
|
2107
|
+
toNumber(): number;
|
|
2108
|
+
} | number;
|
|
2109
|
+
};
|
|
2110
|
+
loaders?: {
|
|
2111
|
+
thrust: {
|
|
2112
|
+
toNumber(): number;
|
|
2113
|
+
} | number;
|
|
2114
|
+
mass: {
|
|
2115
|
+
toNumber(): number;
|
|
2116
|
+
} | number;
|
|
2117
|
+
quantity: {
|
|
2118
|
+
toNumber(): number;
|
|
2119
|
+
} | number;
|
|
2120
|
+
};
|
|
2121
|
+
}
|
|
2122
|
+
interface HasScheduleAndLocation {
|
|
2123
|
+
coordinates: ActionParams.Type.coordinates;
|
|
2124
|
+
schedule?: Types.schedule;
|
|
2125
|
+
}
|
|
2126
|
+
declare function getFlightOrigin(entity: HasScheduleAndLocation, flightTaskIndex: number): ActionParams.Type.coordinates;
|
|
2127
|
+
declare function getDestinationLocation(entity: HasScheduleAndLocation): ActionParams.Type.coordinates | undefined;
|
|
2128
|
+
/** Returns chain-tile coordinates (rounded). For visual position use getInterpolatedPosition. */
|
|
2129
|
+
declare function getPositionAt(entity: HasScheduleAndLocation, taskIndex: number, taskProgress: number): ActionParams.Type.coordinates;
|
|
2130
|
+
declare function calc_transfer_duration(source: TransferEntity, dest: TransferEntity, cargoMass: number): number;
|
|
2131
|
+
|
|
1984
2132
|
interface MovementCapability {
|
|
1985
2133
|
engines: Types.movement_stats;
|
|
1986
2134
|
generator: Types.energy_stats;
|
|
@@ -2105,6 +2253,7 @@ declare function getTaskRemaining(entity: ScheduleData, index: number, now: Date
|
|
|
2105
2253
|
declare function isTaskComplete(entity: ScheduleData, index: number, now: Date): boolean;
|
|
2106
2254
|
declare function isTaskInProgress(entity: ScheduleData, index: number, now: Date): boolean;
|
|
2107
2255
|
declare function currentTaskProgress(entity: ScheduleData, now: Date): number;
|
|
2256
|
+
declare function currentTaskProgressFloat(entity: ScheduleData, now: Date): number;
|
|
2108
2257
|
declare function scheduleProgress(entity: ScheduleData, now: Date): number;
|
|
2109
2258
|
declare function isTaskType(entity: ScheduleData, taskType: TaskType, now: Date): boolean;
|
|
2110
2259
|
declare function isInFlight(entity: ScheduleData, now: Date): boolean;
|
|
@@ -2130,6 +2279,7 @@ declare const schedule_getTaskRemaining: typeof getTaskRemaining;
|
|
|
2130
2279
|
declare const schedule_isTaskComplete: typeof isTaskComplete;
|
|
2131
2280
|
declare const schedule_isTaskInProgress: typeof isTaskInProgress;
|
|
2132
2281
|
declare const schedule_currentTaskProgress: typeof currentTaskProgress;
|
|
2282
|
+
declare const schedule_currentTaskProgressFloat: typeof currentTaskProgressFloat;
|
|
2133
2283
|
declare const schedule_scheduleProgress: typeof scheduleProgress;
|
|
2134
2284
|
declare const schedule_isTaskType: typeof isTaskType;
|
|
2135
2285
|
declare const schedule_isInFlight: typeof isInFlight;
|
|
@@ -2157,6 +2307,7 @@ declare namespace schedule {
|
|
|
2157
2307
|
schedule_isTaskComplete as isTaskComplete,
|
|
2158
2308
|
schedule_isTaskInProgress as isTaskInProgress,
|
|
2159
2309
|
schedule_currentTaskProgress as currentTaskProgress,
|
|
2310
|
+
schedule_currentTaskProgressFloat as currentTaskProgressFloat,
|
|
2160
2311
|
schedule_scheduleProgress as scheduleProgress,
|
|
2161
2312
|
schedule_isTaskType as isTaskType,
|
|
2162
2313
|
schedule_isInFlight as isInFlight,
|
|
@@ -2249,6 +2400,7 @@ declare class ScheduleAccessor {
|
|
|
2249
2400
|
taskComplete(index: number, now: Date): boolean;
|
|
2250
2401
|
taskInProgress(index: number, now: Date): boolean;
|
|
2251
2402
|
currentTaskProgress(now: Date): number;
|
|
2403
|
+
currentTaskProgressFloat(now: Date): number;
|
|
2252
2404
|
progress(now: Date): number;
|
|
2253
2405
|
}
|
|
2254
2406
|
declare function createScheduleAccessor(entity: ScheduleData): ScheduleAccessor;
|
|
@@ -2301,6 +2453,8 @@ declare class Ship extends Types.entity_info {
|
|
|
2301
2453
|
private _sched?;
|
|
2302
2454
|
private _inv?;
|
|
2303
2455
|
get name(): string;
|
|
2456
|
+
get entityClass(): 'mobile';
|
|
2457
|
+
get canUndeploy(): boolean;
|
|
2304
2458
|
get inv(): InventoryAccessor;
|
|
2305
2459
|
get inventory(): EntityInventory[];
|
|
2306
2460
|
get sched(): ScheduleAccessor;
|
|
@@ -2308,7 +2462,9 @@ declare class Ship extends Types.entity_info {
|
|
|
2308
2462
|
get isIdle(): boolean;
|
|
2309
2463
|
getFlightOrigin(flightTaskIndex: number): Coordinates;
|
|
2310
2464
|
destinationLocation(): Coordinates | undefined;
|
|
2465
|
+
/** Chain-tile coordinates at `now`. For smooth visual position use interpolatedPositionAt. */
|
|
2311
2466
|
positionAt(now: Date): Coordinates;
|
|
2467
|
+
interpolatedPositionAt(now: Date): FloatPosition;
|
|
2312
2468
|
isInFlight(now: Date): boolean;
|
|
2313
2469
|
isRecharging(now: Date): boolean;
|
|
2314
2470
|
isLoading(now: Date): boolean;
|
|
@@ -2355,6 +2511,8 @@ declare class Warehouse extends Types.entity_info {
|
|
|
2355
2511
|
private _sched?;
|
|
2356
2512
|
private _inv?;
|
|
2357
2513
|
get name(): string;
|
|
2514
|
+
get entityClass(): 'building';
|
|
2515
|
+
get canDemolish(): boolean;
|
|
2358
2516
|
get inv(): InventoryAccessor;
|
|
2359
2517
|
get inventory(): EntityInventory[];
|
|
2360
2518
|
get sched(): ScheduleAccessor;
|
|
@@ -2400,8 +2558,11 @@ interface ContainerStateInput {
|
|
|
2400
2558
|
declare class Container extends Types.entity_info {
|
|
2401
2559
|
private _sched?;
|
|
2402
2560
|
get name(): string;
|
|
2561
|
+
get entityClass(): 'mobile';
|
|
2562
|
+
get canUndeploy(): boolean;
|
|
2403
2563
|
get sched(): ScheduleAccessor;
|
|
2404
2564
|
get isIdle(): boolean;
|
|
2565
|
+
interpolatedPositionAt(now: Date): FloatPosition;
|
|
2405
2566
|
isLoading(now: Date): boolean;
|
|
2406
2567
|
isUnloading(now: Date): boolean;
|
|
2407
2568
|
get location(): Location;
|
|
@@ -2435,6 +2596,11 @@ interface BoundsSubscriptionHandle {
|
|
|
2435
2596
|
updateBounds(bounds: BoundingBox): void;
|
|
2436
2597
|
current: Map<number, EntityInstance>;
|
|
2437
2598
|
}
|
|
2599
|
+
interface OwnerSubscriptionHandle {
|
|
2600
|
+
readonly subId: string;
|
|
2601
|
+
unsubscribe(): void;
|
|
2602
|
+
current: Map<number, EntityInstance>;
|
|
2603
|
+
}
|
|
2438
2604
|
interface EntitySubscriptionHandle {
|
|
2439
2605
|
readonly subId: string;
|
|
2440
2606
|
readonly entityType: SubscriptionEntityType;
|
|
@@ -2461,6 +2627,10 @@ declare class SubscriptionsManager {
|
|
|
2461
2627
|
owner?: string;
|
|
2462
2628
|
prioritizeOwner?: string;
|
|
2463
2629
|
}): BoundsSubscriptionHandle;
|
|
2630
|
+
subscribeOwner(owner: string, handlers?: {
|
|
2631
|
+
onSnapshot?: (entities: EntityInstance[]) => void;
|
|
2632
|
+
onUpdate?: (entity: EntityInstance) => void;
|
|
2633
|
+
}): OwnerSubscriptionHandle;
|
|
2464
2634
|
private unsubscribeBounds;
|
|
2465
2635
|
private updateBounds;
|
|
2466
2636
|
private onStateChange;
|
|
@@ -2594,87 +2764,6 @@ declare function deriveLocation(gameSeed: Checksum256Type, epochSeed: Checksum25
|
|
|
2594
2764
|
declare function hash(seed: Checksum256Type, string: string): Checksum256;
|
|
2595
2765
|
declare function hash512(seed: Checksum256Type, string: string): Checksum512;
|
|
2596
2766
|
|
|
2597
|
-
/**
|
|
2598
|
-
* Travel calculations for ship movement, energy usage, and flight times.
|
|
2599
|
-
*
|
|
2600
|
-
* Functions prefixed with `calc_` are contract-parity functions that mirror
|
|
2601
|
-
* the C++ implementation in the server contract (schedule.cpp, ship.cpp).
|
|
2602
|
-
* These use snake_case intentionally to match the contract naming convention
|
|
2603
|
-
* and signal that they must produce identical results to the on-chain code.
|
|
2604
|
-
*
|
|
2605
|
-
* Functions prefixed with `calculate` are higher-level SDK helpers that may
|
|
2606
|
-
* combine multiple contract calculations for convenience.
|
|
2607
|
-
*/
|
|
2608
|
-
|
|
2609
|
-
declare function calc_orbital_altitude(mass: number): number;
|
|
2610
|
-
declare function distanceBetweenCoordinates(origin: ActionParams.Type.coordinates, destination: ActionParams.Type.coordinates): UInt64;
|
|
2611
|
-
declare function distanceBetweenPoints(x1: Int64Type, y1: Int64Type, x2: Int64Type, y2: Int64Type): UInt64;
|
|
2612
|
-
declare function lerp(origin: ActionParams.Type.coordinates, destination: ActionParams.Type.coordinates, time: number): ActionParams.Type.coordinates;
|
|
2613
|
-
declare function rotation(origin: ActionParams.Type.coordinates, destination: ActionParams.Type.coordinates): number;
|
|
2614
|
-
declare function findNearbyPlanets(seed: Checksum256, origin: ActionParams.Type.coordinates, maxDistance?: UInt64Type): Distance[];
|
|
2615
|
-
declare function calc_rechargetime(capacity: UInt32Type, energy: UInt32Type, recharge: UInt32Type): UInt32;
|
|
2616
|
-
declare function calc_ship_rechargetime(ship: ShipLike): UInt32;
|
|
2617
|
-
declare function calc_flighttime(distance: UInt64Type, acceleration: number): UInt32;
|
|
2618
|
-
declare function calc_loader_flighttime(ship: ShipLike, mass: UInt64, altitude?: number): UInt32;
|
|
2619
|
-
declare function calc_loader_acceleration(ship: ShipLike, mass: UInt64): number;
|
|
2620
|
-
declare function calc_ship_flighttime(ship: ShipLike, mass: UInt64, distance: UInt64): UInt32;
|
|
2621
|
-
declare function calc_ship_acceleration(ship: ShipLike, mass: UInt64): number;
|
|
2622
|
-
declare function calc_acceleration(thrust: number, mass: number): number;
|
|
2623
|
-
declare function calc_ship_mass(ship: ShipLike, cargos: CargoMassInfo[]): UInt64;
|
|
2624
|
-
declare function calc_energyusage(distance: UInt64Type, drain: UInt32Type): UInt32;
|
|
2625
|
-
declare function calculateTransferTime(ship: ShipLike, cargos: CargoMassInfo[], quantities?: Map<number, number>): UInt32;
|
|
2626
|
-
declare function calculateRefuelingTime(ship: ShipLike): UInt32;
|
|
2627
|
-
declare function calculateFlightTime(ship: ShipLike, cargos: CargoMassInfo[], distance: UInt64Type): UInt32;
|
|
2628
|
-
interface LoadTimeBreakdown {
|
|
2629
|
-
unloadTime: number;
|
|
2630
|
-
loadTime: number;
|
|
2631
|
-
totalTime: number;
|
|
2632
|
-
unloadMass: number;
|
|
2633
|
-
loadMass: number;
|
|
2634
|
-
}
|
|
2635
|
-
declare function calculateLoadTimeBreakdown(ship: ShipLike, cargos: CargoMassInfo[], loadQuantities?: Map<number, number>, unloadQuantities?: Map<number, number>): LoadTimeBreakdown;
|
|
2636
|
-
interface EstimatedTravelTime {
|
|
2637
|
-
flightTime: UInt32;
|
|
2638
|
-
rechargeTime: UInt32;
|
|
2639
|
-
loadTime: UInt32;
|
|
2640
|
-
unloadTime: UInt32;
|
|
2641
|
-
total: UInt32;
|
|
2642
|
-
}
|
|
2643
|
-
interface EstimateTravelTimeOptions {
|
|
2644
|
-
needsRecharge?: boolean;
|
|
2645
|
-
loadMass?: UInt32Type;
|
|
2646
|
-
unloadMass?: UInt32Type;
|
|
2647
|
-
}
|
|
2648
|
-
declare function estimateTravelTime(ship: ShipLike, travelMass: UInt64Type, distance: UInt64Type, options?: EstimateTravelTimeOptions): EstimatedTravelTime;
|
|
2649
|
-
declare function estimateDealTravelTime(ship: ShipLike, shipMass: UInt64Type, distance: UInt64Type, loadMass: UInt32Type): UInt32;
|
|
2650
|
-
declare function hasEnergyForDistance(ship: ShipLike, distance: UInt64Type): boolean;
|
|
2651
|
-
interface TransferEntity {
|
|
2652
|
-
location: {
|
|
2653
|
-
z?: {
|
|
2654
|
-
toNumber(): number;
|
|
2655
|
-
} | number;
|
|
2656
|
-
};
|
|
2657
|
-
loaders?: {
|
|
2658
|
-
thrust: {
|
|
2659
|
-
toNumber(): number;
|
|
2660
|
-
} | number;
|
|
2661
|
-
mass: {
|
|
2662
|
-
toNumber(): number;
|
|
2663
|
-
} | number;
|
|
2664
|
-
quantity: {
|
|
2665
|
-
toNumber(): number;
|
|
2666
|
-
} | number;
|
|
2667
|
-
};
|
|
2668
|
-
}
|
|
2669
|
-
interface HasScheduleAndLocation {
|
|
2670
|
-
coordinates: ActionParams.Type.coordinates;
|
|
2671
|
-
schedule?: Types.schedule;
|
|
2672
|
-
}
|
|
2673
|
-
declare function getFlightOrigin(entity: HasScheduleAndLocation, flightTaskIndex: number): ActionParams.Type.coordinates;
|
|
2674
|
-
declare function getDestinationLocation(entity: HasScheduleAndLocation): ActionParams.Type.coordinates | undefined;
|
|
2675
|
-
declare function getPositionAt(entity: HasScheduleAndLocation, taskIndex: number, taskProgress: number): ActionParams.Type.coordinates;
|
|
2676
|
-
declare function calc_transfer_duration(source: TransferEntity, dest: TransferEntity, cargoMass: number): number;
|
|
2677
|
-
|
|
2678
2767
|
interface CargoData {
|
|
2679
2768
|
cargo: EntityInventory[];
|
|
2680
2769
|
}
|
|
@@ -2773,7 +2862,7 @@ declare function isModuleItem(itemId: number): boolean;
|
|
|
2773
2862
|
declare function moduleSlotTypeToCode(slotType: string): number;
|
|
2774
2863
|
|
|
2775
2864
|
declare function computeHaulPenalty(totalThrust: number, haulCount: number, avgEfficiency: number): number;
|
|
2776
|
-
declare function computeHaulerDrain(distance: number, drain: number, haulCount: number): number;
|
|
2865
|
+
declare function computeHaulerDrain$1(distance: number, drain: number, haulCount: number): number;
|
|
2777
2866
|
|
|
2778
2867
|
declare const categoryColors: Record<ResourceCategory, string>;
|
|
2779
2868
|
declare const tierColors: Record<number, string>;
|
|
@@ -2855,7 +2944,14 @@ declare function computeGeneratorCapabilities(stats: Record<string, number>): {
|
|
|
2855
2944
|
capacity: number;
|
|
2856
2945
|
recharge: number;
|
|
2857
2946
|
};
|
|
2858
|
-
|
|
2947
|
+
interface GathererDepthParams {
|
|
2948
|
+
readonly floor: number;
|
|
2949
|
+
readonly slope: number;
|
|
2950
|
+
}
|
|
2951
|
+
declare const GATHERER_DEPTH_TABLE: readonly GathererDepthParams[];
|
|
2952
|
+
declare const GATHERER_DEPTH_MAX_TIER = 10;
|
|
2953
|
+
declare function gathererDepthForTier(tol: number, tier: number): number;
|
|
2954
|
+
declare function computeGathererCapabilities(stats: Record<string, number>, tier: number): {
|
|
2859
2955
|
yield: number;
|
|
2860
2956
|
drain: number;
|
|
2861
2957
|
depth: number;
|
|
@@ -3020,12 +3116,15 @@ declare const computeGeneratorCap: (com: number) => number;
|
|
|
3020
3116
|
declare const computeGeneratorRech: (fin: number) => number;
|
|
3021
3117
|
declare const computeGathererYield: (str: number) => number;
|
|
3022
3118
|
declare const computeGathererDrain: (con: number) => number;
|
|
3023
|
-
declare const computeGathererDepth: (tol: number) => number;
|
|
3119
|
+
declare const computeGathererDepth: (tol: number, tier: number) => number;
|
|
3024
3120
|
declare const computeGathererSpeed: (ref: number) => number;
|
|
3025
3121
|
declare const computeLoaderMass: (ins: number) => number;
|
|
3026
3122
|
declare const computeLoaderThrust: (pla: number) => number;
|
|
3027
3123
|
declare const computeCrafterSpeed: (rea: number) => number;
|
|
3028
3124
|
declare const computeCrafterDrain: (fin: number) => number;
|
|
3125
|
+
declare const computeHaulerCapacity: (fin: number) => number;
|
|
3126
|
+
declare const computeHaulerEfficiency: (con: number) => number;
|
|
3127
|
+
declare const computeHaulerDrain: (com: number) => number;
|
|
3029
3128
|
declare const computeWarpRange: (stat: number) => number;
|
|
3030
3129
|
declare function entityDisplayName(itemId: number): string;
|
|
3031
3130
|
declare function moduleDisplayName(itemId: number): string;
|
|
@@ -3058,6 +3157,9 @@ declare const index_computeLoaderMass: typeof computeLoaderMass;
|
|
|
3058
3157
|
declare const index_computeLoaderThrust: typeof computeLoaderThrust;
|
|
3059
3158
|
declare const index_computeCrafterSpeed: typeof computeCrafterSpeed;
|
|
3060
3159
|
declare const index_computeCrafterDrain: typeof computeCrafterDrain;
|
|
3160
|
+
declare const index_computeHaulerCapacity: typeof computeHaulerCapacity;
|
|
3161
|
+
declare const index_computeHaulerEfficiency: typeof computeHaulerEfficiency;
|
|
3162
|
+
declare const index_computeHaulerDrain: typeof computeHaulerDrain;
|
|
3061
3163
|
declare const index_computeWarpRange: typeof computeWarpRange;
|
|
3062
3164
|
declare const index_entityDisplayName: typeof entityDisplayName;
|
|
3063
3165
|
declare const index_moduleDisplayName: typeof moduleDisplayName;
|
|
@@ -3091,6 +3193,9 @@ declare namespace index {
|
|
|
3091
3193
|
index_computeLoaderThrust as computeLoaderThrust,
|
|
3092
3194
|
index_computeCrafterSpeed as computeCrafterSpeed,
|
|
3093
3195
|
index_computeCrafterDrain as computeCrafterDrain,
|
|
3196
|
+
index_computeHaulerCapacity as computeHaulerCapacity,
|
|
3197
|
+
index_computeHaulerEfficiency as computeHaulerEfficiency,
|
|
3198
|
+
index_computeHaulerDrain as computeHaulerDrain,
|
|
3094
3199
|
index_computeWarpRange as computeWarpRange,
|
|
3095
3200
|
index_entityDisplayName as entityDisplayName,
|
|
3096
3201
|
index_moduleDisplayName as moduleDisplayName,
|
|
@@ -3178,4 +3283,4 @@ type location_epoch = Types.location_epoch;
|
|
|
3178
3283
|
type location_derived = Types.location_derived;
|
|
3179
3284
|
type location_row = Types.location_row;
|
|
3180
3285
|
|
|
3181
|
-
export { AckMessage, ActionsManager, AnyEntity, BASE_ORBITAL_MASS, BLEND_INPUTS_MUST_MATCH, BLEND_REQUIRES_MULTIPLE, BLEND_STAT_LESS_NOT_SUPPORTED, BoundingBox, BoundsDeltaMessage, BoundsSubscriptionHandle, CANCEL_CONTAINS_GROUPED_TASK, CANCEL_PAIRED_HAS_PENDING, CATEGORY_LABELS, COMMIT_ALREADY_SET, COMMIT_CANNOT_MATCH, COMMIT_NOT_SET, COMPANY_NOT_FOUND, CONTAINER_CAPACITY_EXCEEDED, CONTAINER_NOT_FOUND, CONTAINER_Z, CRAFT_ENERGY_DIVISOR, CRAFT_EXCEEDS_ENERGY_CAPACITY, CRAFT_NOT_ENOUGH_ENERGY, CapabilityAttribute, CapabilityInput, CargoData, CargoMassInfo, CargoStack, CategoryIconShape, CategoryInfo, CategoryStacks, ClientMessage, ConnectionState, Container, ContainerEntity, ContainerStateInput, Coordinates, CoordinatesType, CraftedItemCategory, CrafterCapability, DEPLOY_ENTITY_HAS_SCHEDULE, DEPTH_THRESHOLD_T1, DEPTH_THRESHOLD_T2, DEPTH_THRESHOLD_T3, DEPTH_THRESHOLD_T4, DEPTH_THRESHOLD_T5, DESTINATION_CAPACITY_EXCEEDED, DerivedStratum, DescribeOptions, Distance, ENTITY_CAPACITY_EXCEEDED, ENTITY_NO_CRAFTER, EPOCH_NON_ZERO, EPOCH_NOT_READY, ERROR_SYSTEM_ALREADY_INITIALIZED, ERROR_SYSTEM_DISABLED, ERROR_SYSTEM_NOT_INITIALIZED, EnergyCapability, EntitiesManager, Entity, EntityCapabilities, EntityInfo, EntityInstance, EntityInventory, EntityLayout, EntityRefInput, EntitySlot, EntityState, EntitySubscriptionHandle, EntityType, EntityTypeName, EpochInfo, EpochsManager, ErrorMessage, EstimateTravelTimeOptions, EstimatedTravelTime, EventCatchupCompleteMessage, EventMessage, GAME_NOT_FOUND, GAME_SEED_NOT_SET, 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, GathererCapability, HasCapacity, HasCargo, HasCargomass, HasScheduleAndLocation, INSUFFICIENT_BALANCE, INSUFFICIENT_ITEM_QUANTITY, INSUFFICIENT_ITEM_SUPPLY, INVALID_AMOUNT, 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_CARGO_ARM, ITEM_CARGO_LINING, ITEM_CARGO_LINING_T2, 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_ENGINE_T1, ITEM_FOCUSING_ARRAY, 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_HULL_PLATES, ITEM_HULL_PLATES_T2, ITEM_LOADER_T1, ITEM_MATTER_CONDUIT, 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_POWER_CELL, ITEM_REACTION_CHAMBER, 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_SHIP_T1_PACKED, ITEM_STORAGE_T1, ITEM_SURVEY_PROBE, ITEM_THRUSTER_CORE, ITEM_TOOL_BIT, ITEM_TYPE_COMPONENT, ITEM_TYPE_ENTITY, ITEM_TYPE_MODULE, ITEM_TYPE_RESOURCE, ITEM_WAREHOUSE_T1_PACKED, ITEM_WARP_T1, InventoryAccessor, Item, ItemType, LOCATION_MAX_DEPTH, LOCATION_MIN_DEPTH, LoadTimeBreakdown, LoaderCapability, Location, LocationStratum, LocationType, LocationsManager, MAX_ORBITAL_ALTITUDE, MIN_ORBITAL_ALTITUDE, MODULE_ANY, 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_TYPE_MISMATCH, MODULE_WARP, MassCapability, ModuleDescription, ModuleEntry, ModuleType, MovementCapability, index as NFT, NFTCargoItem, NFTCommonBase, NFTInstalledModule, NFTModuleSlot, NO_SCHEDULE, NamedStats, 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, PackedModule, PackedModuleInput, PingMessage, PlanetSubtypeInfo, platform as PlatformContract, Types$1 as PlatformTypes, Player, PlayerStateInput, PlayersManager, PongMessage, Projectable, ProjectableSnapshot, ProjectedEntity, ProjectionOptions, 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, Recipe, RecipeInput, RecipeInputCategory, RecipeInputItemId, RecipeSlotInput, RenderDescriptionOptions, ReserveTier, ResolvedAttributeGroup, ResolvedItem, ResolvedItemStat, ResolvedItemType, ResolvedModuleSlot, ResourceCategory, ResourceStats, SHIP_ALREADY_THERE, SHIP_ALREADY_TRAVELING, SHIP_CANNOT_BUY_TRAVELING, SHIP_CANNOT_CANCEL_TASK, SHIP_CANNOT_UPDATE_TRAVELING, SHIP_CAPACITY_EXCEEDED, SHIP_CARGO_NOT_LOADED, SHIP_CARGO_NOT_OWNED, SHIP_INVALID_CARGO, SHIP_INVALID_DESTINATION, SHIP_INVALID_TRAVEL_DURATION, SHIP_NOT_ARRIVED, SHIP_NOT_ENOUGH_ENERGY, SHIP_NOT_ENOUGH_ENERGY_CAPACITY, SHIP_NOT_FOUND, SHIP_NOT_IDLE, SHIP_NOT_OWNED, SHIP_NO_COMPLETED_TASKS, SHIP_NO_TASKS_TO_CANCEL, SLOT_FORMULAS, STARTER_ALREADY_CLAIMED, ScheduleAccessor, ScheduleCapability, ScheduleData, Scheduleable, server as ServerContract, ServerMessage, Types as ServerTypes, Ship, ShipCapabilities, ShipEntity, ShipLike, ShipStateInput, Shipload, SlotConsumer, SlotConsumerKind, SnapshotMessage, StackInput, StatDefinition, StatMapping, StatSlot, StorageCapability, StratumInfo, SubscribeEntityMessage, SubscribeEventsMessage, SubscribeMessage, SubscriptionEntityType, SubscriptionsManager, SubscriptionsOptions, TIER_ADJECTIVES, TIER_ROLL_MAX, TRAVEL_MAX_DURATION, TaskCancelable, TaskType, TextSpan, TierRange, TransferEntity, UnsubscribeEntityMessage, UnsubscribeEventsMessage, UnsubscribeMessage, UpdateBoundsMessage, UpdateMessage, WAREHOUSE_ALREADY_AT_LOCATION, WAREHOUSE_CAPACITY_EXCEEDED, WAREHOUSE_NOT_FOUND, WAREHOUSE_Z, WARP_HAS_CARGO, WARP_HAS_SCHEDULE, WARP_NOT_FULL_ENERGY, WARP_NO_CAPABILITY, WARP_OUT_OF_RANGE, Warehouse, WarehouseEntity, WarehouseStateInput, WebSocketConnection, WebSocketConnectionOptions, WireCoordinates, WireEntity, availableCapacity$1 as availableCapacity, availableCapacityFromMass, blendCargoStacks, blendComponentStacks, blendCrossGroup, blendStacks, buildEntityDescription, calcCargoItemMass, calcCargoMass, calcEnergyUsage, calcLoadDuration, calcStacksMass, calc_acceleration, calc_craft_duration, calc_craft_energy, calc_energyusage, calc_flighttime, calc_gather_duration, calc_gather_energy, 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, cargoItemToStack, cargoUtils, cargo_item, categoryColors, categoryFromIndex, categoryIconShapes, categoryIcons, categoryLabel, categoryLabelFromIndex, componentIcon, computeBaseCapacityShip, computeBaseCapacityWarehouse, computeBaseHullmass, computeComponentStats, computeContainerCapabilities, computeContainerT2Capabilities, computeCraftedOutputStats, computeCrafterCapabilities, computeCrafterDrain, computeCrafterSpeed, computeEngineCapabilities, computeEngineDrain, computeEngineThrust, computeEntityStats, computeGathererCapabilities, computeGathererDepth, computeGathererDrain, computeGathererSpeed, computeGathererYield, computeGeneratorCap, computeGeneratorCapabilities, computeGeneratorRech, computeHaulPenalty, computeHaulerCapabilities, computeHaulerDrain, computeInputMass, computeLoaderCapabilities, computeLoaderMass, computeLoaderThrust, computeShipCapabilities, computeShipHullCapabilities, computeStorageCapabilities, computeWarehouseCapabilities, computeWarehouseHullCapabilities, computeWarpRange, container_row, coordsToLocationId, createInventoryAccessor, createProjectedEntity, createScheduleAccessor, decodeCraftedItemStats, decodeStat, decodeStats, Shipload as default, deriveLocation, deriveLocationEpoch, deriveLocationSize, deriveLocationStatic, deriveResourceStats, deriveStatMappings, deriveStrata, deriveStratum, describeItem, describeModule, describeModuleForItem, describeModuleForSlot, deserializeAsset, deserializeComponent, deserializeEntity, deserializeModule, deserializeResource, displayName, distanceBetweenCoordinates, distanceBetweenPoints, encodeGatheredCargoStats, encodeStats, energyPercent, energy_stats, entityDisplayName, estimateDealTravelTime, estimateTravelTime, findItemByCategoryAndTier, findNearbyPlanets, formatMass, formatMassDelta, formatModuleLine, formatTier, gatherer_stats, getCapabilityAttributes, getCategoryInfo, getComponents, getCurrentEpoch, getDepthThreshold, getDestinationLocation, getEligibleResources, getEntityItems, getEntityLayout, getEpochInfo, getFlightOrigin, getItem, getItems, getLocationCandidates, getLocationType, getLocationTypeName, getModuleCapabilityType, getModules, getPlanetSubtype, getPlanetSubtypes, getPositionAt, getRecipe, getResourceTier, getResourceWeight, getResources, getStatDefinitions, getStatMappings, getStatMappingsForCapability, getStatMappingsForStat, getStatName, getSystemName, hasEnergy, hasEnergyForDistance, hasGatherer, hasLoaders, hasMass, hasSchedule, hasSpace$1 as hasSpace, hasSpaceForMass, hasStorage, hasSystem, hash, hash512, isCraftedItem, isFull$1 as isFull, isFullFromMass, isGatherableLocation, isInvertedAttribute, isModuleItem, isRelatedItem, isSubscriptionsDebugEnabled, itemAbbreviations, itemCategory, itemIds, itemOffset, itemTier, itemTypeCode, lerp, loader_stats, location_derived, location_epoch, location_row, location_static, makeContainer, makeShip, makeWarehouse, mapEntity, maxTravelDistance, mergeStacks, moduleAccepts, moduleDisplayName, moduleIcon, moduleSlotTypeToCode, movement_stats, needsRecharge, parseWireEntity, projectEntity, projectEntityAt, projectFromCurrentState, projectFromCurrentStateAt, readCommonBase, removeFromStacks, renderDescription, resolveItem, resolveItemCategory, resolveStats, rollTier, rollWithinTier, rotation, schedule, setSubscriptionsDebug, stackKey, stackToCargoItem, stacksEqual, task, tierColors, tierLabel, tierLabels, toLocation, typeLabel, validateSchedule, warehouse_row };
|
|
3286
|
+
export { AckMessage, ActionsManager, AnyEntity, BASE_ORBITAL_MASS, BLEND_INPUTS_MUST_MATCH, BLEND_REQUIRES_MULTIPLE, BLEND_STAT_LESS_NOT_SUPPORTED, BoundingBox, BoundsDeltaMessage, BoundsSubscriptionHandle, CANCEL_CONTAINS_GROUPED_TASK, CANCEL_PAIRED_HAS_PENDING, CATEGORY_LABELS, COMMIT_ALREADY_SET, COMMIT_CANNOT_MATCH, COMMIT_NOT_SET, COMPANY_NOT_FOUND, CONTAINER_CAPACITY_EXCEEDED, CONTAINER_NOT_FOUND, CONTAINER_Z, CRAFT_ENERGY_DIVISOR, CRAFT_EXCEEDS_ENERGY_CAPACITY, CRAFT_NOT_ENOUGH_ENERGY, CapabilityAttribute, CapabilityInput, CargoData, CargoMassInfo, CargoStack, CategoryIconShape, CategoryInfo, CategoryStacks, ClientMessage, ConnectionState, Container, ContainerEntity, ContainerStateInput, Coordinates, CoordinatesType, CraftedItemCategory, CrafterCapability, DEPLOY_ENTITY_HAS_SCHEDULE, DEPTH_THRESHOLD_T1, DEPTH_THRESHOLD_T2, DEPTH_THRESHOLD_T3, DEPTH_THRESHOLD_T4, DEPTH_THRESHOLD_T5, DESTINATION_CAPACITY_EXCEEDED, DerivedStratum, DescribeOptions, Distance, ENTITY_CAPACITY_EXCEEDED, ENTITY_NO_CRAFTER, EPOCH_NON_ZERO, EPOCH_NOT_READY, ERROR_SYSTEM_ALREADY_INITIALIZED, ERROR_SYSTEM_DISABLED, ERROR_SYSTEM_NOT_INITIALIZED, EnergyCapability, EntitiesManager, Entity, EntityCapabilities, EntityInfo, EntityInstance, EntityInventory, EntityLayout, EntityRefInput, EntitySlot, EntityState, EntitySubscriptionHandle, EntityType, EntityTypeName, EpochInfo, EpochsManager, ErrorMessage, EstimateTravelTimeOptions, EstimatedTravelTime, EventCatchupCompleteMessage, EventMessage, FloatPosition, 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, GathererCapability, GathererDepthParams, HasCapacity, HasCargo, HasCargomass, HasScheduleAndLocation, INSUFFICIENT_BALANCE, INSUFFICIENT_ITEM_QUANTITY, INSUFFICIENT_ITEM_SUPPLY, INVALID_AMOUNT, 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_CARGO_ARM, ITEM_CARGO_LINING, ITEM_CARGO_LINING_T2, 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_ENGINE_T1, ITEM_FOCUSING_ARRAY, 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_HULL_PLATES, ITEM_HULL_PLATES_T2, ITEM_LOADER_T1, ITEM_MATTER_CONDUIT, 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_POWER_CELL, ITEM_REACTION_CHAMBER, 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_SHIP_T1_PACKED, ITEM_STORAGE_T1, ITEM_SURVEY_PROBE, ITEM_THRUSTER_CORE, ITEM_TOOL_BIT, ITEM_TYPE_COMPONENT, ITEM_TYPE_ENTITY, ITEM_TYPE_MODULE, ITEM_TYPE_RESOURCE, ITEM_WAREHOUSE_T1_PACKED, ITEM_WARP_T1, InventoryAccessor, Item, ItemType, LOCATION_MAX_DEPTH, LOCATION_MIN_DEPTH, LoadTimeBreakdown, LoaderCapability, Location, LocationStratum, LocationType, LocationsManager, MAX_ORBITAL_ALTITUDE, MIN_ORBITAL_ALTITUDE, MODULE_ANY, 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_TYPE_MISMATCH, MODULE_WARP, MassCapability, ModuleDescription, ModuleEntry, ModuleType, MovementCapability, index as NFT, NFTCargoItem, NFTCommonBase, NFTInstalledModule, NFTModuleSlot, NO_SCHEDULE, NamedStats, OwnerSubscriptionHandle, 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, PackedModule, PackedModuleInput, PingMessage, PlanetSubtypeInfo, platform as PlatformContract, Types$1 as PlatformTypes, Player, PlayerStateInput, PlayersManager, PongMessage, Projectable, ProjectableSnapshot, ProjectedEntity, ProjectionOptions, 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, Recipe, RecipeInput, RecipeInputCategory, RecipeInputItemId, RecipeSlotInput, RenderDescriptionOptions, ReserveTier, ResolvedAttributeGroup, ResolvedItem, ResolvedItemStat, ResolvedItemType, ResolvedModuleSlot, ResourceCategory, ResourceStats, SHIP_ALREADY_THERE, SHIP_ALREADY_TRAVELING, SHIP_CANNOT_BUY_TRAVELING, SHIP_CANNOT_CANCEL_TASK, SHIP_CANNOT_UPDATE_TRAVELING, SHIP_CAPACITY_EXCEEDED, SHIP_CARGO_NOT_LOADED, SHIP_CARGO_NOT_OWNED, SHIP_INVALID_CARGO, SHIP_INVALID_DESTINATION, SHIP_INVALID_TRAVEL_DURATION, SHIP_NOT_ARRIVED, SHIP_NOT_ENOUGH_ENERGY, SHIP_NOT_ENOUGH_ENERGY_CAPACITY, SHIP_NOT_FOUND, SHIP_NOT_IDLE, SHIP_NOT_OWNED, SHIP_NO_COMPLETED_TASKS, SHIP_NO_TASKS_TO_CANCEL, SLOT_FORMULAS, STARTER_ALREADY_CLAIMED, ScheduleAccessor, ScheduleCapability, ScheduleData, Scheduleable, server as ServerContract, ServerMessage, Types as ServerTypes, Ship, ShipCapabilities, ShipEntity, ShipLike, ShipStateInput, Shipload, SlotConsumer, SlotConsumerKind, SnapshotMessage, StackInput, StatDefinition, StatMapping, StatSlot, StorageCapability, StratumInfo, SubscribeEntityMessage, SubscribeEventsMessage, SubscribeMessage, SubscriptionEntityType, SubscriptionsManager, SubscriptionsOptions, TIER_ADJECTIVES, TIER_ROLL_MAX, TRAVEL_MAX_DURATION, TaskCancelable, TaskType, TextSpan, TierRange, TransferEntity, UnsubscribeEntityMessage, UnsubscribeEventsMessage, UnsubscribeMessage, UpdateBoundsMessage, UpdateMessage, WAREHOUSE_ALREADY_AT_LOCATION, WAREHOUSE_CAPACITY_EXCEEDED, WAREHOUSE_NOT_FOUND, WAREHOUSE_Z, WARP_HAS_CARGO, WARP_HAS_SCHEDULE, WARP_NOT_FULL_ENERGY, WARP_NO_CAPABILITY, WARP_OUT_OF_RANGE, Warehouse, WarehouseEntity, WarehouseStateInput, WebSocketConnection, WebSocketConnectionOptions, WireCoordinates, WireEntity, availableCapacity$1 as availableCapacity, availableCapacityFromMass, blendCargoStacks, blendComponentStacks, blendCrossGroup, blendStacks, buildEntityDescription, calcCargoItemMass, calcCargoMass, calcEnergyUsage, calcLoadDuration, calcStacksMass, calc_acceleration, calc_craft_duration, calc_craft_energy, calc_energyusage, calc_flighttime, calc_gather_duration, calc_gather_energy, 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, cargoItemToStack, cargoUtils, cargo_item, categoryColors, categoryFromIndex, categoryIconShapes, categoryIcons, categoryLabel, categoryLabelFromIndex, componentIcon, computeBaseCapacityShip, computeBaseCapacityWarehouse, computeBaseHullmass, computeComponentStats, computeContainerCapabilities, computeContainerT2Capabilities, computeCraftedOutputStats, computeCrafterCapabilities, computeCrafterDrain, computeCrafterSpeed, computeEngineCapabilities, computeEngineDrain, computeEngineThrust, computeEntityStats, computeGathererCapabilities, computeGathererDepth, computeGathererDrain, computeGathererSpeed, computeGathererYield, computeGeneratorCap, computeGeneratorCapabilities, computeGeneratorRech, computeHaulPenalty, computeHaulerCapabilities, computeHaulerDrain$1 as computeHaulerDrain, computeInputMass, computeLoaderCapabilities, computeLoaderMass, computeLoaderThrust, computeShipCapabilities, computeShipHullCapabilities, computeStorageCapabilities, computeWarehouseCapabilities, computeWarehouseHullCapabilities, computeWarpRange, container_row, coordsToLocationId, createInventoryAccessor, createProjectedEntity, createScheduleAccessor, decodeCraftedItemStats, decodeStat, decodeStats, Shipload as default, deriveLocation, deriveLocationEpoch, deriveLocationSize, deriveLocationStatic, deriveResourceStats, deriveStatMappings, deriveStrata, deriveStratum, describeItem, describeModule, describeModuleForItem, describeModuleForSlot, deserializeAsset, deserializeComponent, deserializeEntity, deserializeModule, deserializeResource, displayName, distanceBetweenCoordinates, distanceBetweenPoints, easeFlightProgress, encodeGatheredCargoStats, encodeStats, energyPercent, energy_stats, entityDisplayName, estimateDealTravelTime, estimateTravelTime, findItemByCategoryAndTier, findNearbyPlanets, flightSpeedFactor, formatMass, formatMassDelta, formatModuleLine, formatTier, gathererDepthForTier, gatherer_stats, getCapabilityAttributes, getCategoryInfo, getComponents, getCurrentEpoch, getDepthThreshold, getDestinationLocation, getEligibleResources, getEntityItems, getEntityLayout, getEpochInfo, getFlightOrigin, getInterpolatedPosition, getItem, getItems, getLocationCandidates, getLocationProfile, getLocationType, getLocationTypeName, getModuleCapabilityType, getModules, getPlanetSubtype, getPlanetSubtypes, getPositionAt, getRecipe, getResourceTier, getResourceWeight, getResources, getStatDefinitions, getStatMappings, getStatMappingsForCapability, getStatMappingsForStat, getStatName, getSystemName, hasEnergy, hasEnergyForDistance, hasGatherer, hasLoaders, hasMass, hasSchedule, hasSpace$1 as hasSpace, hasSpaceForMass, hasStorage, hasSystem, hash, hash512, interpolateFlightPosition, isCraftedItem, isFull$1 as isFull, isFullFromMass, isGatherableLocation, isInvertedAttribute, isModuleItem, isRelatedItem, isSubscriptionsDebugEnabled, itemAbbreviations, itemCategory, itemIds, itemOffset, itemTier, itemTypeCode, lerp, loader_stats, location_derived, location_epoch, location_row, location_static, makeContainer, makeShip, makeWarehouse, mapEntity, maxTravelDistance, mergeStacks, moduleAccepts, moduleDisplayName, moduleIcon, moduleSlotTypeToCode, movement_stats, needsRecharge, parseWireEntity, projectEntity, projectEntityAt, projectFromCurrentState, projectFromCurrentStateAt, readCommonBase, removeFromStacks, renderDescription, resolveItem, resolveItemCategory, resolveStats, rollTier, rollWithinTier, rotation, schedule, setSubscriptionsDebug, stackKey, stackToCargoItem, stacksEqual, task, tierColors, tierLabel, tierLabels, toLocation, typeLabel, validateSchedule, warehouse_row };
|