mirror of
https://github.com/tobspr-games/shapez.io.git
synced 2026-01-14 21:31:04 -08:00
Fix hub not accepting items
This commit is contained in:
parent
efd8ba7ae9
commit
fd7ae79971
1 changed files with 8 additions and 5 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue