Retractable items system + Arm Blade action (#38150)
This commit is contained in:
@@ -124,6 +124,27 @@ public abstract partial class SharedHandsSystem : EntitySystem
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries to pick up an entity into a hand, forcing to drop an item if its not free.
|
||||
/// By default it does check if it's possible to drop items.
|
||||
/// </summary>
|
||||
public bool TryForcePickup(
|
||||
EntityUid uid,
|
||||
EntityUid entity,
|
||||
Hand hand,
|
||||
bool checkActionBlocker = true,
|
||||
bool animate = true,
|
||||
HandsComponent? handsComp = null,
|
||||
ItemComponent? item = null)
|
||||
{
|
||||
if (!Resolve(uid, ref handsComp, false))
|
||||
return false;
|
||||
|
||||
TryDrop(uid, hand, checkActionBlocker: checkActionBlocker, handsComp: handsComp);
|
||||
|
||||
return TryPickup(uid, entity, hand, checkActionBlocker, animate, handsComp, item);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries to pick up an entity into any hand, forcing to drop an item if there are no free hands
|
||||
/// By default it does check if it's possible to drop items
|
||||
|
||||
Reference in New Issue
Block a user