]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Unrevivable trait (#24226)
authorScribbles0 <91828755+Scribbles0@users.noreply.github.com>
Sat, 20 Jan 2024 02:22:15 +0000 (18:22 -0800)
committerGitHub <noreply@github.com>
Sat, 20 Jan 2024 02:22:15 +0000 (13:22 +1100)
* unrevivable trait + remove unclonable remnants

* cleanup

* change to hascomp

Content.Server/Cloning/CloningSystem.cs
Content.Server/Medical/DefibrillatorSystem.cs
Content.Server/Traits/Assorted/UncloneableComponent.cs [deleted file]
Content.Server/Traits/Assorted/UnrevivableComponent.cs [new file with mode: 0644]
Resources/Locale/en-US/medical/components/defibrillator.ftl
Resources/Locale/en-US/traits/traits.ftl
Resources/Prototypes/Traits/disabilities.yml

index 95b0bd731052640cbface544d10fcc8375410f71..da8de13af2d6755f05796113d5a2efba7fc47992 100644 (file)
@@ -195,19 +195,6 @@ namespace Content.Server.Cloning
             if (_configManager.GetCVar(CCVars.BiomassEasyMode))
                 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
             var biomassAmount = _material.GetMaterialAmount(uid, clonePod.RequiredMaterial);
 
index d8bbeb998244aaf89c1da28e5debcae1987be3ec..e6ef8bf96a9a789538e9ed6681c7189208d73855 100644 (file)
@@ -6,6 +6,7 @@ using Content.Server.EUI;
 using Content.Server.Ghost;
 using Content.Server.Popups;
 using Content.Server.PowerCell;
+using Content.Server.Traits.Assorted;
 using Content.Shared.Damage;
 using Content.Shared.DoAfter;
 using Content.Shared.Interaction;
@@ -221,6 +222,11 @@ public sealed class DefibrillatorSystem : EntitySystem
             _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))
diff --git a/Content.Server/Traits/Assorted/UncloneableComponent.cs b/Content.Server/Traits/Assorted/UncloneableComponent.cs
deleted file mode 100644 (file)
index 650b78c..0000000
+++ /dev/null
@@ -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
-{
-
-}
diff --git a/Content.Server/Traits/Assorted/UnrevivableComponent.cs b/Content.Server/Traits/Assorted/UnrevivableComponent.cs
new file mode 100644 (file)
index 0000000..b95c922
--- /dev/null
@@ -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
+{
+
+}
index 1c32dd801d9307508862bc0a1680a4317c8289d8..dc4a03aa3b112dd9d7a924343736c6d11062cb42 100644 (file)
@@ -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.
index 3a8b1f3b59de2f81d7d85529971a4ad8ee9d699b..f8f8021e86fdf5647634e2c5634661ea9dcbb83d 100644 (file)
@@ -18,6 +18,9 @@ trait-muted-desc = You can't speak
 trait-paracusia-name = Paracusia
 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-desc = You can't stop speaking like a pirate!
 
index 14f633058032d5d3ed282f1c9f96545270d51cc6..43d87d4c123610efa7ab2670c2d4f8d80ddc5294 100644 (file)
       sounds:
         collection: Paracusia
 
+- type: trait
+  id: Unrevivable
+  name: trait-unrevivable-name
+  description: trait-unrevivable-desc
+  components:
+    - type: Unrevivable
+
 - type: trait
   id: Muted
   name: trait-muted-name