@@ -8,7 +8,7 @@ import type {
88 PlayerView ,
99 UnitView ,
1010} from "../../../core/game/GameView" ;
11- import { ToggleStructureEvent } from "../../InputHandler" ;
11+ import { AlternateViewEvent , ToggleStructureEvent } from "../../InputHandler" ;
1212import { UIState } from "../UIState" ;
1313import { Layer } from "./Layer" ;
1414import { NukeRenderUtilLayer } from "./NukeRenderUtilLayer" ;
@@ -31,6 +31,7 @@ interface SamInfo {
3131 */
3232export class SAMRadiusLayer implements Layer {
3333 private readonly theme : Theme ;
34+ private alternativeView : boolean = false ;
3435 private readonly samLaunchers : Map < number , SamInfo > = new Map ( ) ; // Track SAM launcher IDs -> SAM info
3536 // track whether the stroke should be shown due to hover or due to an active build ghost
3637 private hoveredShow : boolean = false ;
@@ -68,6 +69,9 @@ export class SAMRadiusLayer implements Layer {
6869 this . eventBus . on ( ToggleStructureEvent , ( e ) =>
6970 this . handleToggleStructure ( e ) ,
7071 ) ;
72+ this . eventBus . on ( AlternateViewEvent , ( e ) => {
73+ this . alternativeView = e . alternateView ;
74+ } ) ;
7175 }
7276
7377 shouldTransform ( ) : boolean {
@@ -290,7 +294,10 @@ export class SAMRadiusLayer implements Layer {
290294 ctx . beginPath ( ) ;
291295 ctx . arc ( a . x + offsetX , a . y + offsetY , a . r , s , e ) ;
292296
293- const nukeMode = this . nukeRenderUtilLayer . isNukeGhostActive ( ) ;
297+ // nuke mode shows transparent radii and other predictions
298+ const nukeMode =
299+ this . nukeRenderUtilLayer . isNukeGhostActive ( ) && ! this . alternativeView ;
300+
294301 // players who are targeted by nuke are stressed
295302 const stressed = this . nukeRenderUtilLayer
296303 . getAllianceStressedPlayers ( )
0 commit comments