|
|
|
@ -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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|