From 6a8317d76eb23cffa204785c7f9fcf3538ef3738 Mon Sep 17 00:00:00 2001 From: Vigers Ray Date: Mon, 21 Oct 2024 05:49:27 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A6=D0=B2=D0=B0=D1=80=20=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=BE=D1=82=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D0=B8=D0=B5=20?= =?UTF-8?q?=D0=BF=D0=BB=D0=B0=D0=BD=D0=B5=D1=82=D0=B0=D1=80=D0=BD=D0=BE?= =?UTF-8?q?=D0=B8=20=D1=82=D1=8E=D1=80=D1=8C=D0=BC=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_Sunrise/PlanetPrison/PlanetPrisonStationSystem.cs | 4 ++++ Content.Shared/_Sunrise/SunriseCCVars/SunriseCCVars.cs | 3 +++ 2 files changed, 7 insertions(+) diff --git a/Content.Server/_Sunrise/PlanetPrison/PlanetPrisonStationSystem.cs b/Content.Server/_Sunrise/PlanetPrison/PlanetPrisonStationSystem.cs index 79edbe3ea74..343b322a0f8 100644 --- a/Content.Server/_Sunrise/PlanetPrison/PlanetPrisonStationSystem.cs +++ b/Content.Server/_Sunrise/PlanetPrison/PlanetPrisonStationSystem.cs @@ -71,6 +71,10 @@ private void OnPlanetPrisonStationInit(EntityUid uid, PlanetPrisonStationCompone return; } + var enable = _cfg.GetCVar(SunriseCCVars.MinPlayersEnable); + if (!enable) + return; + var minPlayers = _cfg.GetCVar(SunriseCCVars.MinPlayersPlanetPrison); if (_player.PlayerCount <= minPlayers) { diff --git a/Content.Shared/_Sunrise/SunriseCCVars/SunriseCCVars.cs b/Content.Shared/_Sunrise/SunriseCCVars/SunriseCCVars.cs index 2c328eeb642..1a1cf56af0d 100644 --- a/Content.Shared/_Sunrise/SunriseCCVars/SunriseCCVars.cs +++ b/Content.Shared/_Sunrise/SunriseCCVars/SunriseCCVars.cs @@ -200,6 +200,9 @@ public static readonly CVarDef * Planet Prison */ + public static readonly CVarDef MinPlayersEnable = + CVarDef.Create("planet_prison.enable", true, CVar.SERVERONLY); + public static readonly CVarDef MinPlayersPlanetPrison = CVarDef.Create("planet_prison.min_players", 60, CVar.SERVERONLY);