Alerts for breathing plasma/tritium (#24484)
* Alert autoremove v0 * Code cleanup and timing * comment * Tritium, code compression * not resolving manually * reduced lookups, new comp * fix-fix yes * use RemCompDeferred, handle OnUnpaused * missed a todo * entitysystem resolve * remove unnecessary component updates * remove AlertState from comp, move EntityUnpausedEvent actions to AlertStateComponent's Timespan * Code cleanup * comments * combines AutoRemove input into Clear * minor logic adjustment that does not really change anything but is less ambiguous
This commit is contained in:
19
Content.Shared/Alert/AlertAutoRemoveComponent.cs
Normal file
19
Content.Shared/Alert/AlertAutoRemoveComponent.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Alert;
|
||||
|
||||
/// <summary>
|
||||
/// Copy of the entity's alerts that are flagged for autoRemove, so that not all of the alerts need to be checked constantly
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class AlertAutoRemoveComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// List of alerts that have to be checked on every tick for automatic removal at a specific time
|
||||
/// </summary>
|
||||
[AutoNetworkedField]
|
||||
[DataField]
|
||||
public List<AlertKey> AlertKeys = new();
|
||||
|
||||
public override bool SendOnlyToOwner => true;
|
||||
}
|
||||
Reference in New Issue
Block a user