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

Function to Disable & Remove Traffic Lights #535

Merged
merged 6 commits into from
Oct 31, 2019

Conversation

krzychu124
Copy link
Member

@krzychu124 krzychu124 commented Oct 21, 2019

Fixes #320

Description:

  • disable traffic lights at new junctions
    • touches only new junctions, not existing ones
    • still allows adding lights manually -- it only prevents lights at new junctions
  • remove all traffic lights at existing junctions
    • doesn't remove timed traffic lights
    • because quite drastic and undoable: confirmation dialog before execution

Additional work done:

…icts, changed manual detour to harmony postfix, adopted translations
@krzychu124 krzychu124 added enhancement Improve existing feature feature A new distinct feature Usability Make mod easier to use UI User interface updates 11 ALPHA TM:PE v11 alpha edition TRAFFIC LIGHTS Feature: Traffic lights - toggle, timed, etc labels Oct 21, 2019
@krzychu124 krzychu124 added this to the 11.0 milestone Oct 21, 2019
@krzychu124 krzychu124 self-assigned this Oct 21, 2019
@originalfoo
Copy link
Member

Looks like it will need translations adding to options.csv for following keys:

Policies tab:

  • VR.Checkbox:Disable setting up traffic lights for new junctions -- @VictorPhilipp once mentioned to me it's best to avoid 'negative' options, so this might be better as VR.Checkbox:Automatically add traffic lights if applicable (and default the setting to true)?

Maintenance tab:

  • Maintenance.Button:Remove all existing traffic lights

Not sure about following keys - @kvakvs any suggestions?

  • Maintenance.Dialog.Title:Remove all traffic lights
  • Maintenance.Dialog.Text:Remove all traffic lights, Confirmation

@krzychu124
Copy link
Member Author

krzychu124 commented Oct 22, 2019

Right, we have to add those keys.
Text is not final because I wasn't sure how it should look like, (Dialog.Text keys)
I forgot about negative option suggestion. I'd got 'false' as default value in my mind while I wrote that checkbox key text 😅 I like your suggested description.

Copy link
Collaborator

@kvakvs kvakvs left a comment

Choose a reason for hiding this comment

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

2 notes, but only 1 action required.
Otherwise looking good

TLM/TLM/Manager/Impl/OptionsManager.cs Show resolved Hide resolved
TLM/TLM/Manager/Impl/TrafficLightManager.cs Show resolved Hide resolved
@krzychu124
Copy link
Member Author

I've just benchmarked Remove traffic lights call and I must say it's not that bad. On my potato laptop, 30-35 ms, savegame with 650k population city

@krzychu124 krzychu124 merged commit 05a9b8b into master Oct 31, 2019
@krzychu124 krzychu124 deleted the 320-remove-disable-traffic-lights branch November 14, 2019 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
11 ALPHA TM:PE v11 alpha edition enhancement Improve existing feature feature A new distinct feature TRAFFIC LIGHTS Feature: Traffic lights - toggle, timed, etc UI User interface updates Usability Make mod easier to use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Button to remove / disable all traffic lights
3 participants