mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Fix wrong belt stats
This commit is contained in:
parent
a60d23da77
commit
14edac0f93
@ -1,7 +1,7 @@
|
|||||||
#ingame_HUD_EntityDebugger {
|
#ingame_HUD_EntityDebugger {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@include S(right, 30px);
|
@include S(right, 30px);
|
||||||
@include S(top, 250px);
|
@include S(top, 200px);
|
||||||
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
.data {
|
.data {
|
||||||
@include S(width, 150px);
|
@include S(width, 150px);
|
||||||
@include S(height, 50px);
|
@include S(height, 130px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -113,11 +113,11 @@ export class ItemEjectorSystem extends GameSystemWithFilter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const undergroundBeltCmop = receiver.components.UndergroundBelt;
|
const undergroundBeltComp = receiver.components.UndergroundBelt;
|
||||||
if (undergroundBeltCmop) {
|
if (undergroundBeltComp) {
|
||||||
// Its an underground belt. yay.
|
// Its an underground belt. yay.
|
||||||
if (
|
if (
|
||||||
undergroundBeltCmop.tryAcceptExternalItem(
|
undergroundBeltComp.tryAcceptExternalItem(
|
||||||
item,
|
item,
|
||||||
this.root.hubGoals.getUndergroundBeltBaseSpeed()
|
this.root.hubGoals.getUndergroundBeltBaseSpeed()
|
||||||
)
|
)
|
||||||
|
@ -96,11 +96,15 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
|
|||||||
/** @type {Array<{item: BaseItem, requiredSlot?: number, preferredSlot?: number}>} */
|
/** @type {Array<{item: BaseItem, requiredSlot?: number, preferredSlot?: number}>} */
|
||||||
const outItems = [];
|
const outItems = [];
|
||||||
|
|
||||||
|
// Whether to track the production towards the analytics
|
||||||
|
let trackProduction = true;
|
||||||
|
|
||||||
// DO SOME MAGIC
|
// DO SOME MAGIC
|
||||||
|
|
||||||
switch (processorComp.type) {
|
switch (processorComp.type) {
|
||||||
// SPLITTER
|
// SPLITTER
|
||||||
case enumItemProcessorTypes.splitter: {
|
case enumItemProcessorTypes.splitter: {
|
||||||
|
trackProduction = false;
|
||||||
const availableSlots = entity.components.ItemEjector.slots.length;
|
const availableSlots = entity.components.ItemEjector.slots.length;
|
||||||
|
|
||||||
let nextSlot = processorComp.nextOutputSlot++ % availableSlots;
|
let nextSlot = processorComp.nextOutputSlot++ % availableSlots;
|
||||||
@ -311,6 +315,8 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
|
|||||||
// HUB
|
// HUB
|
||||||
|
|
||||||
case enumItemProcessorTypes.hub: {
|
case enumItemProcessorTypes.hub: {
|
||||||
|
trackProduction = false;
|
||||||
|
|
||||||
const hubComponent = entity.components.Hub;
|
const hubComponent = entity.components.Hub;
|
||||||
assert(hubComponent, "Hub item processor has no hub component");
|
assert(hubComponent, "Hub item processor has no hub component");
|
||||||
|
|
||||||
@ -327,8 +333,10 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Track produced items
|
// Track produced items
|
||||||
for (let i = 0; i < outItems.length; ++i) {
|
if (trackProduction) {
|
||||||
this.root.signals.itemProduced.dispatch(outItems[i].item);
|
for (let i = 0; i < outItems.length; ++i) {
|
||||||
|
this.root.signals.itemProduced.dispatch(outItems[i].item);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
processorComp.itemsToEject = outItems;
|
processorComp.itemsToEject = outItems;
|
||||||
|
Loading…
Reference in New Issue
Block a user