1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Add wire bridges and fix Q on hub crash

This commit is contained in:
tobspr
2020-08-13 21:04:44 +02:00
parent ff02508361
commit efd8ba7ae9
25 changed files with 1064 additions and 898 deletions

View File

@@ -0,0 +1,43 @@
import { Vector } from "../../core/vector";
import { Entity } from "../entity";
import { MetaBuilding } from "../meta_building";
import { GameRoot, enumLayer } from "../root";
import { WireTunnelComponent } from "../components/wire_tunnel";
export class MetaWireTunnelBuilding extends MetaBuilding {
constructor() {
super("wire_tunnel");
}
getSilhouetteColor() {
return "#25fff2";
}
/**
* @param {GameRoot} root
*/
getIsUnlocked(root) {
// @todo
return true;
}
isRotateable() {
return false;
}
getDimensions() {
return new Vector(1, 1);
}
getLayer() {
return enumLayer.wires;
}
/**
* Creates the entity at the given location
* @param {Entity} entity
*/
setupEntityComponents(entity) {
entity.addComponent(new WireTunnelComponent());
}
}