More blood tweaks (#6811)
This commit is contained in:
@@ -54,6 +54,13 @@ namespace Content.Server.Fluids.Components
|
||||
[ViewVariables] [DataField("overflowVolume")]
|
||||
public FixedPoint2 OverflowVolume = DefaultOverflowVolume;
|
||||
|
||||
/// <summary>
|
||||
/// How much should this puddle's opacity be multiplied by?
|
||||
/// Useful for puddles that have a high overflow volume but still want to be mostly opaque.
|
||||
/// </summary>
|
||||
[DataField("opacityModifier")]
|
||||
public float OpacityModifier = 1.0f;
|
||||
|
||||
public FixedPoint2 OverflowLeft => CurrentVolume - OverflowVolume;
|
||||
|
||||
[DataField("solution")] public string SolutionName { get; set; } = DefaultSolutionName;
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Content.Server.Fluids.EntitySystems
|
||||
|
||||
// Opacity based on level of fullness to overflow
|
||||
// Hard-cap lower bound for visibility reasons
|
||||
var volumeScale = puddleComponent.CurrentVolume.Float() / puddleComponent.OverflowVolume.Float();
|
||||
var volumeScale = puddleComponent.CurrentVolume.Float() / puddleComponent.OverflowVolume.Float() * puddleComponent.OpacityModifier;
|
||||
var puddleSolution = _solutionContainerSystem.EnsureSolution(uid, puddleComponent.SolutionName);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user