CitiesSkylinesMods / TMPE

Cities: Skylines Traffic Manager: President Edition
https://steamcommunity.com/sharedfiles/filedetails/?id=1637663252
MIT License
571 stars 85 forks source link

Shortcut for fixing all round about rules in one click #539

Closed kianzarrin closed 4 years ago

kianzarrin commented 4 years ago

people use a lot of roundabouts in their cities. the vanilla roundabout can get a massive boost if pimped by traffic manager. while the roundabout mod automatically adds TMPE rules when creating them, I still want to be able to add traffic rules after creating roundabouts for example because I might modify my roundabout or I am trying to fix other peoples cities. I am planning to add a simple shortcut to fix all the traffic rules for a roundabout with one click. I prefer to avoid adding a roundabout tool to traffic manager. I think its best to use the already existing junction priority tool. select the tool and then press alt+shift+click on a round about to do all of the following:

originalfoo commented 4 years ago

Just a random thought: Looking at some of the glitches identified in the test images (great work btw!!) would it be worth having something that classifies as segment as "clockwise, anti-clockwise, or bidirectional"?

That way, if the starting segment is clockwise travel direction (such as roundabout on LHT cities), for example, it would make it easier to filter adjacent segments if, in relation to previous segment, they are going clockwise.

If starting segment is bi-directional, then pick a direction relevant to city setup: LHT = clockwise, RHT = anti-clockwise, and follow that curve?

Rough mockup: based on direction of traffic (on current segment) entering a node, and knowing if clockwise vs. anti-clockwise, could something like this work?

image

Example above would be for clockwise travel. So one line is "straight ahead", the other is at some angle of tolerance, and any outgoing segment in between would be considered candidate for "continuation of the road in the (anti)clockwise direction".

kianzarrin commented 4 years ago

Just a random thought: Looking at some of the glitches identified in the test images (great work btw!!) would it be worth having something that classifies as segment as "clockwise, anti-clockwise, or bidirectional"?

I can't see how to implement the clockwise direction thing since the code is not aware of the bigger picture when its focusing on one segment. I have some simple ideas to fix it

kianzarrin commented 4 years ago

I now check for nodeList.Contains(CurrentSegment.headNode) instead of segmentList.constains(currentSegment) Didn't solve the problem but made it a little bit better. No more zig zags.

before

Cities_xmCQOsZYuX Cities_TH4DK7RkAE

After

Cities_PtXixifMAF

Cities_HdgHjyccJG