Re-implement stage 2 of deprecation

This commit is contained in:
JustArchi
2018-05-17 11:11:03 +02:00
parent 7f80728d18
commit 494370a226
2 changed files with 3 additions and 28 deletions

View File

@@ -41,6 +41,9 @@ namespace ArchiSteamFarm {
[JsonProperty(Required = Required.DisallowNull)]
internal readonly bool AutoSteamSaleEvent;
[JsonProperty(Required = Required.DisallowNull)]
internal readonly EBotBehaviour BotBehaviour = EBotBehaviour.None;
[JsonProperty]
internal readonly string CustomGamePlayedWhileFarming;
@@ -114,9 +117,6 @@ namespace ArchiSteamFarm {
[JsonProperty(Required = Required.DisallowNull)]
internal readonly bool UseLoginKeys = true;
[JsonProperty(Required = Required.DisallowNull)]
internal EBotBehaviour BotBehaviour { get; private set; } = EBotBehaviour.None;
[JsonProperty]
internal string SteamLogin { get; set; }
@@ -129,19 +129,8 @@ namespace ArchiSteamFarm {
[JsonProperty]
internal string SteamPassword { get; set; }
private bool DeprecatedConfig;
private bool ShouldSerializeSensitiveDetails = true;
[JsonProperty(Required = Required.DisallowNull)]
[SuppressMessage("ReSharper", "ValueParameterNotUsed")]
private bool IsBotAccount {
set {
// TODO: Deprecate further in the next version
ASF.ArchiLogger.LogGenericError(string.Format(Strings.WarningDeprecated, nameof(IsBotAccount), nameof(BotBehaviour)));
DeprecatedConfig = true;
}
}
[JsonProperty(PropertyName = SharedInfo.UlongCompatibilityStringPrefix + nameof(SteamMasterClanID), Required = Required.DisallowNull)]
private string SSteamMasterClanID {
get => SteamMasterClanID.ToString();
@@ -183,10 +172,6 @@ namespace ArchiSteamFarm {
return null;
}
if (botConfig.DeprecatedConfig) {
return null;
}
botConfig.ShouldSerializeSensitiveDetails = false;
// Support encrypted passwords

View File

@@ -445,16 +445,6 @@ namespace ArchiSteamFarm {
case "--process-required" when !cryptKeyNext:
ProcessRequired = true;
break;
case "--server" when !cryptKeyNext:
// TODO: Deprecate further in the next version
ASF.ArchiLogger.LogGenericError(string.Format(Strings.WarningDeprecated, "--server", "GlobalConfig.IPC"));
Environment.Exit(1);
break;
case "--service" when !cryptKeyNext:
// TODO: Deprecate further in the next version
ASF.ArchiLogger.LogGenericError(string.Format(Strings.WarningDeprecated, "--service", "--no-restart --process-required --system-required"));
Environment.Exit(1);
break;
case "--system-required" when !cryptKeyNext:
SystemRequired = true;
break;