diff --git a/src/js/game/hud/parts/blueprint_placer.js b/src/js/game/hud/parts/blueprint_placer.js index 92f5a0cb..141789a1 100644 --- a/src/js/game/hud/parts/blueprint_placer.js +++ b/src/js/game/hud/parts/blueprint_placer.js @@ -28,6 +28,7 @@ export class HUDBlueprintPlacer extends BaseHUDPart { } initialize() { + // @ts-ignore this.root.hud.signals.buildingsSelectedForCopy.add(this.createBlueprintFromBuildings, this); /** @type {TypedTrackedState} */ diff --git a/src/js/game/hud/parts/keybinding_overlay.js b/src/js/game/hud/parts/keybinding_overlay.js index 65919d3c..f822b175 100644 --- a/src/js/game/hud/parts/keybinding_overlay.js +++ b/src/js/game/hud/parts/keybinding_overlay.js @@ -101,7 +101,7 @@ export class HUDKeybindingOverlay extends BaseHUDPart { */ get anythingSelectedOnMap() { const selector = this.root.hud.parts.massSelector; - return selector && selector.selectedUids.size > 0; + return selector && selector.selectedEntities.size > 0; } /** diff --git a/src/js/game/hud/parts/mass_selector.js b/src/js/game/hud/parts/mass_selector.js index 72f4ca3e..5a34ec96 100644 --- a/src/js/game/hud/parts/mass_selector.js +++ b/src/js/game/hud/parts/mass_selector.js @@ -25,9 +25,6 @@ export class HUDMassSelector extends BaseHUDPart { /** @type {Set} */ this.selectedEntities = new Set(); - /** @type {number} */ - this.selectedUids = 42; - this.root.signals.entityQueuedForDestroy.add(this.onEntityDestroyed, this); this.root.hud.signals.pasteBlueprintRequested.add(this.clearSelection, this); diff --git a/src/js/game/hud/parts/wires_overlay.js b/src/js/game/hud/parts/wires_overlay.js index 752d9cb3..9d9bbd61 100644 --- a/src/js/game/hud/parts/wires_overlay.js +++ b/src/js/game/hud/parts/wires_overlay.js @@ -8,6 +8,7 @@ import { KEYMAPPINGS } from "../../key_action_mapper"; import { enumHubGoalRewards } from "../../tutorial_goals"; import { BaseHUDPart } from "../base_hud_part"; +// @ts-ignore const copy = require("clipboard-copy"); const wiresBackgroundDpi = 4; @@ -61,7 +62,7 @@ export class HUDWiresOverlay extends BaseHUDPart { const desiredAlpha = this.root.currentLayer === "wires" ? 1.0 : 0.0; // On low performance, skip the fade - if (this.root.entityMgr.entities.length > 5000 || this.root.dynamicTickrate.averageFps < 50) { + if (this.root.entityMgr.entities.size > 5000 || this.root.dynamicTickrate.averageFps < 50) { this.currentAlpha = desiredAlpha; } else { this.currentAlpha = lerp(this.currentAlpha, desiredAlpha, 0.12);