Remove useless resolves from a buncha tests.

This commit is contained in:
Vera Aguilera Puerto
2021-12-08 12:43:38 +01:00
parent 32416334c4
commit 2699540526
30 changed files with 189 additions and 184 deletions

View File

@@ -23,14 +23,15 @@ namespace Content.Client.VendingMachines
{
base.Open();
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(Owner.Owner, out SharedVendingMachineComponent? vendingMachine))
var entMan = IoCManager.Resolve<IEntityManager>();
if (!entMan.TryGetComponent(Owner.Owner, out SharedVendingMachineComponent? vendingMachine))
{
return;
}
VendingMachine = vendingMachine;
_menu = new VendingMachineMenu(this) {Title = IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(Owner.Owner).EntityName};
_menu = new VendingMachineMenu(this) {Title = entMan.GetComponent<MetaDataComponent>(Owner.Owner).EntityName};
_menu.Populate(VendingMachine.Inventory);
_menu.OnClose += Close;