Skip to main content

DynamicTextAssets

TextAssets which has placeholders in the text.

Hierarchy

Index

Constructors

constructor

Properties

readonlyclient

client: StarRail

readonlydynamicData

dynamicData: DynamicData

readonlyid

id: number

Methods

get

  • get(lang?: chs | cht | de | en | es | fr | id | jp | kr | pt | ru | th | vi): string
  • @throws

    Parameters

    • optionallang: chs | cht | de | en | es | fr | id | jp | kr | pt | ru | th | vi

    Returns string

getAsFormattedText

  • getAsFormattedText(lang?: chs | cht | de | en | es | fr | id | jp | kr | pt | ru | th | vi): FormattedText
  • Parameters

    • optionallang: chs | cht | de | en | es | fr | id | jp | kr | pt | ru | th | vi

    Returns FormattedText

getAsNullableFormattedText

  • getAsNullableFormattedText(lang?: chs | cht | de | en | es | fr | id | jp | kr | pt | ru | th | vi): null | FormattedText

  • Parameters

    • optionallang: chs | cht | de | en | es | fr | id | jp | kr | pt | ru | th | vi

    Returns null | FormattedText

    null instead of throwing AssetsNotFoundError.

getNullable

  • getNullable(lang?: chs | cht | de | en | es | fr | id | jp | kr | pt | ru | th | vi): null | string

  • Parameters

    • optionallang: chs | cht | de | en | es | fr | id | jp | kr | pt | ru | th | vi

    Returns null | string

    null instead of throwing AssetsNotFoundError.

getNullableReplacedData

  • getNullableReplacedData(replaceWith?: paramList[], lang?: chs | cht | de | en | es | fr | id | jp | kr | pt | ru | th | vi): null | { text: string; usedParamIndices: number[] }

  • Parameters

    • replaceWith: paramList[] = []
    • optionallang: chs | cht | de | en | es | fr | id | jp | kr | pt | ru | th | vi

    Returns null | { text: string; usedParamIndices: number[] }

    null instead of throwing AssetsNotFoundError.

getNullableReplacedText

  • getNullableReplacedText(replaceWith?: paramList[], lang?: chs | cht | de | en | es | fr | id | jp | kr | pt | ru | th | vi): null | string

  • Parameters

    • replaceWith: paramList[] = []
    • optionallang: chs | cht | de | en | es | fr | id | jp | kr | pt | ru | th | vi

    Returns null | string

    null instead of throwing AssetsNotFoundError.

getReplacedData

  • getReplacedData(replaceWith?: paramList[], lang?: chs | cht | de | en | es | fr | id | jp | kr | pt | ru | th | vi): { text: string; usedParamIndices: number[] }
  • @throws

    AssetsNotFoundError


    Parameters

    • replaceWith: paramList[] = []
    • optionallang: chs | cht | de | en | es | fr | id | jp | kr | pt | ru | th | vi

    Returns { text: string; usedParamIndices: number[] }

    • text: string
    • usedParamIndices: number[]

getReplacedText

  • getReplacedText(replaceWith?: paramList[], lang?: chs | cht | de | en | es | fr | id | jp | kr | pt | ru | th | vi): string
  • @throws

    AssetsNotFoundError


    Parameters

    • replaceWith: paramList[] = []
    • optionallang: chs | cht | de | en | es | fr | id | jp | kr | pt | ru | th | vi

    Returns string

isFormatted

  • isFormatted(lang?: chs | cht | de | en | es | fr | id | jp | kr | pt | ru | th | vi): boolean

  • Parameters

    • optionallang: chs | cht | de | en | es | fr | id | jp | kr | pt | ru | th | vi

    Returns boolean

    whether the text is formatted or not.

toString

  • toString(): string
  • Returns string