Storage CanInsert() tweaks (#21623)
This commit is contained in:
@@ -27,6 +27,20 @@ public abstract partial class SharedHandsSystem
|
||||
RaiseLocalEvent(uid, didUnequip);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether an entity can drop a given entity. Will return false if they are not holding the entity.
|
||||
/// </summary>
|
||||
public bool CanDrop(EntityUid uid, EntityUid entity, HandsComponent? handsComp = null, bool checkActionBlocker = true)
|
||||
{
|
||||
if (!Resolve(uid, ref handsComp))
|
||||
return false;
|
||||
|
||||
if (!IsHolding(uid, entity, out var hand, handsComp))
|
||||
return false;
|
||||
|
||||
return CanDropHeld(uid, hand, checkActionBlocker);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the contents of a hand is able to be removed from its container.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user