Turns 90% of vomit into actual vomit (#17697)

* Changes vomit reagent composition

* Formatting
This commit is contained in:
Arendian
2023-06-28 04:08:57 +02:00
committed by GitHub
parent 74b4f2b3cd
commit 7c26480b5f
3 changed files with 34 additions and 3 deletions

View File

@@ -70,11 +70,21 @@ namespace Content.Server.Medical
_solutionContainer.UpdateChemicals(stomach.Comp.Owner, sol);
}
}
// And the small bit of the chem stream from earlier
// Adds a tiny amount of the chem stream from earlier along with vomit
if (TryComp<BloodstreamComponent>(uid, out var bloodStream))
{
var temp = _solutionContainer.SplitSolution(uid, bloodStream.ChemicalSolution, solutionSize);
solution.AddSolution(temp, _proto);
var chemMultiplier = 0.1;
var vomitMultiplier = 0.9;
// Makes a vomit solution the size of 90% of the chemicals removed from the chemstream
var vomitAmount = new Solution("Vomit", solutionSize * vomitMultiplier);
// Takes 10% of the chemicals removed from the chem stream
var vomitChemstreamAmount = _solutionContainer.SplitSolution(uid, bloodStream.ChemicalSolution, solutionSize * chemMultiplier);
_solutionContainer.SplitSolution(uid, bloodStream.ChemicalSolution, solutionSize * vomitMultiplier);
solution.AddSolution(vomitAmount, _proto);
solution.AddSolution(vomitChemstreamAmount, _proto);
}
if (_puddle.TrySpillAt(uid, solution, out var puddle, false))