mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-03-02 03:39:21 +00:00
Preparations for the trailer
This commit is contained in:
@@ -206,14 +206,18 @@ export class BeltSystem extends GameSystemWithFilter {
|
||||
this.computeBeltCache();
|
||||
}
|
||||
|
||||
// Divide by item spacing on belts since we use throughput and not speed
|
||||
let beltSpeed =
|
||||
this.root.hubGoals.getBeltBaseSpeed() *
|
||||
this.root.dynamicTickrate.deltaSeconds *
|
||||
globalConfig.itemSpacingOnBelts;
|
||||
if (G_IS_DEV && globalConfig.debug.instantBelts) {
|
||||
beltSpeed *= 100;
|
||||
}
|
||||
|
||||
for (let i = 0; i < this.beltCache.length; ++i) {
|
||||
const { entity, followUp } = this.beltCache[i];
|
||||
|
||||
// Divide by item spacing on belts since we use throughput and not speed
|
||||
const beltSpeed =
|
||||
this.root.hubGoals.getBeltBaseSpeed() *
|
||||
this.root.dynamicTickrate.deltaSeconds *
|
||||
globalConfig.itemSpacingOnBelts;
|
||||
const beltComp = entity.components.Belt;
|
||||
const items = beltComp.sortedItems;
|
||||
|
||||
|
||||
@@ -14,7 +14,11 @@ export class ItemEjectorSystem extends GameSystemWithFilter {
|
||||
|
||||
update() {
|
||||
const effectiveBeltSpeed = this.root.hubGoals.getBeltBaseSpeed() * globalConfig.itemSpacingOnBelts;
|
||||
const progressGrowth = (effectiveBeltSpeed / 0.5) * this.root.dynamicTickrate.deltaSeconds;
|
||||
let progressGrowth = (effectiveBeltSpeed / 0.5) * this.root.dynamicTickrate.deltaSeconds;
|
||||
|
||||
if (G_IS_DEV && globalConfig.debug.instantBelts) {
|
||||
progressGrowth = 1;
|
||||
}
|
||||
|
||||
// Try to find acceptors for every ejector
|
||||
for (let i = 0; i < this.allEntities.length; ++i) {
|
||||
|
||||
@@ -26,6 +26,10 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
|
||||
processorComp.secondsUntilEject - this.root.dynamicTickrate.deltaSeconds
|
||||
);
|
||||
|
||||
if (G_IS_DEV && globalConfig.debug.instantProcessors) {
|
||||
processorComp.secondsUntilEject = 0;
|
||||
}
|
||||
|
||||
// Check if we have any finished items we can eject
|
||||
if (
|
||||
processorComp.secondsUntilEject === 0 && // it was processed in time
|
||||
|
||||
@@ -13,7 +13,11 @@ export class MinerSystem extends GameSystemWithFilter {
|
||||
}
|
||||
|
||||
update() {
|
||||
const miningSpeed = this.root.hubGoals.getMinerBaseSpeed();
|
||||
let miningSpeed = this.root.hubGoals.getMinerBaseSpeed();
|
||||
if (G_IS_DEV && globalConfig.debug.instantMiners) {
|
||||
miningSpeed *= 100;
|
||||
}
|
||||
|
||||
for (let i = 0; i < this.allEntities.length; ++i) {
|
||||
const entity = this.allEntities[i];
|
||||
|
||||
|
||||
@@ -32,6 +32,10 @@ export class UndergroundBeltSystem extends GameSystemWithFilter {
|
||||
for (let k = 0; k < undergroundComp.pendingItems.length; ++k) {
|
||||
const item = undergroundComp.pendingItems[k];
|
||||
item[1] = Math_max(0, item[1] - this.root.dynamicTickrate.deltaSeconds);
|
||||
|
||||
if (G_IS_DEV && globalConfig.debug.instantBelts) {
|
||||
item[1] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (undergroundComp.mode === enumUndergroundBeltMode.sender) {
|
||||
|
||||
Reference in New Issue
Block a user