merge cores
This commit is contained in:
parent
62700cfbbd
commit
672a434d0e
4 changed files with 17 additions and 12 deletions
|
@ -1,3 +1 @@
|
|||
module.exports = extendContent(Floor, "factory-floor", {
|
||||
variants: 0,
|
||||
});
|
||||
module.exports = extendContent(Floor, "factory-floor", {});
|
||||
|
|
|
@ -6,21 +6,17 @@ const exit = require(this.modName + "/content/exit");
|
|||
size: 1,
|
||||
breakable: false,
|
||||
destructible: false,
|
||||
hasPower: true,
|
||||
buildVisibility: BuildVisibility.hidden,
|
||||
|
||||
itemCapacity: i === "factory-wall" ? 0 : 25,
|
||||
consumesTap: true,
|
||||
unitCapModifier: 1,
|
||||
});
|
||||
|
||||
// h
|
||||
// wall.outputsPower = true;
|
||||
// wall.unitType = exit;
|
||||
wall.buildType = () =>
|
||||
extendContent(CoreBlock.CoreBuild, wall, {
|
||||
tapped() {},
|
||||
});
|
||||
// wall.buildType = () =>
|
||||
// extendContent(CoreBlock.CoreBuild, wall, {
|
||||
// tapped() {},
|
||||
// });
|
||||
|
||||
module.exports[i] = wall;
|
||||
});
|
||||
|
|
|
@ -26,6 +26,12 @@ function create(size, storage, team) {
|
|||
if (x < 2 || x >= size - 2) wall(tile);
|
||||
if (y < 2 || y >= size - 2) wall(tile);
|
||||
});
|
||||
|
||||
world.tiles.each((x, y) => {
|
||||
const build = world.build(x, y);
|
||||
if(build) build.updateProximity();
|
||||
});
|
||||
|
||||
return world;
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,12 @@ function Simulation(from) {
|
|||
|
||||
Vars.logic.play();
|
||||
Events.fire(new WorldLoadEvent());
|
||||
|
||||
|
||||
this.world.tiles.each((x, y) => {
|
||||
const build = this.world.build(x, y);
|
||||
if(build) build.updateProximity();
|
||||
});
|
||||
|
||||
Core.camera.position.set(size * 4, size * 4);
|
||||
Vars.renderer.setScale(Vars.renderer.getScale() + 1);
|
||||
|
||||
|
|
Loading…
Reference in a new issue