Add Paused bot config property, closes #344

This commit is contained in:
JustArchi 2016-10-01 21:09:24 +02:00
parent ab0bbcf924
commit 96dc3246b8
4 changed files with 12 additions and 0 deletions

View file

@ -269,6 +269,10 @@ namespace ArchiSteamFarm {
throw new ArgumentException("That bot is already defined!");
}
if (BotConfig.Paused) {
CardsFarmer.Pause().Wait();
}
if (!BotConfig.StartOnLaunch) {
return;
}

View file

@ -50,6 +50,9 @@ namespace ArchiSteamFarm {
[JsonProperty(Required = Required.DisallowNull)]
internal readonly bool Enabled = false;
[JsonProperty(Required = Required.DisallowNull)]
internal readonly bool Paused = false;
[JsonProperty(Required = Required.DisallowNull)]
internal readonly bool StartOnLaunch = true;

View file

@ -1,5 +1,6 @@
{
"Enabled": false,
"Paused": false,
"StartOnLaunch": true,
"SteamLogin": null,
"SteamPassword": null,

View file

@ -57,6 +57,10 @@ namespace ConfigGenerator {
[JsonProperty(Required = Required.DisallowNull)]
public bool Enabled { get; set; } = false;
[Category("\tAdvanced")]
[JsonProperty(Required = Required.DisallowNull)]
public bool Paused { get; set; } = false;
[Category("\tAdvanced")]
[JsonProperty(Required = Required.DisallowNull)]
public bool StartOnLaunch { get; set; } = true;