diff --git a/KfChatDotNetBot/Commands/Kasino/PlanesCommand.cs b/KfChatDotNetBot/Commands/Kasino/PlanesCommand.cs index c46b668..b39b84a 100644 --- a/KfChatDotNetBot/Commands/Kasino/PlanesCommand.cs +++ b/KfChatDotNetBot/Commands/Kasino/PlanesCommand.cs @@ -119,7 +119,7 @@ public class Planes : ICommand _riggedWin = true; } } - + var size = (await SettingsProvider.GetValueAsync(BuiltIn.Keys.KasinoPlanesSize)).ToType(); var planesBoard = CreatePlanesBoard(gambler,0); var planesBoard2 = CreatePlanesBoard(gambler); var planesBoard3 = CreatePlanesBoard(gambler); @@ -129,7 +129,7 @@ public class Planes : ICommand var fullCounter = 0; var noseUp = true; var planesDisplay = GetPreGameBoard(-3, planesBoard2, plane, CarrierCount, noseUp); - var msgId = await botInstance.SendChatMessageAsync(planesDisplay, true); + var msgId = await botInstance.SendChatMessageAsync($"[size={size}]" + planesDisplay, true); var num = 0; while (msgId.ChatMessageUuid == null) { @@ -160,7 +160,7 @@ public class Planes : ICommand } var winnings = plane.MultiTracker * wager; planesDisplay += $"Winnings: {await winnings.FormatKasinoCurrencyAsync()}"; - await botInstance.KfClient.EditMessageAsync(msgId.ChatMessageUuid, planesDisplay); + await botInstance.KfClient.EditMessageAsync(msgId.ChatMessageUuid, $"[size={size}]" + planesDisplay); } var neutral = false; @@ -171,7 +171,7 @@ public class Planes : ICommand { counter = (fullCounter - 3) % 24; planesDisplay = GetPreGameBoard(fullCounter, planesBoard2, plane, CarrierCount, noseUp); - await botInstance.KfClient.EditMessageAsync(msgId.ChatMessageUuid, planesDisplay); + await botInstance.KfClient.EditMessageAsync(msgId.ChatMessageUuid, $"[size={size}]" + planesDisplay); await Task.Delay(TimeSpan.FromMilliseconds(frameLength), ctx); fullCounter++; } @@ -240,7 +240,7 @@ public class Planes : ICommand logger.Error(e); throw; } - planesDisplay += $"[br]Multi: {plane.MultiTracker}x"; + planesDisplay += $"[/size][br]Multi: {plane.MultiTracker}x"; for (var i = 0; i < 10; i++) { planesDisplay += BlankSpace; @@ -248,7 +248,7 @@ public class Planes : ICommand var winnings = plane.MultiTracker * wager; planesDisplay += $"Winnings: {await winnings.FormatKasinoCurrencyAsync()}"; - await botInstance.KfClient.EditMessageAsync(msgId.ChatMessageUuid, planesDisplay); + await botInstance.KfClient.EditMessageAsync(msgId.ChatMessageUuid, $"[size={size}]" + planesDisplay); if (plane.Height > 5) { break; @@ -276,7 +276,7 @@ public class Planes : ICommand var win = plane.MultiTracker * wager; newBalance = await Money.NewWagerAsync(gambler.Id, wager, win, WagerGame.Planes, ct: ctx); planesDisplay = GetGameBoard(fullCounter, planesBoards, plane, CarrierCount, noseUp); - await botInstance.KfClient.EditMessageAsync(msgId.ChatMessageUuid, planesDisplay); + await botInstance.KfClient.EditMessageAsync(msgId.ChatMessageUuid, $"[size={size}]" + planesDisplay); await botInstance.SendChatMessageAsync( $"{user.FormatUsername()}, you [color={colors[BuiltIn.Keys.KiwiFarmsGreenColor].Value}]successfully landed with {await win.FormatKasinoCurrencyAsync()} from a total {plane.MultiTracker:N2}x multi![/color]. Your balance is now: {await newBalance.FormatKasinoCurrencyAsync()}", true, autoDeleteAfter: cleanupDelay); @@ -294,7 +294,7 @@ public class Planes : ICommand newBalance = await Money.NewWagerAsync(gambler.Id, wager, -wager, WagerGame.Planes, ct: ctx); planesDisplay = GetGameBoard(fullCounter, planesBoards, plane, CarrierCount, noseUp); await Task.Delay(TimeSpan.FromMilliseconds(frameLength), ctx); - await botInstance.KfClient.EditMessageAsync(msgId.ChatMessageUuid, planesDisplay); + await botInstance.KfClient.EditMessageAsync(msgId.ChatMessageUuid, $"[size={size}]" + planesDisplay); await botInstance.SendChatMessageAsync( $"{user.FormatUsername()}, you [color={colors[BuiltIn.Keys.KiwiFarmsRedColor].Value}]crashed![/color] Your balance is now: {await newBalance.FormatKasinoCurrencyAsync()}", true, autoDeleteAfter: cleanupDelay); @@ -368,7 +368,7 @@ public class Planes : ICommand output += "[br]"; } - return output; + return output.GridToTable(); } private string GetGameBoard(int fullCounter, List planesBoards, Plane plane, int carrierCount, bool noseUp) @@ -445,7 +445,7 @@ public class Planes : ICommand } output += "[br]"; } - return output; + return output.GridToTable(); } private int[,] CreatePlanesBoard(GamblerDbModel gambler, int forceTiles = -1) diff --git a/KfChatDotNetBot/Settings/BuiltIn.cs b/KfChatDotNetBot/Settings/BuiltIn.cs index 6925404..4bb5e46 100644 --- a/KfChatDotNetBot/Settings/BuiltIn.cs +++ b/KfChatDotNetBot/Settings/BuiltIn.cs @@ -591,6 +591,8 @@ public static class BuiltIn public static string DLiveEnabled = "DLive.Enabled"; [BuiltInSetting("Size (%) of the Keno board", SettingValueType.Text, "70", WholeNumberRegex)] public static string KasinoKenoSize = "Kasino.Keno.Size"; + [BuiltInSetting("Size (%) of the Planes board", SettingValueType.Text, "70", WholeNumberRegex)] + public static string KasinoPlanesSize = "Kasino.Planes.Size"; } } @@ -638,4 +640,4 @@ public class BuiltInSetting( ValueType = ValueType }; } -} \ No newline at end of file +}