Add an option to set farming order

This commit is contained in:
stackia
2016-07-30 05:06:40 +08:00
parent ef5b108b34
commit 80abd3ed69
4 changed files with 94 additions and 24 deletions

View File

@@ -41,6 +41,12 @@ namespace ConfigGenerator {
ProtectedDataForCurrentUser
}
internal enum EFarmingOrder : byte {
Unordered,
MostCardDropRemainingFirst,
FewestCardDropRemainingFirst
}
[JsonProperty(Required = Required.DisallowNull)]
public bool Enabled { get; set; } = false;
@@ -120,6 +126,9 @@ namespace ConfigGenerator {
[JsonProperty(Required = Required.DisallowNull)]
public List<uint> GamesPlayedWhileIdle { get; set; } = new List<uint>();
[JsonProperty(Required = Required.DisallowNull)]
public EFarmingOrder FarmingOrder { get; set; } = EFarmingOrder.Unordered;
internal static BotConfig Load(string filePath) {
if (string.IsNullOrEmpty(filePath)) {
Logging.LogNullError(nameof(filePath));