From 69358779b437c927bca31ee8f6a8c5ebca6165fd Mon Sep 17 00:00:00 2001 From: JustArchi Date: Fri, 24 Feb 2017 20:18:24 +0100 Subject: [PATCH] Closes #469 Lots of thanks to @il-marc for helping me with most of lockdown tests. --- ArchiSteamFarm/Bot.cs | 8 +++----- .../Localization/Strings.Designer.cs | 18 ++++++++++++++++++ ArchiSteamFarm/Localization/Strings.resx | 6 ++++++ 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/ArchiSteamFarm/Bot.cs b/ArchiSteamFarm/Bot.cs index dc7711677..c918d71e9 100755 --- a/ArchiSteamFarm/Bot.cs +++ b/ArchiSteamFarm/Bot.cs @@ -60,7 +60,7 @@ namespace ArchiSteamFarm { internal readonly ArchiWebHandler ArchiWebHandler; internal readonly string BotName; - internal bool CanReceiveSteamCards => !IsAccountLimited; // TODO: What about IsAccountLocked? + internal bool CanReceiveSteamCards => !IsAccountLimited && !IsAccountLocked; internal bool HasMobileAuthenticator => BotDatabase?.MobileAuthenticator != null; internal bool IsConnectedAndLoggedOn => (SteamClient?.IsConnected == true) && (SteamClient.SteamID != null); internal bool IsPlayingPossible => !PlayingBlocked && (LibraryLockedBySteamID == 0); @@ -1475,8 +1475,7 @@ namespace ArchiSteamFarm { } if (IsAccountLocked) { - // TODO: Enable warning with generic description once we check if locked accounts can farm cards - //ArchiLogger.LogGenericWarning(Strings.BotAccountLocked); + ArchiLogger.LogGenericWarning(Strings.BotAccountLocked); } if ((callback.CellID != 0) && (Program.GlobalDatabase.CellID != callback.CellID)) { @@ -2790,8 +2789,7 @@ namespace ArchiSteamFarm { } if (IsAccountLocked) { - // TODO: Enable warning with generic description once we check if locked accounts can farm cards - //return FormatBotResponse(Strings.BotStatusLocked); + return FormatBotResponse(Strings.BotStatusLocked); } if (CardsFarmer.CurrentGamesFarming.Count == 0) { diff --git a/ArchiSteamFarm/Localization/Strings.Designer.cs b/ArchiSteamFarm/Localization/Strings.Designer.cs index 400e7d5e9..efa5d719a 100644 --- a/ArchiSteamFarm/Localization/Strings.Designer.cs +++ b/ArchiSteamFarm/Localization/Strings.Designer.cs @@ -105,6 +105,15 @@ namespace ArchiSteamFarm.Localization { } } + /// + /// Looks up a localized string similar to This account is locked, idling process is permanently unavailable!. + /// + internal static string BotAccountLocked { + get { + return ResourceManager.GetString("BotAccountLocked", resourceCulture); + } + } + /// /// Looks up a localized string similar to Account is currently being used, ASF will resume idling when it's free.... /// @@ -564,6 +573,15 @@ namespace ArchiSteamFarm.Localization { } } + /// + /// Looks up a localized string similar to Bot is locked and can't drop any cards through idling.. + /// + internal static string BotStatusLocked { + get { + return ResourceManager.GetString("BotStatusLocked", resourceCulture); + } + } + /// /// Looks up a localized string similar to Bot is not connected.. /// diff --git a/ArchiSteamFarm/Localization/Strings.resx b/ArchiSteamFarm/Localization/Strings.resx index 088d459ce..dcf9a9b5e 100644 --- a/ArchiSteamFarm/Localization/Strings.resx +++ b/ArchiSteamFarm/Localization/Strings.resx @@ -701,4 +701,10 @@ StackTrace: {0} V{1} {0} will be replaced by program's name (e.g. "ASF"), {1} will be replaced by program's version (e.g. "1.0.0.0"). This string typically has nothing to translate and you should leave it as it is, unless you need to change the format, e.g. in RTL languages. + + This account is locked, idling process is permanently unavailable! + + + Bot is locked and can't drop any cards through idling. + \ No newline at end of file