Retractable items system + Arm Blade action (#38150)

This commit is contained in:
ScarKy0
2025-06-14 20:29:06 +02:00
committed by GitHub
parent 635ea4b2b4
commit 208b245dcb
13 changed files with 243 additions and 6 deletions

View File

@@ -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