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:
parent
efd8ba7ae9
commit
fd7ae79971
@ -7,6 +7,7 @@ import { BaseItem } from "../base_item";
|
||||
import { ItemEjectorComponent } from "../components/item_ejector";
|
||||
import { Entity } from "../entity";
|
||||
import { GameSystemWithFilter } from "../game_system_with_filter";
|
||||
import { enumItemProcessorTypes } from "../components/item_processor";
|
||||
|
||||
const logger = createLogger("systems/ejector");
|
||||
|
||||
@ -285,11 +286,13 @@ export class ItemEjectorSystem extends GameSystemWithFilter {
|
||||
if (itemProcessorComp) {
|
||||
// @todo HACK
|
||||
// Check if there are pins, and if so if they are connected
|
||||
const pinsComp = receiver.components.WiredPins;
|
||||
if (pinsComp && pinsComp.slots.length === 1) {
|
||||
const network = pinsComp.slots[0].linkedNetwork;
|
||||
if (!network || !network.currentValue) {
|
||||
return false;
|
||||
if (itemProcessorComp.type === enumItemProcessorTypes.filter) {
|
||||
const pinsComp = receiver.components.WiredPins;
|
||||
if (pinsComp && pinsComp.slots.length === 1) {
|
||||
const network = pinsComp.slots[0].linkedNetwork;
|
||||
if (!network || !network.currentValue) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user