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:
parent
c09151d846
commit
d8937fd3ec
@ -28,6 +28,7 @@ export class HUDBlueprintPlacer extends BaseHUDPart {
|
||||
}
|
||||
|
||||
initialize() {
|
||||
// @ts-ignore
|
||||
this.root.hud.signals.buildingsSelectedForCopy.add(this.createBlueprintFromBuildings, this);
|
||||
|
||||
/** @type {TypedTrackedState<Blueprint?>} */
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -25,9 +25,6 @@ export class HUDMassSelector extends BaseHUDPart {
|
||||
/** @type {Set<Entity>} */
|
||||
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);
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user