Move DismissInventoryNotifications to BotBehaviour

Also stage 2 of all deprecated properties until now.
This commit is contained in:
JustArchi
2018-06-19 20:02:11 +02:00
parent a540f24208
commit 2090d6301b
6 changed files with 9 additions and 76 deletions

View File

@@ -42,18 +42,12 @@ 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;
[JsonProperty]
internal readonly string CustomGamePlayedWhileIdle;
[JsonProperty(Required = Required.DisallowNull)]
internal readonly bool DismissInventoryNotifications;
[JsonProperty(Required = Required.DisallowNull)]
internal readonly bool Enabled;
@@ -115,6 +109,9 @@ namespace ArchiSteamFarm {
[JsonProperty(Required = Required.DisallowNull)]
internal readonly bool UseLoginKeys = true;
[JsonProperty(Required = Required.DisallowNull)]
internal EBotBehaviour BotBehaviour { get; private set; } = EBotBehaviour.None;
[JsonProperty(Required = Required.DisallowNull)]
internal EPersonaState OnlineStatus { get; private set; } = EPersonaState.Online;
@@ -133,12 +130,12 @@ namespace ArchiSteamFarm {
private bool ShouldSerializeSensitiveDetails = true;
[JsonProperty(Required = Required.DisallowNull)]
private bool FarmOffline {
private bool DismissInventoryNotifications {
set {
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningDeprecated, nameof(FarmOffline), nameof(OnlineStatus)));
ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningDeprecated, nameof(DismissInventoryNotifications), nameof(BotBehaviour)));
if (value) {
OnlineStatus = EPersonaState.Offline;
BotBehaviour |= EBotBehaviour.DismissInventoryNotifications;
}
}
}
@@ -244,7 +241,8 @@ namespace ArchiSteamFarm {
None = 0,
RejectInvalidFriendInvites = 1,
RejectInvalidTrades = 2,
RejectInvalidGroupInvites = 4
RejectInvalidGroupInvites = 4,
DismissInventoryNotifications = 8
}
internal enum EFarmingOrder : byte {