Docs categories
Problem
Currently documentation is hard to index as all syntax elements are usually in a giant list with no possibility of organizing by type.
Solution
Allows syntax to be organized in docs.json by a few common categories. Here are some examples.
- The damage source module can use the damage source category,
- The breeding module can use the entities category,
- The vector module can use the math category.
These categories can be expanded on by (official) addons, in case a docs site needs them. Extending is as easy as implementing Category and adding your own fields using Category#of.
To allow getting the module with which a syntax was registered, a new method was added to AddonModule for mass registering syntax using the current module. This method is recommended instead of registering to a registry directly. The damage source module has been converted to the new registration API to showcase this.
Testing Completed
Manual testing.
Supporting Information
Adds a new field to the docs.json spec called category.
Completes: none Related: none
I might also like to see a tree structure for categories:
Math:
ExprArith
Vectors:
ExprVectorLength