[#30096 Fix] Dumping a RefillableSolution into a DumpableSolution now requires CanComplexInteract (#33350)
* dumping containers now require having at least one hand * Cleanup * Better * Apply suggested changes * Cleanup --------- Co-authored-by: Luiz Costa <luiz@mavromati.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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!;
|
||||
|
||||
@@ -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!
|
||||
|
||||
Reference in New Issue
Block a user