Home Reference Source

Function

Static Public Summary
public

Router(path: String, fn: Function)

Register path with callback fn(), or route path`, or Router.start().

public

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

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(ship: Ship, planetary: Boolean)

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

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

Turn a URL-safe base-64 encoded string in to a normal version.

public

Finds the hardpoint with the specified ID

public

Finds the internal module with the specified ID

public

isEmpty(obj: object): bool

Check if an object is empty

public

Determine if a module group is a shield generator

public

jumpRange(mass: number, fsd: object, fuel: number): number

Calculate the maximum single jump range based on mass and a specific FSD

public

miner(ship: Ship, shielded: Boolean)

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

outfitURL(shipId: String, code: String, buildName: String): String

Generates a URL for the outiffing page

public

pitch(mass: number, basePitch: number, thrusters: object, engpip: number): array

Calculate pitch of a ship based on mass and thrusters

public

racer(ship: Ship)

Racer Role

public

roll(mass: number, baseRoll: number, thrusters: object, engpip: number): array

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

shieldStrength(mass: number, baseShield: number, sg: object, multiplier: number): number

Calculate the a ships shield strength based on mass, shield generator and shield boosters used.

public

Build a ship from the companion API JSON

public

Build a ship from the journal Loadout event JSON

public

Obtain a ship's model from the companion API JSON

public

shorternUrl(url: string, success: function, error: function)

Shorten a URL

public

speed(mass: number, baseSpeed: number, thrusters: object, engpip: number): array

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

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

timeToDeplete(amount: number, dps: number, eps: number, capacity: number, recharge: number): number

Calculate the time to deplete an amount of shields or armour

public

Calculate time to drain WEP capacitor

public

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

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(ship: Ship, shielded: Boolean, standardOpts: Object)

Trader Role

public

Wraps the callback/context menu handler such that the default operation can proceed if the SHIFT key is held while right-clicked

public

yaw(mass: number, baseYaw: number, thrusters: object, engpip: number): array

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

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();

Params:

NameTypeAttributeDescription
path String

path

fn Function

Callbacks (fn, fn, ...)

public armourMetrics(ship: Object): Object source

Calculate armour metrics

Params:

NameTypeAttributeDescription
ship Object

The ship

Return:

Object

Armour metrics

public bulkheadIndex(bulkheadName: String): number source

Get the bulkhead index for the given bulkhead name

Params:

NameTypeAttributeDescription
bulkheadName String

Bulkhead name in english

Return:

number

Bulkhead index

public calcBoost(ship: Ship): number source

Calculate time from one boost to another

Params:

NameTypeAttributeDescription
ship Ship

Ship object

Return:

number

Boost frequency in seconds

public calcPitch(mass: number, basePitch: number, thrusters: object, engpip: number, eng: number, boostFactor: number, boost: boolean): number source

Calculate pitch for a given setup

Params:

NameTypeAttributeDescription
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

Return:

number

the resultant pitch

public calcRoll(mass: number, baseRoll: number, thrusters: ojbect, engpip: number, eng: number, boostFactor: number, boost: boolean): number source

Calculate roll for a given setup

Params:

NameTypeAttributeDescription
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

Return:

number

the resultant roll

public calcSpeed(mass: number, baseSpeed: number, thrusters: ojbect, engpip: number, eng: number, boostFactor: number, boost: boolean): number source

Calculate speed for a given setup

Params:

NameTypeAttributeDescription
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

Return:

number

the resultant speed

public calcYaw(mass: number, baseYaw: number, thrusters: ojbect, engpip: number, eng: number, boostFactor: number, boost: boolean): number source

Calculate yaw for a given setup

Params:

NameTypeAttributeDescription
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

Return:

number

the resultant yaw

public cargoHatch(): Object source

Created a cargo hatch model

Return:

Object

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

Params:

NameTypeAttributeDescription
translate Function

Translate language function

formats object

Number Formats

facets array

Ship Facets

builds object

Ship builds

link string

Link to the comparison

Return:

string

the BBCode

public defenceMetrics(ship: Object, opponent: Object, sys: int, opponentWep: int, engagementrange: int): Object source

Calculate defence metrics for a ship

Params:

NameTypeAttributeDescription
ship Object

The ship

opponent Object

The opponent ship

sys int

The pips to SYS

opponentWep int

The pips to pponent's WEP

engagementrange int

The range between the ship and opponent

Return:

Object

Defence metrics

public explorer(ship: Ship, planetary: Boolean) source

Explorer Role

Params:

NameTypeAttributeDescription
ship Ship

Ship instance

planetary Boolean

True if Planetary Vehicle Hangar (PVH) should be included

public findHardpoint(groupName: String, clss: integer, rating: String, name: String, mount: String, missile: String): String source

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:

NameTypeAttributeDescription
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

Return:

String

The id of the module if found, null if not found

public findHardpointId(groupName: String, clss: integer, rating: String, name: String, mount: String, missile: String): String source

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:

NameTypeAttributeDescription
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

Return:

String

The id of the module if found, null if not found

public findInternal(groupName: String, clss: integer, rating: String, name: String): Object source

Finds an internal module based on Class, Rating, Group and/or name. At least one ofGroup name or unique module name must be provided

Params:

NameTypeAttributeDescription
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. 'Advanced Discover Scanner'

Return:

Object

The module if found, null if not found

public findInternalId(groupName: String, clss: integer, rating: String, name: String): String source

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

Params:

NameTypeAttributeDescription
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. 'Advanced Discover Scanner'

Return:

String

The id of the module if found, null if not found

public findMaxInternal(groupName: String, clss: integer, rating: String, name: String): Object source

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

Params:

NameTypeAttributeDescription
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. 'Advanced Discover Scanner'

Return:

Object

The module if found, null if not found

public findModule(grp: String, id: String): Object source

Finds the module with the specific group and ID

Params:

NameTypeAttributeDescription
grp String

Module group (pp - power plant, pl - pulse laser etc)

id String

The module ID

Return:

Object

The module or null

public findStandard(groupName: String, clss: integer, rating: String, name: String): Object source

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

Params:

NameTypeAttributeDescription
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. 'Advanced Discover Scanner'

Return:

Object

The module if found, null if not found

public findStandardId(groupName: String, clss: integer, rating: String, name: String): String source

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

Params:

NameTypeAttributeDescription
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. 'Advanced Discover Scanner'

Return:

String

The id of the module if found, null if not found

public forShip(shipId: String): ModuleSet source

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:

NameTypeAttributeDescription
shipId String

Unique ship Id/Key

Return:

ModuleSet

The set of modules the ship can install

public fromComparison(name: string, builds: array, facets: array, predicate: string, desc: boolean): string source

Serializes a comparion and all of the ships to zipped Base 64 encoded JSON.

Params:

NameTypeAttributeDescription
name string

Comparison name

builds array

Array of ship builds

facets array

Selected facets

predicate string

sort predicate

desc boolean

sort order

Return:

string

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:

NameTypeAttributeDescription
detailedBuild Object

ship-loadout object

Return:

Ship

Ship instance

public fromUrlSafe(data: string): string source

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:

NameTypeAttributeDescription
data string

the string

Return:

string

the converted string

public hardpoints(id: String): Object source

Finds the hardpoint with the specified ID

Params:

NameTypeAttributeDescription
id String

Hardpoint ID

Return:

Object

Hardpoint module or null

public internal(id: String): Object source

Finds the internal module with the specified ID

Params:

NameTypeAttributeDescription
id String

Internal module ID

Return:

Object

Internal module or null

public isEmpty(obj: object): bool source

Check if an object is empty

Params:

NameTypeAttributeDescription
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:

NameTypeAttributeDescription
g String

Module Group name

Return:

Boolean

True if the group is a shield generator

public jumpRange(mass: number, fsd: object, fuel: number): number source

Calculate the maximum single jump range based on mass and a specific FSD

Params:

NameTypeAttributeDescription
mass number

Mass of a ship: laden, unlanden, partially laden, etc

fsd object

The FDS object/component with maxfuel, fuelmul, fuelpower, optmass

fuel number

Optional - The fuel consumed during the jump

Return:

number

Distance in Light Years

public miner(ship: Ship, shielded: Boolean) source

Miner Role

Params:

NameTypeAttributeDescription
ship Ship

Ship instance

shielded Boolean

True if shield generator should be included

public multiPurpose(ship: Ship, shielded: Boolean, bulkheadIndex: integer) source

Standard / typical role for multi-purpose or combat (if shielded with better bulkheads)

Params:

NameTypeAttributeDescription
ship Ship

Ship instance

shielded Boolean

True if shield generator should be included

bulkheadIndex integer

Bulkhead to use see Constants.BulkheadNames

public offenceMetrics(ship: Object, opponent: Object, wep: int, opponentSys: int, engagementrange: int): array source

Calculate offence metrics for a ship

Params:

NameTypeAttributeDescription
ship Object

The ship

opponent Object

The opponent ship

wep int

The pips to WEP

opponentSys int

The pips to opponent's SYS

engagementrange int

The range between the ship and opponent

Return:

array

Offence metrics

public outfitURL(shipId: String, code: String, buildName: String): String source

Generates a URL for the outiffing page

Params:

NameTypeAttributeDescription
shipId String

Ship Id

code String

[optional] Serliazed build code

buildName String

[optional] Build name

Return:

String

URL

public pitch(mass: number, basePitch: number, thrusters: object, engpip: number): array source

Calculate pitch of a ship based on mass and thrusters

Params:

NameTypeAttributeDescription
mass number

the mass of the ship

basePitch number

base pitch of the ship

thrusters object

the ship's thrusters

engpip number

the multiplier per pip to engines

Return:

array

Pitch by pips

public racer(ship: Ship) source

Racer Role

Params:

NameTypeAttributeDescription
ship Ship

Ship instance

public roll(mass: number, baseRoll: number, thrusters: object, engpip: number): array source

Calculate roll of a ship based on mass and thrusters

Params:

NameTypeAttributeDescription
mass number

the mass of the ship

baseRoll number

base roll of the ship

thrusters object

the ship's thrusters

engpip number

the multiplier per pip to engines

Return:

array

Roll by pips

public shallowEqual(objA: any, objB: any): boolean source

Compares A and B and return true using strict comparison (===)

Params:

NameTypeAttributeDescription
objA any

A

objB any

B

Return:

boolean

true if A === B OR A properties === B properties

public shieldMetrics(ship: Object, sys: int): Object source

Calculate shield metrics

Params:

NameTypeAttributeDescription
ship Object

The ship

sys int

The pips to SYS

Return:

Object

Shield metrics

public shieldStrength(mass: number, baseShield: number, sg: object, multiplier: number): number source

Calculate the a ships shield strength based on mass, shield generator and shield boosters used.

Params:

NameTypeAttributeDescription
mass number

Current mass of the ship

baseShield number

Base Shield strength MJ for ship

sg object

The shield generator used

multiplier number

Shield multiplier for ship (1 + shield boosters if any)

Return:

number

Approximate shield strengh in MJ

public shipFromJson(json: object): Ship source

Build a ship from the companion API JSON

Params:

NameTypeAttributeDescription
json object

the companion API JSON

Return:

Ship

the built ship

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:

NameTypeAttributeDescription
json object

the Loadout event JSON

Return:

Ship

the built ship

public shipModelFromJson(json: object): string source

Obtain a ship's model from the companion API JSON

Params:

NameTypeAttributeDescription
json object

the companion API JSON

Return:

string

the Coriolis model of the ship

public shorternUrl(url: string, success: function, error: function) source

Shorten a URL

Params:

NameTypeAttributeDescription
url string

The URL to shorten

success function

Success callback

error function

Failure/Error callback

public speed(mass: number, baseSpeed: number, thrusters: object, engpip: number): array source

Calculate the a ships speed based on mass, and thrusters.

Params:

NameTypeAttributeDescription
mass number

the mass of the ship

baseSpeed number

base speed m/s for ship

thrusters object

The ship's thrusters

engpip number

the multiplier per pip to engines

Return:

array

Speed by pips

public standard(type: String | Number, id: String): Object source

Finds the standard module type with the specified ID

Params:

NameTypeAttributeDescription
type String | Number

Standard Module Type (0/pp - Power Plant, 1/t - Thrusters, etc)

id String

The module ID or '[Class][Rating]'

Return:

Object

The standard module or null

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:

NameTypeAttributeDescription
event SyntheticEvent

Event

public sustainedDps(ship: Object, opponent: Object, sys: number, engagementrange: int): Object source

Calculate the sustained DPS for a ship against an opponent at a given range

Params:

NameTypeAttributeDescription
ship Object

The ship

opponent Object

The opponent ship

sys number

Pips to opponent's SYS

engagementrange int

The range between the ship and opponent

Return:

Object

Sustained DPS for shield and armour

public sysRechargeRate(pd: Object, sys: number): number source

Obtain the recharge rate of the SYS capacitor of a power distributor given pips

Params:

NameTypeAttributeDescription
pd Object

The power distributor

sys number

The number of pips to SYS

Return:

number

The recharge rate in MJ/s

public sysResistance(sys: integer): integer source

Calculate the resistance provided by SYS pips

Params:

NameTypeAttributeDescription
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

Calculate the time to deplete an amount of shields or armour

Params:

NameTypeAttributeDescription
amount number

The amount to be depleted

dps number

The depletion per second

eps number

The energy drained per second

capacity number

The initial energy capacity

recharge number

The energy recharged per second

Return:

number

The number of seconds to deplete to 0

public timeToDrainWep(ship: object, wep: number): number source

Calculate time to drain WEP capacitor

Params:

NameTypeAttributeDescription
ship object

The ship

wep number

Pips to WEP

Return:

number

The time to drain the WEP capacitor, in seconds

public toComparison(code: string): Object source

Parses the comarison data string back to an object.

Params:

NameTypeAttributeDescription
code string

Zipped Base 64 encoded JSON comparison data

Return:

Object

Comparison data object

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

Params:

NameTypeAttributeDescription
buildName string

The build name

ship Ship

Ship instance

Return:

Object

ship-loadout object

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:

NameTypeAttributeDescription
builds Array

Array of ship builds

Return:

Array

Array of of ship-loadout objects

public totalJumpRange(mass: number, fsd: object, fuel: number): number source

Calculate the total jump range based on mass and a specific FSD, and all fuel available

Params:

NameTypeAttributeDescription
mass number

Mass of a ship: laden, unlanden, partially laden, etc

fsd object

The FDS object/component with maxfuel, fuelmul, fuelpower, optmass

fuel number

The total fuel available

Return:

number

Distance in Light Years

public trader(ship: Ship, shielded: Boolean, standardOpts: Object) source

Trader Role

Params:

NameTypeAttributeDescription
ship Ship

Ship instance

shielded Boolean

True if shield generator should be included

standardOpts Object

[Optional] Standard module optional overrides

public wrapCtxMenu(cb: Function): Function source

Wraps the callback/context menu handler such that the default operation can proceed if the SHIFT key is held while right-clicked

Params:

NameTypeAttributeDescription
cb Function

Callback for contextMenu

Return:

Function

Wrapped contextmenu handler

public yaw(mass: number, baseYaw: number, thrusters: object, engpip: number): array source

Calculate yaw of a ship based on mass and thrusters

Params:

NameTypeAttributeDescription
mass number

the mass of the ship

baseYaw number

base yaw of the ship

thrusters object

the ship's thrusters

engpip number

the multiplier per pip to engines

Return:

array

Yaw by pips

Static Private

private _sustainedDps(ship: Object, opponent: Object, opponentShields: Object, opponentArmour: Object, engagementrange: int): Object source

Calculate the sustained DPS for a ship against an opponent at a given range

Params:

NameTypeAttributeDescription
ship Object

The ship

opponent Object

The opponent ship

opponentShields Object

The opponent's shield resistances

opponentArmour Object

The opponent's armour resistances

engagementrange int

The range between the ship and opponent

Return:

Object

Sustained DPS for shield and armour

private _weaponSustainedDps(m: Object, opponent: Object, opponentShields: Object, opponentArmour: Object, engagementrange: int): Object source

import {_weaponSustainedDps} from 'coriolis_shipyard/src/app/shipyard/Calculations.js'

Calculate the sustained DPS for a weapon at a given range

Params:

NameTypeAttributeDescription
m Object

The weapon

opponent Object

The opponent ship

opponentShields Object

The opponent's shield resistances

opponentArmour Object

The opponent's armour resistances

engagementrange int

The range between the ship and opponent

Return:

Object

Sustained DPS for shield and armour