Implementation of Subscenes, SceneGroups and Gamemodes

Standardizes Gamemodes to be an actual class with data and utility functions that can be parsed
Adds inspector field handling for selecting gamemodes
Updated Scene class to work with Gamemodes for the gamemode field
Updates editor suite elements to be able to create SubScenes, SceneGroups and Gamemodes
Adds ability to convert SimGroup to SubScene
Updates BaseUI's chooselevel menu to have gamemode selection and filters shown levels based on selected gamemode
This commit is contained in:
Areloch 2024-09-01 16:39:00 -05:00
parent 0d07823ecd
commit ae8eca48e1
36 changed files with 2963 additions and 173 deletions

View file

@ -176,6 +176,31 @@ function AssetBrowser::performRenameAsset(%this, %originalAssetName, %newName)
%buildCommand = %this @ ".rename" @ EditAssetPopup.assetType @ "(" @ %assetDef @ "," @ %newName @ ");";
eval(%buildCommand);
}
else
{
//do generic action here
%oldAssetId = %moduleName @ ":" @ %originalAssetName;
%assetDef = AssetDatabase.acquireAsset(%oldAssetId);
%assetFileName = fileName(%assetDef.getFileName());
%assetFilePath = filePath(%assetDef.getFileName());
%pattern = %assetFilePath @ "/" @ %assetFileName @ ".*";
echo("Searching for matches of asset files following pattern: " @ %pattern);
//get list of files that match the name in the same dir
//do a rename on them
for (%file = findFirstFileMultiExpr(%pattern); %file !$= ""; %file = findNextFileMultiExpr(%pattern))
{
if(%file !$= %assetFileName)
renameAssetLooseFile(%file, %newName);
}
//update the assetDef
replaceInFile(%assetDef.getFileName(), %originalAssetName, %newName);
renameAssetFile(%assetDef, %newName);
}
}
else
{