Rollerbeds (#5681)

This commit is contained in:
metalgearsloth
2021-12-29 15:57:20 +11:00
committed by GitHub
parent 0bab6ecb71
commit e5e144d99c
40 changed files with 627 additions and 53 deletions

View File

@@ -615,11 +615,14 @@ namespace Content.Shared.Hands.Components
protected bool CanInsertEntityIntoHand(Hand hand, EntityUid entity)
{
var handContainer = hand.Container;
if (handContainer == null)
return false;
if (handContainer == null) return false;
if (!handContainer.CanInsert(entity))
return false;
if (!handContainer.CanInsert(entity)) return false;
var @event = new AttemptItemPickupEvent();
_entMan.EventBus.RaiseLocalEvent(entity, @event);
if (@event.Cancelled) return false;
return true;
}