Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quick fix for lane connector #703

Closed
kianzarrin opened this issue Feb 16, 2020 · 11 comments · Fixed by #706
Closed

quick fix for lane connector #703

kianzarrin opened this issue Feb 16, 2020 · 11 comments · Fixed by #706
Assignees
Labels
enhancement Improve existing feature LANE ROUTING Feature: Lane arrows / connectors Usability Make mod easier to use
Milestone

Comments

@kianzarrin
Copy link
Collaborator

pressing CTRL+S activates stay in lane feature. we can expand it to support the following situations:

Screenshot (505)
Screenshot (502)
Screenshot (500)

Sometimes people use lane connector to handle split road like this:
Screenshot (497)
But i think that is unnecessary because changing lane arrows would be sufficient(already possible by priority tool -> CTRL+ckick):
Screenshot (504)
Cars are not going to change lanes if switch lane while going straight in junctions is turned off.
maybe its worth supporting this too because customer is always right?

We need to limit the scope of this review so that it does not get into an all or nothing scenario. The following junction does not support quick fix:
Screenshot (503)
I cannot think of other junctions right now. but its worth discussing them for the second phase of this issue.

@kianzarrin kianzarrin added enhancement Improve existing feature feature A new distinct feature triage Awaiting issue categorisation LANE ROUTING Feature: Lane arrows / connectors labels Feb 16, 2020
@originalfoo
Copy link
Member

I assume existing Shift+S is getting changed to Ctrl+S as part of this (to tie in with how all the other tools work)? And then Shift+Ctrl+S would apply Ctrl+S to the route?

I think these two, defintely should be part of Ctrl+S shortcut as they are both clearly "straight on":

image image

Remember also that Ctrl+S (currently Shift+S) can be applied multiple times to toggle between:

  • Both directions
  • One direction
  • Other direction

The other two examples you posted are not "straight on" from the perspective of the main road:

image image

Maybe those could be Ctrl+J or something?

@kianzarrin
Copy link
Collaborator Author

The shift+S hotkey will be repurposed to be quick fix.

Also we don't need a 4-state stay in lane state-machines for one way roads.

@kianzarrin
Copy link
Collaborator Author

@aubergine10 we put comments at the same time. I prefer to use the same hotkey and not introduced a new one. the state machine would be variable depending on the connection.
Also we don't need a 4-state stay in lane state-machines for one way roads so that is kind of a bug.

@kianzarrin
Copy link
Collaborator Author

@aubergine10 The other two examples you posted are not "straight on" from the perspective of the main road

so ctrl+s is no longer straight on but rather quick setup.

@originalfoo
Copy link
Member

ok

@kianzarrin kianzarrin self-assigned this Feb 16, 2020
@kianzarrin
Copy link
Collaborator Author

kianzarrin commented Feb 16, 2020

Some intermediate results:
Screenshot (511)
Screenshot (512)
Screenshot (509)

It gets confused when the road is connected from left inner side of the highway. I should compare inner lanes in that case instead of outer lanes.

All of these scenarios is handled with one inclusive formula.

EDIT: I also modified stay in lane a bit. when removing lane connections, the node circles no longer disappear. Also one-way roads have only two states.

@kianzarrin
Copy link
Collaborator Author

kianzarrin commented Feb 16, 2020

OK this is done. but it depends on #701

EDIT:
Screenshot (513)

kianzarrin added a commit to kianzarrin/Cities-Skylines-Traffic-Manager-President-Edition that referenced this issue Feb 16, 2020
fixed a couple of issues with stay in lane.
@kianzarrin
Copy link
Collaborator Author

kianzarrin commented Feb 16, 2020

In this issue I do not intend to handle tracks. That should be handled as part of #705

I want to limit scope.

@kianzarrin
Copy link
Collaborator Author

This works with asym roads too:
Screenshot (517)
Screenshot (516)

@kianzarrin
Copy link
Collaborator Author

The second phase of this issue can connect the lanes from the other side of the T junction as well. Also support for 4 way junctions.

This way we can have a 4-state quick-setup state machine. StayInLane would be special case of Quick-setup where the connecting road has 0 lanes.

@originalfoo originalfoo added Usability Make mod easier to use and removed feature A new distinct feature triage Awaiting issue categorisation labels Feb 16, 2020
@pcfantasy
Copy link
Contributor

pcfantasy commented Feb 22, 2020

Aha, nice to see TMPE team also want to implement this function.

actually, I have implement this function for CSUR road.

https://github.com/citiesskylines-csur/CSURToolBox/blob/master/UI/StayInLaneUI.cs
AddLaneConnectionForCSUR

All outgoing lane will connect to nearest incoming lane, and All incoming lane will connect to nearest outgoing lane.

This is a quick way for Y juction in CSUR road.

Nice to see if more complex cases can by handle by TMPE tools.

kianzarrin added a commit that referenced this issue Apr 7, 2020
fixes #703 
- stay in lane on junctions (lanes do not crisscross). 
- When lane arithmetic does not match lanes connections are distributed evenly. the remainder goes to inner/other/center lanes depending  on circumstances.
- guide message is shown when nothing happens.
- changed shortcut key to CTRL+S (which conflicts with mod tools).
- I fixed a problem with stay in lane when stay in lane : when stayInLaneMode == None selected node markers disappeared.
- I added simple CanConnect() Condition for tracks which mostly solves #705. Asymmetrical tracks and mixed car/tram roads are still unsupported. 
fixes #617
- stay in lane does not connect if there is only one lane: #617
@originalfoo originalfoo added this to the 11.3.0 milestone Apr 7, 2020
krzychu124 added a commit that referenced this issue Apr 7, 2020
fixes #703
- stay in lane on junctions (lanes do not crisscross).
- When lane arithmetic does not match lanes connections are distributed evenly. the remainder goes to inner/other/center lanes depending  on circumstances.
- guide message is shown when nothing happens.
- changed shortcut key to CTRL+S (which conflicts with mod tools).
- I fixed a problem with stay in lane when stay in lane : when stayInLaneMode == None selected node markers disappeared.
- I added simple CanConnect() Condition for tracks which mostly solves #705. Asymmetrical tracks and mixed car/tram roads are still unsupported.
fixes #617
- stay in lane does not connect if there is only one lane: #617
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing feature LANE ROUTING Feature: Lane arrows / connectors Usability Make mod easier to use
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants