mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14:35 +00:00
Improve handling of non-default script filenames
This commit is contained in:
parent
099dd4f1f3
commit
9ccaa6d3ea
118 changed files with 534 additions and 528 deletions
|
|
@ -2,7 +2,7 @@
|
|||
ModuleId="CoreModule"
|
||||
VersionId="1"
|
||||
Description="Module that implements the core engine-level setup for the game."
|
||||
ScriptFile="Core.tscript"
|
||||
ScriptFile="Core"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy"
|
||||
Group="Core"/>
|
||||
|
|
@ -27,10 +27,10 @@ function CoreModule::onCreate(%this)
|
|||
ModuleDatabase.LoadExplicit( "Core_PostFX" );
|
||||
ModuleDatabase.LoadExplicit( "Core_GameObjects" );
|
||||
|
||||
exec("data/defaults.tscript");
|
||||
exec("data/defaults." @ $TorqueScriptFileExtension);
|
||||
%prefPath = getPrefpath();
|
||||
if ( isFile( %prefPath @ "/clientPrefs.tscript" ) )
|
||||
exec( %prefPath @ "/clientPrefs.tscript" );
|
||||
if ( isFile( %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension ) )
|
||||
exec( %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension );
|
||||
|
||||
// Seed the random number generator.
|
||||
setRandomSeed();
|
||||
|
|
@ -44,7 +44,7 @@ function CoreModule::onCreate(%this)
|
|||
createCanvas($appName);
|
||||
|
||||
//load canvas
|
||||
//exec("./console/main.tscript");
|
||||
//exec("./console/main." @ $TorqueScriptFileExtension);
|
||||
|
||||
ModuleDatabase.LoadExplicit( "Core_Console" );
|
||||
|
||||
|
|
@ -62,8 +62,8 @@ function CoreModule::onCreate(%this)
|
|||
// If we have editors, initialize them here as well
|
||||
if (isToolBuild())
|
||||
{
|
||||
if(isFile("tools/main.tscript") && !$isDedicated)
|
||||
exec("tools/main.tscript");
|
||||
if(isFile("tools/main." @ $TorqueScriptFileExtension) && !$isDedicated)
|
||||
exec("tools/main." @ $TorqueScriptFileExtension);
|
||||
}
|
||||
|
||||
//This is used to build the remap keybind sets for the different actionMaps.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
ModuleId="Core_ClientServer"
|
||||
VersionId="1"
|
||||
Description="Default module for the game."
|
||||
ScriptFile="Core_ClientServer.tscript"
|
||||
ScriptFile="Core_ClientServer"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy"
|
||||
Group="Core">
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@
|
|||
function Core_ClientServer::onCreate( %this )
|
||||
{
|
||||
echo("\n--------- Initializing Directory: scripts ---------");
|
||||
exec( "./scripts/client/client.tscript" );
|
||||
exec( "./scripts/server/server.tscript" );
|
||||
exec( "./scripts/client/client." @ $TorqueScriptFileExtension );
|
||||
exec( "./scripts/server/server." @ $TorqueScriptFileExtension );
|
||||
|
||||
$Game::MainScene = getScene(0);
|
||||
|
||||
|
|
@ -52,11 +52,11 @@ function Core_ClientServer::onDestroy( %this )
|
|||
|
||||
echo("Exporting client prefs");
|
||||
%prefPath = getPrefpath();
|
||||
export("$pref::*", %prefPath @ "/clientPrefs.tscript", false);
|
||||
export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false);
|
||||
|
||||
echo("Exporting server prefs");
|
||||
export("$Pref::Server::*", %prefPath @ "/serverPrefs.tscript", false);
|
||||
BanList::Export(%prefPath @ "/banlist.tscript");
|
||||
export("$Pref::Server::*", %prefPath @ "/serverPrefs." @ $TorqueScriptFileExtension, false);
|
||||
BanList::Export(%prefPath @ "/banlist." @ $TorqueScriptFileExtension);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -9,16 +9,16 @@ function initClient()
|
|||
$Client::GameTypeQuery = $appName;
|
||||
$Client::MissionTypeQuery = "Any";
|
||||
|
||||
exec( "./message.tscript" );
|
||||
exec( "./connectionToServer.tscript" );
|
||||
exec( "./levelDownload.tscript" );
|
||||
exec( "./levelLoad.tscript" );
|
||||
exec( "./message." @ $TorqueScriptFileExtension );
|
||||
exec( "./connectionToServer." @ $TorqueScriptFileExtension );
|
||||
exec( "./levelDownload." @ $TorqueScriptFileExtension );
|
||||
exec( "./levelLoad." @ $TorqueScriptFileExtension );
|
||||
|
||||
//load prefs
|
||||
exec( "data/defaults.tscript" );
|
||||
exec( "data/defaults." @ $TorqueScriptFileExtension );
|
||||
%prefPath = getPrefpath();
|
||||
if ( isFile( %prefPath @ "/clientPrefs.tscript" ) )
|
||||
exec( %prefPath @ "/clientPrefs.tscript" );
|
||||
if ( isFile( %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension ) )
|
||||
exec( %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension );
|
||||
|
||||
callOnModules("initClient");
|
||||
|
||||
|
|
|
|||
|
|
@ -27,21 +27,21 @@ function initServer()
|
|||
//load prefs
|
||||
|
||||
//Force-load the defaults just so we don't have any mistakes
|
||||
exec( "./defaults.tscript" );
|
||||
exec( "./defaults." @ $TorqueScriptFileExtension );
|
||||
|
||||
//Then, if the user has saved preferences, we load those over-top the defaults
|
||||
%prefPath = getPrefpath();
|
||||
if ( isFile( %prefPath @ "/serverPrefs.tscript" ) )
|
||||
exec( %prefPath @ "/serverPrefs.tscript" );
|
||||
if ( isFile( %prefPath @ "/serverPrefs." @ $TorqueScriptFileExtension ) )
|
||||
exec( %prefPath @ "/serverPrefs." @ $TorqueScriptFileExtension );
|
||||
|
||||
exec( "./audio.tscript" );
|
||||
exec( "./commands.tscript" );
|
||||
exec( "./kickban.tscript" );
|
||||
exec( "./message.tscript" );
|
||||
exec( "./levelDownload.tscript" );
|
||||
exec( "./levelLoad.tscript" );
|
||||
exec( "./levelInfo.tscript" );
|
||||
exec( "./connectionToClient.tscript" );
|
||||
exec( "./audio." @ $TorqueScriptFileExtension );
|
||||
exec( "./commands." @ $TorqueScriptFileExtension );
|
||||
exec( "./kickban." @ $TorqueScriptFileExtension );
|
||||
exec( "./message." @ $TorqueScriptFileExtension );
|
||||
exec( "./levelDownload." @ $TorqueScriptFileExtension );
|
||||
exec( "./levelLoad." @ $TorqueScriptFileExtension );
|
||||
exec( "./levelInfo." @ $TorqueScriptFileExtension );
|
||||
exec( "./connectionToClient." @ $TorqueScriptFileExtension );
|
||||
|
||||
// Server::Status is returned in the Game Info Query and represents the
|
||||
// current status of the server. This string sould be very short.
|
||||
|
|
@ -250,9 +250,9 @@ function destroyServer()
|
|||
// Save any server settings
|
||||
%prefPath = getPrefpath();
|
||||
echo( "Exporting server prefs..." );
|
||||
export( "$Pref::Server::*", %prefPath@"/serverPrefs.tscript", false );
|
||||
export( "$Pref::Server::*", %prefPath@"/serverPrefs." @ $TorqueScriptFileExtension, false );
|
||||
|
||||
BanList::Export(%prefPath@"/banlist.tscript");
|
||||
BanList::Export(%prefPath@"/banlist." @ $TorqueScriptFileExtension);
|
||||
|
||||
// Increase the server session number. This is used to make sure we're
|
||||
// working with the server session we think we are.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
ModuleId="Core_Console"
|
||||
VersionId="1"
|
||||
Description="Module that implements the core engine-level setup for the game."
|
||||
ScriptFile="Core_Console.tscript"
|
||||
ScriptFile="Core_Console"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy"
|
||||
Group="Core"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
function Core_Console::onCreate(%this)
|
||||
{
|
||||
exec("./scripts/profiles.tscript");
|
||||
exec("./scripts/console.tscript");
|
||||
exec("./scripts/profiles." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/console." @ $TorqueScriptFileExtension);
|
||||
|
||||
exec("./guis/console.gui");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
ModuleId="Core_GameObjects"
|
||||
VersionId="1"
|
||||
Description="Module that implements the core engine-level setup for the game."
|
||||
ScriptFile="Core_GameObjects.tscript"
|
||||
ScriptFile="Core_GameObjects"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy"
|
||||
Group="Core">
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ function Core_GameObjects::initServer( %this )
|
|||
|
||||
function Core_GameObjects::onCreateGameServer(%this)
|
||||
{
|
||||
%this.registerDatablock("./datablocks/defaultDatablocks.tscript");
|
||||
%this.registerDatablock("./datablocks/defaultDatablocks." @ $TorqueScriptFileExtension);
|
||||
}
|
||||
|
||||
function Core_GameObjects::onDestroyGameServer(%this)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
ModuleId="Core_GUI"
|
||||
VersionId="1"
|
||||
Description="Module that implements the core engine-level setup for the game."
|
||||
ScriptFile="Core_GUI.tscript"
|
||||
ScriptFile="Core_GUI"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy"
|
||||
Group="Core"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
function Core_GUI::onCreate(%this)
|
||||
{
|
||||
exec("./scripts/profiles.tscript");
|
||||
exec("./scripts/canvas.tscript");
|
||||
exec("./scripts/cursor.tscript");
|
||||
exec("./scripts/profiles." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/canvas." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/cursor." @ $TorqueScriptFileExtension);
|
||||
}
|
||||
|
||||
function Core_GUI::onDestroy(%this)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
ModuleId="Core_Lighting"
|
||||
VersionId="1"
|
||||
Description="Module that implements the core engine-level setup for the game."
|
||||
ScriptFile="Core_Lighting.tscript"
|
||||
ScriptFile="Core_Lighting"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy"
|
||||
Group="Core">
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
|
||||
function Core_Lighting::onCreate(%this)
|
||||
{
|
||||
exec("./scripts/lighting.tscript");
|
||||
exec("./scripts/lighting." @ $TorqueScriptFileExtension);
|
||||
|
||||
//Advanced/Deferred
|
||||
exec("./scripts/advancedLighting_Shaders.tscript");
|
||||
exec("./scripts/deferredShading.tscript");
|
||||
exec("./scripts/advancedLighting_Init.tscript");
|
||||
exec("./scripts/advancedLighting_Shaders." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/deferredShading." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/advancedLighting_Init." @ $TorqueScriptFileExtension);
|
||||
|
||||
//Basic/Forward
|
||||
exec("./scripts/basicLighting_shadowFilter.tscript");
|
||||
exec("./scripts/shadowMaps_Init.tscript");
|
||||
exec("./scripts/basicLighting_Init.tscript");
|
||||
exec("./scripts/basicLighting_shadowFilter." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/shadowMaps_Init." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/basicLighting_Init." @ $TorqueScriptFileExtension);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ $pref::LightManager::sgUseDynamicShadows = "1";
|
|||
$pref::LightManager::sgUseToneMapping = "";
|
||||
*/
|
||||
|
||||
//exec( "./shaders.tscript" );
|
||||
//exec( "./deferredShading.tscript" );
|
||||
//exec( "./shaders." @ $TorqueScriptFileExtension );
|
||||
//exec( "./deferredShading." @ $TorqueScriptFileExtension );
|
||||
|
||||
function onActivateAdvancedLM()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//exec( "./shadowFilter.tscript" );
|
||||
//exec( "./shadowFilter." @ $TorqueScriptFileExtension );
|
||||
|
||||
singleton GFXStateBlockData( BL_ProjectedShadowSBData )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,12 +26,12 @@ function initLightingSystems(%manager)
|
|||
|
||||
// First exec the scripts for the different light managers
|
||||
// in the lighting folder.
|
||||
/*%pattern = "./lighting/*//*init.tscript";
|
||||
/*%pattern = "./lighting/*//*init." @ $TorqueScriptFileExtension;
|
||||
%file = findFirstFile( %pattern );
|
||||
if ( %file $= "" )
|
||||
{
|
||||
// Try for DSOs next.
|
||||
%pattern = "./lighting/*//*init.tscript.dso";
|
||||
%pattern = "./lighting/*//*init." @ $TorqueScriptFileExtension @ ".dso";
|
||||
%file = findFirstFile( %pattern );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
ModuleId="Core_PostFX"
|
||||
VersionId="1"
|
||||
Description="Module that implements the core engine-level setup for the game."
|
||||
ScriptFile="Core_PostFX.tscript"
|
||||
ScriptFile="Core_PostFX"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy"
|
||||
Group="Core"
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
function Core_PostFX::onCreate(%this)
|
||||
{
|
||||
//
|
||||
exec("./scripts/postFxManager.tscript");
|
||||
exec("./scripts/postFx.tscript");
|
||||
exec("./scripts/postFxManager." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/postFx." @ $TorqueScriptFileExtension);
|
||||
|
||||
//Load the default config
|
||||
loadPresetHandler("./scripts/default.postfxpreset.tscript");
|
||||
loadPresetHandler("./scripts/default.postfxpreset." @ $TorqueScriptFileExtension);
|
||||
}
|
||||
|
||||
function Core_PostFX::onDestroy(%this)
|
||||
|
|
|
|||
|
|
@ -581,7 +581,7 @@ function DepthOfFieldPostFX::autoFocus( %this )
|
|||
/*
|
||||
function reloadDOF()
|
||||
{
|
||||
exec( "./dof.tscript" );
|
||||
exec( "./dof." @ $TorqueScriptFileExtension );
|
||||
DepthOfFieldPostFX.reload();
|
||||
DepthOfFieldPostFX.disable();
|
||||
DepthOfFieldPostFX.enable();
|
||||
|
|
|
|||
|
|
@ -39,12 +39,12 @@ function postFXInit()
|
|||
if (!$Server::Dedicated)
|
||||
{
|
||||
//init the postFX
|
||||
%pattern = "./*.tscript";
|
||||
%pattern = "./*." @ $TorqueScriptFileExtension;
|
||||
%file = findFirstFile( %pattern );
|
||||
if ( %file $= "" )
|
||||
{
|
||||
// Try for DSOs next.
|
||||
%pattern = "core/postFX/*.tscript.dso";
|
||||
%pattern = "core/postFX/*." @ $TorqueScriptFileExtension @ ".dso";
|
||||
%file = findFirstFile( %pattern );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,15 +40,15 @@ function PostFXManager::registerPostEffect(%this, %postEffect)
|
|||
}
|
||||
|
||||
// Used to name the saved files.
|
||||
$PostFXManager::fileExtension = ".postfxpreset.tscript";
|
||||
$PostFXManager::fileExtension = ".postfxpreset." @ $TorqueScriptFileExtension;
|
||||
|
||||
// The filter string for file open/save dialogs.
|
||||
$PostFXManager::fileFilter = "Post Effect Presets|*.postfxpreset.tscript";
|
||||
$PostFXManager::fileFilter = "Post Effect Presets|*.postfxpreset." @ $TorqueScriptFileExtension;
|
||||
|
||||
// Enable / disable PostFX when loading presets or just apply the settings?
|
||||
$PostFXManager::forceEnableFromPresets = true;
|
||||
|
||||
$PostFXManager::defaultPreset = "core/postFX/scripts/default.postfxpreset.tscript";
|
||||
$PostFXManager::defaultPreset = "core/postFX/scripts/default.postfxpreset." @ $TorqueScriptFileExtension;
|
||||
|
||||
$PostFXManager::currentPreset = "";
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
ModuleId="Core_Rendering"
|
||||
VersionId="1"
|
||||
Description="Module that implements the core engine-level setup for the game."
|
||||
ScriptFile="Core_Rendering.tscript"
|
||||
ScriptFile="Core_Rendering"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy"
|
||||
Group="Core">
|
||||
|
|
|
|||
|
|
@ -35,8 +35,6 @@ function Core_Rendering::onCreate(%this)
|
|||
exec("./scripts/gfxData/terrainBlock." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/gfxData/water." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/gfxData/warningTerrainMat." @ $TorqueScriptFileExtension);
|
||||
|
||||
loadTerrainSettings();
|
||||
}
|
||||
|
||||
function Core_Rendering::onDestroy(%this)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
ModuleId="Core_SFX"
|
||||
VersionId="1"
|
||||
Description="Module that implements the core engine-level setup for the game."
|
||||
ScriptFile="Core_SFX.tscript"
|
||||
ScriptFile="Core_SFX"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy"
|
||||
Group="Core">
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
|
||||
function Core_SFX::onCreate(%this)
|
||||
{
|
||||
exec("./scripts/audio.tscript");
|
||||
exec("./scripts/audioData.tscript");
|
||||
exec("./scripts/audioAmbience.tscript");
|
||||
exec("./scripts/audioDescriptions.tscript");
|
||||
exec("./scripts/audioEnvironments.tscript");
|
||||
exec("./scripts/audioStates.tscript");
|
||||
exec("./scripts/audio." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/audioData." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/audioAmbience." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/audioDescriptions." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/audioEnvironments." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/audioStates." @ $TorqueScriptFileExtension);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
ModuleId="Core_Utility"
|
||||
VersionId="1"
|
||||
Description="Module that implements the core engine-level setup for the game."
|
||||
ScriptFile="Core_Utility.tscript"
|
||||
ScriptFile="Core_Utility"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy"
|
||||
Group="Core">
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
|
||||
function Core_Utility::onCreate(%this)
|
||||
{
|
||||
exec("./scripts/parseArgs.tscript");
|
||||
exec("./scripts/globals.tscript");
|
||||
exec("./scripts/helperFunctions.tscript");
|
||||
exec("./scripts/gameObjectManagement.tscript");
|
||||
exec("./scripts/persistanceManagement.tscript");
|
||||
exec("./scripts/module.tscript");
|
||||
exec("./scripts/scene.tscript");
|
||||
exec("./scripts/input.tscript");
|
||||
exec("./scripts/parseArgs." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/globals." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/helperFunctions." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/gameObjectManagement." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/persistanceManagement." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/module." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/scene." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/input." @ $TorqueScriptFileExtension);
|
||||
}
|
||||
|
||||
function Core_Utility::onDestroy(%this)
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ function loadMaterials()
|
|||
// the folder exists
|
||||
if( IsDirectory( "materialEditor" ) )
|
||||
{
|
||||
for( %file = findFirstFile( "materialEditor/*.tscript.dso" );
|
||||
for( %file = findFirstFile( "materialEditor/*." @ $TorqueScriptFileExtension @ ".dso" );
|
||||
%file !$= "";
|
||||
%file = findNextFile( "materialEditor/*.tscript.dso" ))
|
||||
%file = findNextFile( "materialEditor/*." @ $TorqueScriptFileExtension @ ".dso" ))
|
||||
{
|
||||
// Only execute, if we don't have the source file.
|
||||
%csFileName = getSubStr( %file, 0, strlen( %file ) - 4 );
|
||||
|
|
@ -49,9 +49,9 @@ function loadMaterials()
|
|||
exec( %csFileName );
|
||||
}
|
||||
|
||||
for( %file = findFirstFile( "materialEditor/*.tscript" );
|
||||
for( %file = findFirstFile( "materialEditor/*." @ $TorqueScriptFileExtension );
|
||||
%file !$= "";
|
||||
%file = findNextFile( "materialEditor/*.tscript" ))
|
||||
%file = findNextFile( "materialEditor/*." @ $TorqueScriptFileExtension ))
|
||||
{
|
||||
exec( %file );
|
||||
}
|
||||
|
|
@ -477,11 +477,11 @@ function compileFiles(%pattern)
|
|||
|
||||
$Scripts::OverrideDSOPath = %path;
|
||||
$Scripts::ignoreDSOs = false;
|
||||
%mainCsFile = makeFullPath("main.tscript");
|
||||
%mainCsFile = makeFullPath("main." @ $TorqueScriptFileExtension);
|
||||
|
||||
for (%file = findFirstFileMultiExpr(%pattern); %file !$= ""; %file = findNextFileMultiExpr(%pattern))
|
||||
{
|
||||
// we don't want to try and compile the primary main.tscript
|
||||
// we don't want to try and compile the primary main
|
||||
if(%mainCsFile !$= %file)
|
||||
compile(%file, true);
|
||||
}
|
||||
|
|
@ -502,7 +502,7 @@ function displayHelp()
|
|||
|
||||
error(
|
||||
"Torque Demo command line options:\n"@
|
||||
" -log <logmode> Logging behavior; see main.tscript comments for details\n"@
|
||||
" -log <logmode> Logging behavior; see main." @ $TorqueScriptFileExtension @ " comments for details\n"@
|
||||
" -game <game_name> Reset list of mods to only contain <game_name>\n"@
|
||||
" <game_name> Works like the -game argument\n"@
|
||||
" -dir <dir_name> Add <dir_name> to list of directories\n"@
|
||||
|
|
@ -518,8 +518,8 @@ function loadDir(%dir)
|
|||
{
|
||||
pushback($userDirs, %dir, ";");
|
||||
|
||||
if (isScriptFile(%dir @ "/main.tscript"))
|
||||
exec(%dir @ "/main.tscript");
|
||||
if (isScriptFile(%dir @ "/main." @ $TorqueScriptFileExtension))
|
||||
exec(%dir @ "/main." @ $TorqueScriptFileExtension);
|
||||
}
|
||||
|
||||
function loadDirs(%dirPath)
|
||||
|
|
@ -528,7 +528,7 @@ function loadDirs(%dirPath)
|
|||
if (%dirPath !$= "")
|
||||
loadDirs(%dirPath);
|
||||
|
||||
if(exec(%token @ "/main.tscript") != true)
|
||||
if(exec(%token @ "/main." @ $TorqueScriptFileExtension) != true)
|
||||
{
|
||||
error("Error: Unable to find specified directory: " @ %token );
|
||||
$dirCount--;
|
||||
|
|
|
|||
|
|
@ -51,9 +51,9 @@ function loadModuleMaterials(%moduleGroup)
|
|||
|
||||
// Load any materials files for which we only have DSOs.
|
||||
|
||||
for( %file = findFirstFile( %modulePath @ "/*/materials.tscript.dso" );
|
||||
for( %file = findFirstFile( %modulePath @ "/*/materials." @ $TorqueScriptFileExtension @ ".dso" );
|
||||
%file !$= "";
|
||||
%file = findNextFile( %modulePath @ "/*/materials.tscript.dso" ))
|
||||
%file = findNextFile( %modulePath @ "/*/materials." @ $TorqueScriptFileExtension @ ".dso" ))
|
||||
{
|
||||
// Only execute, if we don't have the source file.
|
||||
%csFileName = getSubStr( %file, 0, strlen( %file ) - 4 );
|
||||
|
|
@ -63,9 +63,9 @@ function loadModuleMaterials(%moduleGroup)
|
|||
|
||||
// Load all source material files.
|
||||
|
||||
for( %file = findFirstFile( %modulePath @ "/*/materials.tscript" );
|
||||
for( %file = findFirstFile( %modulePath @ "/*/materials." @ $TorqueScriptFileExtension );
|
||||
%file !$= "";
|
||||
%file = findNextFile( %modulePath @ "/*/materials.tscript" ))
|
||||
%file = findNextFile( %modulePath @ "/*/materials." @ $TorqueScriptFileExtension ))
|
||||
{
|
||||
exec( %file );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -355,7 +355,7 @@ function parseArgs()
|
|||
%i++;
|
||||
}
|
||||
else
|
||||
error("Error: Missing Command Line argument. Usage: -prefs <path/script.tscript>");
|
||||
error("Error: Missing Command Line argument. Usage: -prefs <path/script." @ $TorqueScriptFileExtension @ ">");
|
||||
|
||||
|
||||
//-------------------
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ function TestPManager::testNewObject(%doNotSave)
|
|||
};
|
||||
|
||||
// Flag it as dirty
|
||||
TestPManager.setDirty(AudioNew, "core/scripts/client/audio.tscript");
|
||||
TestPManager.setDirty(AudioNew, "core/scripts/client/audio." @ $TorqueScriptFileExtension);
|
||||
|
||||
// Test adding a new unnamed object
|
||||
%obj = new SFXDescription()
|
||||
|
|
@ -123,12 +123,12 @@ function TestPManager::testNewObject(%doNotSave)
|
|||
};
|
||||
|
||||
// Flag it as dirty
|
||||
TestPManager.setDirty(%obj, "core/scripts/client/audio.tscript");
|
||||
TestPManager.setDirty(%obj, "core/scripts/client/audio." @ $TorqueScriptFileExtension);
|
||||
|
||||
// Test adding an "empty" object
|
||||
new SFXDescription(AudioEmpty);
|
||||
|
||||
TestPManager.setDirty(AudioEmpty, "core/scripts/client/audio.tscript");
|
||||
TestPManager.setDirty(AudioEmpty, "core/scripts/client/audio." @ $TorqueScriptFileExtension);
|
||||
|
||||
// Unless %doNotSave is set (by a batch/combo test)
|
||||
// then go ahead and save now
|
||||
|
|
@ -165,7 +165,7 @@ function TestPManager::testNewGroup(%doNotSave)
|
|||
};
|
||||
|
||||
// Flag this as dirty
|
||||
TestPManager.setDirty(TestGroup, "core/scripts/client/audio.tscript");
|
||||
TestPManager.setDirty(TestGroup, "core/scripts/client/audio." @ $TorqueScriptFileExtension);
|
||||
|
||||
// Test adding a new unnamed SimGroup
|
||||
%group = new SimGroup()
|
||||
|
|
@ -193,7 +193,7 @@ function TestPManager::testNewGroup(%doNotSave)
|
|||
};
|
||||
|
||||
// Flag this as dirty
|
||||
TestPManager.setDirty(%group, "core/scripts/client/audio.tscript");
|
||||
TestPManager.setDirty(%group, "core/scripts/client/audio." @ $TorqueScriptFileExtension);
|
||||
|
||||
// Test adding a new unnamed SimSet
|
||||
%set = new SimSet()
|
||||
|
|
@ -221,7 +221,7 @@ function TestPManager::testNewGroup(%doNotSave)
|
|||
};
|
||||
|
||||
// Flag this as dirty
|
||||
TestPManager.setDirty(%set, "core/scripts/client/audio.tscript");
|
||||
TestPManager.setDirty(%set, "core/scripts/client/audio." @ $TorqueScriptFileExtension);
|
||||
|
||||
// Unless %doNotSave is set (by a batch/combo test)
|
||||
// then go ahead and save now
|
||||
|
|
@ -257,7 +257,7 @@ function TestPManager::testMoveObject(%doNotSave)
|
|||
};
|
||||
|
||||
// Flag this as dirty
|
||||
TestPManager.setDirty(MoveGroup1, "core/scripts/client/audio.tscript");
|
||||
TestPManager.setDirty(MoveGroup1, "core/scripts/client/audio." @ $TorqueScriptFileExtension);
|
||||
|
||||
new SimGroup(MoveGroup2)
|
||||
{
|
||||
|
|
@ -273,7 +273,7 @@ function TestPManager::testMoveObject(%doNotSave)
|
|||
};
|
||||
|
||||
// Flag this as dirty
|
||||
TestPManager.setDirty(MoveGroup2, "core/scripts/client/audio.tscript");
|
||||
TestPManager.setDirty(MoveGroup2, "core/scripts/client/audio." @ $TorqueScriptFileExtension);
|
||||
|
||||
// Unless %doNotSave is set (by a batch/combo test)
|
||||
// then go ahead and save now
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue