mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-03-02 03:39:21 +00:00
Add virtual shape processing buildings
This commit is contained in:
@@ -1,30 +1,36 @@
|
||||
import { Component } from "../component";
|
||||
|
||||
/** @enum {string} */
|
||||
export const enumLogicGateType = {
|
||||
and: "and",
|
||||
not: "not",
|
||||
xor: "xor",
|
||||
or: "or",
|
||||
transistor: "transistor",
|
||||
};
|
||||
|
||||
export class LogicGateComponent extends Component {
|
||||
static getId() {
|
||||
return "LogicGate";
|
||||
}
|
||||
|
||||
duplicateWithoutContents() {
|
||||
return new LogicGateComponent({ type: this.type });
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {object} param0
|
||||
* @param {enumLogicGateType=} param0.type
|
||||
*/
|
||||
constructor({ type = enumLogicGateType.and }) {
|
||||
super();
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
import { Component } from "../component";
|
||||
|
||||
/** @enum {string} */
|
||||
export const enumLogicGateType = {
|
||||
and: "and",
|
||||
not: "not",
|
||||
xor: "xor",
|
||||
or: "or",
|
||||
transistor: "transistor",
|
||||
|
||||
analyzer: "analyzer",
|
||||
rotater: "rotater",
|
||||
unstacker: "unstacker",
|
||||
cutter: "cutter",
|
||||
shapecompare: "shapecompare",
|
||||
};
|
||||
|
||||
export class LogicGateComponent extends Component {
|
||||
static getId() {
|
||||
return "LogicGate";
|
||||
}
|
||||
|
||||
duplicateWithoutContents() {
|
||||
return new LogicGateComponent({ type: this.type });
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {object} param0
|
||||
* @param {enumLogicGateType=} param0.type
|
||||
*/
|
||||
constructor({ type = enumLogicGateType.and }) {
|
||||
super();
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user