move TransformHandler/UIState/Controller out of graphics/, drop dead GhostStructureChangedEvent

graphics/ was a canvas2D-era directory name — TransformHandler, UIState,
and the Controller interface aren't graphics, they're cross-cutting
client state. Hoist them to src/client/ so the path matches what they
are. GhostStructureChangedEvent had three emitters and zero listeners;
removed.
This commit is contained in:
evanpelle
2026-05-17 12:24:41 -07:00
parent 7b1557b886
commit eb046e5a58
40 changed files with 69 additions and 84 deletions
@@ -16,21 +16,20 @@ import {
} from "../../core/game/Game";
import { TileRef } from "../../core/game/GameMap";
import { GameView } from "../../core/game/GameView";
import { Controller } from "../graphics/layers/Controller";
import { TransformHandler } from "../graphics/TransformHandler";
import { UIState } from "../graphics/UIState";
import { Controller } from "../Controller";
import {
ConfirmGhostStructureEvent,
GhostStructureChangedEvent,
MouseMoveEvent,
MouseUpEvent,
} from "../InputHandler";
import { GameView as WebGLGameView } from "../render/gl";
import type { GhostPreviewData } from "../render/types";
import { TransformHandler } from "../TransformHandler";
import {
BuildUnitIntentEvent,
SendUpgradeStructureIntentEvent,
} from "../Transport";
import { UIState } from "../UIState";
/** True for nuke types (AtomBomb, HydrogenBomb): ghost is preserved after placement so user can place multiple or keep selection (Enter/key confirm). */
export function shouldPreserveGhostAfterBuild(unitType: UnitType): boolean {
@@ -314,7 +313,6 @@ export class BuildPreviewController implements Controller {
private removeGhostStructure() {
this.clearGhostStructure();
this.uiState.ghostStructure = null;
this.eventBus.emit(new GhostStructureChangedEvent(null));
}
private resolveGhostRangeLevel(