From f4f7ae392929227c81f05177d0ae1c3337354dcd Mon Sep 17 00:00:00 2001 From: VariableVince <24507472+VariableVince@users.noreply.github.com> Date: Wed, 18 Feb 2026 21:21:19 +0100 Subject: [PATCH] Cleanup: comments in BuildMenu and error messages in worker.worker (#3233) ## Description: PR 1/x in effort to break up PR https://github.com/openfrontio/OpenFrontIO/pull/3220. Please see if these can be merged for v30. - **BuildMenu**: remove one redundant comment about replacing an icon (which has been done long ago already). And fix typo in one other comment. - **Worker.worker**: correct some existing error messages. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: tryout33 --- src/client/graphics/layers/BuildMenu.ts | 3 +-- src/core/worker/Worker.worker.ts | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/client/graphics/layers/BuildMenu.ts b/src/client/graphics/layers/BuildMenu.ts index e2e46f9b1..5ac5fa0e0 100644 --- a/src/client/graphics/layers/BuildMenu.ts +++ b/src/client/graphics/layers/BuildMenu.ts @@ -88,7 +88,6 @@ export const buildTable: BuildItemDisplay[][] = [ key: "unit_type.missile_silo", countable: true, }, - // needs new icon { unitType: UnitType.SAMLauncher, icon: samlauncherIcon, @@ -498,7 +497,7 @@ export class BuildMenu extends LitElement implements Layer { this.requestUpdate(); }); - // removed disabled buildings from the buildtable + // remove disabled buildings from the buildtable this.filteredBuildTable = this.getBuildableUnits(); } diff --git a/src/core/worker/Worker.worker.ts b/src/core/worker/Worker.worker.ts index 4b26f6783..aa61da3de 100644 --- a/src/core/worker/Worker.worker.ts +++ b/src/core/worker/Worker.worker.ts @@ -103,7 +103,7 @@ ctx.addEventListener("message", async (e: MessageEvent) => { result: actions, } as PlayerActionsResultMessage); } catch (error) { - console.error("Failed to check borders:", error); + console.error("Failed to get actions:", error); throw error; } break; @@ -120,7 +120,7 @@ ctx.addEventListener("message", async (e: MessageEvent) => { result: profile, } as PlayerProfileResultMessage); } catch (error) { - console.error("Failed to check borders:", error); + console.error("Failed to get profile:", error); throw error; } break;