mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-12-16 03:31:52 +00:00
fixed items being too close between buildings
This commit is contained in:
parent
7a3ab7aaed
commit
d6bb79c470
@ -163,6 +163,18 @@ export class ItemEjectorSystem extends GameSystemWithFilter {
|
|||||||
// Advance items on the slot
|
// Advance items on the slot
|
||||||
slot.progress += progressGrowth;
|
slot.progress += progressGrowth;
|
||||||
|
|
||||||
|
// limit the progress to stop items being too close
|
||||||
|
if (slot.cachedTargetEntity && slot.cachedDestSlot) {
|
||||||
|
const acceptorComp = slot.cachedTargetEntity.components.ItemAcceptor;
|
||||||
|
const acceptorInput = acceptorComp.inputs.get(slot.cachedDestSlot.index);
|
||||||
|
|
||||||
|
if (acceptorInput) {
|
||||||
|
const maxProgress =
|
||||||
|
0.5 + acceptorInput.animProgress - globalConfig.itemSpacingOnBelts;
|
||||||
|
slot.progress = Math.min(maxProgress, slot.progress);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (G_IS_DEV && globalConfig.debug.disableEjectorProcessing) {
|
if (G_IS_DEV && globalConfig.debug.disableEjectorProcessing) {
|
||||||
slot.progress = maxProgress;
|
slot.progress = maxProgress;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user