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

26 lines
719 B
TypeScript
Raw Normal View History

2022-11-18 01:33:12 +00:00
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();
}
}