Cargo shuttle changes (#14363)
This commit is contained in:
@@ -9,6 +9,8 @@ namespace Content.Server.Shuttles;
|
||||
[AdminCommand(AdminFlags.Mapping)]
|
||||
public sealed class DockCommand : IConsoleCommand
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entManager = default!;
|
||||
|
||||
public string Command => "dock";
|
||||
public string Description => $"Attempts to dock 2 airlocks together. Doesn't check whether it is valid.";
|
||||
public string Help => $"{Command} <airlock entityuid1> <airlock entityuid2>";
|
||||
@@ -32,21 +34,19 @@ public sealed class DockCommand : IConsoleCommand
|
||||
return;
|
||||
}
|
||||
|
||||
var entManager = IoCManager.Resolve<IEntityManager>();
|
||||
|
||||
if (!entManager.TryGetComponent(airlock1, out DockingComponent? dock1))
|
||||
if (!_entManager.TryGetComponent(airlock1, out DockingComponent? dock1))
|
||||
{
|
||||
shell.WriteError($"No docking component found on {airlock1}");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!entManager.TryGetComponent(airlock2, out DockingComponent? dock2))
|
||||
if (!_entManager.TryGetComponent(airlock2, out DockingComponent? dock2))
|
||||
{
|
||||
shell.WriteError($"No docking component found on {airlock2}");
|
||||
return;
|
||||
}
|
||||
|
||||
var dockSystem = EntitySystem.Get<DockingSystem>();
|
||||
dockSystem.Dock(dock1, dock2);
|
||||
var dockSystem = _entManager.System<DockingSystem>();
|
||||
dockSystem.Dock(airlock1, dock1, airlock2, dock2);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user