]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Predict LungSystem (#40729)
authorthetuerk <46725294+ThanosDeGraf@users.noreply.github.com>
Thu, 9 Oct 2025 10:26:21 +0000 (12:26 +0200)
committerGitHub <noreply@github.com>
Thu, 9 Oct 2025 10:26:21 +0000 (10:26 +0000)
* Initial edits of files
Untested yet. I would like to make sure all is accounted for before moving the files.

* trying my best

* Revert "trying my best"

This reverts commit 9aeece466df0169adec97e3947b061b54fd9b388.

* Revert "Initial edits of files"

This reverts commit 45c6e2343844b5fcafadbf2e5115fb2f241086a1.

* an actual meal

* Added networking to LungComponent.cs

* removed duplicate using

* moving GasRagents to SharedAtmosphereSystem.cs

Content.IntegrationTests/Tests/Body/LungTest.cs
Content.Server/Atmos/EntitySystems/AtmosphereSystem.Gases.cs
Content.Server/Body/Systems/RespiratorSystem.cs
Content.Shared/Atmos/EntitySystems/SharedAtmosphereSystem.cs
Content.Shared/Body/Components/LungComponent.cs [moved from Content.Server/Body/Components/LungComponent.cs with 84% similarity]
Content.Shared/Body/Systems/LungSystem.cs [moved from Content.Server/Body/Systems/LungSystem.cs with 86% similarity]

index 8ac3a3021f1b50af31ca1b3fb2ddca5051711867..584eb58595bc8190c8059aa2d6467de480d8a4cb 100644 (file)
@@ -1,7 +1,7 @@
 using Content.Server.Atmos.Components;
 using Content.Server.Atmos.EntitySystems;
 using Content.Server.Body.Components;
-using Content.Server.Body.Systems;
+using Content.Shared.Body.Systems;
 using Content.Shared.Body.Components;
 using Robust.Server.GameObjects;
 using Robust.Shared;
index c5451866690c3276513daf45b5e9682be0b9e0db..0c6a3a7daa5254e94b5effc6334aee5b543d9134 100644 (file)
@@ -25,8 +25,6 @@ namespace Content.Server.Atmos.EntitySystems
         /// </summary>
         public float[] GasSpecificHeats => _gasSpecificHeats;
 
-        public string?[] GasReagents = new string[Atmospherics.TotalNumberOfGases];
-
         private void InitializeGases()
         {
             _gasReactions = _protoMan.EnumeratePrototypes<GasReactionPrototype>().ToArray();
@@ -37,7 +35,6 @@ namespace Content.Server.Atmos.EntitySystems
             for (var i = 0; i < GasPrototypes.Length; i++)
             {
                 _gasSpecificHeats[i] = GasPrototypes[i].SpecificHeat / HeatScale;
-                GasReagents[i] = GasPrototypes[i].Reagent;
             }
         }
 
index eab3e2e56c27e3366a56ce8bd4819406f22a2042..63b04adc6a06b4e07c21329cac9be9ad627368d9 100644 (file)
@@ -3,6 +3,7 @@ using Content.Server.Atmos.EntitySystems;
 using Content.Server.Body.Components;
 using Content.Server.Chat.Systems;
 using Content.Server.EntityEffects;
+using Content.Shared.Body.Systems;
 using Content.Shared.Alert;
 using Content.Shared.Atmos;
 using Content.Shared.Body.Components;
index 46989397347f6c72f3f0a5cfdc8ff841f2cfc922..4a177e62635c60119705c273159f95f872a61906 100644 (file)
@@ -13,6 +13,8 @@ namespace Content.Shared.Atmos.EntitySystems
 
         private EntityQuery<InternalsComponent> _internalsQuery;
 
+        public string?[] GasReagents = new string[Atmospherics.TotalNumberOfGases];
+
         protected readonly GasPrototype[] GasPrototypes = new GasPrototype[Atmospherics.TotalNumberOfGases];
 
         public override void Initialize()
@@ -26,6 +28,7 @@ namespace Content.Shared.Atmos.EntitySystems
             for (var i = 0; i < Atmospherics.TotalNumberOfGases; i++)
             {
                 GasPrototypes[i] = _prototypeManager.Index<GasPrototype>(i.ToString());
+                GasReagents[i] = GasPrototypes[i].Reagent;
             }
         }
 
similarity index 84%
rename from Content.Server/Body/Components/LungComponent.cs
rename to Content.Shared/Body/Components/LungComponent.cs
index 4fb769d6702aaa7c045ed932b5ecc983ed2a1bbb..dd31de7722d152743dd2b4ab26a2d7eed9721f6c 100644 (file)
@@ -1,12 +1,13 @@
-using Content.Server.Body.Systems;
+using Content.Shared.Body.Systems;
 using Content.Shared.Alert;
 using Content.Shared.Atmos;
 using Content.Shared.Chemistry.Components;
+using Robust.Shared.GameStates;
 using Robust.Shared.Prototypes;
 
-namespace Content.Server.Body.Components;
+namespace Content.Shared.Body.Components;
 
-[RegisterComponent, Access(typeof(LungSystem))]
+[RegisterComponent, NetworkedComponent, Access(typeof(LungSystem))]
 public sealed partial class LungComponent : Component
 {
     [DataField]
similarity index 86%
rename from Content.Server/Body/Systems/LungSystem.cs
rename to Content.Shared/Body/Systems/LungSystem.cs
index fdc071c5f178251bda23cd8449f653465ab37fe0..5f4c1ee4ef3e20a5bf1c81b64d36d19f9d503ff2 100644 (file)
@@ -1,19 +1,18 @@
-using Content.Server.Atmos.EntitySystems;
-using Content.Server.Body.Components;
+using Content.Shared.Atmos.Components;
+using Content.Shared.Atmos.EntitySystems;
+using Content.Shared.Body.Components;
 using Content.Shared.Chemistry.EntitySystems;
 using Content.Shared.Atmos;
 using Content.Shared.Chemistry.Components;
 using Content.Shared.Clothing;
 using Content.Shared.Inventory.Events;
-using BreathToolComponent = Content.Shared.Atmos.Components.BreathToolComponent;
-using InternalsComponent = Content.Shared.Body.Components.InternalsComponent;
 
-namespace Content.Server.Body.Systems;
+namespace Content.Shared.Body.Systems;
 
 public sealed class LungSystem : EntitySystem
 {
-    [Dependency] private readonly AtmosphereSystem _atmos = default!;
-    [Dependency] private readonly InternalsSystem _internals = default!;
+    [Dependency] private readonly SharedAtmosphereSystem _atmos = default!;
+    [Dependency] private readonly SharedInternalsSystem _internals = default!;
     [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!;
 
     public static string LungSolutionName = "Lung";