DynamicTextAssets
class DynamicTextAssets extends TextAssets
Properties
Methods
constructor
new DynamicTextAssets(id, data, client)
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
id | number | |||
data | Partial<DynamicData> | |||
client | StarRail |
Properties
dynamicData
Type: DynamicData
id
inherited
Type: number
client
inherited
Type: StarRail
Methods
getReplacedData
Returns: {text: string, usedParamIndices: number[]}
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
replaceWith | (keyof DynamicData)[] | ✔️ | [] | |
lang | LanguageCode | ✔️ |
Throws:
AssetsNotFoundError
getNullableReplacedData
Returns: {text: string, usedParamIndices: number[]} | null
- null instead of throwing AssetsNotFoundError.
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
replaceWith | (keyof DynamicData)[] | ✔️ | [] | |
lang | LanguageCode | ✔️ |
getReplacedText
Returns: string
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
replaceWith | (keyof DynamicData)[] | ✔️ | [] | |
lang | LanguageCode | ✔️ |
Throws:
AssetsNotFoundError
getNullableReplacedText
Returns: string | null
- null instead of throwing AssetsNotFoundError.
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
replaceWith | (keyof DynamicData)[] | ✔️ | [] | |
lang | LanguageCode | ✔️ |
get
inherited
Returns: string
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
lang | LanguageCode | ✔️ |
Throws: AssetsNotFoundError
getNullable
inherited
Returns: string | null
- null instead of throwing AssetsNotFoundError.
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
lang | LanguageCode | ✔️ |
isFormatted
inherited
Returns: boolean
- whether the text is formatted or not.
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
lang | LanguageCode | ✔️ |
getAsNullableFormattedText
inherited
Returns: FormattedText | null
- null instead of throwing AssetsNotFoundError.
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
lang | LanguageCode | ✔️ |