Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unrevivable Trait #423

Merged
merged 1 commit into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Content.Server/Medical/DefibrillatorSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<UnrevivableComponent>(target))
{
_chatManager.TrySendInGameICMessage(uid, Loc.GetString("defibrillator-unrevivable"),
InGameICChatType.Speak, true);
}
else
{
if (_mobState.IsDead(target, mob))
Expand Down
10 changes: 10 additions & 0 deletions Content.Server/Traits/Assorted/UnrevivableComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Content.Server.Traits.Assorted;

/// <summary>
/// This is used for the urevivable trait.
/// </summary>
[RegisterComponent]
public sealed partial class UnrevivableComponent : Component
{

}
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 4 additions & 1 deletion Resources/Locale/en-US/traits/traits.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -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!

Expand Down Expand Up @@ -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.

Expand Down
20 changes: 20 additions & 0 deletions Resources/Prototypes/Traits/disabilities.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading