Class AlertsSystem
Inheritance
System.Object
AlertsSystem
Assembly: Content.Shared.dll
Syntax
public abstract class AlertsSystem : EntitySystem
Methods
|
Improve this Doc
View Source
AfterClearAlert(AlertsComponent)
Invoked after clearing an alert prior to dirtying the component
Declaration
protected virtual void AfterClearAlert(AlertsComponent alertsComponent)
Parameters
|
Improve this Doc
View Source
AfterShowAlert(AlertsComponent)
Invoked after showing an alert prior to dirtying the component
Declaration
protected virtual void AfterShowAlert(AlertsComponent alertsComponent)
Parameters
|
Improve this Doc
View Source
ClearAlert(EntityUid, AlertType)
Clear the alert of the given type if it is currently showing.
Declaration
public void ClearAlert(EntityUid euid, AlertType alertType)
Parameters
Type |
Name |
Description |
EntityUid |
euid |
|
AlertType |
alertType |
|
|
Improve this Doc
View Source
ClearAlertCategory(EntityUid, AlertCategory)
Clear the alert with the given category, if one is currently showing.
Declaration
public void ClearAlertCategory(EntityUid euid, AlertCategory category)
Parameters
|
Improve this Doc
View Source
GetActiveAlerts(EntityUid)
Declaration
public IReadOnlyDictionary<AlertKey, AlertState>? GetActiveAlerts(EntityUid euid)
Parameters
Type |
Name |
Description |
EntityUid |
euid |
|
Returns
|
Improve this Doc
View Source
GetMaxSeverity(AlertType)
Declaration
public short GetMaxSeverity(AlertType alertType)
Parameters
Returns
Type |
Description |
System.Int16 |
|
|
Improve this Doc
View Source
GetMinSeverity(AlertType)
Declaration
public short GetMinSeverity(AlertType alertType)
Parameters
Returns
Type |
Description |
System.Int16 |
|
|
Improve this Doc
View Source
GetSeverityRange(AlertType)
Declaration
public short GetSeverityRange(AlertType alertType)
Parameters
Returns
Type |
Description |
System.Int16 |
|
|
Improve this Doc
View Source
HandleComponentShutdown(EntityUid, AlertsComponent, ComponentShutdown)
Declaration
protected virtual void HandleComponentShutdown(EntityUid uid, AlertsComponent component, ComponentShutdown args)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
AlertsComponent |
component |
|
ComponentShutdown |
args |
|
|
Improve this Doc
View Source
Initialize()
Declaration
public override void Initialize()
|
Improve this Doc
View Source
IsShowingAlert(EntityUid, AlertType)
Declaration
public bool IsShowingAlert(EntityUid euid, AlertType alertType)
Parameters
Type |
Name |
Description |
EntityUid |
euid |
|
AlertType |
alertType |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsShowingAlertCategory(EntityUid, AlertCategory)
Declaration
public bool IsShowingAlertCategory(EntityUid euid, AlertCategory alertCategory)
Parameters
Returns
Type |
Description |
System.Boolean |
true iff an alert of the indicated alert category is currently showing
|
|
Improve this Doc
View Source
LoadPrototypes()
Declaration
protected virtual void LoadPrototypes()
|
Improve this Doc
View Source
ShowAlert(EntityUid, AlertType, Nullable<Int16>, Nullable<(TimeSpan, TimeSpan)>)
Shows the alert. If the alert or another alert of the same category is already showing,
it will be updated / replaced with the specified values.
Declaration
public void ShowAlert(EntityUid euid, AlertType alertType, short? severity = null, (TimeSpan, TimeSpan)? cooldown = null)
Parameters
Type |
Name |
Description |
EntityUid |
euid |
|
AlertType |
alertType |
type of the alert to set
|
System.Nullable<System.Int16> |
severity |
severity, if supported by the alert
|
System.Nullable<System.ValueTuple<TimeSpan, TimeSpan>> |
cooldown |
cooldown start and end, if null there will be no cooldown (and it will
be erased if there is currently a cooldown for the alert)
|
|
Improve this Doc
View Source
Shutdown()
Declaration
public override void Shutdown()
|
Improve this Doc
View Source
TryGet(AlertType, out AlertPrototype)
Tries to get the alert of the indicated type
Declaration
public bool TryGet(AlertType alertType, out AlertPrototype alert)
Parameters
Returns
Type |
Description |
System.Boolean |
true if found
|
|
Improve this Doc
View Source
TryGetAlertState(EntityUid, AlertKey, out AlertState)
Declaration
public bool TryGetAlertState(EntityUid euid, AlertKey key, out AlertState alertState)
Parameters
Returns
Type |
Description |
System.Boolean |
|