Skip to content
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

routing detector tool #1534

Merged
merged 84 commits into from
Apr 24, 2022
Merged

routing detector tool #1534

merged 84 commits into from
Apr 24, 2022

Conversation

kianzarrin
Copy link
Collaborator

@kianzarrin kianzarrin commented Apr 14, 2022

image
it shows different lane transitions type with different colors. when you hover over target lane it shows list of all transitions to that lane.

TODO:

  • highlight target lanes when hovering over source lanes (not only when selecting it).

Future:

TMPE.zip

@originalfoo
Copy link
Member

originalfoo commented Apr 14, 2022

Is this just for dev/debug, or is it aimed at end-users?

EDIT: Debug only - I suggest just re-use existing icons for button, rather than adding new ones, to avoid further filesize bloat of the mod.

Copy link
Member

@originalfoo originalfoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

I'd remove TLM/TLM/UI/MainMenu/MainMenuPanel.cs before merge.

As mentioned in previous comment, if it's debug only tool consider finding some existing texture to use for the button rather than adding new textures.

@kianzarrin
Copy link
Collaborator Author

kianzarrin commented Apr 15, 2022

@aubergine10

I'd remove TLM/TLM/UI/MainMenu/MainMenuPanel.cs before merge.

That is what I did. it was an empty file so I just deleted it :). that is why it is showing here.

I suggest just re-use existing icons

But then how can you tell the difference between different tools? these icons are not too big.
EDIT: I will include the files conditionally: 3587b21

Copy link
Contributor

@chameleon-tbn chameleon-tbn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kianzarrin kianzarrin mentioned this pull request Apr 16, 2022
@krzychu124
Copy link
Member

Select node, hover above an outgoing lane (any without white circle):

NullReferenceException: Object reference not set to an instance of an object
  at TrafficManager.UI.SubTools.RoutingDetector.RoutingDetectorTool.RenderActiveToolOverlay (.CameraInfo cameraInfo) [0x00000] in <filename unknown>:0 
  at TrafficManager.UI.TrafficManagerTool.RenderOverlayImpl (.CameraInfo cameraInfo) [0x00000] in <filename unknown>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
TrafficManager.Util.Shortcuts:LogException(Exception, Boolean)
TrafficManager.UI.TrafficManagerTool:RenderOverlayImpl(CameraInfo)
TrafficManager.UI.TrafficManagerTool:RenderOverlay(CameraInfo)
ToolManager:EndOverlayImpl(CameraInfo)
SimulationManagerBase`2:EndOverlay(CameraInfo)
ToolManager:IRenderableManager.EndOverlay(CameraInfo)
RenderManager:Managers_RenderOverlay(CameraInfo)
OverlayEffect:OnPostRender()

Copy link
Member

@krzychu124 krzychu124 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little bit over engineered (you don't need anything more than just the lane end (laneID + nodeID) to get all its transitions) but whatever.

It does what was advertised.

Base automatically changed from 1053-mixed-lanes to master April 24, 2022 16:39
@kianzarrin kianzarrin merged commit 9f5dceb into master Apr 24, 2022
@kianzarrin kianzarrin deleted the ShowRoutings branch April 24, 2022 16:47
@originalfoo originalfoo added this to the 11.6.5.2 milestone Apr 24, 2022
@originalfoo originalfoo added the Toolbar The main TMPE toolbar label Apr 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new distinct feature LANE ROUTING Feature: Lane arrows / connectors technical Tasks that need to be performed in order to improve quality and maintainability Toolbar The main TMPE toolbar
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants