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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user