]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Remove Entity<T> data-fields (#34083)
authorLeon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Sat, 11 Jan 2025 20:22:29 +0000 (07:22 +1100)
committerGitHub <noreply@github.com>
Sat, 11 Jan 2025 20:22:29 +0000 (21:22 +0100)
15 files changed:
Content.Server/Anomaly/Components/ReagentProducerAnomalyComponent.cs
Content.Server/Atmos/Piping/Unary/Components/GasCondenserComponent.cs
Content.Server/Body/Components/BloodstreamComponent.cs
Content.Server/Body/Components/LungComponent.cs
Content.Server/Body/Components/StomachComponent.cs
Content.Server/Botany/Components/PlantHolderComponent.cs
Content.Server/Chemistry/Components/SolutionRegenerationComponent.cs
Content.Server/Power/Generator/ChemicalFuelGeneratorAdapterComponent.cs
Content.Shared/Animals/UdderComponent.cs
Content.Shared/Animals/WoolyComponent.cs
Content.Shared/Chemistry/Components/SmokeComponent.cs
Content.Shared/Chemistry/Components/SolutionContainerMixerComponent.cs
Content.Shared/Fluids/Components/DrainComponent.cs
Content.Shared/Fluids/Components/PuddleComponent.cs
Content.Shared/Mind/MindComponent.cs

index 49c62aec81d6f642192c897213d03859c24cf11b..3f63a0518cfaec8c1ac98cbef0a4cef55f62fd53 100644 (file)
@@ -97,6 +97,6 @@ public sealed partial class ReagentProducerAnomalyComponent : Component
     /// <summary>
     /// Solution where the substance is generated
     /// </summary>
-    [DataField("solutionRef")]
+    [ViewVariables]
     public Entity<SolutionComponent>? Solution = null;
 }
index c25c010708f987c61fbaf9049a86200d8cae3728..e89bba1fd7097d8762f977c084455923b9ff983d 100644 (file)
@@ -25,7 +25,7 @@ public sealed partial class GasCondenserComponent : Component
     /// <summary>
     /// The solution that gases are condensed into.
     /// </summary>
-    [DataField]
+    [ViewVariables]
     public Entity<SolutionComponent>? Solution = null;
 
     /// <summary>
index a6c8ad90df97b39056b74e3610f23c29ac6161fa..35e76403bb617309d8f35ad1d8dd842c40eacf46 100644 (file)
@@ -157,22 +157,22 @@ namespace Content.Server.Body.Components
         /// <summary>
         ///     Internal solution for blood storage
         /// </summary>
-        [DataField]
-        public Entity<SolutionComponent>? BloodSolution = null;
+        [ViewVariables]
+        public Entity<SolutionComponent>? BloodSolution;
 
         /// <summary>
         ///     Internal solution for reagent storage
         /// </summary>
-        [DataField]
-        public Entity<SolutionComponent>? ChemicalSolution = null;
+        [ViewVariables]
+        public Entity<SolutionComponent>? ChemicalSolution;
 
         /// <summary>
         ///     Temporary blood solution.
         ///     When blood is lost, it goes to this solution, and when this
         ///     solution hits a certain cap, the blood is actually spilled as a puddle.
         /// </summary>
-        [DataField]
-        public Entity<SolutionComponent>? TemporarySolution = null;
+        [ViewVariables]
+        public Entity<SolutionComponent>? TemporarySolution;
 
         /// <summary>
         /// Variable that stores the amount of status time added by having a low blood level.
index 72af4d9e63a991727ab6a7908e7f0ecdf29dcbbc..4fb769d6702aaa7c045ed932b5ecc983ed2a1bbb 100644 (file)
@@ -26,7 +26,7 @@ public sealed partial class LungComponent : Component
     /// <summary>
     /// The solution on this entity that these lungs act on.
     /// </summary>
-    [DataField]
+    [ViewVariables]
     public Entity<SolutionComponent>? Solution = null;
 
     /// <summary>
index d541ca4d7c453641cd1eb446800305822578d2bf..06f03482e7e6769110bb6957e38b10668948f5a0 100644 (file)
@@ -25,8 +25,8 @@ namespace Content.Server.Body.Components
         /// <summary>
         ///     The solution inside of this stomach this transfers reagents to the body.
         /// </summary>
-        [DataField]
-        public Entity<SolutionComponent>? Solution = null;
+        [ViewVariables]
+        public Entity<SolutionComponent>? Solution;
 
         /// <summary>
         ///     What solution should this stomach push reagents into, on the body?
index f0661e4a301f8fa69b76c8a34fbcf81eae035dbe..235cd3050b574db1a8bad740f8cc576414ea96c3 100644 (file)
@@ -96,6 +96,6 @@ public sealed partial class PlantHolderComponent : Component
     [DataField]
     public string SoilSolutionName = "soil";
 
-    [DataField]
+    [ViewVariables]
     public Entity<SolutionComponent>? SoilSolution = null;
 }
index 03c0ffe0c1ae9d97b75d0598b99ab5de5d053437..9266c460f1b219142399db508a3993da4ac755b7 100644 (file)
@@ -20,7 +20,7 @@ public sealed partial class SolutionRegenerationComponent : Component
     /// <summary>
     /// The solution to add reagents to.
     /// </summary>
-    [DataField]
+    [ViewVariables]
     public Entity<SolutionComponent>? SolutionRef = null;
 
     /// <summary>
index 58e0e8b012a8f1e224e025bf7cdb1544c27e67f2..d36828eb83a5a2484836ebb9a94d4268050d5b57 100644 (file)
@@ -29,7 +29,7 @@ public sealed partial class ChemicalFuelGeneratorAdapterComponent : Component
     /// <summary>
     /// The solution on the <see cref="SolutionContainerManagerComponent"/> to use.
     /// </summary>
-    [DataField("solutionRef")]
+    [ViewVariables]
     public Entity<SolutionComponent>? Solution = null;
 
     /// <summary>
index d2767b089605025f4809b925f71617224ffaf89b..12db8efefd639c08605ea6ea7e8e598f0b9a2a92 100644 (file)
@@ -28,7 +28,7 @@ public sealed partial class UdderComponent : Component
     /// <summary>
     ///     The solution to add reagent to.
     /// </summary>
-    [DataField, ViewVariables(VVAccess.ReadOnly)]
+    [ViewVariables(VVAccess.ReadOnly)]
     public Entity<SolutionComponent>? Solution = null;
 
     /// <summary>
index 1dfe523001ed47f719d3f8b8c9b0b76c578a4a25..6e6e6745e1f01c96c8dabc01bcfe50fcdbda578a 100644 (file)
@@ -28,7 +28,7 @@ public sealed partial class WoolyComponent : Component
     /// <summary>
     ///     The solution to add reagent to.
     /// </summary>
-    [DataField, ViewVariables(VVAccess.ReadOnly)]
+    [ViewVariables(VVAccess.ReadOnly)]
     public Entity<SolutionComponent>? Solution;
 
     /// <summary>
index f07a77c1ac6673423891b361822bfee574bb47cf..db4ad37c7ab44a96680e78ce28203d444878b149 100644 (file)
@@ -16,7 +16,7 @@ public sealed partial class SmokeComponent : Component
     /// <summary>
     /// The solution on the entity with touch and ingestion reactions.
     /// </summary>
-    [DataField]
+    [ViewVariables]
     public Entity<SolutionComponent>? Solution = null;
 
     /// <summary>
index 8e4b6f52d875f8f3f61b9dbccfeaee05fc41b5b2..58aba436278f129e0b21df4e1b200eb2c3e91788 100644 (file)
@@ -33,7 +33,7 @@ public sealed partial class SolutionContainerMixerComponent : Component
     [DataField, AutoNetworkedField]
     public SoundSpecifier? MixingSound;
 
-    [DataField]
+    [ViewVariables]
     public Entity<AudioComponent>? MixingSoundEntity;
 }
 
index ef0277d214f989e3fa505e812c0c5f737c6ca463..305ed00b140a644799cf2e0cd4e31bf52af7573a 100644 (file)
@@ -20,7 +20,7 @@ public sealed partial class DrainComponent : Component
     [ValidatePrototypeId<TagPrototype>]
     public const string PlungerTag = "Plunger";
 
-    [DataField]
+    [ViewVariables]
     public Entity<SolutionComponent>? Solution = null;
 
     [DataField]
index b8a6fe0cb8826de3f326d897b2d1ddeb0dc7f541..5434479fb71b5f5d464885ac82c6f35e60380233 100644 (file)
@@ -19,7 +19,7 @@ namespace Content.Shared.Fluids.Components
 
         [DataField("solution")] public string SolutionName = "puddle";
 
-        [DataField("solutionRef")]
+        [ViewVariables]
         public Entity<SolutionComponent>? Solution;
     }
 }
index a0812be8f74e2a0db91957be7b41a6c1d983c70d..07571103ada370e04c5a294aec7bbfb1404157e2 100644 (file)
@@ -45,9 +45,9 @@ public sealed partial class MindComponent : Component
     ///     The first entity that this mind controlled. Used for round end information.
     ///     Might be relevant if the player has ghosted since.
     /// </summary>
-    [DataField, AutoNetworkedField]
-    public NetEntity? OriginalOwnedEntity;
-    // This is a net entity, because this field currently ddoes not get set to null when this entity is deleted.
+    [AutoNetworkedField]
+    public NetEntity? OriginalOwnedEntity; // TODO WeakEntityReference make this a Datafield again
+    // This is a net entity, because this field currently does not get set to null when this entity is deleted.
     // This is a lazy way to ensure that people check that the entity still exists.
     // TODO MIND Fix this properly by adding an OriginalMindContainerComponent or something like that.