Remove obsolete code from VomitSystem (#30544)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user