Fixes placing objects on closed lockers (#658)

This commit is contained in:
adrian
2020-02-09 06:42:12 -03:00
committed by GitHub
parent 7d4dc85a6a
commit 253972d529
2 changed files with 12 additions and 3 deletions

View File

@@ -20,9 +20,12 @@ namespace Content.Server.GameObjects.Components
}
public bool AttackBy(AttackByEventArgs eventArgs)
{
if (!IsPlaceable)
return false;
if(!eventArgs.User.TryGetComponent<HandsComponent>(out var handComponent))
{
return true;
return false;
}
handComponent.Drop(eventArgs.AttackWith);
eventArgs.AttackWith.Transform.WorldPosition = eventArgs.ClickLocation.Position;