]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
[#30096 Fix] Dumping a RefillableSolution into a DumpableSolution now requires `CanCo...
authorMilenVolf <63782763+MilenVolf@users.noreply.github.com>
Sat, 19 Apr 2025 20:32:17 +0000 (23:32 +0300)
committerGitHub <noreply@github.com>
Sat, 19 Apr 2025 20:32:17 +0000 (16:32 -0400)
* dumping containers now require having at least one hand

* Cleanup

* Better

* Apply suggested changes

* Cleanup

---------

Co-authored-by: Luiz Costa <luiz@mavromati.com>
Content.Server/Fluids/EntitySystems/PuddleSystem.Transfers.cs
Content.Server/Fluids/EntitySystems/PuddleSystem.cs
Resources/Locale/en-US/fluids/components/absorbent-component.ftl

index 04bbf55c581c7ad801b1ccea237416fb50107cfc..b8217352652bec6c52c12f6629a8309987f4cac8 100644 (file)
@@ -14,6 +14,12 @@ public sealed partial class PuddleSystem
 
     private void OnRefillableDragged(Entity<RefillableSolutionComponent> entity, ref DragDropDraggedEvent args)
     {
+        if (!_actionBlocker.CanComplexInteract(args.User))
+        {
+            _popups.PopupEntity(Loc.GetString("mopping-system-no-hands"), args.User, args.User);
+            return;
+        }
+
         if (!_solutionContainerSystem.TryGetSolution(entity.Owner, entity.Comp.Solution, out var soln, out var solution) || solution.Volume == FixedPoint2.Zero)
         {
             _popups.PopupEntity(Loc.GetString("mopping-system-empty", ("used", entity.Owner)), entity, args.User);
index 9cf3a1252f4e3954a5948b1d291999b129fa36a2..be45a1dbc43e16609cc39770d4526dce693855a7 100644 (file)
@@ -4,6 +4,7 @@ using Content.Server.Chemistry.TileReactions;
 using Content.Server.DoAfter;
 using Content.Server.Fluids.Components;
 using Content.Server.Spreader;
+using Content.Shared.ActionBlocker;
 using Content.Shared.Chemistry;
 using Content.Shared.Chemistry.Components;
 using Content.Shared.Chemistry.Components.SolutionManager;
@@ -40,6 +41,7 @@ namespace Content.Server.Fluids.EntitySystems;
 /// </summary>
 public sealed partial class PuddleSystem : SharedPuddleSystem
 {
+    [Dependency] private readonly ActionBlockerSystem _actionBlocker = default!;
     [Dependency] private readonly IAdminLogManager _adminLogger = default!;
     [Dependency] private readonly IGameTiming _timing = default!;
     [Dependency] private readonly SharedMapSystem _map = default!;
index 8a4d37023f6c59726e9283c7bf4e5111cffde5f8..51e500a6fe9e01795254c05d5932e4a423dfe39e 100644 (file)
@@ -3,6 +3,7 @@ mopping-system-target-container-empty-water = { CAPITALIZE(THE($target)) } has n
 mopping-system-puddle-space = { CAPITALIZE(THE($used)) } is full of water
 mopping-system-puddle-evaporate = {  CAPITALIZE(THE($target)) } is evaporating
 mopping-system-no-water = { CAPITALIZE(THE($used)) } has no water!
+mopping-system-no-hands = You have no hands!
 
 mopping-system-full = { CAPITALIZE(THE($used)) } is full!
 mopping-system-empty = { CAPITALIZE(THE($used)) } is empty!