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

Further blueprint improvements

This commit is contained in:
tobspr
2020-05-27 15:03:36 +02:00
parent 19c770201f
commit dfe1e64b27
17 changed files with 159 additions and 152 deletions

View File

@@ -17,9 +17,16 @@ export class MinerSystem extends GameSystemWithFilter {
for (let i = 0; i < this.allEntities.length; ++i) {
const entity = this.allEntities[i];
// Check if miner is above an actual tile
const minerComp = entity.components.Miner;
const staticComp = entity.components.StaticMapEntity;
const tileBelow = this.root.map.getLowerLayerContentXY(staticComp.origin.x, staticComp.origin.y);
if (!tileBelow) {
continue;
}
// First, try to get rid of chained items
if (minerComp.itemChainBuffer.length > 0) {
if (this.tryPerformMinerEject(entity, minerComp.itemChainBuffer[0])) {