mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Store lever state
This commit is contained in:
parent
5ec50678b0
commit
b478f4be63
@ -1,10 +1,17 @@
|
|||||||
import { Component } from "../component";
|
import { Component } from "../component";
|
||||||
|
import { types } from "../../savegame/serialization";
|
||||||
|
|
||||||
export class LeverComponent extends Component {
|
export class LeverComponent extends Component {
|
||||||
static getId() {
|
static getId() {
|
||||||
return "Lever";
|
return "Lever";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static getSchema() {
|
||||||
|
return {
|
||||||
|
toggled: types.bool,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
duplicateWithoutContents() {
|
duplicateWithoutContents() {
|
||||||
return new LeverComponent({ toggled: this.toggled });
|
return new LeverComponent({ toggled: this.toggled });
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user