From 75b36bff1eacf4db236c4128f1b6f2389efe5236 Mon Sep 17 00:00:00 2001 From: Mnemotechnican <69920617+Mnemotechnician@users.noreply.github.com> Date: Sun, 4 Aug 2024 01:34:22 +0300 Subject: [PATCH] Fix Event Manager Allowing to Start Multiple Events of the Same Type in a Short Time Window (#645) # Description Makes it so that the event scheduler doesn't pick events that were already added (but not yet ended). In order to fix this:

![image](https://github.com/user-attachments/assets/fd73dbce-7cbc-489b-8990-7ae791723351)

--- Content.Server/StationEvents/EventManagerSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/StationEvents/EventManagerSystem.cs b/Content.Server/StationEvents/EventManagerSystem.cs index 261e8ca46dd..2d8606e9293 100644 --- a/Content.Server/StationEvents/EventManagerSystem.cs +++ b/Content.Server/StationEvents/EventManagerSystem.cs @@ -162,7 +162,7 @@ public TimeSpan TimeSinceLastEvent(EntityPrototype stationEvent) private bool CanRun(EntityPrototype prototype, StationEventComponent stationEvent, int playerCount, TimeSpan currentTime) { - if (GameTicker.IsGameRuleActive(prototype.ID)) + if (GameTicker.IsGameRuleAdded(prototype.ID)) return false; if (stationEvent.MaxOccurrences.HasValue && GetOccurrences(prototype) >= stationEvent.MaxOccurrences.Value)