Lots of thanks to @il-marc for helping me with most of lockdown tests.
This commit is contained in:
JustArchi
2017-02-24 20:18:24 +01:00
parent 4de38465a4
commit 69358779b4
3 changed files with 27 additions and 5 deletions

View File

@@ -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) {

View File

@@ -105,6 +105,15 @@ namespace ArchiSteamFarm.Localization {
}
}
/// <summary>
/// Looks up a localized string similar to This account is locked, idling process is permanently unavailable!.
/// </summary>
internal static string BotAccountLocked {
get {
return ResourceManager.GetString("BotAccountLocked", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Account is currently being used, ASF will resume idling when it&apos;s free....
/// </summary>
@@ -564,6 +573,15 @@ namespace ArchiSteamFarm.Localization {
}
}
/// <summary>
/// Looks up a localized string similar to Bot is locked and can&apos;t drop any cards through idling..
/// </summary>
internal static string BotStatusLocked {
get {
return ResourceManager.GetString("BotStatusLocked", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Bot is not connected..
/// </summary>

View File

@@ -701,4 +701,10 @@ StackTrace:
<value>{0} V{1}</value>
<comment>{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.</comment>
</data>
<data name="BotAccountLocked" xml:space="preserve">
<value>This account is locked, idling process is permanently unavailable!</value>
</data>
<data name="BotStatusLocked" xml:space="preserve">
<value>Bot is locked and can't drop any cards through idling.</value>
</data>
</root>