1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00
tobspr_shapez.io/src/ts/game/components/constant_signal.ts
2022-11-17 20:33:12 -05:00

26 lines
719 B
TypeScript

import { types } from "../../savegame/serialization";
import { BaseItem } from "../base_item";
import { Component } from "../component";
import { typeItemSingleton } from "../item_resolver";
export class ConstantSignalComponent extends Component {
static getId(): any {
return "ConstantSignal";
}
static getSchema(): any {
return {
signal: types.nullable(typeItemSingleton),
};
}
/**
* Copy the current state to another component
*/
copyAdditionalStateTo(otherComponent: ConstantSignalComponent): any {
otherComponent.signal = this.signal;
}
public signal = signal;
constructor({ signal = null }) {
super();
}
}