mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-03-02 03:39:21 +00:00
Add TSLint to github actions, fix existing type errors
This commit is contained in:
@@ -15,7 +15,9 @@ export class HUDEntityDebugger extends BaseHUDPart {
|
||||
`
|
||||
);
|
||||
|
||||
/** @type {HTMLElement} */
|
||||
this.mousePosElem = this.element.querySelector(".mousePos");
|
||||
/** @type {HTMLElement} */
|
||||
this.chunkPosElem = this.element.querySelector(".chunkPos");
|
||||
this.entityInfoElem = this.element.querySelector(".entityInfo");
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ export class HUDSettingsMenu extends BaseHUDPart {
|
||||
<strong>${T.ingame.settingsMenu.beltsPlaced}</strong><span class="beltsPlaced"></span>
|
||||
<strong>${T.ingame.settingsMenu.buildingsPlaced}</strong><span class="buildingsPlaced"></span>
|
||||
<strong>${T.ingame.settingsMenu.playtime}</strong><span class="playtime"></span>
|
||||
|
||||
|
||||
`
|
||||
);
|
||||
|
||||
@@ -106,16 +106,22 @@ export class HUDSettingsMenu extends BaseHUDPart {
|
||||
this.root.app.inputMgr.makeSureAttachedAndOnTop(this.inputReciever);
|
||||
|
||||
const totalMinutesPlayed = Math.ceil(this.root.time.now() / 60);
|
||||
this.statsElement.querySelector(".playtime").innerText = T.global.time.xMinutes.replace(
|
||||
"<x>",
|
||||
"" + totalMinutesPlayed
|
||||
);
|
||||
|
||||
this.statsElement.querySelector(".buildingsPlaced").innerText = formatBigNumberFull(
|
||||
/** @type {HTMLElement} */
|
||||
const playtimeElement = this.statsElement.querySelector(".playtime");
|
||||
/** @type {HTMLElement} */
|
||||
const buildingsPlacedElement = this.statsElement.querySelector(".buildingsPlaced");
|
||||
/** @type {HTMLElement} */
|
||||
const beltsPlacedElement = this.statsElement.querySelector(".beltsPlaced");
|
||||
|
||||
playtimeElement.innerText = T.global.time.xMinutes.replace("<x>", `${totalMinutesPlayed}`);
|
||||
|
||||
buildingsPlacedElement.innerText = formatBigNumberFull(
|
||||
this.root.entityMgr.getAllWithComponent(StaticMapEntityComponent).length -
|
||||
this.root.entityMgr.getAllWithComponent(BeltComponent).length
|
||||
);
|
||||
this.statsElement.querySelector(".beltsPlaced").innerText = formatBigNumberFull(
|
||||
|
||||
beltsPlacedElement.innerText = formatBigNumberFull(
|
||||
this.root.entityMgr.getAllWithComponent(BeltComponent).length
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user