mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-11-14 00:47:25 +00:00
Add Paused bot config property, closes #344
This commit is contained in:
parent
ab0bbcf924
commit
96dc3246b8
4 changed files with 12 additions and 0 deletions
|
@ -269,6 +269,10 @@ namespace ArchiSteamFarm {
|
||||||
throw new ArgumentException("That bot is already defined!");
|
throw new ArgumentException("That bot is already defined!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (BotConfig.Paused) {
|
||||||
|
CardsFarmer.Pause().Wait();
|
||||||
|
}
|
||||||
|
|
||||||
if (!BotConfig.StartOnLaunch) {
|
if (!BotConfig.StartOnLaunch) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,9 @@ namespace ArchiSteamFarm {
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
internal readonly bool Enabled = false;
|
internal readonly bool Enabled = false;
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
internal readonly bool Paused = false;
|
||||||
|
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
internal readonly bool StartOnLaunch = true;
|
internal readonly bool StartOnLaunch = true;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"Enabled": false,
|
"Enabled": false,
|
||||||
|
"Paused": false,
|
||||||
"StartOnLaunch": true,
|
"StartOnLaunch": true,
|
||||||
"SteamLogin": null,
|
"SteamLogin": null,
|
||||||
"SteamPassword": null,
|
"SteamPassword": null,
|
||||||
|
|
|
@ -57,6 +57,10 @@ namespace ConfigGenerator {
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public bool Enabled { get; set; } = false;
|
public bool Enabled { get; set; } = false;
|
||||||
|
|
||||||
|
[Category("\tAdvanced")]
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
public bool Paused { get; set; } = false;
|
||||||
|
|
||||||
[Category("\tAdvanced")]
|
[Category("\tAdvanced")]
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
public bool StartOnLaunch { get; set; } = true;
|
public bool StartOnLaunch { get; set; } = true;
|
||||||
|
|
Loading…
Reference in a new issue