]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Remove kitchen spike component references (#15221)
authorDrSmugleaf <DrSmugleaf@users.noreply.github.com>
Sat, 8 Apr 2023 23:53:29 +0000 (16:53 -0700)
committerGitHub <noreply@github.com>
Sat, 8 Apr 2023 23:53:29 +0000 (09:53 +1000)
Content.Client/Kitchen/Components/KitchenSpikeComponent.cs [deleted file]
Content.Server/Kitchen/Components/KitchenSpikeComponent.cs [deleted file]
Content.Server/Kitchen/EntitySystems/KitchenSpikeSystem.cs
Content.Shared/Kitchen/Components/KitchenSpikeComponent.cs [new file with mode: 0644]
Content.Shared/Kitchen/Components/SharedKitchenSpikeComponent.cs [deleted file]
Content.Shared/Kitchen/SharedKitchenSpikeSystem.cs

diff --git a/Content.Client/Kitchen/Components/KitchenSpikeComponent.cs b/Content.Client/Kitchen/Components/KitchenSpikeComponent.cs
deleted file mode 100644 (file)
index 375677e..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-using Content.Shared.Kitchen.Components;
-
-namespace Content.Client.Kitchen.Components
-{
-    [RegisterComponent, ComponentReference(typeof(SharedKitchenSpikeComponent))]
-    public sealed class KitchenSpikeComponent : SharedKitchenSpikeComponent
-    {
-    }
-}
diff --git a/Content.Server/Kitchen/Components/KitchenSpikeComponent.cs b/Content.Server/Kitchen/Components/KitchenSpikeComponent.cs
deleted file mode 100644 (file)
index 6333ca7..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-using Content.Server.Kitchen.EntitySystems;
-using Content.Shared.Kitchen.Components;
-
-namespace Content.Server.Kitchen.Components
-{
-    [RegisterComponent, Access(typeof(KitchenSpikeSystem)), ComponentReference(typeof(SharedKitchenSpikeComponent))]
-    public sealed class KitchenSpikeComponent : SharedKitchenSpikeComponent
-    {
-        public List<string?>? PrototypesToSpawn;
-
-        // TODO: Spiking alive mobs? (Replace with uid) (deal damage to their limbs on spiking, kill on first butcher attempt?)
-        public string MeatSource1p = "?";
-        public string MeatSource0 = "?";
-        public string Victim = "?";
-
-        // Prevents simultaneous spiking of two bodies (could be replaced with CancellationToken, but I don't see any situation where Cancel could be called)
-        public bool InUse;
-    }
-}
index f9d41e82c03a708bccb2c03698af03d3a58611f7..1b5ca4ade8203fa6eeb7b1015ef0c5668449c100 100644 (file)
@@ -1,4 +1,5 @@
 using Content.Server.Administration.Logs;
+using Content.Server.Body.Systems;
 using Content.Server.Kitchen.Components;
 using Content.Server.Popups;
 using Content.Shared.Database;
@@ -6,18 +7,18 @@ using Content.Shared.DoAfter;
 using Content.Shared.DragDrop;
 using Content.Shared.IdentityManagement;
 using Content.Shared.Interaction;
-using Content.Shared.Nutrition.Components;
-using Robust.Shared.Player;
-using Content.Shared.Storage;
-using Robust.Shared.Random;
-using static Content.Shared.Kitchen.Components.SharedKitchenSpikeComponent;
 using Content.Shared.Interaction.Events;
 using Content.Shared.Kitchen;
+using Content.Shared.Kitchen.Components;
 using Content.Shared.Mobs.Components;
 using Content.Shared.Mobs.Systems;
+using Content.Shared.Nutrition.Components;
 using Content.Shared.Popups;
+using Content.Shared.Storage;
 using Robust.Server.GameObjects;
-using Content.Server.Body.Systems;
+using Robust.Shared.Player;
+using Robust.Shared.Random;
+using static Content.Shared.Kitchen.Components.KitchenSpikeComponent;
 
 namespace Content.Server.Kitchen.EntitySystems
 {
diff --git a/Content.Shared/Kitchen/Components/KitchenSpikeComponent.cs b/Content.Shared/Kitchen/Components/KitchenSpikeComponent.cs
new file mode 100644 (file)
index 0000000..beb0d5a
--- /dev/null
@@ -0,0 +1,40 @@
+using Robust.Shared.Audio;
+using Robust.Shared.GameStates;
+using Robust.Shared.Serialization;
+
+namespace Content.Shared.Kitchen.Components;
+
+[RegisterComponent, NetworkedComponent]
+[Access(typeof(SharedKitchenSpikeSystem))]
+public sealed class KitchenSpikeComponent : Component
+{
+    [DataField("delay")]
+    public float SpikeDelay = 7.0f;
+
+    [ViewVariables(VVAccess.ReadWrite)]
+    [DataField("sound")]
+    public SoundSpecifier SpikeSound = new SoundPathSpecifier("/Audio/Effects/Fluids/splat.ogg");
+
+    public List<string?>? PrototypesToSpawn;
+
+    // TODO: Spiking alive mobs? (Replace with uid) (deal damage to their limbs on spiking, kill on first butcher attempt?)
+    public string MeatSource1p = "?";
+    public string MeatSource0 = "?";
+    public string Victim = "?";
+
+    // Prevents simultaneous spiking of two bodies (could be replaced with CancellationToken, but I don't see any situation where Cancel could be called)
+    public bool InUse;
+
+    [Serializable, NetSerializable]
+    public enum KitchenSpikeVisuals : byte
+    {
+        Status
+    }
+
+    [Serializable, NetSerializable]
+    public enum KitchenSpikeStatus : byte
+    {
+        Empty,
+        Bloody
+    }
+}
diff --git a/Content.Shared/Kitchen/Components/SharedKitchenSpikeComponent.cs b/Content.Shared/Kitchen/Components/SharedKitchenSpikeComponent.cs
deleted file mode 100644 (file)
index 1428ef8..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-using Robust.Shared.Audio;
-using Robust.Shared.GameStates;
-using Robust.Shared.Serialization;
-
-namespace Content.Shared.Kitchen.Components
-{
-    [NetworkedComponent]
-    public abstract class SharedKitchenSpikeComponent : Component
-    {
-        [DataField("delay")]
-        public float SpikeDelay = 7.0f;
-
-        [ViewVariables(VVAccess.ReadWrite)]
-        [DataField("sound")]
-        public SoundSpecifier SpikeSound = new SoundPathSpecifier("/Audio/Effects/Fluids/splat.ogg");
-
-        [Serializable, NetSerializable]
-        public enum KitchenSpikeVisuals : byte
-        {
-            Status
-        }
-
-        [Serializable, NetSerializable]
-        public enum KitchenSpikeStatus : byte
-        {
-            Empty,
-            Bloody
-        }
-    }
-}
index 2a912cbba754a6f06b1087fc0e1bdc3837e56edf..a61fc066c5edc98c968a6981391d7707b6730317 100644 (file)
@@ -11,10 +11,10 @@ public abstract class SharedKitchenSpikeSystem : EntitySystem
     public override void Initialize()
     {
         base.Initialize();
-        SubscribeLocalEvent<SharedKitchenSpikeComponent, CanDropTargetEvent>(OnCanDrop);
+        SubscribeLocalEvent<KitchenSpikeComponent, CanDropTargetEvent>(OnCanDrop);
     }
 
-    private void OnCanDrop(EntityUid uid, SharedKitchenSpikeComponent component, ref CanDropTargetEvent args)
+    private void OnCanDrop(EntityUid uid, KitchenSpikeComponent component, ref CanDropTargetEvent args)
     {
         if (args.Handled)
             return;