From 6d08ebaa13aed891b3707ebabc997e18bc9cd325 Mon Sep 17 00:00:00 2001 From: DJ1TJOO Date: Fri, 26 Feb 2021 19:13:34 +0100 Subject: [PATCH] Fixed tslint errors --- src/js/game/buildings/wire.js | 142 ++++++++++++++++---------------- src/js/profile/setting_types.js | 4 +- 2 files changed, 73 insertions(+), 73 deletions(-) diff --git a/src/js/game/buildings/wire.js b/src/js/game/buildings/wire.js index 43d0afb4..93a575e3 100644 --- a/src/js/game/buildings/wire.js +++ b/src/js/game/buildings/wire.js @@ -13,86 +13,86 @@ export class MetaWireBuilding extends MetaBuilding { super("wire"); } - /** - * @param {string} variant - */ - getSilhouetteColor(variant) { - return MetaWireBuilding.silhouetteColors[variant](); - } + // /** + // * @param {string} variant + // */ + // getSilhouetteColor(variant) { + // return MetaWireBuilding.silhouetteColors[variant](); + // } - /** - * @param {GameRoot} root - */ - getIsUnlocked(root) { - return this.getAvailableVariants(root).length > 0; - } + // /** + // * @param {GameRoot} root + // */ + // getIsUnlocked(root) { + // return this.getAvailableVariants(root).length > 0; + // } - /** - * @param {string} variant - */ - getIsRemovable(variant) { - return MetaWireBuilding.isRemovable[variant](); - } + // /** + // * @param {string} variant + // */ + // getIsRemovable(variant) { + // return MetaWireBuilding.isRemovable[variant](); + // } - /** - * @param {string} variant - */ - getIsRotateable(variant) { - return MetaWireBuilding.isRotateable[variant](); - } + // /** + // * @param {string} variant + // */ + // getIsRotateable(variant) { + // return MetaWireBuilding.isRotateable[variant](); + // } - /** - * @param {GameRoot} root - */ - getAvailableVariants(root) { - const variants = MetaWireBuilding.avaibleVariants; + // /** + // * @param {GameRoot} root + // */ + // getAvailableVariants(root) { + // const variants = MetaWireBuilding.avaibleVariants; - let available = []; - for (const variant in variants) { - if (variants[variant](root)) available.push(variant); - } + // let available = []; + // for (const variant in variants) { + // if (variants[variant](root)) available.push(variant); + // } - return available; - } + // return available; + // } - /** - * Returns the edit layer of the building - * @param {GameRoot} root - * @param {string} variant - * @returns {Layer} - */ - getLayer(root, variant) { - // @ts-ignore - return MetaWireBuilding.layerByVariant[variant](root); - } + // /** + // * Returns the edit layer of the building + // * @param {GameRoot} root + // * @param {string} variant + // * @returns {Layer} + // */ + // getLayer(root, variant) { + // // @ts-ignore + // return MetaWireBuilding.layerByVariant[variant](root); + // } - /** - * @param {string} variant - */ - getDimensions(variant) { - return MetaWireBuilding.dimensions[variant](); - } + // /** + // * @param {string} variant + // */ + // getDimensions(variant) { + // return MetaWireBuilding.dimensions[variant](); + // } - /** - * @param {string} variant - */ - getShowLayerPreview(variant) { - return MetaWireBuilding.layerPreview[variant](); - } + // /** + // * @param {string} variant + // */ + // getShowLayerPreview(variant) { + // return MetaWireBuilding.layerPreview[variant](); + // } - /** - * @param {number} rotation - * @param {number} rotationVariant - * @param {string} variant - * @param {Entity} entity - * @returns {Array|null} - */ - getSpecialOverlayRenderMatrix(rotation, rotationVariant, variant, entity) { - let matrices = MetaWireBuilding.overlayMatrices[ - MetaWireBuilding.rotationVariantToType[rotationVariant] - ](entity, rotationVariant); - return matrices ? matrices[rotation] : null; - } + // /** + // * @param {number} rotation + // * @param {number} rotationVariant + // * @param {string} variant + // * @param {Entity} entity + // * @returns {Array|null} + // */ + // getSpecialOverlayRenderMatrix(rotation, rotationVariant, variant, entity) { + // let matrices = MetaWireBuilding.overlayMatrices[ + // MetaWireBuilding.rotationVariantToType[rotationVariant] + // ](entity, rotationVariant); + // return matrices ? matrices[rotation] : null; + // } /** * @param {string} variant @@ -105,7 +105,7 @@ export class MetaWireBuilding extends MetaBuilding { return true; } - getStayInPlacementMode(variant) { + getStayInPlacementMode() { return true; } diff --git a/src/js/profile/setting_types.js b/src/js/profile/setting_types.js index 9a1e0c03..3b9c80e2 100644 --- a/src/js/profile/setting_types.js +++ b/src/js/profile/setting_types.js @@ -24,8 +24,8 @@ export class BaseSetting { * * @param {string} id * @param {string} categoryId - * @param {function(app: Application,value: any):void} changeCb - * @param {function(app: Application) : boolean=} enabledCb + * @param {function(Application,any):void} changeCb + * @param {function(app:Application) : boolean=} enabledCb */ constructor(id, categoryId, changeCb, enabledCb = null) { this.id = id;