-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Mods can add categories to the help menu #78126
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…hing At least the result is way cleaner now
github-actions
bot
added
<Documentation>
Design documents, internal info, guides and help.
[JSON]
Changes (can be) made in JSON
[C++]
Changes (can be) made in C++. Previously named `Code`
[Markdown]
Markdown issues and PRs
Mods
Issues related to mods or modding
astyled
astyled PR, label is assigned by github actions
json-styled
JSON lint passed, label assigned by github actions
labels
Nov 25, 2024
github-actions
bot
added
the
Code: Tests
Measurement, self-control, statistics, balancing.
label
Nov 25, 2024
github-actions
bot
added
the
BasicBuildPassed
This PR builds correctly, label assigned by github actions
label
Nov 25, 2024
Draft
andrewhr
added a commit
to andrewhr/Cataclysm-DDA
that referenced
this pull request
Nov 28, 2024
After CleverRaven#78126 merge, there is no data/doc folder anymore, as help.json become "a thing" so to speak. This causes errors on macOS build, as part of dmg assembly we do need to copy all folders, and mv (at least on macOS) is strict in relation to the missing path. The fix is essentially remove all mentions to old data/doc from Makefile..
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
astyled
astyled PR, label is assigned by github actions
BasicBuildPassed
This PR builds correctly, label assigned by github actions
[C++]
Changes (can be) made in C++. Previously named `Code`
Code: Tests
Measurement, self-control, statistics, balancing.
<Documentation>
Design documents, internal info, guides and help.
[JSON]
Changes (can be) made in JSON
json-styled
JSON lint passed, label assigned by github actions
[Markdown]
Markdown issues and PRs
Mods
Issues related to mods or modding
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Mods "Mods can add categories to the help menu"
Purpose of change
Having in game explanations of the basics of mods peeps are playing with would be really nice
Describe the solution
Mods can place
"type": "help"
objects anywhere to add new categories to the help menu when the mod is loaded, see new doc and the existing ones in /data/core/help.json (or /data/help/texts.json prior to this PR's merge) for syntax.Moves the current help menu data to /data/core where it gets loaded normally rather than having unique handling with a hardcoded path
The category keybinds for the help menu are now autogenerated a-z then A-Z so that mods don't need to somehow pick unique ones
Order is per source so each mod can do an order from 0-X rather than somehow picking unique order numbers
Adds a new doc for adding to the help menu
Doesn't add any initial uses, Standing Storm has stuff for MoM somewhat ready to go though
Describe alternatives you've considered
After this I'll probably give imguifying the help menu a shot and maybe add tabs or separators per mod if I'm feeling spicy or at least make it handle more categories total than it can currently and put the category name at the top when you have one open.
Ideally it would use the same keybind tag parsing as parse_tags but I'll look at doing that in a later PR too where I try to wrangle some of the other random tags we parse separately. I might add parse_tags support itself if running it with a dummy Character on the main menu actually works period.
Testing
Tested the main menu help still worked on opening the game and after exiting to menu
Tested binds, mouse and highlighting worked as expected
Tested that multiple mods can add categories at the same time and that exiting to menu and loading saves with other mods etc works as expected
Additional context