Skip to content

starship.ts

github-actions[bot] edited this page Oct 3, 2023 · 5 revisions

Functions

subtypeDropdown()void

Set subtype dropdown options based on selected ship type.

calcS()undefined

Calculates the spawn chance of an S class ship based on the economy rating and type of the system

showHideStarshipSelects()void

Shows and hides section based on other input.

invDropdown()void

Sets the dropdown options for the inventory input based on the page data and ship data.

calcInv()void

Calculates inventory size based on type and subtype.

costSlotCalc()void

Calculates the cost and slot count required for the current pageData.

loc()string

Constructs a location sentence for a discovered ship.

capitalDetection()string

Determines whether the discovered ship is a capital ship based on inventory size

freighterSpawn()string

Determines the method of freighter spawn

livingShipSpawn()string

Determines the method of living ship spawn

locText()string

Constructs the location sentence based on ship type

addInfo()string

Constructs additional information sentence that includes the catalogue and research team

appearanceDropdowns()void

Adds items to the part dropdowns based on the selected ship type.

appearanceSentence()void

Sets the actual appearance sentence of the specified creature, using the information provided in the input fields.

albumOtherExternal()string

Fills economy, race, and coords for the "other" parameter on starship album entries.

albumLinkGen()string

Generates a link to a starship album based on the properties of the pageData object.

getCatalog()string

Returns the appropriate album name based on the properties of the pageData object.

generateGalleryArray()void

Creates an array of gallery images based on the current page data.

redirectPage()boolean | string

Redirects to a new page if the page name contains any Greek letters.

subtypeDropdown() ⇒ void

Set subtype dropdown options based on selected ship type.

Kind: global function

calcS() ⇒ undefined

Calculates the spawn chance of an S class ship based on the economy rating and type of the system

Kind: global function

showHideStarshipSelects() ⇒ void

Shows and hides section based on other input.

Kind: global function

invDropdown() ⇒ void

Sets the dropdown options for the inventory input based on the page data and ship data.

Kind: global function

calcInv() ⇒ void

Calculates inventory size based on type and subtype.

Kind: global function

costSlotCalc() ⇒ void

Calculates the cost and slot count required for the current pageData.

Kind: global function

loc() ⇒ string

Constructs a location sentence for a discovered ship.

Kind: global function
Returns: string -

The completed location sentence.


capitalDetection() ⇒ string

Determines whether the discovered ship is a capital ship based on inventory size

Kind: global function
Returns: string -

If ship is a capital ship, returns the string 'Capital'; otherwise returns undefined.


freighterSpawn() ⇒ string

Determines the method of freighter spawn

Kind: global function
Returns: string -

Returns a sentence describing the freighter spawn location.


livingShipSpawn() ⇒ string

Determines the method of living ship spawn

Kind: global function
Returns: string -

Returns a sentence describing the living ship spawn location and coordinates.


locText() ⇒ string

Constructs the location sentence based on ship type

Kind: global function
Returns: string -

Returns the location sentence.


addInfo() ⇒ string

Constructs additional information sentence that includes the catalogue and research team

Kind: global function
Returns: string -

  • The additional information sentence

appearanceDropdowns() ⇒ void

Adds items to the part dropdowns based on the selected ship type.

Kind: global function

appearanceSentence() ⇒ void

Sets the actual appearance sentence of the specified creature, using the information provided in the input fields.

Kind: global function

albumOtherExternal() ⇒ string

Fills economy, race, and coords for the "other" parameter on starship album entries.

Kind: global function
Returns: string -

Returns a string that includes the filled-out properties.


albumLinkGen() ⇒ string

Generates a link to a starship album based on the properties of the pageData object.

Kind: global function
Returns: string -

The link to the appropriate starship album.


getCatalog() ⇒ string

Returns the appropriate album name based on the properties of the pageData object.

Kind: global function
Returns: string -

The name of the corresponding starship album.


generateGalleryArray() ⇒ void

Creates an array of gallery images based on the current page data.

Kind: global function

redirectPage() ⇒ boolean | string

Redirects to a new page if the page name contains any Greek letters.

Kind: global function
Returns: boolean | string -

Either false if the page name doesn't contain Greek letters or a string with the name containing Greek letters replaced with their English transliterations.