From c769e4a99a19fed5093fd8c6d45637d5939ef6fd Mon Sep 17 00:00:00 2001 From: bijx Date: Thu, 8 Jan 2026 20:10:22 -0500 Subject: [PATCH] Feat: SAM Radius arcs show when building cities (#2828) ## Description: Simple PR, but adds the feature where using the hotkey to build a city will show SAM radius layer to let user know safe areas to build. image ## 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: bijx --- src/client/graphics/layers/SAMRadiusLayer.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/graphics/layers/SAMRadiusLayer.ts b/src/client/graphics/layers/SAMRadiusLayer.ts index 8507241bc..a7f0da170 100644 --- a/src/client/graphics/layers/SAMRadiusLayer.ts +++ b/src/client/graphics/layers/SAMRadiusLayer.ts @@ -40,7 +40,10 @@ export class SAMRadiusLayer implements Layer { private handleToggleStructure(e: ToggleStructureEvent) { const types = e.structureTypes; - this.hoveredShow = !!types && types.indexOf(UnitType.SAMLauncher) !== -1; + this.hoveredShow = + !!types && + (types.indexOf(UnitType.SAMLauncher) !== -1 || + types.indexOf(UnitType.City) !== -1); this.updateVisibility(); } @@ -83,6 +86,7 @@ export class SAMRadiusLayer implements Layer { this.ghostShow = this.uiState.ghostStructure === UnitType.MissileSilo || this.uiState.ghostStructure === UnitType.SAMLauncher || + this.uiState.ghostStructure === UnitType.City || this.uiState.ghostStructure === UnitType.AtomBomb || this.uiState.ghostStructure === UnitType.HydrogenBomb; this.updateVisibility();