From a13cd0abef56874343d5c8829073ff28af215152 Mon Sep 17 00:00:00 2001 From: vuonojenmustaturska Date: Wed, 27 Jun 2018 18:33:55 +0300 Subject: [PATCH] Maybe it works better if i actually modify the class and not the fucking interface --- TGS.Server/InstanceConfig.cs | 160 ++++++++++++++++++++++++++++------- 1 file changed, 130 insertions(+), 30 deletions(-) diff --git a/TGS.Server/InstanceConfig.cs b/TGS.Server/InstanceConfig.cs index e64f8edec3..540483756f 100644 --- a/TGS.Server/InstanceConfig.cs +++ b/TGS.Server/InstanceConfig.cs @@ -147,64 +147,164 @@ namespace TGS.Server public ulong Version { get; protected set; } = CurrentVersion; /// - public string Name { get; set; } = "TG Station Server"; + public string Name + { + get { return _name; } + set { _name = value; Save(); } + } + private string _name = "TG Station Server"; /// - public bool Enabled { get; set; } = true; + public bool Enabled + { + get { return _enabled; } + set { _enabled = value; Save(); } + } + private string _enabled = true; /// - public string ProjectName { get; set; } = "tgstation"; + public string ProjectName + { + get { return _projectname; } + set { _projectname = value; Save(); } + } + private string _projectname = "tgstation"; /// - public ushort Port { get; set; } = 1337; + public ushort Port + { + get { return _port; } + set { _port = value; Save(); } + } + private ushort _port = 1337; /// - public DreamDaemonSecurity Security { get; set; } = DreamDaemonSecurity.Trusted; + public DreamDaemonSecurity Security + { + get { return _security; } + set { _security = value; Save(); } + } + private _security = DreamDaemonSecurity.Trusted; /// - public bool Autostart { get; set; } = false; + public bool Autostart + { + get { return _autostart; } + set { _autostart = value; Save(); } + } + private bool _autostart = false; /// - public bool Webclient { get; set; } = false; + public bool Webclient + { + get { return _webclient; } + set { _webclient = value; Save(); } + } + private bool _webclient = false; /// - public string CommitterName { get; set; } = "tgstation-server"; + public string CommitterName + { + get { return _committername; } + set { _committername = value; Save(); } + } + private string _committername = "tgstation-server"; /// - public string CommitterEmail { get; set; } = "tgstation-server@tgstation13.org"; + public string CommitterEmail + { + get { return _committeremail; } + set { _committeremail = value; Save(); } + } + private string _committeremail = "tgstation-server@tgstation13.org"; /// - public string ChatProviderData { get; set; } = Instance.UninitializedString; + public string ChatProviderData + { + get { return _chatproviderdata; } + set { _chatproviderdata = value; Save(); } + } + private string _chatproviderdata = Instance.UninitializedString; /// - public string ChatProviderEntropy { get; set; } + public string ChatProviderEntropy + { + get { return _chatproviderentropy; } + set { _chatproviderentropy = value; Save(); } + } + private string _chatproviderentropy; + + /// + public bool ReattachRequired + { + get { return _reattachrequired; } + set { _reattachrequired = value; Save(); } + } + private string _reattachrequired = false; /// - public bool ReattachRequired { get; set; } = false; + public int ReattachProcessID + { + get { return _reattachprocessid; } + set { _reattachprocessid = value; Save(); } + } + private int _reattachprocessid; + + /// + public ushort ReattachPort + { + get { return _reattachport; } + set { _reattachport = value; Save(); } + } + private int _reattachport; + + /// + public string ReattachCommsKey + { + get { return _reattachcommskey; } + set { _reattachcommskey = value; Save(); } + } + private int _reattachcommskey; + + /// + public string ReattachAPIVersion + { + get { return _reattachapiversion; } + set { _reattachapiversion = value; Save(); } + } + private string _reattachapiversion; + + /// + public string AuthorizedUserGroupSID + { + get { return _authorizedusergroupsid; } + set { _authorizedusergroupsid = value; Save(); } + } + private string _authorizedusergroupsid = null; /// - public int ReattachProcessID { get; set; } + public ulong AutoUpdateInterval + { + get { return _autoupdateinterval; } + set { _autoupdateinterval = value; Save(); } + } + private ulong _autoupdateinterval = 0; /// - public ushort ReattachPort { get; set; } + public bool PushTestmergeCommits + { + get { return _pushtestmergecommits; } + set { _pushtestmergecommits = value; Save(); } + } + private bool _pushtestmergecommits = false; /// - public string ReattachCommsKey { get; set; } - - /// - public string ReattachAPIVersion { get; set; } - - /// - public string AuthorizedUserGroupSID { get; set; } = null; - - /// - public ulong AutoUpdateInterval { get; set; } = 0; - - /// - public bool PushTestmergeCommits { get; set; } = false; - - /// - public int ServerStartupTimeout { get; set; } = 60; + public int ServerStartupTimeout + { + get { return _serverstartuptimeout; } + set { _serverstartuptimeout = value; Save(); } + } + private int _serverstartuptimeout = 60; /// /// Construct a for a at