Files
wwdpublic/Content.Server/Medical/CPR/CPRTrainingComponent.cs
Remuchi b0a5b170f1 [Feat] CPR Impovements (#1405)
# Description

Moved the whole CPR code to the server. There was no need for it to be
on shared.
Now CPR automatically repeats itself until the person is alive.
CPR can now be performed without getting you mask off. You just need to
lower it down like when trying to eat/drink.
Fixed popups repeating itself x100 times.
Removed cvars and moved everything to CPRTraining component. Why would
anyone place them in cvars anyway?..

---

# Changelog

🆑
- add: CPR now automatically repeats itself.
- add: CPR no longer requires you to take the mask off. You can now
simply lower it instead.
- fix: Fixed CPR repeating popups x100 times.

Signed-off-by: Remuchi <RemuchiOfficial@gmail.com>

(cherry picked from commit 075a4433e1a0180d57d4166bb7435ca985883987)
2025-01-14 00:32:37 +03:00

31 lines
718 B
C#

using Content.Shared.Damage;
using Robust.Shared.Audio;
namespace Content.Server.Medical.CPR;
[RegisterComponent]
public sealed partial class CPRTrainingComponent : Component
{
[DataField]
public SoundSpecifier CPRSound = new SoundPathSpecifier("/Audio/Effects/CPR.ogg");
[DataField]
public TimeSpan DoAfterDuration = TimeSpan.FromSeconds(3);
[DataField] public DamageSpecifier CPRHealing = new()
{
DamageDict =
{
["Asphyxiation"] = -6
}
};
[DataField] public float CrackRibsModifier = 1f;
[DataField] public float ResuscitationChance = 0.1f;
[DataField] public float RotReductionMultiplier;
public EntityUid? CPRPlayingStream;
}