Before equipping, check if item can be dropped, but don't do it (#8333)

This fixes the issue #8179.
This commit is contained in:
rok-povsic
2022-05-21 19:39:13 +02:00
committed by GitHub
parent 8aa7e88c1c
commit a9d70fc066

View File

@@ -144,7 +144,7 @@ public abstract partial class InventorySystem
return;
}
if (_handsSystem.TryDrop(actor, hands.ActiveHand!, doDropInteraction: false, handsComp: hands))
if (_handsSystem.CanDropHeld(actor, hands.ActiveHand!, checkActionBlocker: false))
TryEquip(actor, actor, held.Value, ev.Slot, predicted: true, inventory: inventory);
}