RobustToolbox icon indicating copy to clipboard operation
RobustToolbox copied to clipboard

Rework entity prototype categories

Open ElectroJr opened this issue 1 year ago • 0 comments

  • 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.Categories for 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 HideSpawnMenu field. The old HideSpawnMenu category is now just a category with that field set to true.
  • Reworked category inheritance. Inheritance can now be disabled per category using a Inheritable field.
    • 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 Components datafield.
      • By giving the component an EntityCategoryAttribute.
    • 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.

ElectroJr avatar Apr 22 '24 03:04 ElectroJr