Fix small logic issue in item slot swapping (#23378)

fix swapping item slots sometimes failing
This commit is contained in:
Nemanja
2024-01-03 01:16:37 -05:00
committed by GitHub
parent 1c11332fa4
commit 58d518a2a0

View File

@@ -265,6 +265,9 @@ namespace Content.Shared.Containers.ItemSlots
return false;
}
if (swap && slot.HasItem && !CanEject(uid, user, slot))
return false;
var ev = new ItemSlotInsertAttemptEvent(uid, usedUid, user, slot);
RaiseLocalEvent(uid, ref ev);
RaiseLocalEvent(usedUid, ref ev);