Spill some of the chemstream when bleeding (#6772)
This commit is contained in:
@@ -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?
|
/// How much blood needs to be in the temporary solution in order to create a puddle?
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField("bleedPuddleThreshold")]
|
[DataField("bleedPuddleThreshold")]
|
||||||
public FixedPoint2 BleedPuddleThreshold = 10.0f;
|
public FixedPoint2 BleedPuddleThreshold = 5.0f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A modifier set prototype ID corresponding to how damage should be modified
|
/// A modifier set prototype ID corresponding to how damage should be modified
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ public sealed class BloodstreamSystem : EntitySystem
|
|||||||
|
|
||||||
component.ChemicalSolution.MaxVolume = component.ChemicalMaxVolume;
|
component.ChemicalSolution.MaxVolume = component.ChemicalMaxVolume;
|
||||||
component.BloodSolution.MaxVolume = component.BloodMaxVolume;
|
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
|
// Fill blood solution with BLOOD
|
||||||
_solutionContainerSystem.TryAddReagent(uid, component.BloodSolution, component.BloodReagent,
|
_solutionContainerSystem.TryAddReagent(uid, component.BloodSolution, component.BloodReagent,
|
||||||
@@ -168,8 +168,11 @@ public sealed class BloodstreamSystem : EntitySystem
|
|||||||
var newSol = component.BloodSolution.SplitSolution(-amount);
|
var newSol = component.BloodSolution.SplitSolution(-amount);
|
||||||
component.BloodTemporarySolution.AddSolution(newSol);
|
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);
|
_spillableSystem.SpillAt(uid, component.BloodTemporarySolution, "PuddleBlood", false);
|
||||||
component.BloodTemporarySolution.RemoveAllSolution();
|
component.BloodTemporarySolution.RemoveAllSolution();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user