1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

more lint fixes in hud/parts

This commit is contained in:
dgs4349 2020-10-09 18:51:37 -04:00
parent c09151d846
commit d8937fd3ec
4 changed files with 4 additions and 5 deletions

View File

@ -28,6 +28,7 @@ export class HUDBlueprintPlacer extends BaseHUDPart {
} }
initialize() { initialize() {
// @ts-ignore
this.root.hud.signals.buildingsSelectedForCopy.add(this.createBlueprintFromBuildings, this); this.root.hud.signals.buildingsSelectedForCopy.add(this.createBlueprintFromBuildings, this);
/** @type {TypedTrackedState<Blueprint?>} */ /** @type {TypedTrackedState<Blueprint?>} */

View File

@ -101,7 +101,7 @@ export class HUDKeybindingOverlay extends BaseHUDPart {
*/ */
get anythingSelectedOnMap() { get anythingSelectedOnMap() {
const selector = this.root.hud.parts.massSelector; const selector = this.root.hud.parts.massSelector;
return selector && selector.selectedUids.size > 0; return selector && selector.selectedEntities.size > 0;
} }
/** /**

View File

@ -25,9 +25,6 @@ export class HUDMassSelector extends BaseHUDPart {
/** @type {Set<Entity>} */ /** @type {Set<Entity>} */
this.selectedEntities = new Set(); this.selectedEntities = new Set();
/** @type {number} */
this.selectedUids = 42;
this.root.signals.entityQueuedForDestroy.add(this.onEntityDestroyed, this); this.root.signals.entityQueuedForDestroy.add(this.onEntityDestroyed, this);
this.root.hud.signals.pasteBlueprintRequested.add(this.clearSelection, this); this.root.hud.signals.pasteBlueprintRequested.add(this.clearSelection, this);

View File

@ -8,6 +8,7 @@ import { KEYMAPPINGS } from "../../key_action_mapper";
import { enumHubGoalRewards } from "../../tutorial_goals"; import { enumHubGoalRewards } from "../../tutorial_goals";
import { BaseHUDPart } from "../base_hud_part"; import { BaseHUDPart } from "../base_hud_part";
// @ts-ignore
const copy = require("clipboard-copy"); const copy = require("clipboard-copy");
const wiresBackgroundDpi = 4; const wiresBackgroundDpi = 4;
@ -61,7 +62,7 @@ export class HUDWiresOverlay extends BaseHUDPart {
const desiredAlpha = this.root.currentLayer === "wires" ? 1.0 : 0.0; const desiredAlpha = this.root.currentLayer === "wires" ? 1.0 : 0.0;
// On low performance, skip the fade // 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; this.currentAlpha = desiredAlpha;
} else { } else {
this.currentAlpha = lerp(this.currentAlpha, desiredAlpha, 0.12); this.currentAlpha = lerp(this.currentAlpha, desiredAlpha, 0.12);