mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Show connections to tunnel exits as well
This commit is contained in:
parent
8678caf6c5
commit
10fe067c85
@ -143,6 +143,7 @@ export class MetaUndergroundBeltBuilding extends MetaBuilding {
|
|||||||
const tier = enumUndergroundBeltVariantToTier[variant];
|
const tier = enumUndergroundBeltVariantToTier[variant];
|
||||||
|
|
||||||
const targetRotation = (rotation + 180) % 360;
|
const targetRotation = (rotation + 180) % 360;
|
||||||
|
const targetSenderRotation = rotation;
|
||||||
|
|
||||||
for (
|
for (
|
||||||
let searchOffset = 1;
|
let searchOffset = 1;
|
||||||
@ -161,12 +162,20 @@ export class MetaUndergroundBeltBuilding extends MetaBuilding {
|
|||||||
// If we encounter an underground receiver on our way which is also faced in our direction, we don't accept that
|
// If we encounter an underground receiver on our way which is also faced in our direction, we don't accept that
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
rotation: targetRotation,
|
rotation: targetRotation,
|
||||||
rotationVariant: 1,
|
rotationVariant: 1,
|
||||||
connectedEntities: [contents],
|
connectedEntities: [contents],
|
||||||
};
|
};
|
||||||
|
} else if (staticComp.rotation === targetSenderRotation) {
|
||||||
|
// Draw connections to receivers
|
||||||
|
if (undergroundComp.mode === enumUndergroundBeltMode.receiver) {
|
||||||
|
return {
|
||||||
|
rotation: rotation,
|
||||||
|
rotationVariant: 0,
|
||||||
|
connectedEntities: [contents],
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user