Function
Static Public Summary | ||
public |
Register path with callback fn(), or route path`, or Router.start(). |
|
public |
armourMetrics(ship: Object): Object Calculate armour metrics |
|
public |
bulkheadIndex(bulkheadName: String): number Get the bulkhead index for the given bulkhead name |
|
public |
Calculate time from one boost to another |
|
public |
calcPitch(mass: number, basePitch: number, thrusters: object, engpip: number, eng: number, boostFactor: number, boost: boolean): number Calculate pitch for a given setup |
|
public |
calcRoll(mass: number, baseRoll: number, thrusters: ojbect, engpip: number, eng: number, boostFactor: number, boost: boolean): number Calculate roll for a given setup |
|
public |
calcSpeed(mass: number, baseSpeed: number, thrusters: ojbect, engpip: number, eng: number, boostFactor: number, boost: boolean): number Calculate speed for a given setup |
|
public |
calcYaw(mass: number, baseYaw: number, thrusters: ojbect, engpip: number, eng: number, boostFactor: number, boost: boolean): number Calculate yaw for a given setup |
|
public |
cargoHatch(): Object Created a cargo hatch model |
|
public |
comparisonBBCode(translate: Function, formats: object, facets: array, builds: object, link: string): string Generate a BBCode (Forum) compatible table from comparisons |
|
public |
defenceMetrics(ship: Object, opponent: Object, sys: int, opponentWep: int, engagementrange: int): Object Calculate defence metrics for a ship |
|
public |
Explorer Role |
|
public |
findHardpoint(groupName: String, clss: integer, rating: String, name: String, mount: String, missile: String): String Finds a hardpoint Module based on Class, Rating, Group and/or name. |
|
public |
findHardpointId(groupName: String, clss: integer, rating: String, name: String, mount: String, missile: String): String Finds a hardpoint module ID based on Class, Rating, Group and/or name. |
|
public |
findInternal(groupName: String, clss: integer, rating: String, name: String): Object Finds an internal module based on Class, Rating, Group and/or name. |
|
public |
findInternalId(groupName: String, clss: integer, rating: String, name: String): String Finds an internal Module ID based on Class, Rating, Group and/or name. |
|
public |
findMaxInternal(groupName: String, clss: integer, rating: String, name: String): Object Finds an internal module based on Class, Rating, Group and/or name. |
|
public |
findModule(grp: String, id: String): Object Finds the module with the specific group and ID |
|
public |
findStandard(groupName: String, clss: integer, rating: String, name: String): Object Finds a standard module based on Class, Rating, Group and/or name. |
|
public |
findStandardId(groupName: String, clss: integer, rating: String, name: String): String Finds a standard Module ID based on Class, Rating, Group and/or name. |
|
public |
Creates a new ModuleSet that contains all available modules that the specified ship is eligible to use. |
|
public |
fromComparison(name: string, builds: array, facets: array, predicate: string, desc: boolean): string Serializes a comparion and all of the ships to zipped Base 64 encoded JSON. |
|
public |
fromDetailedBuild(detailedBuild: Object): Ship Instantiates a ship from a ship-loadout object |
|
public |
fromUrlSafe(data: string): string Turn a URL-safe base-64 encoded string in to a normal version. |
|
public |
hardpoints(id: String): Object Finds the hardpoint with the specified ID |
|
public |
Finds the internal module with the specified ID |
|
public |
Check if an object is empty |
|
public |
Determine if a module group is a shield generator |
|
public |
Calculate the maximum single jump range based on mass and a specific FSD |
|
public |
Miner Role |
|
public |
multiPurpose(ship: Ship, shielded: Boolean, bulkheadIndex: integer) Standard / typical role for multi-purpose or combat (if shielded with better bulkheads) |
|
public |
offenceMetrics(ship: Object, opponent: Object, wep: int, opponentSys: int, engagementrange: int): array Calculate offence metrics for a ship |
|
public |
Generates a URL for the outiffing page |
|
public |
Calculate pitch of a ship based on mass and thrusters |
|
public |
Racer Role |
|
public |
Calculate roll of a ship based on mass and thrusters |
|
public |
shallowEqual(objA: any, objB: any): boolean Compares A and B and return true using strict comparison (===) |
|
public |
shieldMetrics(ship: Object, sys: int): Object Calculate shield metrics |
|
public |
Calculate the a ships shield strength based on mass, shield generator and shield boosters used. |
|
public |
shipFromJson(json: object): Ship Build a ship from the companion API JSON |
|
public |
shipFromLoadoutJSON(json: object): Ship Build a ship from the journal Loadout event JSON |
|
public |
shipModelFromJson(json: object): string Obtain a ship's model from the companion API JSON |
|
public |
shorternUrl(url: string, success: function, error: function) Shorten a URL |
|
public |
Calculate the a ships speed based on mass, and thrusters. |
|
public |
Finds the standard module type with the specified ID |
|
public |
stopCtxPropagation(event: SyntheticEvent) Stop context menu / right-click propagation unless shift is held. |
|
public |
sustainedDps(ship: Object, opponent: Object, sys: number, engagementrange: int): Object Calculate the sustained DPS for a ship against an opponent at a given range |
|
public |
sysRechargeRate(pd: Object, sys: number): number Obtain the recharge rate of the SYS capacitor of a power distributor given pips |
|
public |
sysResistance(sys: integer): integer Calculate the resistance provided by SYS pips |
|
public |
Calculate the time to deplete an amount of shields or armour |
|
public |
timeToDrainWep(ship: object, wep: number): number Calculate time to drain WEP capacitor |
|
public |
toComparison(code: string): Object Parses the comarison data string back to an object. |
|
public |
toDetailedBuild(buildName: string, ship: Ship): Object Generates an object conforming to the ship-loadout JSON schema from a Ship model |
|
public |
toDetailedExport(builds: Array): Array Generates an array of ship-loadout JSON Schema object for export |
|
public |
totalJumpRange(mass: number, fsd: object, fuel: number): number Calculate the total jump range based on mass and a specific FSD, and all fuel available |
|
public |
Trader Role |
|
public |
wrapCtxMenu(cb: Function): Function Wraps the callback/context menu handler such that the default operation can proceed if the SHIFT key is held while right-clicked |
|
public |
Calculate yaw of a ship based on mass and thrusters |
Static Private Summary | ||
private |
_sustainedDps(ship: Object, opponent: Object, opponentShields: Object, opponentArmour: Object, engagementrange: int): Object Calculate the sustained DPS for a ship against an opponent at a given range |
|
private |
_weaponSustainedDps(m: Object, opponent: Object, opponentShields: Object, opponentArmour: Object, engagementrange: int): Object Calculate the sustained DPS for a weapon at a given range |
Static Public
public Router(path: String, fn: Function) source
import Router from 'coriolis_shipyard/src/app/Router.js'
Register path with callback fn(), or route path`, or Router.start().
Router('*', fn); Router('/user/:id', load, user); Router('/user/' + user.id, { some: 'thing' }); Router('/user/' + user.id); Router();
public armourMetrics(ship: Object): Object source
import {armourMetrics} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'
Calculate armour metrics
Params:
Name | Type | Attribute | Description |
ship | Object | The ship |
public bulkheadIndex(bulkheadName: String): number source
import {bulkheadIndex} from 'coriolis_shipyard/src/app/shipyard/ModuleUtils.js'
Get the bulkhead index for the given bulkhead name
Params:
Name | Type | Attribute | Description |
bulkheadName | String | Bulkhead name in english |
public calcBoost(ship: Ship): number source
import {calcBoost} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'
Calculate time from one boost to another
Params:
Name | Type | Attribute | Description |
ship | Ship | Ship object |
public calcPitch(mass: number, basePitch: number, thrusters: object, engpip: number, eng: number, boostFactor: number, boost: boolean): number source
import {calcPitch} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'
Calculate pitch for a given setup
Params:
Name | Type | Attribute | Description |
mass | number | the mass of the ship |
|
basePitch | number | the base pitch of the ship |
|
thrusters | object | the thrusters of the ship |
|
engpip | number | the multiplier per pip to engines |
|
eng | number | the pips to engines |
|
boostFactor | number | the boost factor for ths ship |
|
boost | boolean | true if the boost is activated |
public calcRoll(mass: number, baseRoll: number, thrusters: ojbect, engpip: number, eng: number, boostFactor: number, boost: boolean): number source
import {calcRoll} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'
Calculate roll for a given setup
Params:
Name | Type | Attribute | Description |
mass | number | the mass of the ship |
|
baseRoll | number | the base roll of the ship |
|
thrusters | ojbect | the thrusters of the ship |
|
engpip | number | the multiplier per pip to engines |
|
eng | number | the pips to engines |
|
boostFactor | number | the boost factor for ths ship |
|
boost | boolean | true if the boost is activated |
public calcSpeed(mass: number, baseSpeed: number, thrusters: ojbect, engpip: number, eng: number, boostFactor: number, boost: boolean): number source
import {calcSpeed} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'
Calculate speed for a given setup
Params:
Name | Type | Attribute | Description |
mass | number | the mass of the ship |
|
baseSpeed | number | the base speed of the ship |
|
thrusters | ojbect | the thrusters of the ship |
|
engpip | number | the multiplier per pip to engines |
|
eng | number | the pips to engines |
|
boostFactor | number | the boost factor for ths ship |
|
boost | boolean | true if the boost is activated |
public calcYaw(mass: number, baseYaw: number, thrusters: ojbect, engpip: number, eng: number, boostFactor: number, boost: boolean): number source
import {calcYaw} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'
Calculate yaw for a given setup
Params:
Name | Type | Attribute | Description |
mass | number | the mass of the ship |
|
baseYaw | number | the base yaw of the ship |
|
thrusters | ojbect | the thrusters of the ship |
|
engpip | number | the multiplier per pip to engines |
|
eng | number | the pips to engines |
|
boostFactor | number | the boost factor for ths ship |
|
boost | boolean | true if the boost is activated |
public cargoHatch(): Object source
import {cargoHatch} from 'coriolis_shipyard/src/app/shipyard/ModuleUtils.js'
Created a cargo hatch model
public comparisonBBCode(translate: Function, formats: object, facets: array, builds: object, link: string): string source
import {comparisonBBCode} from 'coriolis_shipyard/src/app/utils/BBCode.js'
Generate a BBCode (Forum) compatible table from comparisons
public defenceMetrics(ship: Object, opponent: Object, sys: int, opponentWep: int, engagementrange: int): Object source
import {defenceMetrics} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'
Calculate defence metrics for a ship
public explorer(ship: Ship, planetary: Boolean) source
import {explorer} from 'coriolis_shipyard/src/app/shipyard/ShipRoles.js'
Explorer Role
public findHardpoint(groupName: String, clss: integer, rating: String, name: String, mount: String, missile: String): String source
import {findHardpoint} from 'coriolis_shipyard/src/app/shipyard/ModuleUtils.js'
Finds a hardpoint Module based on Class, Rating, Group and/or name. At least one ofGroup name or unique module name must be provided
Params:
Name | Type | Attribute | Description |
groupName | String | [Optional] Full name or abbreviated name for module group |
|
clss | integer | Module Class |
|
rating | String | [Optional] module Rating |
|
name | String | [Optional] Long/unique name for module -e.g. 'Heat Sink Launcher' |
|
mount | String | Mount type - [F]ixed, [G]imballed, [T]urret |
|
missile | String | [Optional] Missile type - [D]umbfire, [S]eeker |
public findHardpointId(groupName: String, clss: integer, rating: String, name: String, mount: String, missile: String): String source
import {findHardpointId} from 'coriolis_shipyard/src/app/shipyard/ModuleUtils.js'
Finds a hardpoint module ID based on Class, Rating, Group and/or name. At least one of Group name or unique module name must be provided
Params:
Name | Type | Attribute | Description |
groupName | String | [Optional] Full name or abbreviated name for module group |
|
clss | integer | module Class |
|
rating | String | module Rating |
|
name | String | [Optional] Long/unique name for module -e.g. 'Heat Sink Launcher' |
|
mount | String | Mount type - [F]ixed, [G]imballed, [T]urret |
|
missile | String | [Optional] Missile type - [D]umbfire, [S]eeker |
public findInternal(groupName: String, clss: integer, rating: String, name: String): Object source
import {findInternal} from 'coriolis_shipyard/src/app/shipyard/ModuleUtils.js'
Finds an internal module based on Class, Rating, Group and/or name. At least one ofGroup name or unique module name must be provided
public findInternalId(groupName: String, clss: integer, rating: String, name: String): String source
import {findInternalId} from 'coriolis_shipyard/src/app/shipyard/ModuleUtils.js'
Finds an internal Module ID based on Class, Rating, Group and/or name. At least one ofGroup name or unique module name must be provided
public findMaxInternal(groupName: String, clss: integer, rating: String, name: String): Object source
import {findMaxInternal} from 'coriolis_shipyard/src/app/shipyard/ModuleUtils.js'
Finds an internal module based on Class, Rating, Group and/or name. At least one of Group name or unique module name must be provided. will start searching at specified class and proceed lower until a module is found or 0 is hit Uses findInternal internally
public findModule(grp: String, id: String): Object source
import {findModule} from 'coriolis_shipyard/src/app/shipyard/ModuleUtils.js'
Finds the module with the specific group and ID
public findStandard(groupName: String, clss: integer, rating: String, name: String): Object source
import {findStandard} from 'coriolis_shipyard/src/app/shipyard/ModuleUtils.js'
Finds a standard module based on Class, Rating, Group and/or name. At least one of Group name or unique module name must be provided
public findStandardId(groupName: String, clss: integer, rating: String, name: String): String source
import {findStandardId} from 'coriolis_shipyard/src/app/shipyard/ModuleUtils.js'
Finds a standard Module ID based on Class, Rating, Group and/or name. At least one of Group name or unique module name must be provided
public forShip(shipId: String): ModuleSet source
import {forShip} from 'coriolis_shipyard/src/app/shipyard/ModuleUtils.js'
Creates a new ModuleSet that contains all available modules that the specified ship is eligible to use.
6.5 T is the lightest possible mass of standard components that any ship can use
Params:
Name | Type | Attribute | Description |
shipId | String | Unique ship Id/Key |
public fromComparison(name: string, builds: array, facets: array, predicate: string, desc: boolean): string source
import {fromComparison} from 'coriolis_shipyard/src/app/shipyard/Serializer.js'
Serializes a comparion and all of the ships to zipped Base 64 encoded JSON.
public fromDetailedBuild(detailedBuild: Object): Ship source
import {fromDetailedBuild} from 'coriolis_shipyard/src/app/shipyard/Serializer.js'
Instantiates a ship from a ship-loadout object
Params:
Name | Type | Attribute | Description |
detailedBuild | Object | ship-loadout object |
public fromUrlSafe(data: string): string source
import {fromUrlSafe} from 'coriolis_shipyard/src/app/utils/UtilityFunctions.js'
Turn a URL-safe base-64 encoded string in to a normal version. Coriolis used to use a different encoding system, and some old data might be bookmarked or on local storage, so we keep this around and use it when decoding data from the old-style URLs to be safe.
Params:
Name | Type | Attribute | Description |
data | string | the string |
public hardpoints(id: String): Object source
import {hardpoints} from 'coriolis_shipyard/src/app/shipyard/ModuleUtils.js'
Finds the hardpoint with the specified ID
Params:
Name | Type | Attribute | Description |
id | String | Hardpoint ID |
public internal(id: String): Object source
import {internal} from 'coriolis_shipyard/src/app/shipyard/ModuleUtils.js'
Finds the internal module with the specified ID
Params:
Name | Type | Attribute | Description |
id | String | Internal module ID |
public isEmpty(obj: object): bool source
import {isEmpty} from 'coriolis_shipyard/src/app/utils/UtilityFunctions.js'
Check if an object is empty
Params:
Name | Type | Attribute | Description |
obj | object | the object |
Return:
bool | true if the object is empty, otherwise false |
public isShieldGenerator(g: String): Boolean source
import {isShieldGenerator} from 'coriolis_shipyard/src/app/shipyard/ModuleUtils.js'
Determine if a module group is a shield generator
Params:
Name | Type | Attribute | Description |
g | String | Module Group name |
public jumpRange(mass: number, fsd: object, fuel: number): number source
import {jumpRange} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'
Calculate the maximum single jump range based on mass and a specific FSD
public miner(ship: Ship, shielded: Boolean) source
import {miner} from 'coriolis_shipyard/src/app/shipyard/ShipRoles.js'
Miner Role
public multiPurpose(ship: Ship, shielded: Boolean, bulkheadIndex: integer) source
import {multiPurpose} from 'coriolis_shipyard/src/app/shipyard/ShipRoles.js'
Standard / typical role for multi-purpose or combat (if shielded with better bulkheads)
public offenceMetrics(ship: Object, opponent: Object, wep: int, opponentSys: int, engagementrange: int): array source
import {offenceMetrics} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'
Calculate offence metrics for a ship
Return:
array | Offence metrics |
public outfitURL(shipId: String, code: String, buildName: String): String source
import {outfitURL} from 'coriolis_shipyard/src/app/utils/UrlGenerators.js'
Generates a URL for the outiffing page
public pitch(mass: number, basePitch: number, thrusters: object, engpip: number): array source
import {pitch} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'
Calculate pitch of a ship based on mass and thrusters
Return:
array | Pitch by pips |
public racer(ship: Ship) source
import {racer} from 'coriolis_shipyard/src/app/shipyard/ShipRoles.js'
Racer Role
Params:
Name | Type | Attribute | Description |
ship | Ship | Ship instance |
public roll(mass: number, baseRoll: number, thrusters: object, engpip: number): array source
import {roll} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'
Calculate roll of a ship based on mass and thrusters
Return:
array | Roll by pips |
public shallowEqual(objA: any, objB: any): boolean source
import {shallowEqual} from 'coriolis_shipyard/src/app/utils/UtilityFunctions.js'
Compares A and B and return true using strict comparison (===)
Params:
Name | Type | Attribute | Description |
objA | any | A |
|
objB | any | B |
public shieldMetrics(ship: Object, sys: int): Object source
import {shieldMetrics} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'
Calculate shield metrics
Params:
Name | Type | Attribute | Description |
ship | Object | The ship |
|
sys | int | The pips to SYS |
public shieldStrength(mass: number, baseShield: number, sg: object, multiplier: number): number source
import {shieldStrength} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'
Calculate the a ships shield strength based on mass, shield generator and shield boosters used.
public shipFromJson(json: object): Ship source
import {shipFromJson} from 'coriolis_shipyard/src/app/utils/CompanionApiUtils.js'
Build a ship from the companion API JSON
Params:
Name | Type | Attribute | Description |
json | object | the companion API JSON |
public shipFromLoadoutJSON(json: object): Ship source
import {shipFromLoadoutJSON} from 'coriolis_shipyard/src/app/utils/JournalUtils.js'
Build a ship from the journal Loadout event JSON
Params:
Name | Type | Attribute | Description |
json | object | the Loadout event JSON |
public shipModelFromJson(json: object): string source
import {shipModelFromJson} from 'coriolis_shipyard/src/app/utils/CompanionApiUtils.js'
Obtain a ship's model from the companion API JSON
Params:
Name | Type | Attribute | Description |
json | object | the companion API JSON |
public shorternUrl(url: string, success: function, error: function) source
import shorternUrl from 'coriolis_shipyard/src/app/utils/ShortenUrl.js'
Shorten a URL
public speed(mass: number, baseSpeed: number, thrusters: object, engpip: number): array source
import {speed} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'
Calculate the a ships speed based on mass, and thrusters.
Return:
array | Speed by pips |
public standard(type: String | Number, id: String): Object source
import {standard} from 'coriolis_shipyard/src/app/shipyard/ModuleUtils.js'
Finds the standard module type with the specified ID
public stopCtxPropagation(event: SyntheticEvent) source
import {stopCtxPropagation} from 'coriolis_shipyard/src/app/utils/UtilityFunctions.js'
Stop context menu / right-click propagation unless shift is held.
Params:
Name | Type | Attribute | Description |
event | SyntheticEvent | Event |
public sustainedDps(ship: Object, opponent: Object, sys: number, engagementrange: int): Object source
import {sustainedDps} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'
Calculate the sustained DPS for a ship against an opponent at a given range
public sysRechargeRate(pd: Object, sys: number): number source
import {sysRechargeRate} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'
Obtain the recharge rate of the SYS capacitor of a power distributor given pips
public sysResistance(sys: integer): integer source
import {sysResistance} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'
Calculate the resistance provided by SYS pips
Params:
Name | Type | Attribute | Description |
sys | integer | the value of the SYS pips |
Return:
integer | the resistance for the given pips |
public timeToDeplete(amount: number, dps: number, eps: number, capacity: number, recharge: number): number source
import {timeToDeplete} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'
Calculate the time to deplete an amount of shields or armour
public timeToDrainWep(ship: object, wep: number): number source
import {timeToDrainWep} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'
Calculate time to drain WEP capacitor
public toComparison(code: string): Object source
import {toComparison} from 'coriolis_shipyard/src/app/shipyard/Serializer.js'
Parses the comarison data string back to an object.
Params:
Name | Type | Attribute | Description |
code | string | Zipped Base 64 encoded JSON comparison data |
public toDetailedBuild(buildName: string, ship: Ship): Object source
import {toDetailedBuild} from 'coriolis_shipyard/src/app/shipyard/Serializer.js'
Generates an object conforming to the ship-loadout JSON schema from a Ship model
public toDetailedExport(builds: Array): Array source
import {toDetailedExport} from 'coriolis_shipyard/src/app/shipyard/Serializer.js'
Generates an array of ship-loadout JSON Schema object for export
Params:
Name | Type | Attribute | Description |
builds | Array | Array of ship builds |
public totalJumpRange(mass: number, fsd: object, fuel: number): number source
import {totalJumpRange} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'
Calculate the total jump range based on mass and a specific FSD, and all fuel available
public trader(ship: Ship, shielded: Boolean, standardOpts: Object) source
import {trader} from 'coriolis_shipyard/src/app/shipyard/ShipRoles.js'
Trader Role
public wrapCtxMenu(cb: Function): Function source
import {wrapCtxMenu} from 'coriolis_shipyard/src/app/utils/UtilityFunctions.js'
Wraps the callback/context menu handler such that the default operation can proceed if the SHIFT key is held while right-clicked
Params:
Name | Type | Attribute | Description |
cb | Function | Callback for contextMenu |
public yaw(mass: number, baseYaw: number, thrusters: object, engpip: number): array source
import {yaw} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'
Calculate yaw of a ship based on mass and thrusters
Return:
array | Yaw by pips |
Static Private
private _sustainedDps(ship: Object, opponent: Object, opponentShields: Object, opponentArmour: Object, engagementrange: int): Object source
import {_sustainedDps} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'
Calculate the sustained DPS for a ship against an opponent at a given range