Stop mop buckets from spilling when you push them (#26706)

(cherry picked from commit d4982bad31)
This commit is contained in:
Vasilis
2024-04-07 14:34:16 +02:00
committed by NullWanderer
parent 31bda710af
commit d50ae28b15
3 changed files with 20 additions and 0 deletions
@@ -143,6 +143,9 @@ public sealed partial class PuddleSystem
if (Openable.IsClosed(entity.Owner))
return;
if (!entity.Comp.SpillWhenThrown)
return;
if (args.User != null)
{
_adminLogger.Add(LogType.Landed,
@@ -29,4 +29,10 @@ public sealed partial class SpillableComponent : Component
/// </summary>
[DataField]
public FixedPoint2 MaxMeleeSpillAmount = FixedPoint2.New(20);
/// <summary>
/// Should this item be spilled when thrown?
/// </summary>
[DataField]
public bool SpillWhenThrown = true;
}
@@ -23,6 +23,7 @@
- type: Spillable
solution: bucket
spillDelay: 3.0
spillWhenThrown: false
- type: DrainableSolution
solution: bucket
- type: RefillableSolution
@@ -82,6 +83,15 @@
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.45,-0.45,0.45,0.45"
density: 60
mask:
- MachineMask
- type: entity
name: mop bucket
@@ -207,6 +217,7 @@
- type: Spillable
solution: bucket
spillDelay: 3.0
spillWhenThrown: false
- type: SolutionContainerManager
solutions:
bucket: