]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Make mobs without hands unable to spill jugs (#31438)
authorslarticodefast <161409025+slarticodefast@users.noreply.github.com>
Mon, 9 Sep 2024 11:02:15 +0000 (13:02 +0200)
committerGitHub <noreply@github.com>
Mon, 9 Sep 2024 11:02:15 +0000 (14:02 +0300)
* make mobs without hands unable to spill jugs

* snails

Content.Shared/Fluids/Components/PreventSpillerComponent.cs [deleted file]
Content.Shared/Fluids/SharedPuddleSystem.Spillable.cs
Resources/Prototypes/Entities/Mobs/NPCs/animals.yml
Resources/Prototypes/Entities/Mobs/NPCs/space.yml

diff --git a/Content.Shared/Fluids/Components/PreventSpillerComponent.cs b/Content.Shared/Fluids/Components/PreventSpillerComponent.cs
deleted file mode 100644 (file)
index e396d9f..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-using Robust.Shared.GameStates;
-
-namespace Content.Shared.Fluids.Components;
-
-/// <summary>
-/// Blocks this entity's ability to spill solution containing entities via the verb menu.
-/// </summary>
-[RegisterComponent, NetworkedComponent]
-public sealed partial class PreventSpillerComponent : Component
-{
-
-}
index f88f13e8b0d77ae4c3f4b3cab0d4e72d5a210874..2ce008da26240fb41020f23c4ce462f48f2bbe92 100644 (file)
@@ -34,7 +34,7 @@ public abstract partial class SharedPuddleSystem
 
     private void AddSpillVerb(Entity<SpillableComponent> entity, ref GetVerbsEvent<Verb> args)
     {
-        if (!args.CanAccess || !args.CanInteract)
+        if (!args.CanAccess || !args.CanInteract || args.Hands == null)
             return;
 
         if (!_solutionContainerSystem.TryGetSolution(args.Target, entity.Comp.SolutionName, out var soln, out var solution))
@@ -46,10 +46,6 @@ public abstract partial class SharedPuddleSystem
         if (solution.Volume == FixedPoint2.Zero)
             return;
 
-        if (HasComp<PreventSpillerComponent>(args.User))
-            return;
-
-
         Verb verb = new()
         {
             Text = Loc.GetString("spill-target-verb-get-data-text")
index 4e37a5ca3fa8a6274acaa85fa8794b715b516175..b11c1a50c6e963c2b371c8a978a1fecc0aa9ec78 100644 (file)
     price: 50
   - type: BadFood
   - type: NonSpreaderZombie
-  - type: PreventSpiller
   - type: FireVisuals
     sprite: Mobs/Effects/onfire.rsi
     normalState: Mouse_burning
index bba4d44265160a041b2e76a367f5ecae9b28259d..a51fe522381a2b3ab35a83b4331ec43c6f9254df 100644 (file)
     price: 50
   - type: BadFood
   - type: NonSpreaderZombie
-  - type: PreventSpiller
   - type: FireVisuals
     sprite: Mobs/Effects/onfire.rsi
     normalState: Mouse_burning
         visualType: Large
         messages: [ "snail-hurt-by-salt-popup" ]
         probability: 0.66
-    
+
 - type: entity
   parent: MobSnail
   id: MobSnailInstantDeath