Skip to content

Commit

Permalink
лрп цварник
Browse files Browse the repository at this point in the history
  • Loading branch information
AwareFoxy committed Dec 3, 2024
1 parent 3032c9b commit d9d2e34
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
using Content.Server.Fax;
using Content.Shared.GameTicking.Components;
using Content.Server.GameTicking;
using Content.Shared._CorvaxNext.NextVars;
using Content.Shared.Paper;
using Content.Shared.Dataset;
using Robust.Shared.Random;
using Content.Shared.Fax.Components;
using Content.Server.StationEvents.Events;
using Robust.Shared.Timing;
using Robust.Shared.Prototypes;
using Robust.Shared.Configuration;
using Content.Server._CorvaxNext.StationEvents.Components;

namespace Content.Server._CorvaxNext.StationEvents.Events
Expand All @@ -23,6 +25,7 @@ public sealed class SpaceLawChangeRule : StationEventSystem<SpaceLawChangeRuleCo
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly GameTicker _gameTicker = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly IConfigurationManager _cfg = default!;

/// <summary>
/// Sequence of laws to be used for the current event
Expand All @@ -34,6 +37,9 @@ protected override void Started(EntityUid uid, SpaceLawChangeRuleComponent compo
{
base.Started(uid, component, gameRule, args);

if (!_cfg.GetCVar(NextVars.LRPEnabled))
return;

// Loading a prototype dataset
if (!_prototypeManager.TryIndex<LocalizedDatasetPrototype>(component.LawLocalizedDataset, out var dataset))
{
Expand Down
6 changes: 6 additions & 0 deletions Content.Shared/_CorvaxNext/NextVars.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,10 @@ public sealed class NextVars

// public static readonly CVarDef<bool> OfferModeIndicatorsPointShow =
// CVarDef.Create("hud.offer_mode_indicators_point_show", true, CVar.ARCHIVE | CVar.CLIENTONLY);

/// <summary>
/// LRP CVar
/// </summary>
public static readonly CVarDef<bool> LRPEnabled =
CVarDef.Create("lrp.enabled", false, CVar.SERVERONLY);
}
3 changes: 3 additions & 0 deletions Resources/ConfigPresets/Corvax/main.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ time = 180.0
[hub]
advertise = true
tags = "lang:ru,rp:low,rp:med,region:eu_e,tts"

[lrp] # Corvax-Next-LRP
enabled = true

0 comments on commit d9d2e34

Please sign in to comment.