]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Stop mop buckets from spilling when you push them (#26706)
authorVasilis <vasilis@pikachu.systems>
Thu, 4 Apr 2024 08:39:54 +0000 (10:39 +0200)
committerGitHub <noreply@github.com>
Thu, 4 Apr 2024 08:39:54 +0000 (02:39 -0600)
Content.Server/Fluids/EntitySystems/PuddleSystem.Spillable.cs
Content.Shared/Fluids/Components/SpillableComponent.cs
Resources/Prototypes/Entities/Structures/Specific/Janitor/janicart.yml

index bd7c55e85ea51afd600ef6a2c7600b573ec11d40..7780e5d46768686056e579ae84d9933d66464533 100644 (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,
index 428d91f2de75f9fdf492dc2a67f6fd3a6d000b71..51bb73a11fe4eb0b9aa96d2d959fb151a37e2bc9 100644 (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;
 }
index bdbff1b504f1906574733033be14b02208996c60..f35a0527232f71b563a44fc041a4052a8e483b14 100644 (file)
@@ -23,6 +23,7 @@
   - type: Spillable
     solution: bucket
     spillDelay: 3.0
+    spillWhenThrown: false
   - type: DrainableSolution
     solution: bucket
   - type: RefillableSolution
       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
     - type: Spillable
       solution: bucket
       spillDelay: 3.0
+      spillWhenThrown: false
     - type: SolutionContainerManager
       solutions:
         bucket: