Class: Warning
Defined in: src/sdk/components/Warnings/Warning.ts:13
The main logic for a system warning.
Constructors
Constructor
new Warning(
type
,condition
,shortText?
,longText?
,soundId?
,once?
):Warning
Defined in: src/sdk/components/Warnings/Warning.ts:40
Creates an instance of a Warning.
Parameters
Parameter | Type | Description |
---|---|---|
type | WarningType | The type of warning this is. |
condition | CompositeLogicXMLElement | An XML logic element with the trigger logic. |
shortText? | string | The warning message in short form. |
longText? | string | The warning message in long form. |
soundId? | string | The sound name to use with this warning. |
once? | boolean | True if this warning only fires once |
Returns
Warning
Properties
condition
readonly
condition:CompositeLogicXMLElement
Defined in: src/sdk/components/Warnings/Warning.ts:23
The XML logic element triggering this warning if true.
longText?
readonly
optional
longText:string
Defined in: src/sdk/components/Warnings/Warning.ts:19
The long-form text.
once?
readonly
optional
once:boolean
Defined in: src/sdk/components/Warnings/Warning.ts:25
Does this only fire once?
shortText?
readonly
optional
shortText:string
Defined in: src/sdk/components/Warnings/Warning.ts:17
The short-form text.
soundId?
readonly
optional
soundId:string
Defined in: src/sdk/components/Warnings/Warning.ts:21
The name of a sound to play along with the visual warning.
type
readonly
type:WarningType
Defined in: src/sdk/components/Warnings/Warning.ts:15
The category of the warnining.
Accessors
canTrigger
Get Signature
get canTrigger():
boolean
Defined in: src/sdk/components/Warnings/Warning.ts:88
Can this alert fire?
Returns
boolean
True if the current configuration allows the alert to fire.
description
Get Signature
get description():
string
Defined in: src/sdk/components/Warnings/Warning.ts:72
A text description for the warning, for debugging purposes.
Returns
string
A string
eventId
Get Signature
get eventId():
undefined
|Name_Z
Defined in: src/sdk/components/Warnings/Warning.ts:96
The event ID Coherent returns when this sound has been played.
Returns
undefined
| Name_Z
A Name_Z based on the sound ID.
hasText
Get Signature
get hasText():
boolean
Defined in: src/sdk/components/Warnings/Warning.ts:57
Whether or not we have any text at all.
Returns
boolean
True if any non-empty text strings are set.
triggered
Get Signature
get triggered():
boolean
Defined in: src/sdk/components/Warnings/Warning.ts:80
Whether or not the warning has been triggered in this session.
Returns
boolean
True if the warning has been triggered.
Methods
trigger()
trigger():
void
Defined in: src/sdk/components/Warnings/Warning.ts:64
The alert is being fired, take action.
Returns
void