1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Implement wire networks, add levers

This commit is contained in:
tobspr
2020-08-13 19:23:00 +02:00
parent 75ab655998
commit 52b4d4d742
46 changed files with 1760 additions and 724 deletions

View File

@@ -32,6 +32,13 @@ export class BooleanItem extends BaseItem {
this.value = value ? 1 : 0;
}
/**
* @param {BaseItem} other
*/
equalsImpl(other) {
return this.value === /** @type {BooleanItem} */ (other).value;
}
/**
* @param {number} x
* @param {number} y

View File

@@ -27,6 +27,13 @@ export class ColorItem extends BaseItem {
return enumItemType.color;
}
/**
* @param {BaseItem} other
*/
equalsImpl(other) {
return this.color === /** @type {ColorItem} */ (other).color;
}
/**
* @param {enumColors} color
*/

View File

@@ -25,6 +25,13 @@ export class ShapeItem extends BaseItem {
return enumItemType.shape;
}
/**
* @param {BaseItem} other
*/
equalsImpl(other) {
return this.definition.getHash() === /** @type {ShapeItem} */ (other).definition.getHash();
}
/**
* @param {ShapeDefinition} definition
*/