Closed kianzarrin closed 2 years ago
build fail
oops ... extra bracket
Now it passes test. its ready to review.
@aubergine10 do you understand enough of this code to be able to approve it? the routing detector PRs are based on this so you can use them to see the routings.
@WildQuoll can you please test this. you can use the TMPE.zip link at the top of the page.
if you stress test it in your tram city it would be nice (don't save just test).
EDIT: this is also a problem in vanilla CS. when I change lane connections tram sometimes gets stuck. I didn't add lane connection to the tram lane though. I think what triggered the problem was publish segment changes. Routing does exist though: Is this know issue?
EDIT: I can reproduce with master too and STABLE too.
@aubergine10 what is the plan for this PR? when will it be reviewed?
Code looks good, but haven't had chance to test in game yet. Did you create issue for that tram sinking issue you found?
@krzychu124 trolleybuses are not track or lane-arrow-following vehicle. which one should they be? EDIT: I think trolleybuses don't have tracks (even though they are connected to the wires) so they should obey lane arrows.
@kianzarrin I think we should treat trolleybuses as following "overhead tracks" (the overhead wires). That being the case, they should be able to ingore lane arrows. If user wants more control over the "overhead tracks", maybe we could do something with lane connectors?
As for trams, similar thing - they should be able to go wherever the in-road tracks allow them to go. And if player wants to control the connections of tracks at junctions use lane connectors.
I think same with buses - if there's a bus lane the bus should be able to use it, regardless of lane arrows (obviously lane direction is still obeyed), otherwise why is the bus lane there? It's only on normal road lanes that buses should be following lane arrows, I think.
I think we should treat trolleybuses as following "overhead tracks" (the overhead wires). That being the case, they should be able to ingore lane arrows. If user wants more control over the "overhead tracks", maybe we could do something with lane connectors?
I also think they should ignore lane arrows. Trolleybuses actually don't care if there are overhead wires or not. They only require a lane with Trolleybus
vehicle type so they work more or less like trams but unlike trams they should be able to ignore turn angle just like other road vehicles.
@aubergine10 @krzychu124 Note that Trollybuses can use any of the road lanes regardless of the position of the "overhead tracks". currently there is a option about "buses can ignore lane arrows". I think that option should influence trollybuses too.
In the image bellow I think both bus and trolley bus should use the left-most lane to turn left:
But here I think they can use either:
Do you agree?
EDIT: now that I take a closer look CO asset editor has decided trolleybuses cannot use the left most lane at all for some reason:
maybe they should ignore lane arrows regardless of that option. What do you think?
Note that Trollybuses can use any of the road lanes regardless of the position of the "overhead tracks".
@kianzarrin That's not true -> oneway trolleybus road
They should always ignore arrows. Just try Dedicated turn lanes feature and try creating route on one-way trolleybus roads (left/right will become only right on screenshot above).
Also.. pathfinding still does not work. I can create trolleybus line but vehicles cannot be spawned (flicker 0/1),
I would make trolleybuses to completely ignore lane arrows. Later when Lane connector will get option for tram connections it could support trolleybuses if such lane type was selected.
Also.. pathfinding still does not work. I can create trolleybus line but vehicles cannot be spawned (flicker 0/1),
because they were following lane arrows.
I made them ignore lane arrows. it works now. but I am yet to test cargo ships and ferries.
@krzychu124 are ships/ferrys/planes even handled by CustomPathFind?
I made them ignore lane arrows.
Does not work... 😞
are ships/ferrys/planes even handled by CustomPathFind?
Everything. If we don't patch their StartPathFind then they just don't use any TM:PE features so don't touch Pathfinding if not needed (in 99% cases it is not required).
Tested with this city too: https://steamcommunity.com/sharedfiles/filedetails/?id=2561345715 It has everything but trolleybus. LOM test profile for city
Is this PR suitable for inclusion in to 11.6.5.2?
Bit late, but finally got round to testing this in game and didn't encounter any problems so LGTM 👍
TMPE.zip
minor changes:
outgoingVehicleLanes
andincommingVehicleLanes
now only applies to cars lanes only. Also renamed the variable toincommingCarLanes\incommingVehicleLanes
This serves as a precursor to #354. also fixes #1053. Test: