Remake gasp popup to emote (#27736)

This commit is contained in:
lzk
2024-05-29 01:56:41 +02:00
committed by GitHub
parent fedc01a2a9
commit a2f4540cb5
26 changed files with 127 additions and 9 deletions

View File

@@ -1,5 +1,7 @@
using Content.Server.Body.Systems;
using Content.Shared.Chat.Prototypes;
using Content.Shared.Damage;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Server.Body.Components
@@ -50,10 +52,16 @@ namespace Content.Server.Body.Components
public DamageSpecifier DamageRecovery = default!;
[DataField]
public TimeSpan GaspPopupCooldown = TimeSpan.FromSeconds(8);
public TimeSpan GaspEmoteCooldown = TimeSpan.FromSeconds(8);
[ViewVariables]
public TimeSpan LastGaspPopupTime;
public TimeSpan LastGaspEmoteTime;
/// <summary>
/// The emote when gasps
/// </summary>
[DataField]
public ProtoId<EmotePrototype> GaspEmote = "Gasp";
/// <summary>
/// How many cycles in a row has the mob been under-saturated?