Spill some of the chemstream when bleeding (#6772)

This commit is contained in:
mirrorcult
2022-02-17 23:00:50 -07:00
committed by GitHub
parent 9a8e942ed9
commit 3010de33fc
2 changed files with 6 additions and 3 deletions

View File

@@ -71,7 +71,7 @@ namespace Content.Server.Body.Components
/// How much blood needs to be in the temporary solution in order to create a puddle?
/// </summary>
[DataField("bleedPuddleThreshold")]
public FixedPoint2 BleedPuddleThreshold = 10.0f;
public FixedPoint2 BleedPuddleThreshold = 5.0f;
/// <summary>
/// A modifier set prototype ID corresponding to how damage should be modified

View File

@@ -90,7 +90,7 @@ public sealed class BloodstreamSystem : EntitySystem
component.ChemicalSolution.MaxVolume = component.ChemicalMaxVolume;
component.BloodSolution.MaxVolume = component.BloodMaxVolume;
component.BloodTemporarySolution.MaxVolume = component.BleedPuddleThreshold * 2; // give some leeway
component.BloodTemporarySolution.MaxVolume = component.BleedPuddleThreshold * 4; // give some leeway, for chemstream as well
// Fill blood solution with BLOOD
_solutionContainerSystem.TryAddReagent(uid, component.BloodSolution, component.BloodReagent,
@@ -168,8 +168,11 @@ public sealed class BloodstreamSystem : EntitySystem
var newSol = component.BloodSolution.SplitSolution(-amount);
component.BloodTemporarySolution.AddSolution(newSol);
if (component.BloodTemporarySolution.MaxVolume > component.BleedPuddleThreshold)
if (component.BloodTemporarySolution.CurrentVolume > component.BleedPuddleThreshold)
{
// Pass some of the chemstream into the spilled blood.
var temp = component.ChemicalSolution.SplitSolution(component.BloodTemporarySolution.CurrentVolume / 10);
component.BloodTemporarySolution.AddSolution(temp);
_spillableSystem.SpillAt(uid, component.BloodTemporarySolution, "PuddleBlood", false);
component.BloodTemporarySolution.RemoveAllSolution();
}