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

Fix balancers

This commit is contained in:
tobspr
2021-08-29 14:43:13 +02:00
parent a71d5f3db9
commit 358754307a
2 changed files with 18 additions and 15 deletions

View File

@@ -307,9 +307,6 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
const availableSlots = payload.entity.components.ItemEjector.slots.length;
const processorComp = payload.entity.components.ItemProcessor;
const nextSlot = processorComp.nextOutputSlot++ % availableSlots;
// Hardcoded to 2, to avoid accessing the length
for (let i = 0; i < 2; ++i) {
const item = payload.items.get(i);
if (!item) {
@@ -317,7 +314,7 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
}
payload.outItems.push({
item,
preferredSlot: (nextSlot + i) % availableSlots,
preferredSlot: processorComp.nextOutputSlot++ % availableSlots,
doNotTrack: true,
});
}