diff --git a/ArchiSteamFarm/Bot.cs b/ArchiSteamFarm/Bot.cs index 6685cb1af..3a11d5174 100755 --- a/ArchiSteamFarm/Bot.cs +++ b/ArchiSteamFarm/Bot.cs @@ -269,6 +269,10 @@ namespace ArchiSteamFarm { throw new ArgumentException("That bot is already defined!"); } + if (BotConfig.Paused) { + CardsFarmer.Pause().Wait(); + } + if (!BotConfig.StartOnLaunch) { return; } diff --git a/ArchiSteamFarm/BotConfig.cs b/ArchiSteamFarm/BotConfig.cs index a5fcf2fd4..6dabd1a2d 100644 --- a/ArchiSteamFarm/BotConfig.cs +++ b/ArchiSteamFarm/BotConfig.cs @@ -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; diff --git a/ArchiSteamFarm/config/example.json b/ArchiSteamFarm/config/example.json index 853566206..c8e403413 100644 --- a/ArchiSteamFarm/config/example.json +++ b/ArchiSteamFarm/config/example.json @@ -1,5 +1,6 @@ { "Enabled": false, + "Paused": false, "StartOnLaunch": true, "SteamLogin": null, "SteamPassword": null, diff --git a/ConfigGenerator/BotConfig.cs b/ConfigGenerator/BotConfig.cs index 4e281bc4c..9119748f3 100644 --- a/ConfigGenerator/BotConfig.cs +++ b/ConfigGenerator/BotConfig.cs @@ -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;