using Content.Server.Shuttles.Components;
using Content.Server.Station.Components;
using Content.Server.Station.Events;
-using Content.Shared.Cargo.Components;
using Content.Shared.CCVar;
-using Content.Shared.Procedural;
using Content.Shared.Salvage;
using Content.Shared.Shuttles.Components;
using Content.Shared.Station.Components;
if (targetGrid == null)
return;
- var mapId = _mapManager.CreateMap();
+ _mapSystem.CreateMap(out var mapId);
if (_loader.TryLoad(mapId, component.Path.ToString(), out var ent) && ent.Count > 0)
{
- if (TryComp<ShuttleComponent>(ent[0], out var shuttle))
+ if (HasComp<ShuttleComponent>(ent[0]))
{
TryFTLProximity(ent[0], targetGrid.Value);
}
_mapManager.DeleteMap(mapId);
}
- private bool TryDungeonSpawn(Entity<MapGridComponent?> targetGrid, EntityUid stationUid, MapId mapId, DungeonSpawnGroup group, out EntityUid spawned)
+ private bool TryDungeonSpawn(Entity<MapGridComponent?> targetGrid, MapId mapId, DungeonSpawnGroup group, out EntityUid spawned)
{
spawned = EntityUid.Invalid;
if (_loader.TryLoad(mapId, path.ToString(), out var ent) && ent.Count == 1)
{
- if (TryComp<ShuttleComponent>(ent[0], out var shuttle))
+ if (HasComp<ShuttleComponent>(ent[0]))
{
TryFTLProximity(ent[0], targetGrid);
}
return;
// Spawn on a dummy map and try to FTL if possible, otherwise dump it.
- var mapId = _mapManager.CreateMap();
+ _mapSystem.CreateMap(out var mapId);
foreach (var group in component.Groups.Values)
{
switch (group)
{
case DungeonSpawnGroup dungeon:
- if (!TryDungeonSpawn(targetGrid.Value, uid, mapId, dungeon, out spawned))
+ if (!TryDungeonSpawn(targetGrid.Value, mapId, dungeon, out spawned))
continue;
break;
}
// Spawn on a dummy map and try to dock if possible, otherwise dump it.
- var mapId = _mapManager.CreateMap();
+ _mapSystem.CreateMap(out var mapId);
var valid = false;
if (_loader.TryLoad(mapId, component.Path.ToString(), out var ent) &&