Some more fixes

This commit is contained in:
Vera Aguilera Puerto
2021-12-04 14:14:22 +01:00
parent 2ff16a580b
commit 2bfec7ec62
19 changed files with 46 additions and 56 deletions

View File

@@ -38,8 +38,10 @@ namespace Content.Shared.Shuttles.Components
return;
}
if (!IoCManager.Resolve<IEntityManager>().TryGetEntity(state.Console.Value, out var consoleEnt) ||
!IoCManager.Resolve<IEntityManager>().TryGetComponent(consoleEnt, out SharedShuttleConsoleComponent? shuttleConsoleComponent))
var entityManager = IoCManager.Resolve<IEntityManager>();
if (!entityManager.TryGetEntity(state.Console.Value, out var consoleEnt) ||
!entityManager.TryGetComponent(consoleEnt.Value, out SharedShuttleConsoleComponent? shuttleConsoleComponent))
{
Logger.Warning($"Unable to set Helmsman console to {state.Console.Value}");
return;