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))
|
if (Openable.IsClosed(entity.Owner))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!entity.Comp.SpillWhenThrown)
|
||||||
|
return;
|
||||||
|
|
||||||
if (args.User != null)
|
if (args.User != null)
|
||||||
{
|
{
|
||||||
_adminLogger.Add(LogType.Landed,
|
_adminLogger.Add(LogType.Landed,
|
||||||
|
|||||||
@@ -29,4 +29,10 @@ public sealed partial class SpillableComponent : Component
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public FixedPoint2 MaxMeleeSpillAmount = FixedPoint2.New(20);
|
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
|
- type: Spillable
|
||||||
solution: bucket
|
solution: bucket
|
||||||
spillDelay: 3.0
|
spillDelay: 3.0
|
||||||
|
spillWhenThrown: false
|
||||||
- type: DrainableSolution
|
- type: DrainableSolution
|
||||||
solution: bucket
|
solution: bucket
|
||||||
- type: RefillableSolution
|
- type: RefillableSolution
|
||||||
@@ -82,6 +83,15 @@
|
|||||||
behaviors:
|
behaviors:
|
||||||
- !type:DoActsBehavior
|
- !type:DoActsBehavior
|
||||||
acts: ["Destruction"]
|
acts: ["Destruction"]
|
||||||
|
- type: Fixtures
|
||||||
|
fixtures:
|
||||||
|
fix1:
|
||||||
|
shape:
|
||||||
|
!type:PhysShapeAabb
|
||||||
|
bounds: "-0.45,-0.45,0.45,0.45"
|
||||||
|
density: 60
|
||||||
|
mask:
|
||||||
|
- MachineMask
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
name: mop bucket
|
name: mop bucket
|
||||||
@@ -207,6 +217,7 @@
|
|||||||
- type: Spillable
|
- type: Spillable
|
||||||
solution: bucket
|
solution: bucket
|
||||||
spillDelay: 3.0
|
spillDelay: 3.0
|
||||||
|
spillWhenThrown: false
|
||||||
- type: SolutionContainerManager
|
- type: SolutionContainerManager
|
||||||
solutions:
|
solutions:
|
||||||
bucket:
|
bucket:
|
||||||
|
|||||||
Reference in New Issue
Block a user