mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
thanks EmeraldBlock
This commit is contained in:
parent
3425cb149d
commit
7612c75f56
@ -366,16 +366,14 @@ export class BeltPath extends BasicSerializableObject {
|
|||||||
return function (item) {
|
return function (item) {
|
||||||
// it could be a custom mod case
|
// it could be a custom mod case
|
||||||
// let's check if it is any of them
|
// let's check if it is any of them
|
||||||
var any = false; // so that all matching components can process it
|
|
||||||
for (let id in MOD_ITEM_FILTERS) {
|
for (let id in MOD_ITEM_FILTERS) {
|
||||||
if (entity.components[id]) {
|
if (entity.components[id]) {
|
||||||
let handler = MOD_ITEM_FILTERS[id];
|
let handler = MOD_ITEM_FILTERS[id];
|
||||||
if (handler(item, entity, matchingSlotIndex)) any = true;
|
if (handler(item, entity, matchingSlotIndex)) return true;
|
||||||
else return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return any;
|
return false;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -302,16 +302,14 @@ export class ItemEjectorSystem extends GameSystemWithFilter {
|
|||||||
|
|
||||||
// it could be a custom mod case
|
// it could be a custom mod case
|
||||||
// let's check if it is any of them
|
// let's check if it is any of them
|
||||||
var any = false; // so that all matching components can process it
|
|
||||||
for (let id in MOD_ITEM_FILTERS) {
|
for (let id in MOD_ITEM_FILTERS) {
|
||||||
if (receiver.components[id]) {
|
if (receiver.components[id]) {
|
||||||
let handler = MOD_ITEM_FILTERS[id];
|
let handler = MOD_ITEM_FILTERS[id];
|
||||||
if (handler(item, receiver, slotIndex)) any = true;
|
if (handler(item, receiver, slotIndex)) return true;
|
||||||
else return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return any;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user