From c93f9e7eb05ca16bbfcfd1ce32475125f19d1c4a Mon Sep 17 00:00:00 2001 From: Schrodinger71 <132720404+Schrodinger71@users.noreply.github.com> Date: Tue, 21 Nov 2023 23:25:49 +0300 Subject: [PATCH] Create EvilTwinRule.cs --- .../EvilTwin/StationEvents /EvilTwinRule.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Content.Server/ADT/EvilTwin/StationEvents /EvilTwinRule.cs diff --git a/Content.Server/ADT/EvilTwin/StationEvents /EvilTwinRule.cs b/Content.Server/ADT/EvilTwin/StationEvents /EvilTwinRule.cs new file mode 100644 index 00000000000..2ea88340962 --- /dev/null +++ b/Content.Server/ADT/EvilTwin/StationEvents /EvilTwinRule.cs @@ -0,0 +1,19 @@ +using Content.Server.GameTicking.Rules.Components; +using Content.Server.StationEvents.Events; +using Robust.Shared.Random; + +namespace Content.Server.Backmen.EvilTwin.StationEvents; +public sealed partial class EvilTwinRule : StationEventSystem +{ + protected override void Started(EntityUid uid, EvilTwinRuleComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args) + { + base.Started(uid, component, gameRule, args); + + if(!_evilTwinSystem.MakeTwin(out _)) + { + Sawmill.Warning("Map not have latejoin spawnpoints for creating evil twin spawner"); + } + } + + [Dependency] private readonly EvilTwinSystem _evilTwinSystem = default!; +}