From 70906ed5cbe13a13df476395ea5c21785a704938 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Sun, 13 Aug 2017 04:24:20 +0200 Subject: [PATCH] Added betflip and betroll multiplier to .bce, closes #1498 --- src/NadekoBot/Common/BotConfigEditType.cs | 4 ++++ .../Services/Impl/BotConfigProvider.cs | 24 +++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/src/NadekoBot/Common/BotConfigEditType.cs b/src/NadekoBot/Common/BotConfigEditType.cs index 32b1415c..5eadbe9d 100644 --- a/src/NadekoBot/Common/BotConfigEditType.cs +++ b/src/NadekoBot/Common/BotConfigEditType.cs @@ -2,6 +2,10 @@ { public enum BotConfigEditType { + BetflipMultiplier, + Betroll100Multiplier, + Betroll67Multiplier, + Betroll91Multiplier, CurrencyGenerationChance, CurrencyGenerationCooldown, CurrencyName, diff --git a/src/NadekoBot/Services/Impl/BotConfigProvider.cs b/src/NadekoBot/Services/Impl/BotConfigProvider.cs index c18a0e1a..0ed97550 100644 --- a/src/NadekoBot/Services/Impl/BotConfigProvider.cs +++ b/src/NadekoBot/Services/Impl/BotConfigProvider.cs @@ -98,6 +98,30 @@ namespace NadekoBot.Services.Impl else return false; break; + case BotConfigEditType.Betroll100Multiplier: + if (float.TryParse(newValue, out var br100) && br100 > 0) + bc.Betroll100Multiplier = br100; + else + return false; + break; + case BotConfigEditType.Betroll91Multiplier: + if (int.TryParse(newValue, out var br91) && br91 > 0) + bc.Betroll91Multiplier = br91; + else + return false; + break; + case BotConfigEditType.Betroll67Multiplier: + if (int.TryParse(newValue, out var br67) && br67 > 0) + bc.Betroll67Multiplier = br67; + else + return false; + break; + case BotConfigEditType.BetflipMultiplier: + if (int.TryParse(newValue, out var bf) && bf > 0) + bc.BetflipMultiplier = bf; + else + return false; + break; default: return false; }