From 8b5c2ebbbe22ed8f047b1514ed7746d1738e73d1 Mon Sep 17 00:00:00 2001 From: fox Date: Fri, 20 Dec 2024 21:56:23 +0300 Subject: [PATCH] Added the unrevivable trait --- Content.Server/Medical/DefibrillatorSystem.cs | 6 ++++++ .../Traits/Assorted/UnrevivableComponent.cs | 10 ++++++++++ .../medical/components/defibrillator.ftl | 1 + Resources/Locale/en-US/traits/traits.ftl | 5 ++++- Resources/Prototypes/Traits/disabilities.yml | 20 +++++++++++++++++++ 5 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 Content.Server/Traits/Assorted/UnrevivableComponent.cs diff --git a/Content.Server/Medical/DefibrillatorSystem.cs b/Content.Server/Medical/DefibrillatorSystem.cs index 7b0b4110201..f49e7a37e28 100644 --- a/Content.Server/Medical/DefibrillatorSystem.cs +++ b/Content.Server/Medical/DefibrillatorSystem.cs @@ -6,6 +6,7 @@ using Content.Server.Ghost; using Content.Server.Popups; using Content.Server.PowerCell; +using Content.Server.Traits.Assorted; using Content.Shared.Chat; using Content.Shared.Damage; using Content.Shared.DoAfter; @@ -213,6 +214,11 @@ public void Zap(EntityUid uid, EntityUid target, EntityUid user, DefibrillatorCo _chatManager.TrySendInGameICMessage(uid, Loc.GetString("defibrillator-rotten"), InGameICChatType.Speak, true); } + else if (HasComp(target)) + { + _chatManager.TrySendInGameICMessage(uid, Loc.GetString("defibrillator-unrevivable"), + InGameICChatType.Speak, true); + } else { if (_mobState.IsDead(target, mob)) diff --git a/Content.Server/Traits/Assorted/UnrevivableComponent.cs b/Content.Server/Traits/Assorted/UnrevivableComponent.cs new file mode 100644 index 00000000000..b95c922d548 --- /dev/null +++ b/Content.Server/Traits/Assorted/UnrevivableComponent.cs @@ -0,0 +1,10 @@ +namespace Content.Server.Traits.Assorted; + +/// +/// This is used for the urevivable trait. +/// +[RegisterComponent] +public sealed partial class UnrevivableComponent : Component +{ + +} diff --git a/Resources/Locale/en-US/medical/components/defibrillator.ftl b/Resources/Locale/en-US/medical/components/defibrillator.ftl index 1c32dd801d9..dc4a03aa3b1 100644 --- a/Resources/Locale/en-US/medical/components/defibrillator.ftl +++ b/Resources/Locale/en-US/medical/components/defibrillator.ftl @@ -1,3 +1,4 @@ defibrillator-not-on = The defibrillator isn't turned on. defibrillator-no-mind = No intelligence pattern can be detected in patient's brain. Further attempts futile. defibrillator-rotten = Body decomposition detected: resuscitation failed. +defibrillator-unrevivable = This patient is unable to be revived due to a unique body composition. diff --git a/Resources/Locale/en-US/traits/traits.ftl b/Resources/Locale/en-US/traits/traits.ftl index c9db3d5056d..1f143d34cd5 100644 --- a/Resources/Locale/en-US/traits/traits.ftl +++ b/Resources/Locale/en-US/traits/traits.ftl @@ -43,6 +43,9 @@ trait-description-Hemophilia = trait-name-Paracusia = Paracusia trait-description-Paracusia = You hear sounds that aren't really there +trait-name-Unrevivable = Unrevivable +trait-description-Unrevivable = You have a unique body composition that prevents you from being revived by normal means. + trait-name-PirateAccent = Pirate Accent trait-description-PirateAccent = You can't stop speaking like a pirate! @@ -321,7 +324,7 @@ trait-description-AddictionNicotine = trait-name-AnimalFriend = Animal Friend trait-description-AnimalFriend = You have a way with animals. You will never be attacked by animals, unless you attack them first. - + trait-name-Liar = Pathological liar trait-description-Liar = You can hardly bring yourself to tell the truth. Sometimes you lie anyway. diff --git a/Resources/Prototypes/Traits/disabilities.yml b/Resources/Prototypes/Traits/disabilities.yml index efa77391013..288a8209f29 100644 --- a/Resources/Prototypes/Traits/disabilities.yml +++ b/Resources/Prototypes/Traits/disabilities.yml @@ -73,6 +73,26 @@ sounds: collection: Paracusia +# Floofstation-specific trait, for now. EE will probably port it over later, so we keep it here. +- type: trait + id: Unrevivable + category: Physical + points: 6 + requirements: + - !type:CharacterJobRequirement + inverted: true + jobs: + - Borg # Borgs cannot be revived and don't have the "dead" state, they just gib + - MedicalBorg + - !type:CharacterSpeciesRequirement + inverted: true + species: + - IPC # IPCs use their own system + functions: + - !type:TraitAddComponent + components: + - type: Unrevivable + - type: trait id: Muted category: Mental