ejectOnBreak ejects locked slots too (#12933)
This commit is contained in:
@@ -541,9 +541,12 @@ namespace Content.Shared.Containers.ItemSlots
|
|||||||
foreach (var slot in component.Slots.Values)
|
foreach (var slot in component.Slots.Values)
|
||||||
{
|
{
|
||||||
if (slot.EjectOnBreak && slot.HasItem)
|
if (slot.EjectOnBreak && slot.HasItem)
|
||||||
|
{
|
||||||
|
SetLock(uid, slot, false, component);
|
||||||
TryEject(uid, slot, null, out var _);
|
TryEject(uid, slot, null, out var _);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the contents of some item slot.
|
/// Get the contents of some item slot.
|
||||||
|
|||||||
Reference in New Issue
Block a user