Dumpable component to use a doafter to empty storage into a disposal unit, placeable surface, or the ground (#7792)

This commit is contained in:
Rane
2022-05-03 23:00:22 -04:00
committed by GitHub
parent 40ae7cc285
commit cfd00e74ca
11 changed files with 240 additions and 72 deletions

View File

@@ -1,4 +1,4 @@
using Content.Shared.Hands.Components;
using Content.Shared.Storage.Components;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.Interaction;
using Robust.Shared.GameStates;
@@ -52,6 +52,11 @@ namespace Content.Shared.Placeable
if (!surface.IsPlaceable)
return;
// 99% of the time they want to dump the stuff inside on the table, they can manually place with q if they really need to.
// Just causes prediction CBT otherwise.
if (HasComp<DumpableComponent>(args.Used))
return;
if (!_handsSystem.TryDrop(args.User, args.Used))
return;