From ea15b6c017d08cacb90a7d921a8226519611d74c Mon Sep 17 00:00:00 2001 From: JustArchi Date: Mon, 27 Feb 2017 19:59:52 +0100 Subject: [PATCH] Remove default entries from Blacklist It doesn't make any sense for them to be there, if we don't allow to edit them anyway --- ArchiSteamFarm/GlobalConfig.cs | 5 +++-- ArchiSteamFarm/config/ASF.json | 10 +--------- ConfigGenerator/GlobalConfig.cs | 7 ++----- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/ArchiSteamFarm/GlobalConfig.cs b/ArchiSteamFarm/GlobalConfig.cs index feb916647..3e026e86e 100644 --- a/ArchiSteamFarm/GlobalConfig.cs +++ b/ArchiSteamFarm/GlobalConfig.cs @@ -47,8 +47,9 @@ namespace ArchiSteamFarm { [JsonProperty(Required = Required.DisallowNull)] internal readonly bool AutoUpdates = true; - [JsonProperty(ObjectCreationHandling = ObjectCreationHandling.Replace, Required = Required.DisallowNull)] - internal readonly HashSet Blacklist = new HashSet(GlobalBlacklist); + [SuppressMessage("ReSharper", "CollectionNeverUpdated.Global")] + [JsonProperty(Required = Required.DisallowNull)] + internal readonly HashSet Blacklist = new HashSet(); [JsonProperty(Required = Required.DisallowNull)] internal readonly byte ConnectionTimeout = DefaultConnectionTimeout; diff --git a/ArchiSteamFarm/config/ASF.json b/ArchiSteamFarm/config/ASF.json index 164ca0d1a..0f797679c 100644 --- a/ArchiSteamFarm/config/ASF.json +++ b/ArchiSteamFarm/config/ASF.json @@ -1,15 +1,7 @@ { "AutoRestart": true, "AutoUpdates": true, - "Blacklist": [ - 267420, - 303700, - 335590, - 368020, - 425280, - 480730, - 566020 - ], + "Blacklist": [], "ConnectionTimeout": 60, "CurrentCulture": null, "Debug": false, diff --git a/ConfigGenerator/GlobalConfig.cs b/ConfigGenerator/GlobalConfig.cs index 586536371..b0077c631 100644 --- a/ConfigGenerator/GlobalConfig.cs +++ b/ConfigGenerator/GlobalConfig.cs @@ -42,9 +42,6 @@ namespace ConfigGenerator { private const ProtocolType DefaultSteamProtocol = ProtocolType.Tcp; private const ushort DefaultWCFPort = 1242; - // This is hardcoded blacklist which should not be possible to change - private static readonly HashSet GlobalBlacklist = new HashSet { 267420, 303700, 335590, 368020, 425280, 480730, 566020 }; - [LocalizedCategory("Updates")] [JsonProperty(Required = Required.DisallowNull)] public bool AutoRestart { get; set; } = true; @@ -53,8 +50,8 @@ namespace ConfigGenerator { [JsonProperty(Required = Required.DisallowNull)] public bool AutoUpdates { get; set; } = true; - [JsonProperty(ObjectCreationHandling = ObjectCreationHandling.Replace, Required = Required.DisallowNull)] - public List Blacklist { get; set; } = new List(GlobalBlacklist); + [JsonProperty(Required = Required.DisallowNull)] + public List Blacklist { get; set; } = new List(); [LocalizedCategory("Debugging")] [JsonProperty(Required = Required.DisallowNull)]