2020-09-09 00:30:35 +00:00
|
|
|
import * as GeoZ from "../../main";
|
|
|
|
|
import { Vector } from "../../../core/vector";
|
|
|
|
|
import { Entity } from "../../../game/entity";
|
|
|
|
|
|
|
|
|
|
class MetaTestBuilding extends GeoZ.MetaModBuilding {
|
2020-09-09 22:05:54 +00:00
|
|
|
static getId() {
|
|
|
|
|
return "test";
|
|
|
|
|
}
|
2020-09-09 00:30:35 +00:00
|
|
|
|
|
|
|
|
static getKeybinding() {
|
|
|
|
|
return "0";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static getTranslations() {
|
|
|
|
|
return {
|
2020-09-09 22:05:54 +00:00
|
|
|
variants: {
|
|
|
|
|
default: {
|
|
|
|
|
name: "Test",
|
|
|
|
|
description: "Test GeoZ building",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
keybinding: "Test",
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
constructor() {
|
2020-09-09 00:30:35 +00:00
|
|
|
super("test");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getSilhouetteColor() {
|
|
|
|
|
return "#ff00ff";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getDimensions() {
|
|
|
|
|
return new Vector(1, 1);
|
|
|
|
|
}
|
|
|
|
|
|
2020-09-09 22:05:54 +00:00
|
|
|
/**
|
|
|
|
|
* @returns {import("../../mod_building").BuildingSpriteMetas}
|
|
|
|
|
*/
|
|
|
|
|
getSpriteMetas() {
|
|
|
|
|
const normal = {
|
|
|
|
|
url: "https://raw.githubusercontent.com/Exund/shapez.io/master/res_raw/sprites/wires/boolean_false.png",
|
|
|
|
|
width: 64,
|
|
|
|
|
height: 64,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
default: [
|
|
|
|
|
{
|
|
|
|
|
normal,
|
|
|
|
|
blueprint: normal,
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
}
|
2020-09-09 00:30:35 +00:00
|
|
|
|
2020-09-09 22:05:54 +00:00
|
|
|
setupEntityComponents() {}
|
2020-09-09 00:30:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**@type {GeoZ.Mod}*/
|
|
|
|
|
const test = {
|
2020-09-09 22:05:54 +00:00
|
|
|
name: "test",
|
|
|
|
|
buildings: [MetaTestBuilding],
|
|
|
|
|
shapes: [
|
|
|
|
|
{
|
|
|
|
|
id: "leaf",
|
|
|
|
|
code: "F",
|
|
|
|
|
draw: "M 0 0 v 0.5 a 0.5 0.5 0 0 0 0.5 0.5 h 0.5 v -0.5 a 0.5 0.5 0 0 0 -0.5 -0.5 z",
|
|
|
|
|
tier: 2,
|
|
|
|
|
spawnData: {
|
|
|
|
|
color: "yellow",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
2020-09-09 00:30:35 +00:00
|
|
|
};
|
|
|
|
|
|
2020-09-09 22:05:54 +00:00
|
|
|
export default test;
|