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

delete junction restrictions #639

Conversation

kianzarrin
Copy link
Collaborator

@kianzarrin kianzarrin commented Feb 2, 2020

Fixes #623
I provided Interface for resting junction values. to do so provide ternarybool.undefined to a set<traffic rule>() function

provided documentation explaining what I explained in description of #623.

User Interface: choose Junction restriction tool -> select a junction -> press delete or backspace

added KeyDown and KeyUp methods to keybind settings mimicking Input.KeyDown() and Input.KeyUp()

modified the crowding key : https://crowdin.com/translate/tmpe/42/en-en#8844 to explain the addition of hotkey. can someone approve and merge it please?

added check for isconfigurable.
added check to silently return when flag is not changed.
provided more documentation for the whole interface.
@originalfoo originalfoo added JUNCTION RESTRICTIONS Feature: Junction restrictions UI User interface updates Usability Make mod easier to use labels Feb 2, 2020
@originalfoo originalfoo added this to the 11.1 milestone Feb 2, 2020
@originalfoo originalfoo added the technical Tasks that need to be performed in order to improve quality and maintainability label Feb 2, 2020
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.

The code looks good and makes sense.

@originalfoo
Copy link
Member

Can't seem to get this to work.

I disabled some crosswalks on a junction:

image

Then, with node still selected tried pressing Del and Backspace but nothing changed

image

Exit tool and then go back in to junction restrictions again for that node, settings still there:

image

Tried pressing Del and Backspace again, but still no change:

image

Also, didn't see any shortcuts mentioned on Keybinds settings in mod options:

image

Nothing on the button tooltip either:

image

Note: I renamed mod version to 11.0-del-junc just to make sure I'd built it properly (also checked local repo state and it was definitely this branch) and was using correct mod. No other TMPE's loaded, nothing obvious in the logs.

TMPE.log
output_log.txt

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.

See comment above. The feature doesn't seem to be working.

@kianzarrin
Copy link
Collaborator Author

sorry it was working with hovered segment. I fixed it. now it works with selected node.

@originalfoo
Copy link
Member

This is working great now, just one remaining issue: The Backspace key has no effect (Delete key works fine).

@kianzarrin
Copy link
Collaborator Author

kianzarrin commented Feb 5, 2020

@aubergine10

This is working great now, just one remaining issue: The Backspace key has no effect (Delete key works fine).

Backspace does work for me. Do you have mac? Does backspace work on lane connection tool?
I take that back. backspace does not work for me either.

@kianzarrin
Copy link
Collaborator Author

@aubergine10 I don't know why backspace does not work and delete does. it probably is a bug in Key bind settings.

  • I tried to log what happens after pressing backspace, nothing happens unless if you are in laneconnector tool.
  • I also tried setting the category to Global but that did not work either.

I changed the tutorial message to include only delete key as the hotkey.

Is that OK?

@originalfoo
Copy link
Member

I think we still need backspace support...

@kvakvs Any idea why it's not working?

@kianzarrin
Copy link
Collaborator Author

@aubergine10 Of Course but does it have to block this pull request . Can't we do this as part of #568.

if you really want backspace right NOW I can hack it through by checking for Input.GetKeyDown() instead of KeybindSettingsBase.LaneConnectorDelete.KeyDown()

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 👍

Support for Backspace moved to #568.

For 11.2 release it would be nice to get Delete & Backspace working across all applicable tools.

@kianzarrin kianzarrin merged commit c286caa into CitiesSkylinesMods:master Feb 10, 2020
@kianzarrin kianzarrin deleted the 623-delete-junction-restrictions branch February 10, 2020 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JUNCTION RESTRICTIONS Feature: Junction restrictions technical Tasks that need to be performed in order to improve quality and maintainability UI User interface updates Usability Make mod easier to use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

managers should provide reset functions for traffic rules.
3 participants