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

RFI: Updates to mod options tabs #1356

Open
3 of 4 tasks
originalfoo opened this issue Feb 5, 2022 · 4 comments
Open
3 of 4 tasks

RFI: Updates to mod options tabs #1356

originalfoo opened this issue Feb 5, 2022 · 4 comments
Assignees
Labels
code cleanup Refactor code, remove old code, improve maintainability EPIC Collation of related issues Settings Road config, mod options, config xml UI User interface updates
Milestone

Comments

@originalfoo
Copy link
Member

originalfoo commented Feb 5, 2022

Current status: Phases 1-6 complete

Next steps:

First, implement a long-term stable API that other mods can use if they need access to TM:PE mod option values (in progress).

This is a summary of the changes I'm planning to make to options tabs (each numbered item represents one or more PRs):

EDIT: Phases 2, 3, 4, 5, and 6 are being done together in batches.

  1. Rename the tab .cs files
    • Eg. OptionsVehicleRestrictionsTab.cs will become PoliciesTab.cs
    • The class names in those files will be updated accordingly.
    • Note: This is only change that will occur for for Keybinds tab
  2. Split each group of options (and related set/update code) in to separate .cs file
    • Eg. MaintenanceTab_DespawnGroup.cs
    • Each of the "group" files will have an AddUI() method
    • The AddUI() methods will be called form parent tab MakeSettings... method
    • ...eg: MaintenanceTab_DespawnGroup.AddUI(tab);
  3. Update old-style checkboxes to CheckboxOption
  4. All default values will be defined in OptionsManager.LoadData()
    • At least initially... we can make further changes later if desired.
  5. Use PropagatesTrueTo feature of CheckboxOption to simplify associated code
  6. Remove cumbersome Set.... functions from option groups wherever possible

Finishing up:

@originalfoo originalfoo added UI User interface updates Settings Road config, mod options, config xml labels Feb 5, 2022
@originalfoo originalfoo self-assigned this Feb 5, 2022
@originalfoo originalfoo changed the title RFI: Updates to mod options tab RFI: Updates to mod options tabs Feb 5, 2022
@originalfoo originalfoo changed the title RFI: Updates to mod options tabs RFI: Planned updates to mod options tabs Feb 5, 2022
@originalfoo originalfoo added the code cleanup Refactor code, remove old code, improve maintainability label Feb 6, 2022
originalfoo added a commit that referenced this issue Feb 6, 2022
@originalfoo originalfoo added this to the 11.6.5 milestone Feb 6, 2022
originalfoo added a commit that referenced this issue Feb 6, 2022
Phase 1 refactor as per #1356

There will be separate PR for each of the other tabs.
originalfoo added a commit that referenced this issue Feb 6, 2022
Phase 1 refactor as per #1356

There will be separate PR for each of the other tabs.
originalfoo added a commit that referenced this issue Feb 7, 2022
Phase 1 refactor as per #1356

There will be separate PR for each of the other tabs.

Note: This affects PRs for Maintenance tab and VehicleRestrictions (Policies) tab.
originalfoo added a commit that referenced this issue Feb 7, 2022
Phase 1 refactor as per #1356

There will be separate PR for each of the other tabs.

Note how little code this rename touched - very well organised tab!
@originalfoo originalfoo added this to the 11.6.5.1 milestone Feb 15, 2022
@originalfoo
Copy link
Member Author

originalfoo commented Feb 15, 2022

Phase 2, 3, 4, 5, 6: Split out the groups, updating to CheckboxOption where possible, and other assorted cleanup:

@originalfoo
Copy link
Member Author

originalfoo commented Mar 5, 2022

Remainder of work will continue in 11.6.6.0 branch.

@originalfoo originalfoo added the EPIC Collation of related issues label Mar 21, 2022
@krzychu124 krzychu124 modified the milestones: 11.7.1, Planned stuff Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code cleanup Refactor code, remove old code, improve maintainability EPIC Collation of related issues Settings Road config, mod options, config xml UI User interface updates
Projects
None yet
Development

No branches or pull requests

2 participants