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,20 +1,27 @@
|
|||||||
import { Component } from "../component";
|
import { Component } from "../component";
|
||||||
|
import { types } from "../../savegame/serialization";
|
||||||
export class LeverComponent extends Component {
|
|
||||||
static getId() {
|
export class LeverComponent extends Component {
|
||||||
return "Lever";
|
static getId() {
|
||||||
}
|
return "Lever";
|
||||||
|
}
|
||||||
duplicateWithoutContents() {
|
|
||||||
return new LeverComponent({ toggled: this.toggled });
|
static getSchema() {
|
||||||
}
|
return {
|
||||||
|
toggled: types.bool,
|
||||||
/**
|
};
|
||||||
* @param {object} param0
|
}
|
||||||
* @param {boolean=} param0.toggled
|
|
||||||
*/
|
duplicateWithoutContents() {
|
||||||
constructor({ toggled = false }) {
|
return new LeverComponent({ toggled: this.toggled });
|
||||||
super();
|
}
|
||||||
this.toggled = toggled;
|
|
||||||
}
|
/**
|
||||||
}
|
* @param {object} param0
|
||||||
|
* @param {boolean=} param0.toggled
|
||||||
|
*/
|
||||||
|
constructor({ toggled = false }) {
|
||||||
|
super();
|
||||||
|
this.toggled = toggled;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user