From 663cd70896bf8f5c0157c4537e18c6dca53d92ae Mon Sep 17 00:00:00 2001 From: tobspr <> Date: Sat, 23 May 2020 11:08:27 +0200 Subject: [PATCH] Show connections to tunnel exits as well --- src/js/game/buildings/underground_belt.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/js/game/buildings/underground_belt.js b/src/js/game/buildings/underground_belt.js index 50cb7bc1..0cfc0421 100644 --- a/src/js/game/buildings/underground_belt.js +++ b/src/js/game/buildings/underground_belt.js @@ -143,6 +143,7 @@ export class MetaUndergroundBeltBuilding extends MetaBuilding { const tier = enumUndergroundBeltVariantToTier[variant]; const targetRotation = (rotation + 180) % 360; + const targetSenderRotation = rotation; for ( 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 break; } - return { rotation: targetRotation, rotationVariant: 1, connectedEntities: [contents], }; + } else if (staticComp.rotation === targetSenderRotation) { + // Draw connections to receivers + if (undergroundComp.mode === enumUndergroundBeltMode.receiver) { + return { + rotation: rotation, + rotationVariant: 0, + connectedEntities: [contents], + }; + } } } }