diff --git a/src/js/changelog.js b/src/js/changelog.js index 09af611c..98388839 100644 --- a/src/js/changelog.js +++ b/src/js/changelog.js @@ -14,6 +14,7 @@ export const CHANGELOG = [ "Updated the soundtrack again, it is now 20 minutes in total!", "Updated and added new translations (Thanks to all contributors!)", "Show confirmation when cutting area which is too expensive to get pasted again (by isaisstillalive)", + "Fix tunnels entrances connecting to exits sometimes when they shouldn't", ], }, { diff --git a/src/js/game/systems/underground_belt.js b/src/js/game/systems/underground_belt.js index 7dd4234e..f5e1b0ab 100644 --- a/src/js/game/systems/underground_belt.js +++ b/src/js/game/systems/underground_belt.js @@ -309,17 +309,17 @@ export class UndergroundBeltSystem extends GameSystemWithFilter { continue; } - if (receiverUndergroundComp.mode !== enumUndergroundBeltMode.receiver) { - // Not a receiver - continue; - } - const receiverStaticComp = potentialReceiver.components.StaticMapEntity; if (receiverStaticComp.rotation !== targetRotation) { // Wrong rotation continue; } + if (receiverUndergroundComp.mode !== enumUndergroundBeltMode.receiver) { + // Not a receiver, but a sender -> Abort to make sure we don't deliver double + break; + } + return { entity: potentialReceiver, distance: searchOffset }; }