mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 08:15:44 +00:00
Added D3D error code interpreter
Added sanity check for findMatch Finished most of asset importer logic to utilize settings system Cleaned up code for finding associated files Added General importer settings category and integrated logic for those settings fields Updated logic in variableGroup to support callbacks in custom fields Updated logic in variableInspector to better handle callbacks, as well as being able to manually update when manipulating fields Updated scripts to utilize project settings values for playGUI and mainMenuGUI names Improved module-oriented loading of materials Added util function for populating custom fonts
This commit is contained in:
parent
02262b014a
commit
ab9fc302fc
19 changed files with 620 additions and 598 deletions
|
|
@ -54,6 +54,11 @@ function initServer()
|
|||
$Server::MissionFileSpec = "data/levels/*.mis";
|
||||
|
||||
callOnModules("initServer");
|
||||
|
||||
//Maybe this should be a pref for better per-project control
|
||||
//But many physically based/gameplay things utilize materials being detected
|
||||
//So we'll load on the server as well
|
||||
loadModuleMaterials();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -33,27 +33,8 @@ function isScriptFile(%path)
|
|||
|
||||
function loadMaterials()
|
||||
{
|
||||
// Load any materials files for which we only have DSOs.
|
||||
|
||||
for( %file = findFirstFile( "*/materials.cs.dso" );
|
||||
%file !$= "";
|
||||
%file = findNextFile( "*/materials.cs.dso" ))
|
||||
{
|
||||
// Only execute, if we don't have the source file.
|
||||
%csFileName = getSubStr( %file, 0, strlen( %file ) - 4 );
|
||||
if( !isFile( %csFileName ) )
|
||||
exec( %csFileName );
|
||||
}
|
||||
|
||||
// Load all source material files.
|
||||
|
||||
for( %file = findFirstFile( "*/materials.cs" );
|
||||
%file !$= "";
|
||||
%file = findNextFile( "*/materials.cs" ))
|
||||
{
|
||||
exec( %file );
|
||||
}
|
||||
|
||||
loadModuleMaterials();
|
||||
|
||||
// Load all materials created by the material editor if
|
||||
// the folder exists
|
||||
if( IsDirectory( "materialEditor" ) )
|
||||
|
|
@ -251,7 +232,7 @@ function validateDatablockName(%name)
|
|||
%name = strreplace( %name, " ", "_" );
|
||||
|
||||
// remove any other invalid characters
|
||||
%invalidCharacters = "-+*/%$&§=()[].?\"#,;!~<>|°^{}";
|
||||
%invalidCharacters = "-+*/%$&<EFBFBD>=()[].?\"#,;!~<>|<7C>^{}";
|
||||
%name = stripChars( %name, %invalidCharacters );
|
||||
|
||||
if( %name $= "" )
|
||||
|
|
@ -621,4 +602,13 @@ function switchControlObject(%client, %newControlEntity)
|
|||
return error("SwitchControlObject: Target controller has no conrol object behavior!");
|
||||
|
||||
%control.setConnectionControlObject(%client);
|
||||
}
|
||||
|
||||
function populateAllFonts(%font)
|
||||
{
|
||||
populateFontCacheRange(%font,14,0,65535);
|
||||
populateFontCacheRange(%font,18,0,65535);
|
||||
populateFontCacheRange(%font,24,0,65535);
|
||||
populateFontCacheRange(%font,32,0,65535);
|
||||
populateFontCacheRange(%font,36,0,65535);
|
||||
}
|
||||
|
|
@ -17,4 +17,43 @@ function callOnModules(%functionName, %moduleGroup)
|
|||
eval(%module.scopeSet @ "." @ %functionName @ "();");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function loadModuleMaterials(%moduleGroup)
|
||||
{
|
||||
//Get our modules so we can exec any specific client-side loading/handling
|
||||
%modulesList = ModuleDatabase.findModules(false);
|
||||
for(%i=0; %i < getWordCount(%modulesList); %i++)
|
||||
{
|
||||
%module = getWord(%modulesList, %i);
|
||||
|
||||
if(%moduleGroup !$= "")
|
||||
{
|
||||
if(%module.group !$= %moduleGroup)
|
||||
continue;
|
||||
}
|
||||
|
||||
%modulePath = %module.ModulePath;
|
||||
|
||||
// Load any materials files for which we only have DSOs.
|
||||
|
||||
for( %file = findFirstFile( %modulePath @ "/*/materials.cs.dso" );
|
||||
%file !$= "";
|
||||
%file = findNextFile( %modulePath @ "/*/materials.cs.dso" ))
|
||||
{
|
||||
// Only execute, if we don't have the source file.
|
||||
%csFileName = getSubStr( %file, 0, strlen( %file ) - 4 );
|
||||
if( !isFile( %csFileName ) )
|
||||
exec( %csFileName );
|
||||
}
|
||||
|
||||
// Load all source material files.
|
||||
|
||||
for( %file = findFirstFile( %modulePath @ "/*/materials.cs" );
|
||||
%file !$= "";
|
||||
%file = findNextFile( %modulePath @ "/*/materials.cs" ))
|
||||
{
|
||||
exec( %file );
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue