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
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?
using Content.Server.Atmos;
using Content.Server.Atmos.EntitySystems;
using Content.Server.Body.Components;
+using Content.Server.Chat.Systems;
using Content.Server.Chemistry.Containers.EntitySystems;
-using Content.Server.Popups;
using Content.Shared.Alert;
using Content.Shared.Atmos;
using Content.Shared.Body.Components;
[Dependency] private readonly BodySystem _bodySystem = default!;
[Dependency] private readonly DamageableSystem _damageableSys = default!;
[Dependency] private readonly LungSystem _lungSystem = default!;
- [Dependency] private readonly PopupSystem _popupSystem = default!;
[Dependency] private readonly MobStateSystem _mobState = default!;
[Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!;
+ [Dependency] private readonly ChatSystem _chat = default!;
public override void Initialize()
{
if (respirator.Saturation < respirator.SuffocationThreshold)
{
- if (_gameTiming.CurTime >= respirator.LastGaspPopupTime + respirator.GaspPopupCooldown)
+ if (_gameTiming.CurTime >= respirator.LastGaspEmoteTime + respirator.GaspEmoteCooldown)
{
- respirator.LastGaspPopupTime = _gameTiming.CurTime;
- _popupSystem.PopupEntity(Loc.GetString("lung-behavior-gasp"), uid);
+ respirator.LastGaspEmoteTime = _gameTiming.CurTime;
+ _chat.TryEmoteWithChat(uid, respirator.GaspEmote, ignoreActionBlocker: true);
}
TakeSuffocationDamage((uid, respirator));
--- /dev/null
+- files:
+ - deathgasp_1.ogg
+ - deathgasp_2.ogg
+ - female_deathgasp_1.ogg
+ - female_deathgasp_2.ogg
+ - female_deathgasp_3.ogg
+ - female_deathgasp_4.ogg
+ - female_deathgasp_5.ogg
+ - male_deathgasp_1.ogg
+ - male_deathgasp_2.ogg
+ - male_deathgasp_3.ogg
+ - male_deathgasp_4.ogg
+ - male_deathgasp_5.ogg
+ license: "CC-BY-SA-3.0"
+ copyright: "Taken from Paradise at https://github.com/ParadiseSS13/Paradise/commit/4397f13c72998aa7e6ce192215c9f77b9d62eee2"
+ source: "https://github.com/ParadiseSS13/Paradise/tree/4397f13c72998aa7e6ce192215c9f77b9d62eee2/sound/goonstation/voice"
+
+- files:
+ - gasp_female1.ogg
+ - gasp_female2.ogg
+ - gasp_female3.ogg
+ - gasp_male1.ogg
+ - gasp_male2.ogg
+ license: "CC-BY-SA-3.0"
+ copyright: "Taken from tgstation at https://github.com/tgstation/tgstation/commit/f7a49c4068f1277e6857baf0892d355f1c055974"
+ source: "https://github.com/tgstation/tgstation/tree/f7a49c4068f1277e6857baf0892d355f1c055974/sound/voice/human"
+++ /dev/null
-lung-behavior-gasp = Gasp
\ No newline at end of file
chat-emote-name-clap = Clap
chat-emote-name-snap = Snap
chat-emote-name-salute = Salute
+chat-emote-name-gasp = Gasp
chat-emote-name-deathgasp = Deathgasp
chat-emote-name-buzz = Buzz
chat-emote-name-weh = Weh
chat-emote-msg-clap = claps!
chat-emote-msg-snap = snaps {POSS-ADJ($entity)} fingers.
chat-emote-msg-salute = salutes.
+chat-emote-msg-gasp = gasps.
chat-emote-msg-deathgasp = seizes up and falls limp, {POSS-ADJ($entity)} eyes dead and lifeless...
chat-emote-msg-deathgasp-monkey = lets out a faint chimper as {SUBJECT($entity)} collapses and stops moving...
chat-emote-msg-buzz = buzzes!
--- /dev/null
+- type: soundCollection
+ id: MaleDeathGasp
+ files:
+ - /Audio/Effects/Gasp/male_deathgasp_1.ogg
+ - /Audio/Effects/Gasp/male_deathgasp_2.ogg
+ - /Audio/Effects/Gasp/male_deathgasp_3.ogg
+ - /Audio/Effects/Gasp/male_deathgasp_4.ogg
+ - /Audio/Effects/Gasp/male_deathgasp_5.ogg
+
+- type: soundCollection
+ id: FemaleDeathGasp
+ files:
+ - /Audio/Effects/Gasp/female_deathgasp_1.ogg
+ - /Audio/Effects/Gasp/female_deathgasp_2.ogg
+ - /Audio/Effects/Gasp/female_deathgasp_3.ogg
+ - /Audio/Effects/Gasp/female_deathgasp_4.ogg
+ - /Audio/Effects/Gasp/female_deathgasp_5.ogg
+
+- type: soundCollection
+ id: DeathGasp
+ files:
+ - /Audio/Effects/Gasp/deathgasp_1.ogg
+ - /Audio/Effects/Gasp/deathgasp_2.ogg
--- /dev/null
+- type: soundCollection
+ id: MaleGasp
+ files:
+ - /Audio/Effects/Gasp/gasp_male1.ogg
+ - /Audio/Effects/Gasp/gasp_male2.ogg
+
+- type: soundCollection
+ id: FemaleGasp
+ files:
+ - /Audio/Effects/Gasp/gasp_female1.ogg
+ - /Audio/Effects/Gasp/gasp_female2.ogg
+ - /Audio/Effects/Gasp/gasp_female3.ogg
collection: Whistles
Weh:
collection: Weh
+ Gasp:
+ collection: MaleGasp
+ DefaultDeathgasp:
+ collection: MaleDeathGasp
- type: emoteSounds
id: FemaleHuman
collection: Whistles
Weh:
collection: Weh
+ Gasp:
+ collection: FemaleGasp
+ DefaultDeathgasp:
+ collection: FemaleDeathGasp
- type: emoteSounds
id: MaleReptilian
collection: MaleCry
Weh:
collection: Weh
+ Gasp:
+ collection: MaleGasp
+ DefaultDeathgasp:
+ collection: DeathGasp
- type: emoteSounds
id: FemaleReptilian
collection: Whistles
Weh:
collection: Weh
+ Gasp:
+ collection: MaleGasp
+ DefaultDeathgasp:
+ collection: MaleDeathGasp
params:
variation: 0.125
collection: Whistles
Weh:
collection: Weh
+ Gasp:
+ collection: FemaleGasp
+ DefaultDeathgasp:
+ collection: FemaleDeathGasp
params:
variation: 0.125
collection: BikeHorn
Weh:
collection: Weh
+ Gasp:
+ collection: MaleGasp
+ DefaultDeathgasp:
+ collection: DeathGasp
params:
variation: 0.125
path: /Audio/Voice/Arachnid/arachnid_click.ogg
Weh:
collection: Weh
+ Gasp:
+ collection: MaleGasp
+ DefaultDeathgasp:
+ collection: DeathGasp
- type: emoteSounds
id: UnisexDwarf
collection: Whistles
Weh:
collection: Weh
+ Gasp:
+ collection: MaleGasp
+ DefaultDeathgasp:
+ collection: MaleDeathGasp
params:
variation: 0.125
pitch: 0.75
collection: Whistles
Weh:
collection: Weh
+ Gasp:
+ collection: FemaleGasp
+ DefaultDeathgasp:
+ collection: FemaleDeathGasp
params:
variation: 0.125
pitch: 0.75
path: /Audio/Voice/Moth/moth_squeak.ogg
Weh:
collection: Weh
+ Gasp:
+ collection: MaleGasp
+ DefaultDeathgasp:
+ collection: DeathGasp
- type: emoteSounds
id: UnisexSilicon
-# vocal emotes
+# vocal emotes
- type: emote
id: Scream
name: chat-emote-name-scream
- salutes.
- salutes!
+- type: emote
+ id: Gasp
+ name: chat-emote-name-gasp
+ whitelist:
+ components:
+ - Respirator
+ chatMessages: ["chat-emote-msg-gasp"]
+
- type: emote
id: DefaultDeathgasp
name: chat-emote-name-deathgasp