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:
Pieter-Jan Briers
2024-10-03 02:11:56 +02:00
committed by GitHub
parent 440742f8f7
commit 2d644095e3
4 changed files with 17 additions and 1 deletions

View File

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