mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-03-02 03:39:21 +00:00
Remove unused code (#526)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { ClickDetector } from "../../../core/click_detector";
|
||||
import { globalConfig, THIRDPARTY_URLS } from "../../../core/config";
|
||||
import { globalConfig } from "../../../core/config";
|
||||
import { DrawParameters } from "../../../core/draw_parameters";
|
||||
import { drawRotatedSprite, rotateTrapezRightFaced } from "../../../core/draw_utils";
|
||||
import { drawRotatedSprite } from "../../../core/draw_utils";
|
||||
import { Loader } from "../../../core/loader";
|
||||
import { clamp, makeDiv, removeAllChildren } from "../../../core/utils";
|
||||
import {
|
||||
@@ -323,7 +323,6 @@ export class HUDBuildingPlacer extends HUDBuildingPlacerLogic {
|
||||
|
||||
// Fade in / out
|
||||
parameters.context.lineWidth = 1;
|
||||
// parameters.context.globalAlpha = 0.3 + pulseAnimation(this.root.time.realtimeNow(), 0.9) * 0.7;
|
||||
|
||||
// Determine the bounds and visualize them
|
||||
const entityBounds = staticComp.getTileSpaceBounds();
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { BaseHUDPart } from "../base_hud_part";
|
||||
import { makeDiv, randomInt } from "../../../core/utils";
|
||||
import { makeDiv } from "../../../core/utils";
|
||||
import { SOUNDS } from "../../../platform/sound";
|
||||
import { enumNotificationType } from "./notifications";
|
||||
import { T } from "../../../translations";
|
||||
import { KEYMAPPINGS } from "../../key_action_mapper";
|
||||
import { IS_DEMO } from "../../../core/config";
|
||||
import { DynamicDomAttach } from "../dynamic_dom_attach";
|
||||
|
||||
export class HUDGameMenu extends BaseHUDPart {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ClickDetector } from "../../../core/click_detector";
|
||||
import { formatBigNumber, makeDiv, arrayDelete, arrayDeleteValue } from "../../../core/utils";
|
||||
import { formatBigNumber, makeDiv, arrayDeleteValue } from "../../../core/utils";
|
||||
import { ShapeDefinition } from "../../shape_definition";
|
||||
import { BaseHUDPart } from "../base_hud_part";
|
||||
import { blueprintShape, UPGRADES } from "../../upgrades";
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
import { BaseHUDPart } from "../base_hud_part";
|
||||
import { makeDiv, formatSeconds, formatBigNumberFull } from "../../../core/utils";
|
||||
import { makeDiv, formatBigNumberFull } from "../../../core/utils";
|
||||
import { DynamicDomAttach } from "../dynamic_dom_attach";
|
||||
import { InputReceiver } from "../../../core/input_receiver";
|
||||
import { KeyActionMapper, KEYMAPPINGS } from "../../key_action_mapper";
|
||||
import { T } from "../../../translations";
|
||||
import { StaticMapEntityComponent } from "../../components/static_map_entity";
|
||||
import { ItemProcessorComponent } from "../../components/item_processor";
|
||||
import { BeltComponent } from "../../components/belt";
|
||||
import { IS_DEMO } from "../../../core/config";
|
||||
|
||||
export class HUDSettingsMenu extends BaseHUDPart {
|
||||
createElements(parent) {
|
||||
@@ -57,16 +55,7 @@ export class HUDSettingsMenu extends BaseHUDPart {
|
||||
}
|
||||
|
||||
returnToMenu() {
|
||||
// if (IS_DEMO) {
|
||||
// const { cancel, deleteGame } = this.root.hud.parts.dialogs.showWarning(
|
||||
// T.dialogs.leaveNotPossibleInDemo.title,
|
||||
// T.dialogs.leaveNotPossibleInDemo.desc,
|
||||
// ["cancel:good", "deleteGame:bad"]
|
||||
// );
|
||||
// deleteGame.add(() => this.root.gameState.goBackToMenu());
|
||||
// } else {
|
||||
this.root.gameState.goBackToMenu();
|
||||
// }
|
||||
}
|
||||
|
||||
goToSettings() {
|
||||
@@ -102,7 +91,6 @@ export class HUDSettingsMenu extends BaseHUDPart {
|
||||
show() {
|
||||
this.visible = true;
|
||||
document.body.classList.add("ingameDialogOpen");
|
||||
// this.background.classList.add("visible");
|
||||
this.root.app.inputMgr.makeSureAttachedAndOnTop(this.inputReciever);
|
||||
|
||||
const totalMinutesPlayed = Math.ceil(this.root.time.now() / 60);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { InputReceiver } from "../../../core/input_receiver";
|
||||
import { makeButton, makeDiv, removeAllChildren, capitalizeFirstLetter } from "../../../core/utils";
|
||||
import { makeButton, makeDiv, removeAllChildren } from "../../../core/utils";
|
||||
import { KeyActionMapper, KEYMAPPINGS } from "../../key_action_mapper";
|
||||
import { enumAnalyticsDataSource } from "../../production_analytics";
|
||||
import { BaseHUDPart } from "../base_hud_part";
|
||||
@@ -7,6 +7,14 @@ import { DynamicDomAttach } from "../dynamic_dom_attach";
|
||||
import { enumDisplayMode, HUDShapeStatisticsHandle } from "./statistics_handle";
|
||||
import { T } from "../../../translations";
|
||||
|
||||
/**
|
||||
* Capitalizes the first letter
|
||||
* @param {string} str
|
||||
*/
|
||||
function capitalizeFirstLetter(str) {
|
||||
return str.substr(0, 1).toUpperCase() + str.substr(1).toLowerCase();
|
||||
}
|
||||
|
||||
export class HUDStatistics extends BaseHUDPart {
|
||||
createElements(parent) {
|
||||
this.background = makeDiv(parent, "ingame_HUD_Statistics", ["ingameDialog"]);
|
||||
|
||||
Reference in New Issue
Block a user