-
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
Prevent the user from setting invalid Lane Arrows, update if lane connections exist #1724
Prevent the user from setting invalid Lane Arrows, update if lane connections exist #1724
Conversation
- calculate and refresh allowed lane arrows - reset custom lane arrows when after segment or node update set of available lane arrows is significantly different (segment supports more or less arrow directions than before) - block invalid Lane Arrows in Tool UI - update lane arrows if lane has lane connection(s)
- fixed lane flag recalculation after validation phase
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.
Tested ingame, lgtm
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 and plays good.
Multiple confusions after updating the game to 1.16 and lots of mods going broken or dead.
@@ -215,6 +217,9 @@ private enum Trigger { | |||
buttonLeft.ToggleFlag = API.Traffic.Enums.LaneArrows.Left; | |||
buttonLeft.UpdateButtonSkinAndTooltip(); | |||
buttonLeft.ParentTool = this; // to access error reporting function on click | |||
bool leftAllowed = (availableArrows & LaneArrows.Left) != 0; | |||
buttonLeft.isEnabled = leftAllowed; | |||
buttonLeft.tooltip = !leftAllowed ? T("LaneArrow: Direction not available") : string.Empty; |
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.
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.
true, need to be updated/string needs to be added 😉
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.
I'll create new PR with translations
Fixes #368
Enhancements in this PR:
Lane Arrows
on loadSegmentEnd
Lane Arrows
in the Tool UI, shows a tooltip for disabled arrowsLane Arrows
if the lane has anyLane Connection(s)
, to match direction of the lane connection_RoadBaseAI/SegmentSimulationStepPatch
since it does not provide any value other than wasting CPU timeProvided enhancements will solve a lot of mysterious issues reported by users in the past few years. Sometimes, for some reason (most likely segment update or bug in other feature) custom lane arrows became invalid, effectively causing huge pathfinding issues (including infamous "no cims coming from outside" when the users started a new city), since invalid arrows either don't create any lane transitions or only those of type "relaxed" which come with significant penalty for pathfinding when selected for regular vehicles.
Build ZIP