Solution drag and drop now checks if container is closed and drainable (#34683)
drainable fix
This commit is contained in:
parent
dfd0745db0
commit
04ea0b5e5a
1 changed files with 9 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue