question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Prevent players from setting invalid lane arrows

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
VictorPhilippcommented, Jun 9, 2019

Lane arrows and lane connections have different semantics. Lane arrows are thought to be less restrictive. Lane connections on the other hand cannot be ignored by vehicles. Thus, as of now you cannot represent lane arrows as lane connections.

Some use cases for “soft” lane arrows which cannot be covered by lane connections currently:

  • the player can set that busses may ignore lane arrows if necessary
  • Vehicles must be able to ignore lane arrows when they set off (think of a cemetery which is placed next to a junction)

I also think that showing so many lane connections would clutter the UI.

2reactions
originalfoocommented, Jun 9, 2019

On complex junctions, where there are say 6 segments connected to a node, some at strange angles, it is often difficult to discern exactly where traffic will go based on lane arrows alone. For precisely this reason I no longer use lane arrows feature and instead always use lane connectors feature.

In terms of cluttering UI, this would not be an issue if only the ‘active lane’ gets the connector line display. For example, user hovers the lane arrow panel for lane X, only the lane connectors for lane X are shown.

Lane arrows then become just a quick alternate way of setting lane connectors.

Instead of ignoring lane arrows, the relevant mod options would ignore lane routing (ie. lane connectors).

And, with everything now using lane connections the pathfinder & vehicle AIs have a single source of truth for routing through nodes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cities: Skylines - Cars use wrong highway lane
And the left turn lane have a option to turn left and go straight. ... Check if all lane arrows are pointing straight...
Read more >
Is there a way to prevent a summoned arrow from ...
What you could try doing is destroying any arrow 1 block away from you and set this in a repeat/always activate block to...
Read more >
Sighting At The Bowling Lane Arrows
Sighting at the arrows means that it is very easy to keep your eyes focused on your target without your head moving while...
Read more >
AntiBow | Prevent players shooting arrows
AntiBow is a useful plugin that prevents players from shooting arrows when they are in certain regions or worlds (WorldGuard/Multiverse).
Read more >
An Updated Guide to Funky Friday's Settings - YouTube
This video is here to explain every setting as best as I can! ... Arrow Customization 11:06 - Arrow Settings 11:39 - Arrow...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found