mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-16 21:17:39 +03:00
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 (cherry picked from commit 2d644095e342cfb5727765210bafce7c339252c0)
This commit is contained in:
committed by
Spatison
parent
c8d4c137c9
commit
2f228e1c61
@@ -104,7 +104,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...
|
||||
|
||||
@@ -81,6 +81,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]
|
||||
|
||||
@@ -120,6 +120,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;
|
||||
|
||||
@@ -353,6 +356,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;
|
||||
|
||||
@@ -454,6 +460,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))));
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
- type: Hands
|
||||
showInHands: false
|
||||
disableExplosionRecursion: true
|
||||
canBeStripped: false
|
||||
- type: ComplexInteraction
|
||||
- type: IntrinsicRadioReceiver
|
||||
- type: IntrinsicRadioTransmitter
|
||||
|
||||
Reference in New Issue
Block a user