Skip to content

Prevent players from setting invalid lane arrows #368

@VictorPhilipp

Description

@VictorPhilipp

Description

Players should not be able to set lane arrows that do not point to an outgoing segment.
For example, in issue #361 the player mistakenly used straight lane arrows where the angle between the 4-lane highway and 8-lane road with median requires a right pointing arrow.

Technical Info

  • Lane arrow logic is one of the features that is still handled by the legacy Flags class. We could use this opportunity to move the code to LaneArrowManager.
  • LaneArrowManager:
    • Implement logic to check which kind of lane arrows may be set for a given segment end
    • Implement logic to correct invalid lane arrows
    • Make ToggleLaneArrows() call SetLaneArrows()
    • SetLaneArrows(): Check if the intended lane arrow is valid
    • HandleValidSegment(): (gets called when a segment is updated) Make sure that old lane arrows are valid. If not, call correction code.
  • LaneArrowTool: Disable/Remove invalid lane arrow toggle buttons

Metadata

Metadata

Assignees

No one assigned

    Labels

    LANE ROUTINGFeature: Lane arrows / connectorsOverlaysOverlays, data vis, etc.UIUser interface updatesadjustments requiredAn issue require some adjustments in codeenhancementImprove existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions