using Content.Server.StationEvents.Components; using Content.Shared.GameTicking.Components; namespace Content.Server.StationEvents.Events; /// /// Handler for events that spawn a given entity at a random tile on the affected station. /// /// public sealed partial class RandomSpawnRule : StationEventSystem { protected override void Started(Entity ent, ref GameRuleStartedEvent args) { base.Started(ent, ref args); if (Station.TryFindRandomTile(out _, out _, out _, out var coords)) { Sawmill.Info($"Spawning {ent.Comp1.Prototype} at {coords}"); Spawn(ent.Comp1.Prototype, coords); } } }