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

Highlight connected miners, improve miner performance

This commit is contained in:
tobspr
2020-09-13 18:39:06 +02:00
parent 3529a5d77f
commit 0377c6d58f
9 changed files with 548 additions and 333 deletions

View File

@@ -1,6 +1,7 @@
import { types } from "../../savegame/serialization";
import { BaseItem } from "../base_item";
import { Component } from "../component";
import { Entity } from "../entity";
import { typeItemSingleton } from "../item_resolver";
const chainBufferSize = 6;
@@ -40,6 +41,13 @@ export class MinerComponent extends Component {
* @type {BaseItem}
*/
this.cachedMinedItem = null;
/**
* Which miner this miner ejects to, in case its a chainable one.
* If the value is false, it means there is no entity, and we don't have to re-check
* @type {Entity|null|false}
*/
this.cachedChainedMiner = null;
}
/**