Merging patch from A Log

This commit is contained in:
barelyprofessional
2025-10-09 20:38:56 -05:00
parent 518d001d82
commit 280220cd1d

View File

@@ -348,7 +348,7 @@ public class Planes : ICommand
while (counter < 0) while (counter < 0)
{ {
counter = fullCounter % 13 - 3; counter = fullCounter % 13 - 3;
planesDisplay = GetGameBoard(fullCounter, planesBoard, planesBoard2, plane, carrierCount, noseUp); planesDisplay = GetPreGameBoard(fullCounter, planesBoard, plane, carrierCount, noseUp);
await botInstance.KfClient.EditMessageAsync(msgId.ChatMessageId!.Value, planesDisplay); await botInstance.KfClient.EditMessageAsync(msgId.ChatMessageId!.Value, planesDisplay);
await Task.Delay(TimeSpan.FromMilliseconds(frameLength), ctx); await Task.Delay(TimeSpan.FromMilliseconds(frameLength), ctx);
fullCounter++; fullCounter++;
@@ -361,18 +361,18 @@ public class Planes : ICommand
frameCounter++; frameCounter++;
try try
{ {
switch (planesBoard[plane.Height, fullCounter]) switch (planesBoard[plane.Height, counter])
{ {
case 0: //do nothing plane hit neutral space case 0: //do nothing plane hit neutral space
neutral = true; neutral = true;
break; break;
case 1: //hit rocket case 1: //hit rocket
planesBoard[plane.Height, fullCounter] = 0; //plane consumes rocket planesBoard[plane.Height, counter] = 0; //plane consumes rocket
plane.HitRocket(); plane.HitRocket();
noseUp = false; noseUp = false;
break; break;
case 2: //hit multi case 2: //hit multi
planesBoard[plane.Height, fullCounter] = 0; //plane consumes multi planesBoard[plane.Height, counter] = 0; //plane consumes multi
plane.HitMulti(); plane.HitMulti();
noseUp = true; noseUp = true;
break; break;
@@ -384,10 +384,10 @@ public class Planes : ICommand
catch (IndexOutOfRangeException e) catch (IndexOutOfRangeException e)
{ {
await botInstance.SendChatMessageAsync( await botInstance.SendChatMessageAsync(
$"Something went wrong, error code 2. Counter: {counter} Counter%: {counter % 13 - 3} Height: {plane.Height}[br]{e}", $"Something went wrong, error code 2. Counter: {fullCounter} Counter%: {counter} Height: {plane.Height}[br]{e}",
true, autoDeleteAfter: cleanupDelay); true, autoDeleteAfter: cleanupDelay);
logger.Error( logger.Error(
$"Something went wrong, error code 2. Counter: {counter} Counter%: {counter % 13 - 3} Height: {plane.Height}"); $"Something went wrong, error code 2. Counter: {fullCounter} Counter%: {counter} Height: {plane.Height}");
logger.Error(e); logger.Error(e);
return; return;
} }
@@ -398,7 +398,7 @@ public class Planes : ICommand
else await Task.Delay(TimeSpan.FromMilliseconds(frameLength / (3 * (frameCounter - 1))), ctx); else await Task.Delay(TimeSpan.FromMilliseconds(frameLength / (3 * (frameCounter - 1))), ctx);
} }
else await Task.Delay(TimeSpan.FromMilliseconds(frameLength / (3 * frameCounter)), ctx); //if not the last frame use a fraction of the remaining frame time else await Task.Delay(TimeSpan.FromMilliseconds(frameLength / (3 * frameCounter)), ctx); //if not the last frame use a fraction of the remaining frame time
planesDisplay = GetGameBoard(counter, planesBoard, planesBoard2, plane, carrierCount, noseUp); planesDisplay = GetGameBoard(fullCounter, planesBoard, planesBoard2, plane, carrierCount, noseUp);
planesDisplay += $"[br]Multi: {plane.MultiTracker}x"; planesDisplay += $"[br]Multi: {plane.MultiTracker}x";
for (var i = 0; i < 10; i++) for (var i = 0; i < 10; i++)
{ {
@@ -563,7 +563,7 @@ public class Planes : ICommand
else //this leaves rows 0-5 and columns 0-10, exactly what we need for the board else //this leaves rows 0-5 and columns 0-10, exactly what we need for the board
{ {
logger.Info($"Attempting to get planeboard info while generating main frames. Board: {useBoard} | Row: {row} | Column: {column} | Counter: {counter}"); logger.Info($"Attempting to get planeboard info while generating main frames. Board: {useBoard} | Row: {row} | Column: {column} | Counter: {counter}");
switch (planesBoards[useBoard][row, column + counter]) switch (planesBoards[useBoard][row, column+counter])
{ {
case 0: case 0:
output += Air; output += Air;