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

Add building speed infos to all buildings

This commit is contained in:
tobspr
2020-05-17 15:32:19 +02:00
parent 97f52f509b
commit d58d15ef8c
23 changed files with 243 additions and 36 deletions

View File

@@ -4,7 +4,7 @@ import { Component } from "../component";
import { BaseItem } from "../base_item";
import { gItemRegistry } from "../../core/global_registries";
const chainBufferSize = 10;
const chainBufferSize = 3;
export class MinerComponent extends Component {
static getId() {

View File

@@ -62,7 +62,7 @@ export class UndergroundBeltComponent extends Component {
return false;
}
this.pendingItems.push([item, 0.5 / beltSpeed]);
this.pendingItems.push([item, 1 / beltSpeed / globalConfig.itemSpacingOnBelts]);
return true;
}
@@ -88,7 +88,7 @@ export class UndergroundBeltComponent extends Component {
// NOTICE:
// This corresponds to the item ejector - it needs 0.5 additional tiles to eject the item.
// So instead of adding 1 we add 0.5 only.
const travelDuration = (travelDistance + 0.5) / beltSpeed;
const travelDuration = (travelDistance + 0.5) / beltSpeed / globalConfig.itemSpacingOnBelts;
this.pendingItems.push([item, travelDuration]);