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,11 +286,13 @@ 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
const pinsComp = receiver.components.WiredPins; if (itemProcessorComp.type === enumItemProcessorTypes.filter) {
if (pinsComp && pinsComp.slots.length === 1) { const pinsComp = receiver.components.WiredPins;
const network = pinsComp.slots[0].linkedNetwork; if (pinsComp && pinsComp.slots.length === 1) {
if (!network || !network.currentValue) { const network = pinsComp.slots[0].linkedNetwork;
return false; if (!network || !network.currentValue) {
return false;
}
} }
} }