TMPE icon indicating copy to clipboard operation
TMPE copied to clipboard

set dead ends for lanes using lane connector

Open kianzarrin opened this issue 3 years ago • 7 comments

There should be a mechanism in lane connector to set a lane connected to nothing. This is particularly useful for station tracks or other bidirectional lanes.

I suggest if we connect the lane to itself, it will act as a dead end.

This is also useful for AR tracks to look nice.

kianzarrin avatar Dec 03 '21 21:12 kianzarrin

Is this an alternate to directional lane connectors for both direction lanes, or some other purpose? Could you elaborate on the use cases?

originalfoo avatar Dec 03 '21 22:12 originalfoo

@aubergine10 So in the train station bellow there are 2 unnecessary tracks which I have marked with blue arrows: image I created the network using Adaptive-Network mod.

It would be nice to prevent them from connecting to anything.

kianzarrin avatar Dec 04 '21 00:12 kianzarrin

I see. When you say "connect lane to itself" is that for user-interface perspective or back-end data? If user-interface, I think I'd find that confusing and also suspect it would be accident prone (eg. if user accidentally creates dead end and doesn't realise how to un-do that).

Maybe if user has selected the outgoing lane (visually: wire being dragged by mouse) they could press a shortcut key and the 'source' circle would turn in to a stop / no-entry sign? To remove stop sign either, while lane is selected: a) press key again, or, b) connect it to another lane.

originalfoo avatar Dec 04 '21 01:12 originalfoo

Thinking further, if we had a stop/no-entry icon to indicate when unconnected lane is prevented from connecting to anything, could we also have a * icon to indicate that an unconnected lane will follow default connection rules? That would illustrate to user a) which outgoing lanes don't have connection and b) what will happen as a result (either no-entry or vanilla routing, as applicable).

EDIT: Or unconnected lanes that aren't marked "stop" could show thin grey/dashed(?) connectors (depicting default routing) to visualise the default connections?

originalfoo avatar Dec 04 '21 01:12 originalfoo

image what should happen if lane has no arrows? should it be a dead end? currently it is as if it is forward. https://github.com/CitiesSkylinesMods/TMPE/blob/382830a46aadddf01d48a9d19eee54739e6a24ef/TLM/TLM/Manager/Impl/RoutingManager.cs#L970

                                        bool hasForwardArrow =
                                            (nextLaneArrows & LaneArrows.Forward) != LaneArrows.None ||
                                            (nextLaneArrows & LaneArrows.LeftForwardRight) ==
                                            LaneArrows.None;

kianzarrin avatar May 21 '22 07:05 kianzarrin

I assume the current implementation defaults to 'forward' when no arrows primarily because we had no concept of 'dead end lane' when it was implemented.

However, if we add concept of 'dead end lane', that would be a better default. We'd ideally need additional visual cue to user to illustrate that, eg. a red bar (rectangle) overlay at the end of the lane?

originalfoo avatar May 22 '22 03:05 originalfoo

there are 2 ways to create dead end: 1- user connects a lane to itself (specially useful for tracks) 2- user removes lane arrows. That second part might conflict with NC that removes lane arrow flags if all lanes go forward.

kianzarrin avatar Jun 12 '22 23:06 kianzarrin