clean up "Add" menubar categoes on the 3d object side via the following:

SceneObject now defaults to a category of "misc"
getCategoryOfClass now checks parent classes for what categories they hold so that variants can inherit
categories are in one of a few rough groups and subgroups depending on actual mapper needs/usages
This commit is contained in:
AzaezelX 2023-11-08 20:42:47 -06:00
parent edbb76155b
commit fbcfe02098
157 changed files with 127 additions and 131 deletions

View file

@ -472,7 +472,10 @@ function EditorGui::buildMenus(%this)
for(%c=0; %c < getFieldCount(%enumeratedClasses); %c++)
{
%class = getField(%enumeratedClasses, %c);
//SceneObject itself is not directly spawnable
if (%class $= "SceneObject")
continue;
%category = getCategoryOfClass(%class);
if(%category $= "")
@ -480,7 +483,13 @@ function EditorGui::buildMenus(%this)
error("Attempted to fetch category of class " @ %class @ " but none were found.");
continue;
}
//skip classes explicitly tagged not for listing (typically due to being unspawnable)
if(%category $= "UNLISTED")
continue;
if(%category $= "MISC")
warn("unsorted class: "@ %class);
%parentMenu = %addMenu; //start at the top
for(%cat=0; %cat < getFieldCount(%category); %cat++)
{