]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Remove obsolete code from VomitSystem (#30544)
authorMervill <mervills.email@gmail.com>
Thu, 1 Aug 2024 02:30:14 +0000 (19:30 -0700)
committerGitHub <noreply@github.com>
Thu, 1 Aug 2024 02:30:14 +0000 (19:30 -0700)
Content.Server/Medical/VomitSystem.cs

index 8c3b15aed33aba89a87c70f006cf5eb364e93cea..ec04a27db63e7c042813f7d32f7e192657ba4eed 100644 (file)
@@ -1,6 +1,6 @@
 using Content.Server.Body.Components;
 using Content.Server.Body.Systems;
-using Content.Server.Chemistry.Containers.EntitySystems;
+using Content.Shared.Chemistry.EntitySystems;
 using Content.Server.Fluids.EntitySystems;
 using Content.Server.Forensics;
 using Content.Server.Popups;
@@ -24,7 +24,7 @@ namespace Content.Server.Medical
         [Dependency] private readonly HungerSystem _hunger = default!;
         [Dependency] private readonly PopupSystem _popup = default!;
         [Dependency] private readonly PuddleSystem _puddle = default!;
-        [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!;
+        [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!;
         [Dependency] private readonly StunSystem _stun = default!;
         [Dependency] private readonly ThirstSystem _thirst = default!;
         [Dependency] private readonly ForensicsSystem _forensics = default!;
@@ -35,7 +35,7 @@ namespace Content.Server.Medical
         public void Vomit(EntityUid uid, float thirstAdded = -40f, float hungerAdded = -40f)
         {
             // Main requirement: You have a stomach
-            var stomachList = _body.GetBodyOrganComponents<StomachComponent>(uid);
+            var stomachList = _body.GetBodyOrganEntityComps<StomachComponent>(uid);
             if (stomachList.Count == 0)
                 return;
 
@@ -58,11 +58,11 @@ namespace Content.Server.Medical
             // Empty the stomach out into it
             foreach (var stomach in stomachList)
             {
-                if (_solutionContainer.ResolveSolution(stomach.Comp.Owner, StomachSystem.DefaultSolutionName, ref stomach.Comp.Solution, out var sol))
+                if (_solutionContainer.ResolveSolution(stomach.Owner, StomachSystem.DefaultSolutionName, ref stomach.Comp1.Solution, out var sol))
                 {
                     solution.AddSolution(sol, _proto);
                     sol.RemoveAllSolution();
-                    _solutionContainer.UpdateChemicals(stomach.Comp.Solution.Value);
+                    _solutionContainer.UpdateChemicals(stomach.Comp1.Solution.Value);
                 }
             }
             // Adds a tiny amount of the chem stream from earlier along with vomit
@@ -79,7 +79,7 @@ namespace Content.Server.Medical
                     vomitChemstreamAmount.ScaleSolution(chemMultiplier);
                     solution.AddSolution(vomitChemstreamAmount, _proto);
 
-                    vomitAmount -= (float) vomitChemstreamAmount.Volume;
+                    vomitAmount -= (float)vomitChemstreamAmount.Volume;
                 }
 
                 // Makes a vomit solution the size of 90% of the chemicals removed from the chemstream