Content update for NetEntities (#18935)
This commit is contained in:
@@ -24,29 +24,27 @@ namespace Content.Server.Atmos.Commands
|
||||
return;
|
||||
}
|
||||
|
||||
var entMan = IoCManager.Resolve<IEntityManager>();
|
||||
|
||||
if (!EntityUid.TryParse(args[0], out var euid))
|
||||
if (!NetEntity.TryParse(args[0], out var eNet) || !_entities.TryGetEntity(eNet, out var euid))
|
||||
{
|
||||
shell.WriteError($"Failed to parse euid '{args[0]}'.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!entMan.HasComponent<MapGridComponent>(euid))
|
||||
if (!_entities.HasComponent<MapGridComponent>(euid))
|
||||
{
|
||||
shell.WriteError($"Euid '{euid}' does not exist or is not a grid.");
|
||||
return;
|
||||
}
|
||||
|
||||
var atmos = entMan.EntitySysManager.GetEntitySystem<AtmosphereSystem>();
|
||||
var atmos = _entities.EntitySysManager.GetEntitySystem<AtmosphereSystem>();
|
||||
|
||||
if (atmos.HasAtmosphere(euid))
|
||||
if (atmos.HasAtmosphere(euid.Value))
|
||||
{
|
||||
shell.WriteLine("Grid already has an atmosphere.");
|
||||
return;
|
||||
}
|
||||
|
||||
_entities.AddComponent<GridAtmosphereComponent>(euid);
|
||||
_entities.AddComponent<GridAtmosphereComponent>(euid.Value);
|
||||
|
||||
shell.WriteLine($"Added atmosphere to grid {euid}.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user