Files
tbd-station-14/Content.Server/GameTicking/GameTicker.CVars.cs
metalgearsloth 0f513f64fb Rotate DefaultGrid on round start (#4957)
* Rotate DefaultGrid on round start

Not ideal long-term but good for bugspotting short-term.

* Fix buckle test

Because gridtraversal was being triggered the pos was being fucked when moving back

* Fix buckle

* Buckle offset
2021-10-25 15:22:57 +11:00

47 lines
1.9 KiB
C#

using System;
using Content.Shared.CCVar;
using Robust.Shared.ViewVariables;
namespace Content.Server.GameTicking
{
public partial class GameTicker
{
[ViewVariables]
public bool LobbyEnabled { get; private set; } = false;
[ViewVariables]
public bool DummyTicker { get; private set; } = false;
[ViewVariables]
public string ChosenMap { get; private set; } = string.Empty;
[ViewVariables]
public TimeSpan LobbyDuration { get; private set; } = TimeSpan.Zero;
[ViewVariables]
public bool DisallowLateJoin { get; private set; } = false;
[ViewVariables]
public bool StationOffset { get; private set; } = false;
[ViewVariables]
public bool StationRotation { get; private set; } = false;
[ViewVariables]
public float MaxStationOffset { get; private set; } = 0f;
private void InitializeCVars()
{
_configurationManager.OnValueChanged(CCVars.GameLobbyEnabled, value => LobbyEnabled = value, true);
_configurationManager.OnValueChanged(CCVars.GameDummyTicker, value => DummyTicker = value, true);
_configurationManager.OnValueChanged(CCVars.GameMap, value => ChosenMap = value, true);
_configurationManager.OnValueChanged(CCVars.GameLobbyDuration, value => LobbyDuration = TimeSpan.FromSeconds(value), true);
_configurationManager.OnValueChanged(CCVars.GameDisallowLateJoins,
value => { DisallowLateJoin = value; UpdateLateJoinStatus(); UpdateJobsAvailable(); }, true);
_configurationManager.OnValueChanged(CCVars.StationOffset, value => StationOffset = value, true);
_configurationManager.OnValueChanged(CCVars.StationRotation, value => StationRotation = value, true);
_configurationManager.OnValueChanged(CCVars.MaxStationOffset, value => MaxStationOffset = value, true);
}
}
}