Stop mop buckets from spilling when you push them (#26706)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user