}
}
- if (EntMan.TryGetComponent<HandsComponent>(Owner, out var handsComp))
+ if (EntMan.TryGetComponent<HandsComponent>(Owner, out var handsComp) && handsComp.CanBeStripped)
{
// good ol hands shit code. there is a GuiHands comparer that does the same thing... but these are hands
// and not gui hands... which are different...
[DataField]
public DisplacementData? HandDisplacement;
+
+ /// <summary>
+ /// If false, hands cannot be stripped, and they do not show up in the stripping menu.
+ /// </summary>
+ [DataField]
+ public bool CanBeStripped = true;
}
[Serializable, NetSerializable]
!Resolve(target, ref targetStrippable))
return;
+ if (!target.Comp.CanBeStripped)
+ return;
+
if (!_handsSystem.TryGetHand(target.Owner, handId, out var handSlot))
return;
!Resolve(target, ref target.Comp))
return false;
+ if (!target.Comp.CanBeStripped)
+ return false;
+
if (user.Comp.ActiveHand == null)
return false;
if (!Resolve(target, ref target.Comp))
return false;
+ if (!target.Comp.CanBeStripped)
+ return false;
+
if (!_handsSystem.TryGetHand(target, handName, out var handSlot, target.Comp))
{
_popupSystem.PopupCursor(Loc.GetString("strippable-component-item-slot-free-message", ("owner", Identity.Name(target, EntityManager, user))));