mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
Fixed tslint errors
This commit is contained in:
parent
6a7e8524bb
commit
6d08ebaa13
@ -13,86 +13,86 @@ export class MetaWireBuilding extends MetaBuilding {
|
|||||||
super("wire");
|
super("wire");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* @param {string} variant
|
// * @param {string} variant
|
||||||
*/
|
// */
|
||||||
getSilhouetteColor(variant) {
|
// getSilhouetteColor(variant) {
|
||||||
return MetaWireBuilding.silhouetteColors[variant]();
|
// return MetaWireBuilding.silhouetteColors[variant]();
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* @param {GameRoot} root
|
// * @param {GameRoot} root
|
||||||
*/
|
// */
|
||||||
getIsUnlocked(root) {
|
// getIsUnlocked(root) {
|
||||||
return this.getAvailableVariants(root).length > 0;
|
// return this.getAvailableVariants(root).length > 0;
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* @param {string} variant
|
// * @param {string} variant
|
||||||
*/
|
// */
|
||||||
getIsRemovable(variant) {
|
// getIsRemovable(variant) {
|
||||||
return MetaWireBuilding.isRemovable[variant]();
|
// return MetaWireBuilding.isRemovable[variant]();
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* @param {string} variant
|
// * @param {string} variant
|
||||||
*/
|
// */
|
||||||
getIsRotateable(variant) {
|
// getIsRotateable(variant) {
|
||||||
return MetaWireBuilding.isRotateable[variant]();
|
// return MetaWireBuilding.isRotateable[variant]();
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* @param {GameRoot} root
|
// * @param {GameRoot} root
|
||||||
*/
|
// */
|
||||||
getAvailableVariants(root) {
|
// getAvailableVariants(root) {
|
||||||
const variants = MetaWireBuilding.avaibleVariants;
|
// const variants = MetaWireBuilding.avaibleVariants;
|
||||||
|
|
||||||
let available = [];
|
// let available = [];
|
||||||
for (const variant in variants) {
|
// for (const variant in variants) {
|
||||||
if (variants[variant](root)) available.push(variant);
|
// if (variants[variant](root)) available.push(variant);
|
||||||
}
|
// }
|
||||||
|
|
||||||
return available;
|
// return available;
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* Returns the edit layer of the building
|
// * Returns the edit layer of the building
|
||||||
* @param {GameRoot} root
|
// * @param {GameRoot} root
|
||||||
* @param {string} variant
|
// * @param {string} variant
|
||||||
* @returns {Layer}
|
// * @returns {Layer}
|
||||||
*/
|
// */
|
||||||
getLayer(root, variant) {
|
// getLayer(root, variant) {
|
||||||
// @ts-ignore
|
// // @ts-ignore
|
||||||
return MetaWireBuilding.layerByVariant[variant](root);
|
// return MetaWireBuilding.layerByVariant[variant](root);
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* @param {string} variant
|
// * @param {string} variant
|
||||||
*/
|
// */
|
||||||
getDimensions(variant) {
|
// getDimensions(variant) {
|
||||||
return MetaWireBuilding.dimensions[variant]();
|
// return MetaWireBuilding.dimensions[variant]();
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* @param {string} variant
|
// * @param {string} variant
|
||||||
*/
|
// */
|
||||||
getShowLayerPreview(variant) {
|
// getShowLayerPreview(variant) {
|
||||||
return MetaWireBuilding.layerPreview[variant]();
|
// return MetaWireBuilding.layerPreview[variant]();
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* @param {number} rotation
|
// * @param {number} rotation
|
||||||
* @param {number} rotationVariant
|
// * @param {number} rotationVariant
|
||||||
* @param {string} variant
|
// * @param {string} variant
|
||||||
* @param {Entity} entity
|
// * @param {Entity} entity
|
||||||
* @returns {Array<number>|null}
|
// * @returns {Array<number>|null}
|
||||||
*/
|
// */
|
||||||
getSpecialOverlayRenderMatrix(rotation, rotationVariant, variant, entity) {
|
// getSpecialOverlayRenderMatrix(rotation, rotationVariant, variant, entity) {
|
||||||
let matrices = MetaWireBuilding.overlayMatrices[
|
// let matrices = MetaWireBuilding.overlayMatrices[
|
||||||
MetaWireBuilding.rotationVariantToType[rotationVariant]
|
// MetaWireBuilding.rotationVariantToType[rotationVariant]
|
||||||
](entity, rotationVariant);
|
// ](entity, rotationVariant);
|
||||||
return matrices ? matrices[rotation] : null;
|
// return matrices ? matrices[rotation] : null;
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} variant
|
* @param {string} variant
|
||||||
@ -105,7 +105,7 @@ export class MetaWireBuilding extends MetaBuilding {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
getStayInPlacementMode(variant) {
|
getStayInPlacementMode() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,8 +24,8 @@ export class BaseSetting {
|
|||||||
*
|
*
|
||||||
* @param {string} id
|
* @param {string} id
|
||||||
* @param {string} categoryId
|
* @param {string} categoryId
|
||||||
* @param {function(app: Application,value: any):void} changeCb
|
* @param {function(Application,any):void} changeCb
|
||||||
* @param {function(app: Application) : boolean=} enabledCb
|
* @param {function(app:Application) : boolean=} enabledCb
|
||||||
*/
|
*/
|
||||||
constructor(id, categoryId, changeCb, enabledCb = null) {
|
constructor(id, categoryId, changeCb, enabledCb = null) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
Loading…
Reference in New Issue
Block a user