Mopping Puddle Dilution and Wet Floor Sparkles (#6273)

This commit is contained in:
Willhelm53
2022-02-04 20:26:11 -06:00
committed by GitHub
parent 3d3a3c857b
commit 4d3a381962
10 changed files with 87 additions and 20 deletions

View File

@@ -16,7 +16,11 @@ namespace Content.Server.Chemistry.TileReactions
[DataDefinition]
public class CleanTileReaction : ITileReaction
{
/// <summary>
/// Multiplier used in CleanTileReaction.
/// 1 (default) means normal consumption rate of the cleaning reagent.
/// 0 means no consumption of the cleaning reagent, i.e. the reagent is inexhaustible.
/// </summary>
[DataField("cleanAmountMultiplier")]
public float CleanAmountMultiplier { get; private set; } = 1.0f;
@@ -29,7 +33,7 @@ namespace Content.Server.Chemistry.TileReactions
{
if (entMan.TryGetComponent(entity, out CleanableComponent? cleanable))
{
var next = (amount + cleanable.CleanAmount) * CleanAmountMultiplier;
var next = amount + (cleanable.CleanAmount * CleanAmountMultiplier);
// Nothing left?
if (reactVolume < next)
break;