Unrevivable trait (#24226)

* unrevivable trait + remove unclonable remnants

* cleanup

* change to hascomp
This commit is contained in:
Scribbles0
2024-01-19 18:22:15 -08:00
committed by GitHub
parent ac809c4929
commit 7a2e500f68
7 changed files with 27 additions and 23 deletions

View File

@@ -195,19 +195,6 @@ namespace Content.Server.Cloning
if (_configManager.GetCVar(CCVars.BiomassEasyMode)) if (_configManager.GetCVar(CCVars.BiomassEasyMode))
cloningCost = (int) Math.Round(cloningCost * EasyModeCloningCost); cloningCost = (int) Math.Round(cloningCost * EasyModeCloningCost);
// Check if they have the uncloneable trait
if (TryComp<UncloneableComponent>(bodyToClone, out _))
{
if (clonePod.ConnectedConsole != null)
{
_chatSystem.TrySendInGameICMessage(clonePod.ConnectedConsole.Value,
Loc.GetString("cloning-console-uncloneable-trait-error"),
InGameICChatType.Speak, false);
}
return false;
}
// biomass checks // biomass checks
var biomassAmount = _material.GetMaterialAmount(uid, clonePod.RequiredMaterial); var biomassAmount = _material.GetMaterialAmount(uid, clonePod.RequiredMaterial);

View File

@@ -6,6 +6,7 @@ using Content.Server.EUI;
using Content.Server.Ghost; using Content.Server.Ghost;
using Content.Server.Popups; using Content.Server.Popups;
using Content.Server.PowerCell; using Content.Server.PowerCell;
using Content.Server.Traits.Assorted;
using Content.Shared.Damage; using Content.Shared.Damage;
using Content.Shared.DoAfter; using Content.Shared.DoAfter;
using Content.Shared.Interaction; using Content.Shared.Interaction;
@@ -221,6 +222,11 @@ public sealed class DefibrillatorSystem : EntitySystem
_chatManager.TrySendInGameICMessage(uid, Loc.GetString("defibrillator-rotten"), _chatManager.TrySendInGameICMessage(uid, Loc.GetString("defibrillator-rotten"),
InGameICChatType.Speak, true); InGameICChatType.Speak, true);
} }
else if (HasComp<UnrevivableComponent>(target))
{
_chatManager.TrySendInGameICMessage(uid, Loc.GetString("defibrillator-unrevivable"),
InGameICChatType.Speak, true);
}
else else
{ {
if (_mobState.IsDead(target, mob)) if (_mobState.IsDead(target, mob))

View File

@@ -1,10 +0,0 @@
namespace Content.Server.Traits.Assorted;
/// <summary>
/// This is used for the uncloneable trait.
/// </summary>
[RegisterComponent]
public sealed partial class UncloneableComponent : Component
{
}

View File

@@ -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
{
}

View File

@@ -1,3 +1,4 @@
defibrillator-not-on = The defibrillator isn't turned on. 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-no-mind = No intelligence pattern can be detected in patient's brain. Further attempts futile.
defibrillator-rotten = Body decomposition detected: resuscitation failed. defibrillator-rotten = Body decomposition detected: resuscitation failed.
defibrillator-unrevivable = This patient is unable to be revived due to a unique body composition.

View File

@@ -18,6 +18,9 @@ trait-muted-desc = You can't speak
trait-paracusia-name = Paracusia trait-paracusia-name = Paracusia
trait-paracusia-desc = You hear sounds that aren't really there trait-paracusia-desc = You hear sounds that aren't really there
trait-unrevivable-name = Unrevivable
trait-unrevivable-desc = You are unable to be revived by defibrillators.
trait-pirate-accent-name = Pirate Accent trait-pirate-accent-name = Pirate Accent
trait-pirate-accent-desc = You can't stop speaking like a pirate! trait-pirate-accent-desc = You can't stop speaking like a pirate!

View File

@@ -37,6 +37,13 @@
sounds: sounds:
collection: Paracusia collection: Paracusia
- type: trait
id: Unrevivable
name: trait-unrevivable-name
description: trait-unrevivable-desc
components:
- type: Unrevivable
- type: trait - type: trait
id: Muted id: Muted
name: trait-muted-name name: trait-muted-name