Skip to content

multitool.ts

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

Functions

addInfo()undefined

Constructs additional information sentence.

appearance()

Calculate the appearance of a multi-tool based on pageData and assigns it to a given input element.

acquirement()string

Constructs the acquirement sentence.

acquirementGallery()undefined

Handles acquisition gallery images, retrieves type and highlights location, and generates code array.

autoMTLoc()void

Automatically switches location when a specific type is selected.

autoMTType()void

Automatically switches type when a specific location is selected.

hideLocName()

Hides location name input fields if the location is in Space. Otherwise, shows the location name input fields.

hideSrLocName()

Hides the input field for the srLoc name if the srLoc includes the word "Space". Otherwise, shows the input field.

hideCost()

Hide cost input element if Sentinel Pillar is selected. If cost element exists, its value property will be emptied and it will fire the oninput event.

hideAddons()void

Hides the crystal addons input box if the page type is 'Royal', 'Sentinel' or 'Atlantid'

albumDescExternal()string

Returns a string that describes the acquisition status of an album in external mode.

albumLinkGen()string

Generates a link for the multi-tool album based on the pageData properties.

generateGalleryArray()undefined

Generates an array for use in a gallery. The function uses pageData's location property to determine whether to include the 'Minor Settlement', 'Sentinel Pillar', and 'Harmonic Camp' locations, or remove them from the array.

addInfo() ⇒ undefined

Constructs additional information sentence.

Kind: global function

appearance()

Calculate the appearance of a multi-tool based on pageData and assigns it to a given input element.

Kind: global function

acquirement() ⇒ string

Constructs the acquirement sentence.

Kind: global function
Returns: string -

The constructed sentence.


Throws:
  • Will throw an error if page data is missing.

acquirementGallery() ⇒ undefined

Handles acquisition gallery images, retrieves type and highlights location, and generates code array.

Kind: global function

acquirementGallery~fillPicObj(obj, img, desc) ⇒ undefined

Fills picture object with image and description.

Kind: inner method of acquirementGallery

Param Type Description
obj Object

An object representing pictures.

img string

An image source.

desc string

A picture description.

autoMTLoc() ⇒ void

Automatically switches location when a specific type is selected.

Kind: global function

autoMTType() ⇒ void

Automatically switches type when a specific location is selected.

Kind: global function

hideLocName()

Hides location name input fields if the location is in Space. Otherwise, shows the location name input fields.

Kind: global function

hideSrLocName()

Hides the input field for the srLoc name if the srLoc includes the word "Space". Otherwise, shows the input field.

Kind: global function

hideCost()

Hide cost input element if Sentinel Pillar is selected. If cost element exists, its value property will be emptied and it will fire the oninput event.

Kind: global function

hideAddons() ⇒ void

Hides the crystal addons input box if the page type is 'Royal', 'Sentinel' or 'Atlantid'

Kind: global function

albumDescExternal() ⇒ string

Returns a string that describes the acquisition status of an album in external mode.

Kind: global function
Returns: string -

  • A string that describes the acquisition status of an album.
**Properties**
Name Type Description
pageData Object

An object that holds user input values.

pageData.axes string

The axes of the MT location.

pageData.acquirement string

The acquisition instructions of the MT.

albumLinkGen() ⇒ string

Generates a link for the multi-tool album based on the pageData properties.

Kind: global function
Returns: string -

  • Link for the multi-tool album.

generateGalleryArray() ⇒ undefined

Generates an array for use in a gallery. The function uses pageData's location property to determine whether to include the 'Minor Settlement', 'Sentinel Pillar', and 'Harmonic Camp' locations, or remove them from the array.

Kind: global function
Returns: undefined -

Returns an array for use in a gallery.


Throws:
  • TypeError

    If pageData object or location property is not found, a TypeError is thrown.

Example

generateGalleryArray();