RobustToolbox
RobustToolbox copied to clipboard
Rework entity prototype categories
- Renames engine categories to use pascal case.
- Requires space-wizards/space-station-14/pull/27232.
- Added
IPrototypeManager.EnumerateAllParents()for enumerating over all parents, including any that are abstract. - Added
IPrototypeManager.Categoriesfor retrieving lists of prototypes that belong to a given category. - Allows categories to provide a default value for a prototype's EditorSuffix. E.g., all prototypes in the debug category should get "[Debug]" appended.
- Each category now has a
HideSpawnMenufield. The oldHideSpawnMenucategory is now just a category with that field set to true. - Reworked category inheritance. Inheritance can now be disabled per category using a
Inheritablefield.- This required some jank for entities to properly inherit categories from abstract parents.
- Entity prototypes can now be automatically added to categories based on the components that they have.
- This should help avoid issues where people might forget to specify categories. E.g., it makes it trivial to ensure that all action-entities are in the actions category, and are hidden from the spawn menu.
- There are two ways to associate a component with a category:
- By adding the component to the category's
Componentsdatafield. - By giving the component an
EntityCategoryAttribute.
- By adding the component to the category's
- Having two ways of doing this might lead to inconsistency, if it should be changed to use only one of these, then it should be done via the attribute, so that content can use engine categories.