Rename FarmNonRefundableGamesOnly to SkipRefundableGames

This commit is contained in:
JustArchi
2021-05-11 23:14:33 +02:00
parent e5872156c3
commit 00c217959d
2 changed files with 10 additions and 10 deletions

View File

@@ -1091,7 +1091,7 @@ namespace ArchiSteamFarm.Steam {
return (0, DateTime.MaxValue, true);
}
if ((hoursPlayed < CardsFarmer.HoursForRefund) && BotConfig.FarmNonRefundableGamesOnly) {
if ((hoursPlayed < CardsFarmer.HoursForRefund) && BotConfig.SkipRefundableGames) {
DateTime mostRecent = DateTime.MinValue;
foreach (uint packageID in packageIDs) {

View File

@@ -63,9 +63,6 @@ namespace ArchiSteamFarm.Steam.Storage {
[PublicAPI]
public const bool DefaultEnabled = false;
[PublicAPI]
public const bool DefaultFarmNonRefundableGamesOnly = false;
[PublicAPI]
public const bool DefaultFarmPriorityQueueOnly = false;
@@ -93,6 +90,9 @@ namespace ArchiSteamFarm.Steam.Storage {
[PublicAPI]
public const bool DefaultShutdownOnFarmingFinished = false;
[PublicAPI]
public const bool DefaultSkipRefundableGames = false;
[PublicAPI]
public const string? DefaultSteamLogin = null;
@@ -169,9 +169,6 @@ namespace ArchiSteamFarm.Steam.Storage {
[JsonProperty(Required = Required.DisallowNull)]
public ImmutableList<EFarmingOrder> FarmingOrders { get; private set; } = DefaultFarmingOrders;
[JsonProperty(Required = Required.DisallowNull)]
public bool FarmNonRefundableGamesOnly { get; private set; } = DefaultFarmNonRefundableGamesOnly;
[JsonProperty(Required = Required.DisallowNull)]
public bool FarmPriorityQueueOnly { get; private set; } = DefaultFarmPriorityQueueOnly;
@@ -208,6 +205,9 @@ namespace ArchiSteamFarm.Steam.Storage {
[JsonProperty(Required = Required.DisallowNull)]
public bool ShutdownOnFarmingFinished { get; private set; } = DefaultShutdownOnFarmingFinished;
[JsonProperty(Required = Required.DisallowNull)]
public bool SkipRefundableGames { get; private set; } = DefaultSkipRefundableGames;
[JsonProperty]
public string? SteamLogin {
get => BackingSteamLogin;
@@ -319,9 +319,9 @@ namespace ArchiSteamFarm.Steam.Storage {
[JsonProperty(Required = Required.DisallowNull)]
private bool IdleRefundableGames {
set {
ASF.ArchiLogger.LogGenericWarning(string.Format(CultureInfo.CurrentCulture, Strings.WarningDeprecated, nameof(IdleRefundableGames), nameof(FarmNonRefundableGamesOnly)));
ASF.ArchiLogger.LogGenericWarning(string.Format(CultureInfo.CurrentCulture, Strings.WarningDeprecated, nameof(IdleRefundableGames), nameof(SkipRefundableGames)));
FarmNonRefundableGamesOnly = !value;
SkipRefundableGames = !value;
}
}
@@ -543,7 +543,6 @@ namespace ArchiSteamFarm.Steam.Storage {
public bool ShouldSerializeCustomGamePlayedWhileIdle() => !Saving || (CustomGamePlayedWhileIdle != DefaultCustomGamePlayedWhileIdle);
public bool ShouldSerializeEnabled() => !Saving || (Enabled != DefaultEnabled);
public bool ShouldSerializeFarmingOrders() => !Saving || ((FarmingOrders != DefaultFarmingOrders) && !FarmingOrders.SequenceEqual(DefaultFarmingOrders));
public bool ShouldSerializeFarmNonRefundableGamesOnly() => !Saving || (FarmNonRefundableGamesOnly != DefaultFarmNonRefundableGamesOnly);
public bool ShouldSerializeFarmPriorityQueueOnly() => !Saving || (FarmPriorityQueueOnly != DefaultFarmPriorityQueueOnly);
public bool ShouldSerializeGamesPlayedWhileIdle() => !Saving || ((GamesPlayedWhileIdle != DefaultGamesPlayedWhileIdle) && !GamesPlayedWhileIdle.SetEquals(DefaultGamesPlayedWhileIdle));
public bool ShouldSerializeHoursUntilCardDrops() => !Saving || (HoursUntilCardDrops != DefaultHoursUntilCardDrops);
@@ -556,6 +555,7 @@ namespace ArchiSteamFarm.Steam.Storage {
public bool ShouldSerializeSendOnFarmingFinished() => !Saving || (SendOnFarmingFinished != DefaultSendOnFarmingFinished);
public bool ShouldSerializeSendTradePeriod() => !Saving || (SendTradePeriod != DefaultSendTradePeriod);
public bool ShouldSerializeShutdownOnFarmingFinished() => !Saving || (ShutdownOnFarmingFinished != DefaultShutdownOnFarmingFinished);
public bool ShouldSerializeSkipRefundableGames() => !Saving || (SkipRefundableGames != DefaultSkipRefundableGames);
public bool ShouldSerializeSSteamMasterClanID() => !Saving;
public bool ShouldSerializeSteamLogin() => Saving && (SteamLogin != DefaultSteamLogin);
public bool ShouldSerializeSteamMasterClanID() => !Saving || (SteamMasterClanID != DefaultSteamMasterClanID);