Fix Drop interaction not being raised (#858)

This commit is contained in:
Víctor Aguilera Puerto
2020-04-25 12:03:20 +02:00
committed by GitHub
parent 2734abbe20
commit bc82159878

View File

@@ -192,11 +192,15 @@ namespace Content.Server.GameObjects
var inventorySlot = hands[slot];
var item = inventorySlot.ContainedEntity.GetComponent<ItemComponent>();
if (!inventorySlot.Remove(inventorySlot.ContainedEntity))
{
return false;
}
if (!_entitySystemManager.GetEntitySystem<InteractionSystem>().TryDroppedInteraction(Owner, item.Owner))
return false;
item.RemovedFromSlot();
// TODO: The item should be dropped to the container our owner is in, if any.