Dragdrop fold rollerbed (#30002)
* Deploy foldable * Add NetworkedComponent and access to the component * Add handled to afterinteract * Use drop target location instead of setcoordinates * Put back in hand after failed deploy This prevents dropping the bed when clicking while inside a locker. * Created BaseDeployFoldable for folding chairs, body bags, and rollerbeds * Add dragdrop to fold rollerbed to hand
This commit is contained in:
@@ -61,11 +61,12 @@ public abstract class SharedStrippableSystem : EntitySystem
|
||||
|
||||
private void OnCanDropOn(EntityUid uid, StrippingComponent component, ref CanDropTargetEvent args)
|
||||
{
|
||||
args.Handled = true;
|
||||
args.CanDrop |= uid == args.User &&
|
||||
HasComp<StrippableComponent>(args.Dragged) &&
|
||||
HasComp<HandsComponent>(args.User) &&
|
||||
HasComp<StrippingComponent>(args.User);
|
||||
var val = uid == args.User &&
|
||||
HasComp<StrippableComponent>(args.Dragged) &&
|
||||
HasComp<HandsComponent>(args.User) &&
|
||||
HasComp<StrippingComponent>(args.User);
|
||||
args.Handled |= val;
|
||||
args.CanDrop |= val;
|
||||
}
|
||||
|
||||
private void OnCanDrop(EntityUid uid, StrippableComponent component, ref CanDropDraggedEvent args)
|
||||
|
||||
Reference in New Issue
Block a user