Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
New CVAR and removal of unintended debug code.
Browse files Browse the repository at this point in the history
  • Loading branch information
DoutorWhite committed Dec 8, 2023
1 parent eff01ae commit 2e60e09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Content.Server/Light/EntitySystems/PoweredLightSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,7 @@ public override void Update(float frameTime)
{
ForceUpdate();
_cfg.SetCVar(CCVars.NightTime, true);
Console.WriteLine("Noite! Atualize as lampadas.");
if (_isStationDefined)
if (_isStationDefined && _cfg.GetCVar(CCVars.ShiftAnnouncement))
{
_chatSystem.DispatchStationAnnouncement(
_originStation.GetValueOrDefault(), Loc.GetString("time-cycle-night"), "Central de Comando", true, nightShift, colorOverride: Color.SkyBlue);
Expand All @@ -548,7 +547,7 @@ public override void Update(float frameTime)
{
ForceUpdate();
_cfg.SetCVar(CCVars.NightTime, false);
if (_isStationDefined)
if (_isStationDefined && _cfg.GetCVar(CCVars.ShiftAnnouncement))
{
_chatSystem.DispatchStationAnnouncement(
_originStation.GetValueOrDefault(), Loc.GetString("time-cycle-day"), "Central de Comando", true, dayShift, colorOverride: Color.Orange);
Expand Down
2 changes: 2 additions & 0 deletions Content.Shared/CCVar/CCVars.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1830,6 +1830,8 @@ public static readonly CVarDef<float>
CVarDef.Create("time.night_time", false, desc: "Não altere.", flag: CVar.SERVERONLY);
public static readonly CVarDef<bool> DayNightCycle =
CVarDef.Create("time.day_night_cycle", true, desc: "Define se o sistema de iluminação noturna estará ativado na estação. (true/false)", flag: CVar.SERVERONLY);
public static readonly CVarDef<bool> ShiftAnnouncement =
CVarDef.Create("time.shift_announcement", true, desc: "Define se serão emitidos anúncios após a mudança de turno. (true/false)", flag: CVar.SERVERONLY);
public static readonly CVarDef<float> LightIntensityFall =
CVarDef.Create("time.light_intensity_fall", 1.75f, desc: "Define o multiplicador queda de intensidade das luzes durante o modo noturno. (fator)", flag: CVar.SERVERONLY);
public static readonly CVarDef<int> NightChangeTime =
Expand Down

0 comments on commit 2e60e09

Please sign in to comment.