using System.Linq;
using Content.Server.GameTicking;
using Content.Server.GameTicking.Rules.Components;
+using Content.Server.Station.Components;
using Content.Shared.Dragon;
using Robust.Server.GameObjects;
using Robust.Shared.Map.Components;
{
base.Started(uid, component, gameRule, args);
- var spawnLocations = EntityQuery<MapGridComponent, TransformComponent>().ToList();
+ if (!_station.Stations.Any())
+ return;
- if (spawnLocations.Count == 0)
+ var station = _random.Pick(_station.Stations);
+ if (_station.GetLargestGrid(EntityManager.GetComponent<StationDataComponent>(station)) is not { } grid)
return;
- var location = _random.Pick(spawnLocations);
- Spawn("MobDragon", location.Item2.MapPosition);
+ Spawn("MobDragon", Transform(grid).MapPosition);
}
private void OnRiftRoundEnd(RoundEndTextAppendEvent args)
using Robust.Shared.Map;
using Robust.Shared.Random;
using Content.Server.NPC.Systems;
+using Content.Server.Station.Systems;
using Content.Shared.DoAfter;
using Content.Shared.Humanoid;
using Content.Shared.Mobs;
[Dependency] private readonly MovementSpeedModifierSystem _movement = default!;
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
[Dependency] private readonly SharedAudioSystem _audioSystem = default!;
+ [Dependency] private readonly StationSystem _station = default!;
[Dependency] private readonly NPCSystem _npc = default!;
/// <summary>