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.
61 lines
1.6 KiB
61 lines
1.6 KiB
import { enumDirection, Vector } from "../../core/vector";
|
|
import { enumPinSlotType, WiredPinsComponent } from "../components/wired_pins";
|
|
import { Entity } from "../entity";
|
|
import { defaultBuildingVariant, MetaBuilding } from "../meta_building";
|
|
import { GameRoot } from "../root";
|
|
import { DisplayComponent } from "../components/display";
|
|
import { enumHubGoalRewards } from "../tutorial_goals";
|
|
|
|
export class MetaDisplayBuilding extends MetaBuilding {
|
|
constructor() {
|
|
super("display");
|
|
}
|
|
|
|
static getAllVariantCombinations() {
|
|
return [
|
|
{
|
|
internalId: 40,
|
|
variant: defaultBuildingVariant,
|
|
},
|
|
];
|
|
}
|
|
|
|
getSilhouetteColor() {
|
|
return "#aaaaaa";
|
|
}
|
|
|
|
/**
|
|
* @param {GameRoot} root
|
|
*/
|
|
getIsUnlocked(root) {
|
|
return root.hubGoals.isRewardUnlocked(enumHubGoalRewards.reward_display);
|
|
}
|
|
|
|
getDimensions() {
|
|
return new Vector(1, 1);
|
|
}
|
|
|
|
getShowWiresLayerPreview() {
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Creates the entity at the given location
|
|
* @param {Entity} entity
|
|
*/
|
|
setupEntityComponents(entity) {
|
|
entity.addComponent(
|
|
new WiredPinsComponent({
|
|
slots: [
|
|
{
|
|
pos: new Vector(0, 0),
|
|
direction: enumDirection.bottom,
|
|
type: enumPinSlotType.logicalAcceptor,
|
|
},
|
|
],
|
|
})
|
|
);
|
|
entity.addComponent(new DisplayComponent());
|
|
}
|
|
}
|