You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
976 B
37 lines
976 B
4 years ago
|
import { enumDirection, Vector } from "../../core/vector";
|
||
|
import { ItemEjectorComponent } from "../components/item_ejector";
|
||
|
import { MinerComponent } from "../components/miner";
|
||
|
import { Entity } from "../entity";
|
||
|
import { MetaBuilding } from "../meta_building";
|
||
|
|
||
|
export class MetaMinerBuilding extends MetaBuilding {
|
||
|
constructor() {
|
||
|
super("miner");
|
||
|
}
|
||
|
|
||
|
getName() {
|
||
|
return "Extract";
|
||
|
}
|
||
|
|
||
|
getSilhouetteColor() {
|
||
|
return "#b37dcd";
|
||
|
}
|
||
|
|
||
|
getDescription() {
|
||
|
return "Place over a shape or color to extract it. Six extractors fill exactly one belt.";
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Creates the entity at the given location
|
||
|
* @param {Entity} entity
|
||
|
*/
|
||
|
setupEntityComponents(entity) {
|
||
|
entity.addComponent(new MinerComponent({}));
|
||
|
entity.addComponent(
|
||
|
new ItemEjectorComponent({
|
||
|
slots: [{ pos: new Vector(0, 0), direction: enumDirection.top }],
|
||
|
})
|
||
|
);
|
||
|
}
|
||
|
}
|