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

This commit is contained in:
Vasilis
2024-04-04 10:39:54 +02:00
committed by GitHub
parent f5d9d3c458
commit d4982bad31
3 changed files with 20 additions and 0 deletions

View File

@@ -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,

View File

@@ -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;
}

View File

@@ -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: