From ceb7595e38e8c82f80e6b2946619a49d4062c0e7 Mon Sep 17 00:00:00 2001 From: BIGZi0348 Date: Mon, 10 Mar 2025 22:05:42 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B7=D0=B0=D0=BF=D0=BB=D0=B0=D1=82=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=B4=D0=BB=D1=8F=20=D0=9E=D0=91=D0=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content.Server/_White/ERTRecruitment/ERTRecruitmentRule.cs | 2 +- .../_White/GhostRecruitment/GhostRecruitmentSystem.cs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Content.Server/_White/ERTRecruitment/ERTRecruitmentRule.cs b/Content.Server/_White/ERTRecruitment/ERTRecruitmentRule.cs index 03fa050b42..83ab47e691 100644 --- a/Content.Server/_White/ERTRecruitment/ERTRecruitmentRule.cs +++ b/Content.Server/_White/ERTRecruitment/ERTRecruitmentRule.cs @@ -137,7 +137,7 @@ public sealed class ERTRecruitmentRule : StationEventSystem /// name of recruitment. + /// Minimal playtime to be eligible for recruitment. /// is success? - public bool EndRecruitment(string recruitmentName) + public bool EndRecruitment(string recruitmentName, TimeSpan? overallPlaytime) { var spawners = GetEventSpawners(recruitmentName).ToList(); @@ -88,6 +89,9 @@ public sealed class GhostRecruitmentSystem : EntitySystem if (!TryComp(uid, out var actorComponent)) continue; + if (overallPlaytime != null && _playTimeTracking.GetOverallPlaytime(actorComponent.PlayerSession) < overallPlaytime) + continue; + // if there are too many recruited, then just skip if (count >= spawners.Count || count >= maxCount) continue;