Fix small logic issue in item slot swapping (#23378)
fix swapping item slots sometimes failing
This commit is contained in:
@@ -265,6 +265,9 @@ namespace Content.Shared.Containers.ItemSlots
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (swap && slot.HasItem && !CanEject(uid, user, slot))
|
||||||
|
return false;
|
||||||
|
|
||||||
var ev = new ItemSlotInsertAttemptEvent(uid, usedUid, user, slot);
|
var ev = new ItemSlotInsertAttemptEvent(uid, usedUid, user, slot);
|
||||||
RaiseLocalEvent(uid, ref ev);
|
RaiseLocalEvent(uid, ref ev);
|
||||||
RaiseLocalEvent(usedUid, ref ev);
|
RaiseLocalEvent(usedUid, ref ev);
|
||||||
|
|||||||
Reference in New Issue
Block a user