Skip to content

Commit

Permalink
Цвар на отключение планетарнои тюрьмы
Browse files Browse the repository at this point in the history
  • Loading branch information
VigersRay committed Oct 21, 2024
1 parent 2a121fc commit 6a8317d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
3 changes: 3 additions & 0 deletions Content.Shared/_Sunrise/SunriseCCVars/SunriseCCVars.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ public static readonly CVarDef<bool>
* Planet Prison
*/

public static readonly CVarDef<bool> MinPlayersEnable =
CVarDef.Create("planet_prison.enable", true, CVar.SERVERONLY);

public static readonly CVarDef<int> MinPlayersPlanetPrison =
CVarDef.Create("planet_prison.min_players", 60, CVar.SERVERONLY);

Expand Down

0 comments on commit 6a8317d

Please sign in to comment.