* Prevent EntityStorages from being opened while inside a mech.
* compressed into few lines
* unneeded line
* Popup client
---------
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
return false;
}
+ if (_container.IsEntityInContainer(target))
+ {
+ if (_container.TryGetOuterContainer(target,Transform(target) ,out var container) &&
+ !HasComp<HandsComponent>(container.Owner))
+ {
+ Popup.PopupClient(Loc.GetString("entity-storage-component-already-contains-user-message"), user, user);
+
+ return false;
+ }
+ }
+
//Checks to see if the opening position, if offset, is inside of a wall.
if (component.EnteringOffset != new Vector2(0, 0) && !HasComp<WallMountComponent>(target)) //if the entering position is offset
{