@shipload/sdk 0.6.0 → 0.7.1
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 +4 -2
- package/lib/shipload.js +1206 -4
- package/lib/shipload.js.map +1 -1
- package/lib/shipload.m.js +1206 -5
- package/lib/shipload.m.js.map +1 -1
- package/package.json +1 -1
- package/src/contracts/platform.ts +30 -30
- package/src/contracts/server.ts +117 -117
- package/src/index-module.ts +1 -0
- package/src/shipload.ts +3 -1
- package/src/syllables.ts +1184 -0
- package/src/system.ts +37 -0
- package/src/travel.ts +1 -9
package/lib/shipload.d.ts
CHANGED
|
@@ -615,6 +615,9 @@ declare function getGoods(): Good[];
|
|
|
615
615
|
declare function hash(seed: Checksum256Type, string: string): Checksum512;
|
|
616
616
|
declare function hash512(seed: Checksum256Type, string: string): Checksum512;
|
|
617
617
|
|
|
618
|
+
declare function getSystemName(gameSeed: Checksum256, location: Coordinates): string;
|
|
619
|
+
declare function hasSystem(gameSeed: Checksum256, coordinates: ActionParams.Type.coordinates): boolean;
|
|
620
|
+
|
|
618
621
|
declare enum Rarities {
|
|
619
622
|
legendary = "LEGENDARY",
|
|
620
623
|
epic = "EPIC",
|
|
@@ -649,7 +652,6 @@ declare function distanceBetweenCoordinates(origin: ActionParams.Type.coordinate
|
|
|
649
652
|
declare function distanceBetweenPoints(x1: Int64Type, y1: Int64Type, x2: Int64Type, y2: Int64Type): UInt64;
|
|
650
653
|
declare function lerp(origin: ActionParams.Type.coordinates, destination: ActionParams.Type.coordinates, time: number): ActionParams.Type.coordinates;
|
|
651
654
|
declare function rotation(origin: ActionParams.Type.coordinates, destination: ActionParams.Type.coordinates): number;
|
|
652
|
-
declare function hasSystem(seed: Checksum256, coordinates: ActionParams.Type.coordinates): boolean;
|
|
653
655
|
declare function findNearbyPlanets(seed: Checksum256, origin: ActionParams.Type.coordinates, maxDistance?: UInt64Type): Distance[];
|
|
654
656
|
declare function travelplan(game: Types$1.game_row, ship: Types.ship_row, cargos: Types.cargo_row[], origin: ActionParams.Type.coordinates, destination: ActionParams.Type.coordinates, recharge: boolean, alwaysValid?: boolean): Types.travel_plan;
|
|
655
657
|
declare function calc_mass_penalty(ship: Types.ship_row, mass: UInt64Type): UInt32;
|
|
@@ -697,4 +699,4 @@ declare class Shipload {
|
|
|
697
699
|
getLocation(location: Coordinates): Promise<any[]>;
|
|
698
700
|
}
|
|
699
701
|
|
|
700
|
-
export { CameraPosition, Coordinates, Dimensions, Distance, ERROR_SYSTEM_NOT_INITIALIZED, EpochInfo, GOOD_DOES_NOT_EXIST, GOOD_NOT_AVAILABLE_AT_LOCATION, Good, GoodPrice, GoodType, INSUFFICIENT_BALANCE, INSUFFICIENT_GOOD_QUANTITY, PLAYER_NOT_FOUND, PRECISION, platform as PlatformContract, REQUIRES_MORE_THAN_ONE, Rarities, Rarity, SHIP_CANNOT_BUY_TRAVELING, SHIP_NOT_FOUND, server as ServerContract, Ship, TRAVEL_MAXMASS_PENALTY, calc_acceleration, calc_energyusage, calc_flighttime, calc_loader_acceleration, calc_loader_flighttime, calc_mass_penalty, calc_rechargetime, calc_ship_acceleration, calc_ship_flighttime, calc_ship_loadtime, calc_ship_mass, calc_ship_rechargetime, Shipload as default, distanceBetweenCoordinates, distanceBetweenPoints, distanceTraveled, findNearbyPlanets, generateLocationSeed, getCurrentEpoch, getEpochInfo, getGood, getGoods, getLocationMultiplier, getRarity, getRarityMultiplier, getSupply, goodIds, hasSystem, hash, hash512, lerp, marketprice, marketprices, rotation, travelplan, travelplanDuration };
|
|
702
|
+
export { CameraPosition, Coordinates, Dimensions, Distance, ERROR_SYSTEM_NOT_INITIALIZED, EpochInfo, GOOD_DOES_NOT_EXIST, GOOD_NOT_AVAILABLE_AT_LOCATION, Good, GoodPrice, GoodType, INSUFFICIENT_BALANCE, INSUFFICIENT_GOOD_QUANTITY, PLAYER_NOT_FOUND, PRECISION, platform as PlatformContract, REQUIRES_MORE_THAN_ONE, Rarities, Rarity, SHIP_CANNOT_BUY_TRAVELING, SHIP_NOT_FOUND, server as ServerContract, Ship, TRAVEL_MAXMASS_PENALTY, calc_acceleration, calc_energyusage, calc_flighttime, calc_loader_acceleration, calc_loader_flighttime, calc_mass_penalty, calc_rechargetime, calc_ship_acceleration, calc_ship_flighttime, calc_ship_loadtime, calc_ship_mass, calc_ship_rechargetime, Shipload as default, distanceBetweenCoordinates, distanceBetweenPoints, distanceTraveled, findNearbyPlanets, generateLocationSeed, getCurrentEpoch, getEpochInfo, getGood, getGoods, getLocationMultiplier, getRarity, getRarityMultiplier, getSupply, getSystemName, goodIds, hasSystem, hash, hash512, lerp, marketprice, marketprices, rotation, travelplan, travelplanDuration };
|