mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-03-02 03:39:21 +00:00
Fix tunnels entrances connecting to exits sometimes when they shouldn't
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user