-
Notifications
You must be signed in to change notification settings - Fork 85
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
Disambiguate LeftHandDrive
to TrafficDrivesOnLeft
#580
Conversation
LeftHandDrive actually means "traffic drives on right", but it's being used as "traffic drives on left". This is creating lots of confusion in the code base. A new property has been added: `TrafficDrivesOnLeft` which leaves nothing to the imagination.
Makes code intent much clearer. Also changed variable names, where applicable, from `lhd` to `lht` for correctness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff
I will check the code later but vanilla uses that term too. There is |
Yes, vanilla is also incorrect in the terminology it uses = mass confusion. Also, in some cases it will be valid to know which side driver is on - possibly for things like busses, trams, etc? In other words, which side do passengers transfer to the vehicle? At some point it would be nice to try and wrap the vanilla wrongness in something less confusing but I'm lacking in C# knowledge as to how to fix that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
I've created #581 to track future work to disambiguate the vanilla usage of |
Fixes #577 - h/t @kianzarrin for reporting the issue
The term "LHD" (Left Hand Drive_r_) actually relates to traffic driving on the right (RHT, or Right Hand Traffic). However, TM:PE was regularly using the term to refer to the situation where traffic drives on the left (which is actually RHD / LHT).
To avoid ongoing mass confusion, this PR obsoletes
Services.SimulationService.LeftHandDrive
and adds a new disambiguousServices.SimulationService.TrafficDrivesOnLeft
.Uses of the obsolete property have been updated to use the new property. Also any instances of that code creating variables called
lhd
(ie. traffic drives on right) have been updated tolht
(left hand traffic, which would be right hand driver).Features affected include:
RoutingManager
was updated, so anything that affects.Everything should just work, as all that's changed is the property name, not it's value.
Side note: As far as I can tell, all uses of the now-obsolete
LeftHandDrive
property are updated to useTrafficDrivesOnLeft
- should the obsolete property be removed?