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