1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2024-10-27 20:34:29 +00:00

Fix hub not accepting items

This commit is contained in:
tobspr 2020-08-13 21:06:54 +02:00
parent efd8ba7ae9
commit fd7ae79971

View File

@ -7,6 +7,7 @@ import { BaseItem } from "../base_item";
import { ItemEjectorComponent } from "../components/item_ejector"; import { ItemEjectorComponent } from "../components/item_ejector";
import { Entity } from "../entity"; import { Entity } from "../entity";
import { GameSystemWithFilter } from "../game_system_with_filter"; import { GameSystemWithFilter } from "../game_system_with_filter";
import { enumItemProcessorTypes } from "../components/item_processor";
const logger = createLogger("systems/ejector"); const logger = createLogger("systems/ejector");
@ -285,6 +286,7 @@ export class ItemEjectorSystem extends GameSystemWithFilter {
if (itemProcessorComp) { if (itemProcessorComp) {
// @todo HACK // @todo HACK
// Check if there are pins, and if so if they are connected // Check if there are pins, and if so if they are connected
if (itemProcessorComp.type === enumItemProcessorTypes.filter) {
const pinsComp = receiver.components.WiredPins; const pinsComp = receiver.components.WiredPins;
if (pinsComp && pinsComp.slots.length === 1) { if (pinsComp && pinsComp.slots.length === 1) {
const network = pinsComp.slots[0].linkedNetwork; const network = pinsComp.slots[0].linkedNetwork;
@ -292,6 +294,7 @@ export class ItemEjectorSystem extends GameSystemWithFilter {
return false; return false;
} }
} }
}
// Its an item processor .. // Its an item processor ..
if (itemProcessorComp.tryTakeItem(item, slotIndex)) { if (itemProcessorComp.tryTakeItem(item, slotIndex)) {