Fix borg hands showing up in stripping menu (#32606)
* Fix borg hands showing up in stripping menu Borgs can't drop their items anyways, and the amount of hands borgs have causes the UI to just bug out. * Add more checks
This commit is contained in:
committed by
GitHub
parent
440742f8f7
commit
2d644095e3
@@ -98,7 +98,7 @@ namespace Content.Client.Inventory
|
||||
}
|
||||
}
|
||||
|
||||
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...
|
||||
|
||||
@@ -80,6 +80,12 @@ public sealed partial class HandsComponent : Component
|
||||
|
||||
[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]
|
||||
|
||||
@@ -118,6 +118,9 @@ public abstract class SharedStrippableSystem : EntitySystem
|
||||
!Resolve(target, ref targetStrippable))
|
||||
return;
|
||||
|
||||
if (!target.Comp.CanBeStripped)
|
||||
return;
|
||||
|
||||
if (!_handsSystem.TryGetHand(target.Owner, handId, out var handSlot))
|
||||
return;
|
||||
|
||||
@@ -349,6 +352,9 @@ public abstract class SharedStrippableSystem : EntitySystem
|
||||
!Resolve(target, ref target.Comp))
|
||||
return false;
|
||||
|
||||
if (!target.Comp.CanBeStripped)
|
||||
return false;
|
||||
|
||||
if (user.Comp.ActiveHand == null)
|
||||
return false;
|
||||
|
||||
@@ -449,6 +455,9 @@ public abstract class SharedStrippableSystem : EntitySystem
|
||||
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))));
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
- type: Hands
|
||||
showInHands: false
|
||||
disableExplosionRecursion: true
|
||||
canBeStripped: false
|
||||
- type: ComplexInteraction
|
||||
- type: IntrinsicRadioReceiver
|
||||
- type: IntrinsicRadioTransmitter
|
||||
|
||||
Reference in New Issue
Block a user