Solution drag and drop now checks if container is closed and drainable (#34683)
drainable fix
This commit is contained in:
@@ -2,11 +2,14 @@ using Content.Shared.Chemistry.Components;
|
||||
using Content.Shared.DragDrop;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Fluids;
|
||||
using Content.Shared.Nutrition.EntitySystems;
|
||||
|
||||
namespace Content.Server.Fluids.EntitySystems;
|
||||
|
||||
public sealed partial class PuddleSystem
|
||||
{
|
||||
[Dependency] private readonly OpenableSystem _openable = default!;
|
||||
|
||||
private void InitializeTransfers()
|
||||
{
|
||||
SubscribeLocalEvent<RefillableSolutionComponent, DragDropDraggedEvent>(OnRefillableDragged);
|
||||
@@ -32,6 +35,12 @@ public sealed partial class PuddleSystem
|
||||
if (!_solutionContainerSystem.TryGetDumpableSolution((args.Target, dump, null), out var dumpableSoln, out var dumpableSolution))
|
||||
return;
|
||||
|
||||
if (!_solutionContainerSystem.TryGetDrainableSolution(entity.Owner, out _, out _))
|
||||
return;
|
||||
|
||||
if (_openable.IsClosed(entity))
|
||||
return;
|
||||
|
||||
bool success = true;
|
||||
if (dump.Unlimited)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user