Updated ContainerHelpers to use new extensions (#2530)

Co-authored-by: David Tan <>
This commit is contained in:
DTanxxx
2020-11-13 20:25:04 +13:00
committed by GitHub
parent 9f9bd3ade6
commit 69d709a28f
32 changed files with 38 additions and 38 deletions

View File

@@ -29,7 +29,7 @@ namespace Content.Client.Commands
sprite.ContainerOccluded = false;
var tempParent = mechanism.Owner;
while (ContainerHelpers.TryGetContainer(tempParent, out var container))
while (tempParent.TryGetContainer(out var container))
{
if (!container.ShowContents)
{

View File

@@ -39,7 +39,7 @@ namespace Content.Client.GameObjects.Components.Items
set
{
_equippedPrefix = value;
if (!ContainerHelpers.TryGetContainer(Owner, out IContainer container)) return;
if (!Owner.TryGetContainer(out IContainer container)) return;
if(container.Owner.TryGetComponent(out HandsComponent hands))
hands.RefreshInHands();
}

View File

@@ -126,7 +126,7 @@ namespace Content.Client.GameObjects.EntitySystems
}
if (!_playerCanSeeThroughContainers &&
ContainerHelpers.TryGetContainer(entity, out var container) &&
entity.TryGetContainer(out var container) &&
!container.ShowContents)
{
return false;

View File

@@ -218,7 +218,7 @@ namespace Content.Client.Instruments
var instrumentEnt = _owner.Instrument.Owner;
var instrument = _owner.Instrument;
ContainerHelpers.TryGetContainerMan(_owner.Instrument.Owner, out var conMan);
_owner.Instrument.Owner.TryGetContainerMan(out var conMan);
var localPlayer = IoCManager.Resolve<IPlayerManager>().LocalPlayer;