mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-05 08:30:18 +00:00
Never restart cards farming module
There is enough logic to handle games added in the meantime already
This commit is contained in:
@@ -838,7 +838,11 @@ namespace ArchiSteamFarm {
|
||||
return "This bot instance is not connected!";
|
||||
}
|
||||
|
||||
CardsFarmer.RestartFarming().Forget();
|
||||
if (CardsFarmer.CurrentGamesFarming.Count > 0) {
|
||||
return "This bot instance is farming already!";
|
||||
}
|
||||
|
||||
CardsFarmer.StartFarming().Forget();
|
||||
return "Done!";
|
||||
}
|
||||
|
||||
@@ -1662,7 +1666,8 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
if (acceptedSomething) {
|
||||
CardsFarmer.RestartFarming().Forget();
|
||||
// Start farming, but only if we're not farming already
|
||||
CardsFarmer.StartFarming().Forget();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2017,8 +2022,8 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
if (callback.PurchaseResult == ArchiHandler.PurchaseResponseCallback.EPurchaseResult.OK) {
|
||||
// We will restart CF module to recalculate current status and decide about new optimal approach
|
||||
CardsFarmer.RestartFarming().Forget();
|
||||
// Start farming, but only if we're not farming already
|
||||
CardsFarmer.StartFarming().Forget();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,11 +187,6 @@ namespace ArchiSteamFarm {
|
||||
FarmingSemaphore.Release();
|
||||
}
|
||||
|
||||
internal async Task RestartFarming() {
|
||||
await StopFarming().ConfigureAwait(false);
|
||||
await StartFarming().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
internal void OnNewItemsNotification() {
|
||||
if (!NowFarming) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user