Improve handling of non-default script filenames

This commit is contained in:
Lukas Aldershaab 2021-01-07 12:01:09 +01:00
parent 099dd4f1f3
commit 9ccaa6d3ea
118 changed files with 534 additions and 528 deletions

View file

@ -570,6 +570,7 @@ bool StandardMainLoop::handleCommandLine( S32 argc, const char **argv )
Platform::setMainDotCsDir(buffer); Platform::setMainDotCsDir(buffer);
Platform::setCurrentDirectory(buffer); Platform::setCurrentDirectory(buffer);
Con::setVariable("TorqueScriptFileExtension", TORQUE_SCRIPT_EXTENSION);
Con::evaluate(script, false, useDefaultScript ? defaultScriptName : argv[1]); Con::evaluate(script, false, useDefaultScript ? defaultScriptName : argv[1]);
delete[] script; delete[] script;

View file

@ -1197,6 +1197,13 @@ bool executeFile(const char* fileName, bool noCalls, bool journalScript)
if (!ext) if (!ext)
{ {
// Try appending the default script extension and see if that succeeds
if (executeFile(fileName + String("." TORQUE_SCRIPT_EXTENSION), noCalls, journalScript))
{
return true;
}
// We need an extension! // We need an extension!
Con::errorf(ConsoleLogEntry::Script, "exec: invalid script file name %s.", scriptFilenameBuffer); Con::errorf(ConsoleLogEntry::Script, "exec: invalid script file name %s.", scriptFilenameBuffer);
execDepth--; execDepth--;

View file

@ -2,7 +2,7 @@
ModuleId="CoreModule" ModuleId="CoreModule"
VersionId="1" VersionId="1"
Description="Module that implements the core engine-level setup for the game." Description="Module that implements the core engine-level setup for the game."
ScriptFile="Core.tscript" ScriptFile="Core"
CreateFunction="onCreate" CreateFunction="onCreate"
DestroyFunction="onDestroy" DestroyFunction="onDestroy"
Group="Core"/> Group="Core"/>

View file

@ -27,10 +27,10 @@ function CoreModule::onCreate(%this)
ModuleDatabase.LoadExplicit( "Core_PostFX" ); ModuleDatabase.LoadExplicit( "Core_PostFX" );
ModuleDatabase.LoadExplicit( "Core_GameObjects" ); ModuleDatabase.LoadExplicit( "Core_GameObjects" );
exec("data/defaults.tscript"); exec("data/defaults." @ $TorqueScriptFileExtension);
%prefPath = getPrefpath(); %prefPath = getPrefpath();
if ( isFile( %prefPath @ "/clientPrefs.tscript" ) ) if ( isFile( %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension ) )
exec( %prefPath @ "/clientPrefs.tscript" ); exec( %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension );
// Seed the random number generator. // Seed the random number generator.
setRandomSeed(); setRandomSeed();
@ -44,7 +44,7 @@ function CoreModule::onCreate(%this)
createCanvas($appName); createCanvas($appName);
//load canvas //load canvas
//exec("./console/main.tscript"); //exec("./console/main." @ $TorqueScriptFileExtension);
ModuleDatabase.LoadExplicit( "Core_Console" ); ModuleDatabase.LoadExplicit( "Core_Console" );
@ -62,8 +62,8 @@ function CoreModule::onCreate(%this)
// If we have editors, initialize them here as well // If we have editors, initialize them here as well
if (isToolBuild()) if (isToolBuild())
{ {
if(isFile("tools/main.tscript") && !$isDedicated) if(isFile("tools/main." @ $TorqueScriptFileExtension) && !$isDedicated)
exec("tools/main.tscript"); exec("tools/main." @ $TorqueScriptFileExtension);
} }
//This is used to build the remap keybind sets for the different actionMaps. //This is used to build the remap keybind sets for the different actionMaps.

View file

@ -2,7 +2,7 @@
ModuleId="Core_ClientServer" ModuleId="Core_ClientServer"
VersionId="1" VersionId="1"
Description="Default module for the game." Description="Default module for the game."
ScriptFile="Core_ClientServer.tscript" ScriptFile="Core_ClientServer"
CreateFunction="onCreate" CreateFunction="onCreate"
DestroyFunction="onDestroy" DestroyFunction="onDestroy"
Group="Core"> Group="Core">

View file

@ -15,8 +15,8 @@
function Core_ClientServer::onCreate( %this ) function Core_ClientServer::onCreate( %this )
{ {
echo("\n--------- Initializing Directory: scripts ---------"); echo("\n--------- Initializing Directory: scripts ---------");
exec( "./scripts/client/client.tscript" ); exec( "./scripts/client/client." @ $TorqueScriptFileExtension );
exec( "./scripts/server/server.tscript" ); exec( "./scripts/server/server." @ $TorqueScriptFileExtension );
$Game::MainScene = getScene(0); $Game::MainScene = getScene(0);
@ -52,11 +52,11 @@ function Core_ClientServer::onDestroy( %this )
echo("Exporting client prefs"); echo("Exporting client prefs");
%prefPath = getPrefpath(); %prefPath = getPrefpath();
export("$pref::*", %prefPath @ "/clientPrefs.tscript", false); export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false);
echo("Exporting server prefs"); 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);
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View file

@ -9,16 +9,16 @@ function initClient()
$Client::GameTypeQuery = $appName; $Client::GameTypeQuery = $appName;
$Client::MissionTypeQuery = "Any"; $Client::MissionTypeQuery = "Any";
exec( "./message.tscript" ); exec( "./message." @ $TorqueScriptFileExtension );
exec( "./connectionToServer.tscript" ); exec( "./connectionToServer." @ $TorqueScriptFileExtension );
exec( "./levelDownload.tscript" ); exec( "./levelDownload." @ $TorqueScriptFileExtension );
exec( "./levelLoad.tscript" ); exec( "./levelLoad." @ $TorqueScriptFileExtension );
//load prefs //load prefs
exec( "data/defaults.tscript" ); exec( "data/defaults." @ $TorqueScriptFileExtension );
%prefPath = getPrefpath(); %prefPath = getPrefpath();
if ( isFile( %prefPath @ "/clientPrefs.tscript" ) ) if ( isFile( %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension ) )
exec( %prefPath @ "/clientPrefs.tscript" ); exec( %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension );
callOnModules("initClient"); callOnModules("initClient");

View file

@ -27,21 +27,21 @@ function initServer()
//load prefs //load prefs
//Force-load the defaults just so we don't have any mistakes //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 //Then, if the user has saved preferences, we load those over-top the defaults
%prefPath = getPrefpath(); %prefPath = getPrefpath();
if ( isFile( %prefPath @ "/serverPrefs.tscript" ) ) if ( isFile( %prefPath @ "/serverPrefs." @ $TorqueScriptFileExtension ) )
exec( %prefPath @ "/serverPrefs.tscript" ); exec( %prefPath @ "/serverPrefs." @ $TorqueScriptFileExtension );
exec( "./audio.tscript" ); exec( "./audio." @ $TorqueScriptFileExtension );
exec( "./commands.tscript" ); exec( "./commands." @ $TorqueScriptFileExtension );
exec( "./kickban.tscript" ); exec( "./kickban." @ $TorqueScriptFileExtension );
exec( "./message.tscript" ); exec( "./message." @ $TorqueScriptFileExtension );
exec( "./levelDownload.tscript" ); exec( "./levelDownload." @ $TorqueScriptFileExtension );
exec( "./levelLoad.tscript" ); exec( "./levelLoad." @ $TorqueScriptFileExtension );
exec( "./levelInfo.tscript" ); exec( "./levelInfo." @ $TorqueScriptFileExtension );
exec( "./connectionToClient.tscript" ); exec( "./connectionToClient." @ $TorqueScriptFileExtension );
// Server::Status is returned in the Game Info Query and represents the // Server::Status is returned in the Game Info Query and represents the
// current status of the server. This string sould be very short. // current status of the server. This string sould be very short.
@ -250,9 +250,9 @@ function destroyServer()
// Save any server settings // Save any server settings
%prefPath = getPrefpath(); %prefPath = getPrefpath();
echo( "Exporting server prefs..." ); 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 // Increase the server session number. This is used to make sure we're
// working with the server session we think we are. // working with the server session we think we are.

View file

@ -2,7 +2,7 @@
ModuleId="Core_Console" ModuleId="Core_Console"
VersionId="1" VersionId="1"
Description="Module that implements the core engine-level setup for the game." Description="Module that implements the core engine-level setup for the game."
ScriptFile="Core_Console.tscript" ScriptFile="Core_Console"
CreateFunction="onCreate" CreateFunction="onCreate"
DestroyFunction="onDestroy" DestroyFunction="onDestroy"
Group="Core" Group="Core"

View file

@ -1,8 +1,8 @@
function Core_Console::onCreate(%this) function Core_Console::onCreate(%this)
{ {
exec("./scripts/profiles.tscript"); exec("./scripts/profiles." @ $TorqueScriptFileExtension);
exec("./scripts/console.tscript"); exec("./scripts/console." @ $TorqueScriptFileExtension);
exec("./guis/console.gui"); exec("./guis/console.gui");
} }

View file

@ -2,7 +2,7 @@
ModuleId="Core_GameObjects" ModuleId="Core_GameObjects"
VersionId="1" VersionId="1"
Description="Module that implements the core engine-level setup for the game." Description="Module that implements the core engine-level setup for the game."
ScriptFile="Core_GameObjects.tscript" ScriptFile="Core_GameObjects"
CreateFunction="onCreate" CreateFunction="onCreate"
DestroyFunction="onDestroy" DestroyFunction="onDestroy"
Group="Core"> Group="Core">

View file

@ -12,7 +12,7 @@ function Core_GameObjects::initServer( %this )
function Core_GameObjects::onCreateGameServer(%this) function Core_GameObjects::onCreateGameServer(%this)
{ {
%this.registerDatablock("./datablocks/defaultDatablocks.tscript"); %this.registerDatablock("./datablocks/defaultDatablocks." @ $TorqueScriptFileExtension);
} }
function Core_GameObjects::onDestroyGameServer(%this) function Core_GameObjects::onDestroyGameServer(%this)

View file

@ -2,7 +2,7 @@
ModuleId="Core_GUI" ModuleId="Core_GUI"
VersionId="1" VersionId="1"
Description="Module that implements the core engine-level setup for the game." Description="Module that implements the core engine-level setup for the game."
ScriptFile="Core_GUI.tscript" ScriptFile="Core_GUI"
CreateFunction="onCreate" CreateFunction="onCreate"
DestroyFunction="onDestroy" DestroyFunction="onDestroy"
Group="Core" Group="Core"

View file

@ -1,9 +1,9 @@
function Core_GUI::onCreate(%this) function Core_GUI::onCreate(%this)
{ {
exec("./scripts/profiles.tscript"); exec("./scripts/profiles." @ $TorqueScriptFileExtension);
exec("./scripts/canvas.tscript"); exec("./scripts/canvas." @ $TorqueScriptFileExtension);
exec("./scripts/cursor.tscript"); exec("./scripts/cursor." @ $TorqueScriptFileExtension);
} }
function Core_GUI::onDestroy(%this) function Core_GUI::onDestroy(%this)

View file

@ -2,7 +2,7 @@
ModuleId="Core_Lighting" ModuleId="Core_Lighting"
VersionId="1" VersionId="1"
Description="Module that implements the core engine-level setup for the game." Description="Module that implements the core engine-level setup for the game."
ScriptFile="Core_Lighting.tscript" ScriptFile="Core_Lighting"
CreateFunction="onCreate" CreateFunction="onCreate"
DestroyFunction="onDestroy" DestroyFunction="onDestroy"
Group="Core"> Group="Core">

View file

@ -1,17 +1,17 @@
function Core_Lighting::onCreate(%this) function Core_Lighting::onCreate(%this)
{ {
exec("./scripts/lighting.tscript"); exec("./scripts/lighting." @ $TorqueScriptFileExtension);
//Advanced/Deferred //Advanced/Deferred
exec("./scripts/advancedLighting_Shaders.tscript"); exec("./scripts/advancedLighting_Shaders." @ $TorqueScriptFileExtension);
exec("./scripts/deferredShading.tscript"); exec("./scripts/deferredShading." @ $TorqueScriptFileExtension);
exec("./scripts/advancedLighting_Init.tscript"); exec("./scripts/advancedLighting_Init." @ $TorqueScriptFileExtension);
//Basic/Forward //Basic/Forward
exec("./scripts/basicLighting_shadowFilter.tscript"); exec("./scripts/basicLighting_shadowFilter." @ $TorqueScriptFileExtension);
exec("./scripts/shadowMaps_Init.tscript"); exec("./scripts/shadowMaps_Init." @ $TorqueScriptFileExtension);
exec("./scripts/basicLighting_Init.tscript"); exec("./scripts/basicLighting_Init." @ $TorqueScriptFileExtension);
} }

View file

@ -39,8 +39,8 @@ $pref::LightManager::sgUseDynamicShadows = "1";
$pref::LightManager::sgUseToneMapping = ""; $pref::LightManager::sgUseToneMapping = "";
*/ */
//exec( "./shaders.tscript" ); //exec( "./shaders." @ $TorqueScriptFileExtension );
//exec( "./deferredShading.tscript" ); //exec( "./deferredShading." @ $TorqueScriptFileExtension );
function onActivateAdvancedLM() function onActivateAdvancedLM()
{ {

View file

@ -20,7 +20,7 @@
// IN THE SOFTWARE. // IN THE SOFTWARE.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
//exec( "./shadowFilter.tscript" ); //exec( "./shadowFilter." @ $TorqueScriptFileExtension );
singleton GFXStateBlockData( BL_ProjectedShadowSBData ) singleton GFXStateBlockData( BL_ProjectedShadowSBData )
{ {

View file

@ -26,12 +26,12 @@ function initLightingSystems(%manager)
// First exec the scripts for the different light managers // First exec the scripts for the different light managers
// in the lighting folder. // in the lighting folder.
/*%pattern = "./lighting/*//*init.tscript"; /*%pattern = "./lighting/*//*init." @ $TorqueScriptFileExtension;
%file = findFirstFile( %pattern ); %file = findFirstFile( %pattern );
if ( %file $= "" ) if ( %file $= "" )
{ {
// Try for DSOs next. // Try for DSOs next.
%pattern = "./lighting/*//*init.tscript.dso"; %pattern = "./lighting/*//*init." @ $TorqueScriptFileExtension @ ".dso";
%file = findFirstFile( %pattern ); %file = findFirstFile( %pattern );
} }

View file

@ -2,7 +2,7 @@
ModuleId="Core_PostFX" ModuleId="Core_PostFX"
VersionId="1" VersionId="1"
Description="Module that implements the core engine-level setup for the game." Description="Module that implements the core engine-level setup for the game."
ScriptFile="Core_PostFX.tscript" ScriptFile="Core_PostFX"
CreateFunction="onCreate" CreateFunction="onCreate"
DestroyFunction="onDestroy" DestroyFunction="onDestroy"
Group="Core" Group="Core"

View file

@ -2,11 +2,11 @@
function Core_PostFX::onCreate(%this) function Core_PostFX::onCreate(%this)
{ {
// //
exec("./scripts/postFxManager.tscript"); exec("./scripts/postFxManager." @ $TorqueScriptFileExtension);
exec("./scripts/postFx.tscript"); exec("./scripts/postFx." @ $TorqueScriptFileExtension);
//Load the default config //Load the default config
loadPresetHandler("./scripts/default.postfxpreset.tscript"); loadPresetHandler("./scripts/default.postfxpreset." @ $TorqueScriptFileExtension);
} }
function Core_PostFX::onDestroy(%this) function Core_PostFX::onDestroy(%this)

View file

@ -581,7 +581,7 @@ function DepthOfFieldPostFX::autoFocus( %this )
/* /*
function reloadDOF() function reloadDOF()
{ {
exec( "./dof.tscript" ); exec( "./dof." @ $TorqueScriptFileExtension );
DepthOfFieldPostFX.reload(); DepthOfFieldPostFX.reload();
DepthOfFieldPostFX.disable(); DepthOfFieldPostFX.disable();
DepthOfFieldPostFX.enable(); DepthOfFieldPostFX.enable();

View file

@ -39,12 +39,12 @@ function postFXInit()
if (!$Server::Dedicated) if (!$Server::Dedicated)
{ {
//init the postFX //init the postFX
%pattern = "./*.tscript"; %pattern = "./*." @ $TorqueScriptFileExtension;
%file = findFirstFile( %pattern ); %file = findFirstFile( %pattern );
if ( %file $= "" ) if ( %file $= "" )
{ {
// Try for DSOs next. // Try for DSOs next.
%pattern = "core/postFX/*.tscript.dso"; %pattern = "core/postFX/*." @ $TorqueScriptFileExtension @ ".dso";
%file = findFirstFile( %pattern ); %file = findFirstFile( %pattern );
} }

View file

@ -40,15 +40,15 @@ function PostFXManager::registerPostEffect(%this, %postEffect)
} }
// Used to name the saved files. // Used to name the saved files.
$PostFXManager::fileExtension = ".postfxpreset.tscript"; $PostFXManager::fileExtension = ".postfxpreset." @ $TorqueScriptFileExtension;
// The filter string for file open/save dialogs. // 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? // Enable / disable PostFX when loading presets or just apply the settings?
$PostFXManager::forceEnableFromPresets = true; $PostFXManager::forceEnableFromPresets = true;
$PostFXManager::defaultPreset = "core/postFX/scripts/default.postfxpreset.tscript"; $PostFXManager::defaultPreset = "core/postFX/scripts/default.postfxpreset." @ $TorqueScriptFileExtension;
$PostFXManager::currentPreset = ""; $PostFXManager::currentPreset = "";

View file

@ -2,7 +2,7 @@
ModuleId="Core_Rendering" ModuleId="Core_Rendering"
VersionId="1" VersionId="1"
Description="Module that implements the core engine-level setup for the game." Description="Module that implements the core engine-level setup for the game."
ScriptFile="Core_Rendering.tscript" ScriptFile="Core_Rendering"
CreateFunction="onCreate" CreateFunction="onCreate"
DestroyFunction="onDestroy" DestroyFunction="onDestroy"
Group="Core"> Group="Core">

View file

@ -35,8 +35,6 @@ function Core_Rendering::onCreate(%this)
exec("./scripts/gfxData/terrainBlock." @ $TorqueScriptFileExtension); exec("./scripts/gfxData/terrainBlock." @ $TorqueScriptFileExtension);
exec("./scripts/gfxData/water." @ $TorqueScriptFileExtension); exec("./scripts/gfxData/water." @ $TorqueScriptFileExtension);
exec("./scripts/gfxData/warningTerrainMat." @ $TorqueScriptFileExtension); exec("./scripts/gfxData/warningTerrainMat." @ $TorqueScriptFileExtension);
loadTerrainSettings();
} }
function Core_Rendering::onDestroy(%this) function Core_Rendering::onDestroy(%this)

View file

@ -2,7 +2,7 @@
ModuleId="Core_SFX" ModuleId="Core_SFX"
VersionId="1" VersionId="1"
Description="Module that implements the core engine-level setup for the game." Description="Module that implements the core engine-level setup for the game."
ScriptFile="Core_SFX.tscript" ScriptFile="Core_SFX"
CreateFunction="onCreate" CreateFunction="onCreate"
DestroyFunction="onDestroy" DestroyFunction="onDestroy"
Group="Core"> Group="Core">

View file

@ -1,12 +1,12 @@
function Core_SFX::onCreate(%this) function Core_SFX::onCreate(%this)
{ {
exec("./scripts/audio.tscript"); exec("./scripts/audio." @ $TorqueScriptFileExtension);
exec("./scripts/audioData.tscript"); exec("./scripts/audioData." @ $TorqueScriptFileExtension);
exec("./scripts/audioAmbience.tscript"); exec("./scripts/audioAmbience." @ $TorqueScriptFileExtension);
exec("./scripts/audioDescriptions.tscript"); exec("./scripts/audioDescriptions." @ $TorqueScriptFileExtension);
exec("./scripts/audioEnvironments.tscript"); exec("./scripts/audioEnvironments." @ $TorqueScriptFileExtension);
exec("./scripts/audioStates.tscript"); exec("./scripts/audioStates." @ $TorqueScriptFileExtension);
} }

View file

@ -2,7 +2,7 @@
ModuleId="Core_Utility" ModuleId="Core_Utility"
VersionId="1" VersionId="1"
Description="Module that implements the core engine-level setup for the game." Description="Module that implements the core engine-level setup for the game."
ScriptFile="Core_Utility.tscript" ScriptFile="Core_Utility"
CreateFunction="onCreate" CreateFunction="onCreate"
DestroyFunction="onDestroy" DestroyFunction="onDestroy"
Group="Core"> Group="Core">

View file

@ -1,14 +1,14 @@
function Core_Utility::onCreate(%this) function Core_Utility::onCreate(%this)
{ {
exec("./scripts/parseArgs.tscript"); exec("./scripts/parseArgs." @ $TorqueScriptFileExtension);
exec("./scripts/globals.tscript"); exec("./scripts/globals." @ $TorqueScriptFileExtension);
exec("./scripts/helperFunctions.tscript"); exec("./scripts/helperFunctions." @ $TorqueScriptFileExtension);
exec("./scripts/gameObjectManagement.tscript"); exec("./scripts/gameObjectManagement." @ $TorqueScriptFileExtension);
exec("./scripts/persistanceManagement.tscript"); exec("./scripts/persistanceManagement." @ $TorqueScriptFileExtension);
exec("./scripts/module.tscript"); exec("./scripts/module." @ $TorqueScriptFileExtension);
exec("./scripts/scene.tscript"); exec("./scripts/scene." @ $TorqueScriptFileExtension);
exec("./scripts/input.tscript"); exec("./scripts/input." @ $TorqueScriptFileExtension);
} }
function Core_Utility::onDestroy(%this) function Core_Utility::onDestroy(%this)

View file

@ -39,9 +39,9 @@ function loadMaterials()
// the folder exists // the folder exists
if( IsDirectory( "materialEditor" ) ) if( IsDirectory( "materialEditor" ) )
{ {
for( %file = findFirstFile( "materialEditor/*.tscript.dso" ); for( %file = findFirstFile( "materialEditor/*." @ $TorqueScriptFileExtension @ ".dso" );
%file !$= ""; %file !$= "";
%file = findNextFile( "materialEditor/*.tscript.dso" )) %file = findNextFile( "materialEditor/*." @ $TorqueScriptFileExtension @ ".dso" ))
{ {
// Only execute, if we don't have the source file. // Only execute, if we don't have the source file.
%csFileName = getSubStr( %file, 0, strlen( %file ) - 4 ); %csFileName = getSubStr( %file, 0, strlen( %file ) - 4 );
@ -49,9 +49,9 @@ function loadMaterials()
exec( %csFileName ); exec( %csFileName );
} }
for( %file = findFirstFile( "materialEditor/*.tscript" ); for( %file = findFirstFile( "materialEditor/*." @ $TorqueScriptFileExtension );
%file !$= ""; %file !$= "";
%file = findNextFile( "materialEditor/*.tscript" )) %file = findNextFile( "materialEditor/*." @ $TorqueScriptFileExtension ))
{ {
exec( %file ); exec( %file );
} }
@ -477,11 +477,11 @@ function compileFiles(%pattern)
$Scripts::OverrideDSOPath = %path; $Scripts::OverrideDSOPath = %path;
$Scripts::ignoreDSOs = false; $Scripts::ignoreDSOs = false;
%mainCsFile = makeFullPath("main.tscript"); %mainCsFile = makeFullPath("main." @ $TorqueScriptFileExtension);
for (%file = findFirstFileMultiExpr(%pattern); %file !$= ""; %file = findNextFileMultiExpr(%pattern)) 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) if(%mainCsFile !$= %file)
compile(%file, true); compile(%file, true);
} }
@ -502,7 +502,7 @@ function displayHelp()
error( error(
"Torque Demo command line options:\n"@ "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 <game_name> Reset list of mods to only contain <game_name>\n"@
" <game_name> Works like the -game argument\n"@ " <game_name> Works like the -game argument\n"@
" -dir <dir_name> Add <dir_name> to list of directories\n"@ " -dir <dir_name> Add <dir_name> to list of directories\n"@
@ -518,8 +518,8 @@ function loadDir(%dir)
{ {
pushback($userDirs, %dir, ";"); pushback($userDirs, %dir, ";");
if (isScriptFile(%dir @ "/main.tscript")) if (isScriptFile(%dir @ "/main." @ $TorqueScriptFileExtension))
exec(%dir @ "/main.tscript"); exec(%dir @ "/main." @ $TorqueScriptFileExtension);
} }
function loadDirs(%dirPath) function loadDirs(%dirPath)
@ -528,7 +528,7 @@ function loadDirs(%dirPath)
if (%dirPath !$= "") if (%dirPath !$= "")
loadDirs(%dirPath); loadDirs(%dirPath);
if(exec(%token @ "/main.tscript") != true) if(exec(%token @ "/main." @ $TorqueScriptFileExtension) != true)
{ {
error("Error: Unable to find specified directory: " @ %token ); error("Error: Unable to find specified directory: " @ %token );
$dirCount--; $dirCount--;

View file

@ -51,9 +51,9 @@ function loadModuleMaterials(%moduleGroup)
// Load any materials files for which we only have DSOs. // 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 !$= "";
%file = findNextFile( %modulePath @ "/*/materials.tscript.dso" )) %file = findNextFile( %modulePath @ "/*/materials." @ $TorqueScriptFileExtension @ ".dso" ))
{ {
// Only execute, if we don't have the source file. // Only execute, if we don't have the source file.
%csFileName = getSubStr( %file, 0, strlen( %file ) - 4 ); %csFileName = getSubStr( %file, 0, strlen( %file ) - 4 );
@ -63,9 +63,9 @@ function loadModuleMaterials(%moduleGroup)
// Load all source material files. // Load all source material files.
for( %file = findFirstFile( %modulePath @ "/*/materials.tscript" ); for( %file = findFirstFile( %modulePath @ "/*/materials." @ $TorqueScriptFileExtension );
%file !$= ""; %file !$= "";
%file = findNextFile( %modulePath @ "/*/materials.tscript" )) %file = findNextFile( %modulePath @ "/*/materials." @ $TorqueScriptFileExtension ))
{ {
exec( %file ); exec( %file );
} }

View file

@ -355,7 +355,7 @@ function parseArgs()
%i++; %i++;
} }
else else
error("Error: Missing Command Line argument. Usage: -prefs <path/script.tscript>"); error("Error: Missing Command Line argument. Usage: -prefs <path/script." @ $TorqueScriptFileExtension @ ">");
//------------------- //-------------------

View file

@ -112,7 +112,7 @@ function TestPManager::testNewObject(%doNotSave)
}; };
// Flag it as dirty // 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 // Test adding a new unnamed object
%obj = new SFXDescription() %obj = new SFXDescription()
@ -123,12 +123,12 @@ function TestPManager::testNewObject(%doNotSave)
}; };
// Flag it as dirty // 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 // Test adding an "empty" object
new SFXDescription(AudioEmpty); 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) // Unless %doNotSave is set (by a batch/combo test)
// then go ahead and save now // then go ahead and save now
@ -165,7 +165,7 @@ function TestPManager::testNewGroup(%doNotSave)
}; };
// Flag this as dirty // 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 // Test adding a new unnamed SimGroup
%group = new SimGroup() %group = new SimGroup()
@ -193,7 +193,7 @@ function TestPManager::testNewGroup(%doNotSave)
}; };
// Flag this as dirty // 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 // Test adding a new unnamed SimSet
%set = new SimSet() %set = new SimSet()
@ -221,7 +221,7 @@ function TestPManager::testNewGroup(%doNotSave)
}; };
// Flag this as dirty // 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) // Unless %doNotSave is set (by a batch/combo test)
// then go ahead and save now // then go ahead and save now
@ -257,7 +257,7 @@ function TestPManager::testMoveObject(%doNotSave)
}; };
// Flag this as dirty // Flag this as dirty
TestPManager.setDirty(MoveGroup1, "core/scripts/client/audio.tscript"); TestPManager.setDirty(MoveGroup1, "core/scripts/client/audio." @ $TorqueScriptFileExtension);
new SimGroup(MoveGroup2) new SimGroup(MoveGroup2)
{ {
@ -273,7 +273,7 @@ function TestPManager::testMoveObject(%doNotSave)
}; };
// Flag this as dirty // 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) // Unless %doNotSave is set (by a batch/combo test)
// then go ahead and save now // then go ahead and save now

View file

@ -4,7 +4,7 @@
ModuleId="ExampleModule" ModuleId="ExampleModule"
VersionId="1" VersionId="1"
Group="Game" Group="Game"
scriptFile="ExampleModule.tscript" scriptFile="ExampleModule"
CreateFunction="onCreate" CreateFunction="onCreate"
DestroyFunction="onDestroy"> DestroyFunction="onDestroy">
<DeclaredAssets <DeclaredAssets

View file

@ -33,7 +33,7 @@ function ExampleModule::onDestroy(%this)
function ExampleModule::initServer(%this) function ExampleModule::initServer(%this)
{ {
//This script contains our ExampleGameMode logic //This script contains our ExampleGameMode logic
%this.queueExec("./scripts/ExampleGamemodeScript.tscript"); %this.queueExec("./scripts/ExampleGamemodeScript." @ $TorqueScriptFileExtension);
} }
//This is called when a game session server is actually created so the game may be played. It's called //This is called when a game session server is actually created so the game may be played. It's called
@ -50,7 +50,7 @@ function ExampleModule::onCreateGameServer(%this)
//onServerCreated(), it loads the datablocks via this array, and when when the server goes //onServerCreated(), it loads the datablocks via this array, and when when the server goes
//to pass data to the client, it iterates over this list and processes it, ensuring all datablocks //to pass data to the client, it iterates over this list and processes it, ensuring all datablocks
//are the most up to date possible for transmission to the connecting client //are the most up to date possible for transmission to the connecting client
//%this.registerDatablock("./datablocks/ExampleDatablock.tscript"); //%this.registerDatablock("./datablocks/ExampleDatablock." @ $TorqueScriptFileExtension);
} }
//This is called when a game session server is destroyed, when the game shuts down. It's called from //This is called when a game session server is destroyed, when the game shuts down. It's called from
@ -74,13 +74,13 @@ function ExampleModule::initClient(%this)
//client scripts //client scripts
//Here, we exec out keybind scripts so the player is able to move when they get into a game //Here, we exec out keybind scripts so the player is able to move when they get into a game
%this.queueExec("./scripts/default.keybinds.tscript"); %this.queueExec("./scripts/default.keybinds." @ $TorqueScriptFileExtension);
%prefPath = getPrefpath(); %prefPath = getPrefpath();
if(isFile(%prefPath @ "/keybinds.tscript")) if(isFile(%prefPath @ "/keybinds." @ $TorqueScriptFileExtension))
exec(%prefPath @ "/keybinds.tscript"); exec(%prefPath @ "/keybinds." @ $TorqueScriptFileExtension);
%this.queueExec("./scripts/inputCommands.tscript"); %this.queueExec("./scripts/inputCommands." @ $TorqueScriptFileExtension);
} }
//This is called when a game session client successfuly connects to a game server. //This is called when a game session client successfuly connects to a game server.

View file

@ -16,7 +16,7 @@ function gameUI::initClient(%this)
{ {
//guis //guis
%this.queueExec("./GUIs/playGui.gui"); %this.queueExec("./GUIs/playGui.gui");
%this.queueExec("./GUIs/playGui.tscript"); %this.queueExec("./GUIs/playGui." @ $TorqueScriptFileExtension);
} }
function gameUI::onCreateClientConnection(%this){} function gameUI::onCreateClientConnection(%this){}

View file

@ -2,7 +2,7 @@
ModuleId="UI" ModuleId="UI"
VersionId="1" VersionId="1"
Description="Module that implements the menus for the game." Description="Module that implements the menus for the game."
ScriptFile="UI.tscript" ScriptFile="UI"
CreateFunction="onCreate" CreateFunction="onCreate"
DestroyFunction="onDestroy" DestroyFunction="onDestroy"
Group="Game"> Group="Game">

View file

@ -30,55 +30,55 @@ function UI::initClient(%this)
{ {
//Load UI stuff //Load UI stuff
//we need to load this because some of the menu profiles use the sounds here //we need to load this because some of the menu profiles use the sounds here
//%this.queueExec("./datablocks/guiSounds.tscript"); //%this.queueExec("./datablocks/guiSounds." @ $TorqueScriptFileExtension);
//Profiles //Profiles
%this.queueExec("./scripts/profiles.tscript"); %this.queueExec("./scripts/profiles." @ $TorqueScriptFileExtension);
//Now gui files //Now gui files
%this.queueExec("./scripts/menuInputButtons.tscript"); %this.queueExec("./scripts/menuInputButtons." @ $TorqueScriptFileExtension);
%this.queueExec("./guis/mainMenu.tscript"); %this.queueExec("./guis/mainMenu." @ $TorqueScriptFileExtension);
%this.queueExec("./guis/mainMenu.gui"); %this.queueExec("./guis/mainMenu.gui");
%this.queueExec("./guis/chooseLevelDlg.tscript"); %this.queueExec("./guis/chooseLevelDlg." @ $TorqueScriptFileExtension);
%this.queueExec("./guis/chooseLevelDlg.gui"); %this.queueExec("./guis/chooseLevelDlg.gui");
%this.queueExec("./guis/joinServerMenu.tscript"); %this.queueExec("./guis/joinServerMenu." @ $TorqueScriptFileExtension);
%this.queueExec("./guis/joinServerMenu.gui"); %this.queueExec("./guis/joinServerMenu.gui");
%this.queueExec("./guis/loadingGui.gui"); %this.queueExec("./guis/loadingGui.gui");
%this.queueExec("./guis/optionsMenu.tscript"); %this.queueExec("./guis/optionsMenu." @ $TorqueScriptFileExtension);
%this.queueExec("./guis/optionsMenu.gui"); %this.queueExec("./guis/optionsMenu.gui");
%this.queueExec("./guis/pauseMenu.tscript"); %this.queueExec("./guis/pauseMenu." @ $TorqueScriptFileExtension);
%this.queueExec("./guis/pauseMenu.gui"); %this.queueExec("./guis/pauseMenu.gui");
%this.queueExec("./guis/remapDlg.gui"); %this.queueExec("./guis/remapDlg.gui");
%this.queueExec("./guis/remapConfirmDlg.gui"); %this.queueExec("./guis/remapConfirmDlg.gui");
%this.queueExec("./guis/profiler.tscript"); %this.queueExec("./guis/profiler." @ $TorqueScriptFileExtension);
%this.queueExec("./guis/profiler.gui"); %this.queueExec("./guis/profiler.gui");
%this.queueExec("./guis/netGraphGui.gui"); %this.queueExec("./guis/netGraphGui.gui");
%this.queueExec("./guis/RecordingsDlg.gui"); %this.queueExec("./guis/RecordingsDlg.gui");
%this.queueExec("./guis/guiMusicPlayer.tscript"); %this.queueExec("./guis/guiMusicPlayer." @ $TorqueScriptFileExtension);
%this.queueExec("./guis/guiMusicPlayer.gui"); %this.queueExec("./guis/guiMusicPlayer.gui");
%this.queueExec("./guis/startupGui.tscript"); %this.queueExec("./guis/startupGui." @ $TorqueScriptFileExtension);
%this.queueExec("./guis/startupGui.gui"); %this.queueExec("./guis/startupGui.gui");
// Load Editor Dialogs // Load Editor Dialogs
%this.queueExec("./guis/messageBoxDlg.gui"); %this.queueExec("./guis/messageBoxDlg.gui");
//Load scripts //Load scripts
%this.queueExec("./scripts/controlsMenu.tscript"); %this.queueExec("./scripts/controlsMenu." @ $TorqueScriptFileExtension);
%this.queueExec("./scripts/messageBoxes.tscript"); %this.queueExec("./scripts/messageBoxes." @ $TorqueScriptFileExtension);
%this.queueExec("./scripts/help.tscript"); %this.queueExec("./scripts/help." @ $TorqueScriptFileExtension);
%this.queueExec("./scripts/cursors.tscript"); %this.queueExec("./scripts/cursors." @ $TorqueScriptFileExtension);
%this.queueExec("./scripts/utility.tscript"); %this.queueExec("./scripts/utility." @ $TorqueScriptFileExtension);
} }
function UI::onCreateClientConnection(%this){} function UI::onCreateClientConnection(%this){}

View file

@ -99,7 +99,7 @@ function OptionsMenu::apply(%this)
if(%actionMap == GlobalActionMap.getId()) if(%actionMap == GlobalActionMap.getId())
continue; continue;
%actionMap.save( %prefPath @ "/keybinds.tscript", %append ); %actionMap.save( %prefPath @ "/keybinds." @ $TorqueScriptFileExtension, %append );
if(%append != true) if(%append != true)
%append = true; %append = true;
@ -107,7 +107,7 @@ function OptionsMenu::apply(%this)
} }
%prefPath = getPrefpath(); %prefPath = getPrefpath();
export("$pref::*", %prefPath @ "/clientPrefs.tscript", false); export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false);
} }
function OptionsMenu::resetToDefaults(%this) function OptionsMenu::resetToDefaults(%this)
@ -290,7 +290,7 @@ function OptionsMenu::applyDisplaySettings(%this)
echo("Exporting client prefs"); echo("Exporting client prefs");
%prefPath = getPrefpath(); %prefPath = getPrefpath();
export("$pref::*", %prefPath @ "/clientPrefs.tscript", false); export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false);
} }
function OptionsMenu::populateGraphicsSettingsList(%this) function OptionsMenu::populateGraphicsSettingsList(%this)
@ -386,7 +386,7 @@ function OptionsMenu::applyGraphicsSettings(%this)
echo("Exporting client prefs"); echo("Exporting client prefs");
%prefPath = getPrefpath(); %prefPath = getPrefpath();
export("$pref::*", %prefPath @ "/clientPrefs.tscript", false); export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false);
} }
function updateDisplaySettings() function updateDisplaySettings()

View file

@ -2,7 +2,7 @@
ModuleId="MainEditor" ModuleId="MainEditor"
VersionId="1" VersionId="1"
Description="Tool that can be used to view/edit an object." Description="Tool that can be used to view/edit an object."
ScriptFile="MainEditor.tscript" ScriptFile="MainEditor"
CreateFunction="onCreate" CreateFunction="onCreate"
DestroyFunction="onDestroy" DestroyFunction="onDestroy"
Group="Tools"> Group="Tools">

View file

@ -2,12 +2,12 @@ function MainEditor::onCreate( %this )
{ {
echo("\n--------- Initializing MainEditor ---------"); echo("\n--------- Initializing MainEditor ---------");
//exec("tools/gui/profiles.ed.tscript"); //exec("tools/gui/profiles.ed." @ $TorqueScriptFileExtension);
//exec("./scripts/GuiProfiles.tscript"); //exec("./scripts/GuiProfiles." @ $TorqueScriptFileExtension);
exec("./guis/MainEditorWindow.gui"); exec("./guis/MainEditorWindow.gui");
//exec("./scripts/newEditorGui.tscript"); //exec("./scripts/newEditorGui." @ $TorqueScriptFileExtension);
$UsePanelLayout = false; $UsePanelLayout = false;
$AssetBrowserPanelState = true; $AssetBrowserPanelState = true;

View file

@ -2,7 +2,7 @@
ModuleId="ToolsModule" ModuleId="ToolsModule"
VersionId="1" VersionId="1"
Description="Module that implements the tools and editor suite." Description="Module that implements the tools and editor suite."
ScriptFile="Tools.tscript" ScriptFile="Tools"
CreateFunction="onCreate" CreateFunction="onCreate"
DestroyFunction="onDestroy" DestroyFunction="onDestroy"
Group="Tools"> Group="Tools">

View file

@ -6,12 +6,12 @@
function InitializeVPathEditor() function InitializeVPathEditor()
{ {
// Gui. // Gui.
exec( "./GUI/Profiles.tscript" ); exec( "./GUI/Profiles." @ $TorqueScriptFileExtension );
exec( "./GUI/VPathEditor.gui" ); exec( "./GUI/VPathEditor.gui" );
// Scripts. // Scripts.
exec( "./Scripts/Plugin.tscript" ); exec( "./Scripts/Plugin." @ $TorqueScriptFileExtension );
exec( "./Scripts/Editor.tscript" ); exec( "./Scripts/Editor." @ $TorqueScriptFileExtension );
} }
function DestroyVPathEditor() function DestroyVPathEditor()

View file

@ -6,8 +6,8 @@
function VerveEditor::InitControllerScripts() function VerveEditor::InitControllerScripts()
{ {
// Core. // Core.
exec( "./VController.tscript" ); exec( "./VController." @ $TorqueScriptFileExtension );
exec( "./VControllerProperties.tscript" ); exec( "./VControllerProperties." @ $TorqueScriptFileExtension );
// Custom. // Custom.
// Exec Custom Controller Scripts. // Exec Custom Controller Scripts.

View file

@ -3,28 +3,28 @@
// Copyright (C) - Violent Tulip // Copyright (C) - Violent Tulip
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
function VerveEditor::InitEventScripts() function VerveEditor::InitEven" @ $TorqueScriptFileExtension @ "s()
{ {
// Core. // Core.
exec( "./VEvent.tscript" ); exec( "./VEvent." @ $TorqueScriptFileExtension );
// Built-In. // Built-In.
exec( "./VCameraShakeEvent.tscript" ); exec( "./VCameraShakeEvent." @ $TorqueScriptFileExtension );
exec( "./VDirectorEvent.tscript" ); exec( "./VDirectorEvent." @ $TorqueScriptFileExtension );
exec( "./VFadeEvent.tscript" ); exec( "./VFadeEvent." @ $TorqueScriptFileExtension );
exec( "./VLightObjectAnimationEvent.tscript" ); exec( "./VLightObjectAnimationEvent." @ $TorqueScriptFileExtension );
exec( "./VLightObjectToggleEvent.tscript" ); exec( "./VLightObjectToggleEvent." @ $TorqueScriptFileExtension );
exec( "./VMotionEvent.tscript" ); exec( "./VMotionEvent." @ $TorqueScriptFileExtension );
exec( "./VParticleEffectToggleEvent.tscript" ); exec( "./VParticleEffectToggleEvent." @ $TorqueScriptFileExtension );
exec( "./VPostEffectToggleEvent.tscript" ); exec( "./VPostEffectToggleEvent." @ $TorqueScriptFileExtension );
exec( "./VSceneJumpEvent.tscript" ); exec( "./VSceneJumpEvent." @ $TorqueScriptFileExtension );
exec( "./VScriptEvent.tscript" ); exec( "./VScriptEvent." @ $TorqueScriptFileExtension );
exec( "./VShapeAnimationEvent.tscript" ); exec( "./VShapeAnimationEvent." @ $TorqueScriptFileExtension );
exec( "./VSlowMoEvent.tscript" ); exec( "./VSlowMoEvent." @ $TorqueScriptFileExtension );
exec( "./VSoundEffectEvent.tscript" ); exec( "./VSoundEffectEvent." @ $TorqueScriptFileExtension );
exec( "./VSpawnSphereSpawnTargetEvent.tscript" ); exec( "./VSpawnSphereSpawnTargetEvent." @ $TorqueScriptFileExtension );
// Custom. // Custom.
// Exec Custom Event Scripts. // Exec Custom Event Scripts.
} }
VerveEditor::InitEventScripts(); VerveEditor::InitEven" @ $TorqueScriptFileExtension @ "s();

View file

@ -6,15 +6,15 @@
function VerveEditor::InitGroupScripts() function VerveEditor::InitGroupScripts()
{ {
// Core. // Core.
exec( "./VGroup.tscript" ); exec( "./VGroup." @ $TorqueScriptFileExtension );
// Built In. // Built In.
exec( "./VCameraGroup.tscript" ); exec( "./VCameraGroup." @ $TorqueScriptFileExtension );
exec( "./VDirectorGroup.tscript" ); exec( "./VDirectorGroup." @ $TorqueScriptFileExtension );
exec( "./VLightObjectGroup.tscript" ); exec( "./VLightObjectGroup." @ $TorqueScriptFileExtension );
exec( "./VParticleEffectGroup.tscript" ); exec( "./VParticleEffectGroup." @ $TorqueScriptFileExtension );
exec( "./VSceneObjectGroup.tscript" ); exec( "./VSceneObjectGroup." @ $TorqueScriptFileExtension );
exec( "./VSpawnSphereGroup.tscript" ); exec( "./VSpawnSphereGroup." @ $TorqueScriptFileExtension );
// Custom. // Custom.
// Exec Custom Group Scripts. // Exec Custom Group Scripts.

View file

@ -5,21 +5,21 @@
function VerveEditor::InitInspectorFieldScripts() function VerveEditor::InitInspectorFieldScripts()
{ {
exec( "./TypeBool.tscript" ); exec( "./TypeBool." @ $TorqueScriptFileExtension );
exec( "./TypeData.tscript" ); exec( "./TypeData." @ $TorqueScriptFileExtension );
exec( "./TypeEnum.tscript" ); exec( "./TypeEnum." @ $TorqueScriptFileExtension );
exec( "./TypeString.tscript" ); exec( "./TypeString." @ $TorqueScriptFileExtension );
exec( "./TypeVCameraGroupEnum.tscript" ); exec( "./TypeVCameraGroupEnum." @ $TorqueScriptFileExtension );
exec( "./TypeVCommandEnum.tscript" ); exec( "./TypeVCommandEnum." @ $TorqueScriptFileExtension );
exec( "./TypeVControllerDataEnum.tscript" ); exec( "./TypeVControllerDataEnum." @ $TorqueScriptFileExtension );
exec( "./TypeVGroupEnum.tscript" ); exec( "./TypeVGroupEnum." @ $TorqueScriptFileExtension );
exec( "./TypeVLightAnimationDataEnum.tscript" ); exec( "./TypeVLightAnimationDataEnum." @ $TorqueScriptFileExtension );
exec( "./TypeVPathOrientationModeEnum.tscript" ); exec( "./TypeVPathOrientationModeEnum." @ $TorqueScriptFileExtension );
exec( "./TypeVPostEffectEnum.tscript" ); exec( "./TypeVPostEffectEnum." @ $TorqueScriptFileExtension );
exec( "./TypeVSceneEnum.tscript" ); exec( "./TypeVSceneEnum." @ $TorqueScriptFileExtension );
exec( "./TypeVSFXProfileEnum.tscript" ); exec( "./TypeVSFXProfileEnum." @ $TorqueScriptFileExtension );
exec( "./TypeVShapeAnimationEnum.tscript" ); exec( "./TypeVShapeAnimationEnum." @ $TorqueScriptFileExtension );
exec( "./TypeToggleEnum.tscript" ); exec( "./TypeToggleEnum." @ $TorqueScriptFileExtension );
} }
VerveEditor::InitInspectorFieldScripts(); VerveEditor::InitInspectorFieldScripts();

View file

@ -5,16 +5,16 @@
function VerveEditor::InitInspectorScripts() function VerveEditor::InitInspectorScripts()
{ {
exec( "./Controls.tscript" ); exec( "./Controls." @ $TorqueScriptFileExtension );
exec( "./CutCopyPaste.tscript" ); exec( "./CutCopyPaste." @ $TorqueScriptFileExtension );
exec( "./EventNotify.tscript" ); exec( "./EventNotify." @ $TorqueScriptFileExtension );
exec( "./Factory.tscript" ); exec( "./Factory." @ $TorqueScriptFileExtension );
exec( "./FactoryControls.tscript" ); exec( "./FactoryControls." @ $TorqueScriptFileExtension );
exec( "./FieldNotify.tscript" ); exec( "./FieldNotify." @ $TorqueScriptFileExtension );
exec( "./Lists.tscript" ); exec( "./Lists." @ $TorqueScriptFileExtension );
exec( "./Properties.tscript" ); exec( "./Properties." @ $TorqueScriptFileExtension );
exec( "./Selection.tscript" ); exec( "./Selection." @ $TorqueScriptFileExtension );
exec( "./Fields/main.tscript" ); exec( "./Fields/main." @ $TorqueScriptFileExtension );
} }
VerveEditor::InitInspectorScripts(); VerveEditor::InitInspectorScripts();

View file

@ -6,23 +6,23 @@
function VerveEditor::InitTrackScripts() function VerveEditor::InitTrackScripts()
{ {
// Core. // Core.
exec( "./VTrack.tscript" ); exec( "./VTrack." @ $TorqueScriptFileExtension );
// Built-In. // Built-In.
exec( "./VCameraShakeTrack.tscript" ); exec( "./VCameraShakeTrack." @ $TorqueScriptFileExtension );
exec( "./VDirectorTrack.tscript" ); exec( "./VDirectorTrack." @ $TorqueScriptFileExtension );
exec( "./VFadeTrack.tscript" ); exec( "./VFadeTrack." @ $TorqueScriptFileExtension );
exec( "./VLightObjectAnimationTrack.tscript" ); exec( "./VLightObjectAnimationTrack." @ $TorqueScriptFileExtension );
exec( "./VLightObjectToggleTrack.tscript" ); exec( "./VLightObjectToggleTrack." @ $TorqueScriptFileExtension );
exec( "./VMotionTrack.tscript" ); exec( "./VMotionTrack." @ $TorqueScriptFileExtension );
exec( "./VParticleEffectToggleTrack.tscript" ); exec( "./VParticleEffectToggleTrack." @ $TorqueScriptFileExtension );
exec( "./VPostEffectToggleTrack.tscript" ); exec( "./VPostEffectToggleTrack." @ $TorqueScriptFileExtension );
exec( "./VSceneJumpTrack.tscript" ); exec( "./VSceneJumpTrack." @ $TorqueScriptFileExtension );
exec( "./VScriptEventTrack.tscript" ); exec( "./VScriptEventTrack." @ $TorqueScriptFileExtension );
exec( "./VShapeAnimationTrack.tscript" ); exec( "./VShapeAnimationTrack." @ $TorqueScriptFileExtension );
exec( "./VSlowMoTrack.tscript" ); exec( "./VSlowMoTrack." @ $TorqueScriptFileExtension );
exec( "./VSoundEffectTrack.tscript" ); exec( "./VSoundEffectTrack." @ $TorqueScriptFileExtension );
exec( "./VSpawnSphereSpawnTargetTrack.tscript" ); exec( "./VSpawnSphereSpawnTargetTrack." @ $TorqueScriptFileExtension );
// Custom. // Custom.
// Exec Custom Track Scripts. // Exec Custom Track Scripts.

View file

@ -12,7 +12,7 @@
function VerveEditor::InitTorqueScripts() function VerveEditor::InitTorqueScripts()
{ {
// Core. // Core.
exec( "./ObjectClasses.tscript" ); exec( "./ObjectClasses." @ $TorqueScriptFileExtension );
exec( "./Selection.tscript" ); exec( "./Selection." @ $TorqueScriptFileExtension );
} }
VerveEditor::InitTorqueScripts(); VerveEditor::InitTorqueScripts();

View file

@ -8,34 +8,34 @@ function InitializeVerveEditor()
$Verve::UseSeparateWindow = true; $Verve::UseSeparateWindow = true;
// Preferences. // Preferences.
exec( "./DefaultPrefs.tscript" ); exec( "./DefaultPrefs." @ $TorqueScriptFileExtension );
// GUI. // GUI.
exec( "./GUI/GuiProfiles.tscript" ); exec( "./GUI/GuiProfiles." @ $TorqueScriptFileExtension );
exec( "./GUI/VerveEditorGroupBuilder.gui" ); exec( "./GUI/VerveEditorGroupBuilder.gui" );
exec( "./GUI/VerveEditorImportPathNodes.gui" ); exec( "./GUI/VerveEditorImportPathNodes.gui" );
// Scripts. // Scripts.
exec( "./Scripts/Plugin.tscript" ); exec( "./Scripts/Plugin." @ $TorqueScriptFileExtension );
exec( "./Scripts/Utility.tscript" ); exec( "./Scripts/Utility." @ $TorqueScriptFileExtension );
exec( "./Scripts/EditorControls.tscript" ); exec( "./Scripts/EditorControls." @ $TorqueScriptFileExtension );
exec( "./Scripts/EditorHistory.tscript" ); exec( "./Scripts/EditorHistory." @ $TorqueScriptFileExtension );
exec( "./Scripts/EditorMenu.tscript" ); exec( "./Scripts/EditorMenu." @ $TorqueScriptFileExtension );
exec( "./Scripts/EditorPreferences.tscript" ); exec( "./Scripts/EditorPreferences." @ $TorqueScriptFileExtension );
exec( "./Scripts/EditorWindow.tscript" ); exec( "./Scripts/EditorWindow." @ $TorqueScriptFileExtension );
exec( "./Scripts/Persistence.tscript" ); exec( "./Scripts/Persistence." @ $TorqueScriptFileExtension );
exec( "./Scripts/ScrollNotify.tscript" ); exec( "./Scripts/ScrollNotify." @ $TorqueScriptFileExtension );
exec( "./Scripts/VObject.tscript" ); exec( "./Scripts/VObject." @ $TorqueScriptFileExtension );
exec( "./Scripts/Inspector/main.tscript" ); exec( "./Scripts/Inspector/main." @ $TorqueScriptFileExtension );
exec( "./Scripts/Controller/main.tscript" ); exec( "./Scripts/Controller/main." @ $TorqueScriptFileExtension );
exec( "./Scripts/Groups/main.tscript" ); exec( "./Scripts/Groups/main." @ $TorqueScriptFileExtension );
exec( "./Scripts/Tracks/main.tscript" ); exec( "./Scripts/Tracks/main." @ $TorqueScriptFileExtension );
exec( "./Scripts/Events/main.tscript" ); exec( "./Scripts/Events/main." @ $TorqueScriptFileExtension );
exec( "./Torque/main.tscript" ); exec( "./Torque/main." @ $TorqueScriptFileExtension );
// Register Events. // Register Events.
VerveEditor::RegisterEvent( "VGroupObjectUpdate" ); VerveEditor::RegisterEvent( "VGroupObjectUpdate" );

View file

@ -51,7 +51,7 @@ function initializeAssetBrowser()
AssetFilterTypeList.add("TerrainMaterialAsset"); AssetFilterTypeList.add("TerrainMaterialAsset");
} }
exec("./scripts/profiles.tscript"); exec("./scripts/profiles." @ $TorqueScriptFileExtension);
exec("./guis/assetBrowser.gui"); exec("./guis/assetBrowser.gui");
exec("./guis/addModuleWindow.gui"); exec("./guis/addModuleWindow.gui");
@ -72,42 +72,42 @@ function initializeAssetBrowser()
exec("./guis/assetNameEdit.gui"); exec("./guis/assetNameEdit.gui");
exec("./guis/createNewCollectionSet.gui"); exec("./guis/createNewCollectionSet.gui");
exec("./scripts/assetBrowser.tscript"); exec("./scripts/assetBrowser." @ $TorqueScriptFileExtension);
exec("./scripts/popupMenus.tscript"); exec("./scripts/popupMenus." @ $TorqueScriptFileExtension);
exec("./scripts/addModuleWindow.tscript"); exec("./scripts/addModuleWindow." @ $TorqueScriptFileExtension);
exec("./scripts/assetImport.tscript"); exec("./scripts/assetImport." @ $TorqueScriptFileExtension);
exec("./scripts/assetImportConfig.tscript"); exec("./scripts/assetImportConfig." @ $TorqueScriptFileExtension);
exec("./scripts/gameObjectCreator.tscript"); exec("./scripts/gameObjectCreator." @ $TorqueScriptFileExtension);
exec("./scripts/newAsset.tscript"); exec("./scripts/newAsset." @ $TorqueScriptFileExtension);
exec("./scripts/editAsset.tscript"); exec("./scripts/editAsset." @ $TorqueScriptFileExtension);
exec("./scripts/editModule.tscript"); exec("./scripts/editModule." @ $TorqueScriptFileExtension);
exec("./scripts/selectModule.tscript"); exec("./scripts/selectModule." @ $TorqueScriptFileExtension);
exec("./scripts/assetImportConfigEditor.tscript"); exec("./scripts/assetImportConfigEditor." @ $TorqueScriptFileExtension);
exec("./scripts/directoryHandling.tscript"); exec("./scripts/directoryHandling." @ $TorqueScriptFileExtension);
exec("./scripts/selectPath.tscript"); exec("./scripts/selectPath." @ $TorqueScriptFileExtension);
exec("./scripts/looseFileAudit.tscript"); exec("./scripts/looseFileAudit." @ $TorqueScriptFileExtension);
//Processing for the different asset types //Processing for the different asset types
exec("./scripts/assetTypes/component.tscript"); exec("./scripts/assetTypes/component." @ $TorqueScriptFileExtension);
exec("./scripts/assetTypes/cpp.tscript"); exec("./scripts/assetTypes/cpp." @ $TorqueScriptFileExtension);
exec("./scripts/assetTypes/gameObject.tscript"); exec("./scripts/assetTypes/gameObject." @ $TorqueScriptFileExtension);
exec("./scripts/assetTypes/gui.tscript"); exec("./scripts/assetTypes/gui." @ $TorqueScriptFileExtension);
exec("./scripts/assetTypes/image.tscript"); exec("./scripts/assetTypes/image." @ $TorqueScriptFileExtension);
exec("./scripts/assetTypes/level.tscript"); exec("./scripts/assetTypes/level." @ $TorqueScriptFileExtension);
exec("./scripts/assetTypes/material.tscript"); exec("./scripts/assetTypes/material." @ $TorqueScriptFileExtension);
exec("./scripts/assetTypes/postFX.tscript"); exec("./scripts/assetTypes/postFX." @ $TorqueScriptFileExtension);
exec("./scripts/assetTypes/script.tscript"); exec("./scripts/assetTypes/script." @ $TorqueScriptFileExtension);
exec("./scripts/assetTypes/shape.tscript"); exec("./scripts/assetTypes/shape." @ $TorqueScriptFileExtension);
exec("./scripts/assetTypes/shapeAnimation.tscript"); exec("./scripts/assetTypes/shapeAnimation." @ $TorqueScriptFileExtension);
exec("./scripts/assetTypes/sound.tscript"); exec("./scripts/assetTypes/sound." @ $TorqueScriptFileExtension);
exec("./scripts/assetTypes/stateMachine.tscript"); exec("./scripts/assetTypes/stateMachine." @ $TorqueScriptFileExtension);
exec("./scripts/assetTypes/cubemap.tscript"); exec("./scripts/assetTypes/cubemap." @ $TorqueScriptFileExtension);
exec("./scripts/assetTypes/folder.tscript"); exec("./scripts/assetTypes/folder." @ $TorqueScriptFileExtension);
exec("./scripts/assetTypes/terrain.tscript"); exec("./scripts/assetTypes/terrain." @ $TorqueScriptFileExtension);
exec("./scripts/assetTypes/terrainMaterial.tscript"); exec("./scripts/assetTypes/terrainMaterial." @ $TorqueScriptFileExtension);
exec("./scripts/assetTypes/datablockObjects.tscript"); exec("./scripts/assetTypes/datablockObjects." @ $TorqueScriptFileExtension);
exec("./scripts/assetTypes/looseFiles.tscript"); exec("./scripts/assetTypes/looseFiles." @ $TorqueScriptFileExtension);
exec("./scripts/assetTypes/prefab.tscript"); exec("./scripts/assetTypes/prefab." @ $TorqueScriptFileExtension);
new ScriptObject( AssetBrowserPlugin ) new ScriptObject( AssetBrowserPlugin )
{ {

View file

@ -46,13 +46,13 @@ function AssetBrowser_addModuleWindow::CreateNewModule(%this)
%moduleFilePath = "data/" @ %newModuleName; %moduleFilePath = "data/" @ %newModuleName;
%moduleDefinitionFilePath = %moduleFilePath @ "/" @ %newModuleName @ ".module"; %moduleDefinitionFilePath = %moduleFilePath @ "/" @ %newModuleName @ ".module";
%moduleScriptFilePath = %moduleFilePath @ "/" @ %newModuleName @ ".tscript"; %moduleScriptFilePath = %moduleFilePath @ "/" @ %newModuleName @ "." @ $TorqueScriptFileExtension;
%newModule = new ModuleDefinition() %newModule = new ModuleDefinition()
{ {
ModuleId = %newModuleName; ModuleId = %newModuleName;
versionId = 1; versionId = 1;
ScriptFile = %newModuleName @ ".tscript"; ScriptFile = %newModuleName @ "." @ $TorqueScriptFileExtension;
CreateFunction="onCreate"; CreateFunction="onCreate";
DestroyFunction="onDestroy"; DestroyFunction="onDestroy";
Group = "Game"; Group = "Game";
@ -70,7 +70,7 @@ function AssetBrowser_addModuleWindow::CreateNewModule(%this)
%file = new FileObject(); %file = new FileObject();
%templateFile = new FileObject(); %templateFile = new FileObject();
%moduleTemplateCodeFilePath = AssetBrowser.templateFilesPath @ "module.tscript.template"; %moduleTemplateCodeFilePath = AssetBrowser.templateFilesPath @ "module." @ $TorqueScriptFileExtension @ ".template";
if(%file.openForWrite(%moduleScriptFilePath) && %templateFile.openForRead(%moduleTemplateCodeFilePath)) if(%file.openForWrite(%moduleScriptFilePath) && %templateFile.openForRead(%moduleTemplateCodeFilePath))
{ {

View file

@ -41,13 +41,13 @@ function AssetBrowser_addPackageWindow::CreateNewPackage(%this)
%moduleFilePath = "data/" @ %newPackageName; %moduleFilePath = "data/" @ %newPackageName;
%moduleDefinitionFilePath = %moduleFilePath @ "/" @ %newPackageName @ ".module"; %moduleDefinitionFilePath = %moduleFilePath @ "/" @ %newPackageName @ ".module";
%moduleScriptFilePath = %moduleFilePath @ "/" @ %newPackageName @ ".tscript"; %moduleScriptFilePath = %moduleFilePath @ "/" @ %newPackageName @ "." @ $TorqueScriptFileExtension;
%newPackage = new ModuleDefinition() %newPackage = new ModuleDefinition()
{ {
ModuleId = %newPackageName; ModuleId = %newPackageName;
versionId = 1; versionId = 1;
ScriptFile = %newPackageName @ ".tscript"; ScriptFile = %newPackageName @ "." @ $TorqueScriptFileExtension;
CreateFunction="onCreate"; CreateFunction="onCreate";
DestroyFunction="onDestroy"; DestroyFunction="onDestroy";
Group = "Game"; Group = "Game";

View file

@ -151,7 +151,7 @@ function getAssetTypeByFilename(%filePath)
return "ShapeAsset"; return "ShapeAsset";
else if( isSoundFormat(%fileExt)) else if( isSoundFormat(%fileExt))
return "SoundAsset"; return "SoundAsset";
else if( %fileExt $= ".tscript" || %fileExt $= ".tscript.dso" ) else if( %fileExt $= "." @ $TorqueScriptFileExtension || %fileExt $= "." @ $TorqueScriptFileExtension @ ".dso" )
return "ScriptAsset"; return "ScriptAsset";
else if( %fileExt $= ".gui" || %fileExt $= ".gui.dso" ) else if( %fileExt $= ".gui" || %fileExt $= ".gui.dso" )
return "GUIAsset"; return "GUIAsset";
@ -188,7 +188,7 @@ function AssetBrowser::onDropFile( %this, %filePath )
%assetItem = %this.addImportingAsset("ShapeAsset", %filePath); %assetItem = %this.addImportingAsset("ShapeAsset", %filePath);
else if( isSoundFormat(%fileExt)) else if( isSoundFormat(%fileExt))
%assetItem = %this.addImportingAsset("SoundAsset", %filePath); %assetItem = %this.addImportingAsset("SoundAsset", %filePath);
else if( %fileExt $= ".tscript" || %fileExt $= ".tscript.dso" ) else if( %fileExt $= "." @ $TorqueScriptFileExtension || %fileExt $= "." @ $TorqueScriptFileExtension @ ".dso" )
%assetItem = %this.addImportingAsset("ScriptAsset", %filePath); %assetItem = %this.addImportingAsset("ScriptAsset", %filePath);
else if( %fileExt $= ".gui" || %fileExt $= ".gui.dso" ) else if( %fileExt $= ".gui" || %fileExt $= ".gui.dso" )
%assetItem = %this.addImportingAsset("GUIAsset", %filePath); %assetItem = %this.addImportingAsset("GUIAsset", %filePath);
@ -238,13 +238,13 @@ function AssetBrowser::onDropZipFile(%this, %filePath)
%this.importAssetListArray.add("SoundAsset", %filePath); %this.importAssetListArray.add("SoundAsset", %filePath);
else if( (%fileExt $= ".gui") || (%fileExt $= ".gui.dso")) else if( (%fileExt $= ".gui") || (%fileExt $= ".gui.dso"))
%this.importAssetListArray.add("GUIAsset", %filePath); %this.importAssetListArray.add("GUIAsset", %filePath);
//else if( (%fileExt $= ".tscript") || (%fileExt $= ".dso")) //else if( (%fileExt $= "." @ $TorqueScriptFileExtension) || (%fileExt $= ".dso"))
// %this.importAssetListArray.add("Script", %filePath); // %this.importAssetListArray.add("Script", %filePath);
else if( (%fileExt $= ".mis")) else if( (%fileExt $= ".mis"))
%this.importAssetListArray.add("LevelAsset", %filePath);*/ %this.importAssetListArray.add("LevelAsset", %filePath);*/
// For now, if it's a .tscript file, we'll assume it's a behavior. // For now, if it's a .tscript file, we'll assume it's a behavior.
//if (fileExt(%fileFrom) !$= ".tscript") //if (fileExt(%fileFrom) !$= "." @ $TorqueScriptFileExtension)
// continue; // continue;
%fileTo = expandFilename("^tools/assetBrowser/importTemp/") @ %fileFrom; %fileTo = expandFilename("^tools/assetBrowser/importTemp/") @ %fileFrom;
@ -286,13 +286,13 @@ function AssetBrowser::onDropFolder(%this, %filePath)
%this.importAssetListArray.add("SoundAsset", %filePath); %this.importAssetListArray.add("SoundAsset", %filePath);
else if( (%fileExt $= ".gui") || (%fileExt $= ".gui.dso")) else if( (%fileExt $= ".gui") || (%fileExt $= ".gui.dso"))
%this.importAssetListArray.add("GUIAsset", %filePath); %this.importAssetListArray.add("GUIAsset", %filePath);
//else if( (%fileExt $= ".tscript") || (%fileExt $= ".dso")) //else if( (%fileExt $= "." @ $TorqueScriptFileExtension) || (%fileExt $= ".dso"))
// %this.importAssetListArray.add("Script", %filePath); // %this.importAssetListArray.add("Script", %filePath);
else if( (%fileExt $= ".mis")) else if( (%fileExt $= ".mis"))
%this.importAssetListArray.add("LevelAsset", %filePath); %this.importAssetListArray.add("LevelAsset", %filePath);
// For now, if it's a .tscript file, we'll assume it's a behavior. // For now, if it's a .tscript file, we'll assume it's a behavior.
if (fileExt(%fileFrom) !$= ".tscript") if (fileExt(%fileFrom) !$= "." @ $TorqueScriptFileExtension)
continue; continue;
%fileTo = expandFilename("^game/behaviors/") @ fileName(%fileFrom); %fileTo = expandFilename("^game/behaviors/") @ fileName(%fileFrom);
@ -942,7 +942,7 @@ function ImportAssetWindow::addNewImportingAsset(%this, %filterType)
%type = "ShapeAsset"; %type = "ShapeAsset";
else if( isSoundFormat(%fileExt)) else if( isSoundFormat(%fileExt))
%type = "SoundAsset"; %type = "SoundAsset";
else if( %fileExt $= ".tscript" || %fileExt $= ".tscript.dso" ) else if( %fileExt $= "." @ $TorqueScriptFileExtension || %fileExt $= "." @ $TorqueScriptFileExtension @ ".dso" )
%type = "ScriptAsset"; %type = "ScriptAsset";
else if( %fileExt $= ".gui" || %fileExt $= ".gui.dso" ) else if( %fileExt $= ".gui" || %fileExt $= ".gui.dso" )
%type = "GUIAsset"; %type = "GUIAsset";

View file

@ -6,7 +6,7 @@ function AssetBrowser::createComponentAsset(%this)
%assetName = AssetBrowser.newAssetSettings.assetName; %assetName = AssetBrowser.newAssetSettings.assetName;
%tamlpath = %modulePath @ "/components/" @ %assetName @ ".asset.taml"; %tamlpath = %modulePath @ "/components/" @ %assetName @ ".asset.taml";
%scriptPath = %modulePath @ "/components/" @ %assetName @ ".tscript"; %scriptPath = %modulePath @ "/components/" @ %assetName @ "." @ $TorqueScriptFileExtension;
%asset = new ComponentAsset() %asset = new ComponentAsset()
{ {
@ -17,7 +17,7 @@ function AssetBrowser::createComponentAsset(%this)
friendlyName = AssetBrowser.newAssetSettings.friendlyName; friendlyName = AssetBrowser.newAssetSettings.friendlyName;
componentType = AssetBrowser.newAssetSettings.componentGroup; componentType = AssetBrowser.newAssetSettings.componentGroup;
description = AssetBrowser.newAssetSettings.description; description = AssetBrowser.newAssetSettings.description;
scriptFile = %assetName @ ".tscript"; scriptFile = %assetName @ "." @ $TorqueScriptFileExtension;
}; };
TamlWrite(%asset, %tamlpath); TamlWrite(%asset, %tamlpath);
@ -25,7 +25,7 @@ function AssetBrowser::createComponentAsset(%this)
%file = new FileObject(); %file = new FileObject();
%templateFile = new FileObject(); %templateFile = new FileObject();
%templateCodeFilePath = %this.templateFilesPath @ "componentFile.tscript.template"; %templateCodeFilePath = %this.templateFilesPath @ "componentFile." @ $TorqueScriptFileExtension @ ".template";
if(%file.openForWrite(%scriptPath) && %templateFile.openForRead(%templateCodeFilePath)) if(%file.openForWrite(%scriptPath) && %templateFile.openForRead(%templateCodeFilePath))
{ {

View file

@ -14,10 +14,10 @@ function AssetBrowser::createGameObjectAsset(%this)
function AssetBrowser::editGameObjectAsset(%this, %assetDef) function AssetBrowser::editGameObjectAsset(%this, %assetDef)
{ {
//We have no dedicated GO editor for now, so just defer to the script editing aspect //We have no dedicated GO editor for now, so just defer to the script editing aspect
%this.editGameObjectAssetScript(%assetDef); %this.editGameObjectAsse" @ $TorqueScriptFileExtension @ "(%assetDef);
} }
function AssetBrowser::editGameObjectAssetScript(%this, %assetDef) function AssetBrowser::editGameObjectAsse" @ $TorqueScriptFileExtension @ "(%this, %assetDef)
{ {
%scriptFile = %assetDef.scriptFile; %scriptFile = %assetDef.scriptFile;

View file

@ -9,13 +9,13 @@ function AssetBrowser::createGUIAsset(%this)
%tamlpath = %assetPath @ %assetName @ ".asset.taml"; %tamlpath = %assetPath @ %assetName @ ".asset.taml";
%guipath = %assetPath @ %assetName @ ".gui"; %guipath = %assetPath @ %assetName @ ".gui";
%scriptPath = %assetPath @ %assetName @ ".tscript"; %scriptPath = %assetPath @ %assetName @ "." @ $TorqueScriptFileExtension;
%asset = new GUIAsset() %asset = new GUIAsset()
{ {
AssetName = %assetName; AssetName = %assetName;
versionId = 1; versionId = 1;
scriptFile = %assetName @ ".tscript"; scriptFile = %assetName @ "." @ $TorqueScriptFileExtension;
guiFile = %assetName @ ".gui"; guiFile = %assetName @ ".gui";
}; };
@ -48,7 +48,7 @@ function AssetBrowser::createGUIAsset(%this)
warnf("CreateGUIAsset - Something went wrong and we couldn't write the GUI file!"); warnf("CreateGUIAsset - Something went wrong and we couldn't write the GUI file!");
} }
%scriptTemplateCodeFilePath = %this.templateFilesPath @ "guiFile.tscript.template"; %scriptTemplateCodeFilePath = %this.templateFilesPath @ "guiFile." @ $TorqueScriptFileExtension @ ".template";
if(%file.openForWrite(%scriptPath) && %templateFile.openForRead(%scriptTemplateCodeFilePath)) if(%file.openForWrite(%scriptPath) && %templateFile.openForRead(%scriptTemplateCodeFilePath))
{ {

View file

@ -29,7 +29,7 @@ function AssetBrowser::createLevelAsset(%this)
versionId = 1; versionId = 1;
LevelFile = %assetName @ ".mis"; LevelFile = %assetName @ ".mis";
DecalsFile = %assetName @ ".mis.decals"; DecalsFile = %assetName @ ".mis.decals";
PostFXPresetFile = %assetName @ ".postfxpreset.tscript"; PostFXPresetFile = %assetName @ ".postfxpreset." @ $TorqueScriptFileExtension;
ForestFile = %assetName @ ".forest"; ForestFile = %assetName @ ".forest";
NavmeshFile = %assetName @ ".nav"; NavmeshFile = %assetName @ ".nav";
LevelName = AssetBrowser.newAssetSettings.levelName; LevelName = AssetBrowser.newAssetSettings.levelName;

View file

@ -323,14 +323,14 @@ function AssetBrowser::importMaterialAsset(%this, %assetItem)
%assetPath = AssetBrowser.dirHandler.currentAddress @ "/"; %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
%tamlpath = %assetPath @ %assetName @ ".asset.taml"; %tamlpath = %assetPath @ %assetName @ ".asset.taml";
%sgfPath = %assetPath @ %assetName @ ".sgf"; %sgfPath = %assetPath @ %assetName @ ".sgf";
%scriptPath = %assetPath @ %assetName @ ".tscript"; %scriptPath = %assetPath @ %assetName @ "." @ $TorqueScriptFileExtension;
%newAsset = new MaterialAsset() %newAsset = new MaterialAsset()
{ {
assetName = %assetName; assetName = %assetName;
versionId = 1; versionId = 1;
shaderGraph = %sgfPath; shaderGraph = %sgfPath;
scriptFile = %assetName @ ".tscript"; scriptFile = %assetName @ "." @ $TorqueScriptFileExtension;
originalFilePath = %filePath; originalFilePath = %filePath;
materialDefinitionName = %assetName; materialDefinitionName = %assetName;
}; };

View file

@ -6,7 +6,7 @@ function AssetBrowser::createPostEffectAsset(%this)
%assetPath = AssetBrowser.dirHandler.currentAddress @ "/"; %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
%tamlpath = %assetPath @ %assetName @ ".asset.taml"; %tamlpath = %assetPath @ %assetName @ ".asset.taml";
%scriptPath = %assetPath @ %assetName @ ".tscript"; %scriptPath = %assetPath @ %assetName @ "." @ $TorqueScriptFileExtension;
%hlslPath = %assetPath @ %assetName @ "P.hlsl"; %hlslPath = %assetPath @ %assetName @ "P.hlsl";
%glslPath = %assetPath @ %assetName @ "P.glsl"; %glslPath = %assetPath @ %assetName @ "P.glsl";
@ -14,7 +14,7 @@ function AssetBrowser::createPostEffectAsset(%this)
{ {
AssetName = %assetName; AssetName = %assetName;
versionId = 1; versionId = 1;
scriptFile = %assetName @ ".tscript"; scriptFile = %assetName @ "." @ $TorqueScriptFileExtension;
hlslShader = %assetName @ "P.hlsl"; hlslShader = %assetName @ "P.hlsl";
glslShader = %assetName @ "P.glsl"; glslShader = %assetName @ "P.glsl";
}; };
@ -27,7 +27,7 @@ function AssetBrowser::createPostEffectAsset(%this)
%file = new FileObject(); %file = new FileObject();
%templateFile = new FileObject(); %templateFile = new FileObject();
%postFXTemplateCodeFilePath = %this.templateFilesPath @ "postFXFile.tscript.template"; %postFXTemplateCodeFilePath = %this.templateFilesPath @ "postFXFile." @ $TorqueScriptFileExtension @ ".template";
if(%file.openForWrite(%scriptPath) && %templateFile.openForRead(%postFXTemplateCodeFilePath)) if(%file.openForWrite(%scriptPath) && %templateFile.openForRead(%postFXTemplateCodeFilePath))
{ {

View file

@ -8,13 +8,13 @@ function AssetBrowser::createScriptAsset(%this)
%assetPath = AssetBrowser.dirHandler.currentAddress @ "/"; %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
%tamlpath = %assetPath @ %assetName @ ".asset.taml"; %tamlpath = %assetPath @ %assetName @ ".asset.taml";
%scriptPath = %assetPath @ %assetName @ ".tscript"; %scriptPath = %assetPath @ %assetName @ "." @ $TorqueScriptFileExtension;
%asset = new ScriptAsset() %asset = new ScriptAsset()
{ {
AssetName = %assetName; AssetName = %assetName;
versionId = 1; versionId = 1;
scriptFile = %assetName @ ".tscript"; scriptFile = %assetName @ "." @ $TorqueScriptFileExtension;
}; };
TamlWrite(%asset, %tamlpath); TamlWrite(%asset, %tamlpath);
@ -32,7 +32,7 @@ function AssetBrowser::createScriptAsset(%this)
return %tamlpath; return %tamlpath;
} }
function AssetBrowser::editScriptAsset(%this, %assetDef) function AssetBrowser::edi" @ $TorqueScriptFileExtension @ "Asset(%this, %assetDef)
{ {
%scriptFile = %assetDef.scriptFile; %scriptFile = %assetDef.scriptFile;
@ -43,7 +43,7 @@ function AssetBrowser::duplicateScriptAsset(%this, %assetDef, %targetModule)
{ {
} }
function AssetBrowser::importScriptAsset(%this, %assetId) function AssetBrowser::impor" @ $TorqueScriptFileExtension @ "Asset(%this, %assetId)
{ {
} }
@ -99,7 +99,7 @@ function AssetBrowser::buildScriptAssetPreview(%this, %assetDef, %previewData)
if(%assetDef.isServerSide) if(%assetDef.isServerSide)
%previewData.previewImage = "tools/assetBrowser/art/serverScriptIcon"; %previewData.previewImage = "tools/assetBrowser/art/serverScriptIcon";
else else
%previewData.previewImage = "tools/assetBrowser/art/clientScriptIcon"; %previewData.previewImage = "tools/assetBrowser/art/clien" @ $TorqueScriptFileExtension @ "Icon";
%previewData.assetFriendlyName = %assetDef.assetName; %previewData.assetFriendlyName = %assetDef.assetName;
%previewData.assetDesc = %assetDef.description; %previewData.assetDesc = %assetDef.description;

View file

@ -9,13 +9,13 @@ function AssetBrowser::createTerrainMaterialAsset(%this)
%assetPath = AssetBrowser.dirHandler.currentAddress @ "/"; %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
%tamlpath = %assetPath @ %assetName @ ".asset.taml"; %tamlpath = %assetPath @ %assetName @ ".asset.taml";
%scriptPath = %assetPath @ %assetName @ ".tscript"; %scriptPath = %assetPath @ %assetName @ "." @ $TorqueScriptFileExtension;
%asset = new TerrainMaterialAsset() %asset = new TerrainMaterialAsset()
{ {
AssetName = %assetName; AssetName = %assetName;
versionId = 1; versionId = 1;
scriptFile = %assetName @ ".tscript"; scriptFile = %assetName @ "." @ $TorqueScriptFileExtension;
materialDefinitionName = %assetName; materialDefinitionName = %assetName;
}; };
@ -33,7 +33,7 @@ function AssetBrowser::createTerrainMaterialAsset(%this)
%file = new FileObject(); %file = new FileObject();
%templateFile = new FileObject(); %templateFile = new FileObject();
%templateFilePath = %this.templateFilesPath @ "terrainMaterial.tscript.template"; %templateFilePath = %this.templateFilesPath @ "terrainMaterial." @ $TorqueScriptFileExtension @ ".template";
if(%file.openForWrite(%scriptPath) && %templateFile.openForRead(%templateFilePath)) if(%file.openForWrite(%scriptPath) && %templateFile.openForRead(%templateFilePath))
{ {

View file

@ -232,7 +232,7 @@ function AssetBrowser::RefreshModuleDependencies(%this, %moduleDef)
//AssetBrowser.RefreshModuleDependencies(16823); //AssetBrowser.RefreshModuleDependencies(16823);
%modulePath = filePath(%moduleDef.ModuleFilePath); %modulePath = filePath(%moduleDef.ModuleFilePath);
%filePattern = "*.tscript" TAB "*.taml" TAB "*.mis"; %filePattern = "*." @ $TorqueScriptFileExtension TAB "*.taml" TAB "*.mis";
//First, wipe out any files inside the folder first //First, wipe out any files inside the folder first
%file = makeFullPath(findFirstFileMultiExpr( %filePattern, true)); %file = makeFullPath(findFirstFileMultiExpr( %filePattern, true));

View file

@ -74,7 +74,7 @@ function GameObjectCreateBtn::onClick(%this)
%file = new FileObject(); %file = new FileObject();
if(%file.openForWrite(%path @ "\\" @ %className @ ".tscript")) if(%file.openForWrite(%path @ "\\" @ %className @ "." @ $TorqueScriptFileExtension))
{ {
%file.writeline("function " @ %className @ "::onAdd(%this)\n{\n\n}\n"); %file.writeline("function " @ %className @ "::onAdd(%this)\n{\n\n}\n");
%file.writeline("function " @ %className @ "::onRemove(%this)\n{\n\n}\n"); %file.writeline("function " @ %className @ "::onRemove(%this)\n{\n\n}\n");
@ -86,7 +86,7 @@ function GameObjectCreateBtn::onClick(%this)
//set up the paths //set up the paths
%tamlPath = %path @ %className @ ".taml"; %tamlPath = %path @ %className @ ".taml";
%scriptPath = %path @ %className @ ".tscript"; %scriptPath = %path @ %className @ "." @ $TorqueScriptFileExtension;
saveGameObject(%className, %tamlPath, %scriptPath); saveGameObject(%className, %tamlPath, %scriptPath);
%asset = new GameObjectAsset() %asset = new GameObjectAsset()

View file

@ -23,7 +23,7 @@ function LooseFileAuditWindow::buildPopupMenus(%this)
superClass = "MenuBuilder"; superClass = "MenuBuilder";
class = "EditorWorldMenu"; class = "EditorWorldMenu";
item[0] = "Make a Script Asset" TAB "" TAB "LooseFileAuditWindow.importScript();"; item[0] = "Make a Script Asset" TAB "" TAB "LooseFileAuditWindow.impor" @ $TorqueScriptFileExtension @ "();";
item[1] = "Make a PostFX Asset" TAB "" TAB "LooseFileAuditWindow.importPostFX();"; item[1] = "Make a PostFX Asset" TAB "" TAB "LooseFileAuditWindow.importPostFX();";
item[2] = "Make a Material Asset" TAB "" TAB "LooseFileAuditWindow.importMaterial();"; item[2] = "Make a Material Asset" TAB "" TAB "LooseFileAuditWindow.importMaterial();";
item[3] = "Make a Terrain Material Asset" TAB "" TAB "LooseFileAuditWindow.importTerrMat();"; item[3] = "Make a Terrain Material Asset" TAB "" TAB "LooseFileAuditWindow.importTerrMat();";
@ -159,7 +159,7 @@ function LooseFileList::onRightMouseDown(%this, %itemId)
{ {
ImageLooseFilePopup.showPopup(Canvas); ImageLooseFilePopup.showPopup(Canvas);
} }
else if(%ext $= ".tscript") else if(%ext $= "." @ $TorqueScriptFileExtension)
{ {
ScriptLooseFilePopup.showPopup(Canvas); ScriptLooseFilePopup.showPopup(Canvas);
} }
@ -199,7 +199,7 @@ function LooseFileAuditWindow::importImage(%this)
LooseFileList.expandItem(0); LooseFileList.expandItem(0);
} }
function LooseFileAuditWindow::importScript(%this) function LooseFileAuditWindow::impor" @ $TorqueScriptFileExtension @ "(%this)
{ {
if(!ImportAssetWindow.isAwake()) if(!ImportAssetWindow.isAwake())
ImportAssetWindow.showDialog(); ImportAssetWindow.showDialog();

View file

@ -329,7 +329,7 @@ function AssetBrowser::buildPopupMenus(%this)
//isPopup = true; //isPopup = true;
item[ 0 ] = "Open GameObject Editor" TAB "" TAB "echo(\"Not yet implemented.\");"; item[ 0 ] = "Open GameObject Editor" TAB "" TAB "echo(\"Not yet implemented.\");";
item[ 1 ] = "Edit GameObject Script" TAB "" TAB "AssetBrowser.editGameObjectAssetScript(AssetDatabase.acquireAsset(EditGameObjectAssetPopup.assetId));"; item[ 1 ] = "Edit GameObject Script" TAB "" TAB "AssetBrowser.editGameObjectAsse" @ $TorqueScriptFileExtension @ "(AssetDatabase.acquireAsset(EditGameObjectAssetPopup.assetId));";
item[ 2 ] = "-"; item[ 2 ] = "-";
item[ 3 ] = "Apply Instance to GameObject" TAB "" TAB "AssetBrowser.applyInstanceToGameObject(AssetDatabase.acquireAsset(EditGameObjectAssetPopup.assetId));"; item[ 3 ] = "Apply Instance to GameObject" TAB "" TAB "AssetBrowser.applyInstanceToGameObject(AssetDatabase.acquireAsset(EditGameObjectAssetPopup.assetId));";
item[ 4 ] = "Reset Instance to GameObject" TAB "" TAB "echo(\"Not yet implemented.\");"; item[ 4 ] = "Reset Instance to GameObject" TAB "" TAB "echo(\"Not yet implemented.\");";

View file

@ -21,15 +21,15 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
//Scripts //Scripts
exec("./scripts/componentEditor.ed.tscript"); exec("./scripts/componentEditor.ed." @ $TorqueScriptFileExtension);
exec("./scripts/stateMachineEditor.ed.tscript"); exec("./scripts/stateMachineEditor.ed." @ $TorqueScriptFileExtension);
exec("./scripts/superToolTipDlg.ed.tscript"); exec("./scripts/superToolTipDlg.ed." @ $TorqueScriptFileExtension);
//gui //gui
exec("./gui/superToolTipDlg.ed.gui"); exec("./gui/superToolTipDlg.ed.gui");
exec("./gui/stateMachineDlg.ed.gui"); exec("./gui/stateMachineDlg.ed.gui");
//field types //field types
exec("./interface/materialFieldType.tscript"); exec("./interface/materialFieldType." @ $TorqueScriptFileExtension);
exec("./interface/typeMaskFieldType.tscript"); exec("./interface/typeMaskFieldType." @ $TorqueScriptFileExtension);
exec("./interface/stateMachineField.tscript"); exec("./interface/stateMachineField." @ $TorqueScriptFileExtension);

View file

@ -24,12 +24,12 @@ function initializeConvexEditor()
{ {
echo(" % - Initializing Sketch Tool"); echo(" % - Initializing Sketch Tool");
exec( "./convexEditor.tscript" ); exec( "./convexEditor." @ $TorqueScriptFileExtension );
exec( "./convexEditorGui.gui" ); exec( "./convexEditorGui.gui" );
exec( "./convexEditorToolbar.ed.gui" ); exec( "./convexEditorToolbar.ed.gui" );
exec( "./convexEditorGui.tscript" ); exec( "./convexEditorGui." @ $TorqueScriptFileExtension );
exec( "./convexEditorSidebarGui.gui" ); exec( "./convexEditorSidebarGui.gui" );
exec( "./materials.tscript" ); exec( "./materials." @ $TorqueScriptFileExtension );
ConvexEditorGui.setVisible( false ); ConvexEditorGui.setVisible( false );
ConvexEditorOptionsWindow.setVisible( false ); ConvexEditorOptionsWindow.setVisible( false );

View file

@ -23,7 +23,7 @@
// Main code for the Datablock Editor plugin. // Main code for the Datablock Editor plugin.
$DATABLOCK_EDITOR_DEFAULT_FILENAME = "art/datablocks/managedDatablocks.tscript"; $DATABLOCK_EDITOR_DEFAULT_FILENAME = "art/datablocks/managedDatablocks." @ $TorqueScriptFileExtension;
//============================================================================================= //=============================================================================================
// Initialization. // Initialization.
@ -375,7 +375,7 @@ function DatablockEditorPlugin::flagDatablockAsDirty(%this, %datablock, %dirty )
function DatablockEditorPlugin::showSaveNewFileDialog(%this) function DatablockEditorPlugin::showSaveNewFileDialog(%this)
{ {
%currentFile = %this.getSelectedDatablock().getFilename(); %currentFile = %this.getSelectedDatablock().getFilename();
getSaveFilename( "TorqueScript Files|*.tscript|All Files|*.*", %this @ ".saveNewFileFinish", %currentFile, false ); getSaveFilename( "TorqueScript Files|*." @ $TorqueScriptFileExtension @ "|All Files|*.*", %this @ ".saveNewFileFinish", %currentFile, false );
} }
//--------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------

View file

@ -27,8 +27,8 @@ function initializeDatablockEditor()
{ {
echo( " - Initializing Datablock Editor" ); echo( " - Initializing Datablock Editor" );
exec("./datablockEditor.tscript"); exec("./datablockEditor." @ $TorqueScriptFileExtension);
exec("./datablockEditorUndo.tscript"); exec("./datablockEditorUndo." @ $TorqueScriptFileExtension);
exec("./DatablockEditorTreeWindow.ed.gui"); exec("./DatablockEditorTreeWindow.ed.gui");
exec("./DatablockEditorInspectorWindow.ed.gui"); exec("./DatablockEditorInspectorWindow.ed.gui");
exec("./DatablockEditorCreatePrompt.ed.gui"); exec("./DatablockEditorCreatePrompt.ed.gui");

View file

@ -33,7 +33,7 @@ function initializeDebugger()
echo(" % - Initializing Debugger"); echo(" % - Initializing Debugger");
// Load the scripts. // Load the scripts.
exec("./scripts/debugger.ed.tscript"); exec("./scripts/debugger.ed." @ $TorqueScriptFileExtension);
// And the guis. // And the guis.
exec("./gui/breakConditionDlg.ed.gui"); exec("./gui/breakConditionDlg.ed.gui");

View file

@ -24,12 +24,12 @@ function initializeDecalEditor()
{ {
echo(" % - Initializing Decal Editor"); echo(" % - Initializing Decal Editor");
$decalDataFile = "art/decals/managedDecalData.tscript"; $decalDataFile = "art/decals/managedDecalData." @ $TorqueScriptFileExtension;
exec( "./decalEditor.tscript" ); exec( "./decalEditor." @ $TorqueScriptFileExtension );
exec( "./decalEditorGui.gui" ); exec( "./decalEditorGui.gui" );
exec( "./decalEditorGui.tscript" ); exec( "./decalEditorGui." @ $TorqueScriptFileExtension );
exec( "./decalEditorActions.tscript" ); exec( "./decalEditorActions." @ $TorqueScriptFileExtension );
// Add ourselves to EditorGui, where all the other tools reside // Add ourselves to EditorGui, where all the other tools reside
DecalEditorGui.setVisible( false ); DecalEditorGui.setVisible( false );
@ -66,9 +66,9 @@ function destroyDecalEditor()
// JCF: helper for during development // JCF: helper for during development
function reinitDecalEditor() function reinitDecalEditor()
{ {
exec( "./main.tscript" ); exec( "./main." @ $TorqueScriptFileExtension );
exec( "./decalEditor.tscript" ); exec( "./decalEditor." @ $TorqueScriptFileExtension );
exec( "./decalEditorGui.tscript" ); exec( "./decalEditorGui." @ $TorqueScriptFileExtension );
} }
function DecalEditorPlugin::onWorldEditorStartup( %this ) function DecalEditorPlugin::onWorldEditorStartup( %this )

View file

@ -34,7 +34,7 @@ function initializeEditorClasses()
// Load Editor Profiles // Load Editor Profiles
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
exec("./scripts/fileLoader.ed.tscript"); exec("./scripts/fileLoader.ed." @ $TorqueScriptFileExtension);
loadDirectory( expandFilename("./gui/panels") ); loadDirectory( expandFilename("./gui/panels") );
@ -43,39 +43,39 @@ function initializeEditorClasses()
// Setup Preferences Manager // Setup Preferences Manager
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
exec("./scripts/preferencesManager.ed.tscript"); exec("./scripts/preferencesManager.ed." @ $TorqueScriptFileExtension);
initPreferencesManager(); initPreferencesManager();
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Load Form Managers // Load Form Managers
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
exec("./scripts/guiFormLibraryManager.ed.tscript"); exec("./scripts/guiFormLibraryManager.ed." @ $TorqueScriptFileExtension);
exec("./scripts/guiFormContentManager.ed.tscript"); exec("./scripts/guiFormContentManager.ed." @ $TorqueScriptFileExtension);
exec("./scripts/guiFormReferenceManager.ed.tscript"); exec("./scripts/guiFormReferenceManager.ed." @ $TorqueScriptFileExtension);
exec("./scripts/guiFormLayoutManager.ed.tscript"); exec("./scripts/guiFormLayoutManager.ed." @ $TorqueScriptFileExtension);
exec("./scripts/guiFormMessageManager.ed.tscript"); exec("./scripts/guiFormMessageManager.ed." @ $TorqueScriptFileExtension);
exec("./scripts/expandos.ed.tscript"); exec("./scripts/expandos.ed." @ $TorqueScriptFileExtension);
exec("./scripts/utility.ed.tscript"); exec("./scripts/utility.ed." @ $TorqueScriptFileExtension);
setupBaseExpandos(); setupBaseExpandos();
// User Display // User Display
exec("./scripts/contextPopup.ed.tscript"); exec("./scripts/contextPopup.ed." @ $TorqueScriptFileExtension);
// Project Support // Project Support
exec("./scripts/projects/projectEvents.ed.tscript"); exec("./scripts/projects/projectEvents.ed." @ $TorqueScriptFileExtension);
exec("./scripts/projects/projectInternalInterface.ed.tscript"); exec("./scripts/projects/projectInternalInterface.ed." @ $TorqueScriptFileExtension);
// Input // Input
exec("./scripts/input/inputEvents.ed.tscript"); exec("./scripts/input/inputEvents.ed." @ $TorqueScriptFileExtension);
exec("./scripts/input/dragDropEvents.ed.tscript"); exec("./scripts/input/dragDropEvents.ed." @ $TorqueScriptFileExtension);
exec("./scripts/input/applicationEvents.ed.tscript"); exec("./scripts/input/applicationEvents.ed." @ $TorqueScriptFileExtension);
// Form Class // Form Class
exec("./scripts/guiFormClass.ed.tscript"); exec("./scripts/guiFormClass.ed." @ $TorqueScriptFileExtension);
exec("./scripts/guiClasses/guiThumbnailPopup.ed.tscript"); exec("./scripts/guiClasses/guiThumbnailPopup.ed." @ $TorqueScriptFileExtension);
exec("./scripts/guiClasses/guiThumbnail.ed.tscript"); exec("./scripts/guiClasses/guiThumbnail.ed." @ $TorqueScriptFileExtension);
exec("./scripts/RSSNews/RSSFeedScript.ed.tscript"); exec("./scripts/RSSNews/RSSFeedScript.ed." @ $TorqueScriptFileExtension);
loadDirectory( expandFilename("./scripts/core") ); loadDirectory( expandFilename("./scripts/core") );
loadDirectory( expandFilename("./scripts/platform") ); loadDirectory( expandFilename("./scripts/platform") );

View file

@ -28,7 +28,7 @@ $RSSFeed::userAgent = "TorqueGameEngineAdvances/1.1";
$RSSFeed::maxNewHeadlines = 10; $RSSFeed::maxNewHeadlines = 10;
// Load up the helper objects // Load up the helper objects
exec( "./RSSStructs.ed.tscript" ); exec( "./RSSStructs.ed." @ $TorqueScriptFileExtension );
function RSSFeedObject::onConnected(%this) function RSSFeedObject::onConnected(%this)
{ {
@ -93,7 +93,7 @@ function RSSFeedObject::onDisconnect(%this)
{ {
// Create collection and load cache. // Create collection and load cache.
%ret = constructRSSHeadlineCollection(); %ret = constructRSSHeadlineCollection();
%ret.loadFromFile( "RSSCache.tscript" ); %ret.loadFromFile( "RSSCache." @ $TorqueScriptFileExtension );
// Ok, we have a full buffer now, hopefully. Let's process it. // Ok, we have a full buffer now, hopefully. Let's process it.
//echo(" - Got " @ $RSSFeed::lineCount @ " lines."); //echo(" - Got " @ $RSSFeed::lineCount @ " lines.");
@ -137,7 +137,7 @@ function RSSFeedObject::onDisconnect(%this)
eval( %this._callback @ "(" @ %params @ ");" ); eval( %this._callback @ "(" @ %params @ ");" );
} }
%ret.writeToFile( "RSSCache.tscript", false ); %ret.writeToFile( "RSSCache." @ $TorqueScriptFileExtension, false );
} }
function RSSUpdate::initialize( %callback ) function RSSUpdate::initialize( %callback )

View file

@ -26,11 +26,11 @@ function setupBaseExpandos()
// FIXME TGEA doesnt currently have these due to the way it's built // FIXME TGEA doesnt currently have these due to the way it's built
return; return;
setScriptPathExpando("tools", getExecutablePath() @ "/tools", true); se" @ $TorqueScriptFileExtension @ "PathExpando("tools", getExecutablePath() @ "/tools", true);
setScriptPathExpando("tool", getExecutablePath() , true); se" @ $TorqueScriptFileExtension @ "PathExpando("tool", getExecutablePath() , true);
setScriptPathExpando("toolResources", getExecutablePath() @ "/resources", true); se" @ $TorqueScriptFileExtension @ "PathExpando("toolResources", getExecutablePath() @ "/resources", true);
setScriptPathExpando("core", getExecutablePath() @ "/core", true); se" @ $TorqueScriptFileExtension @ "PathExpando("core", getExecutablePath() @ "/core", true);
// Remove the game expando so we can use this to reset expandos // Remove the game expando so we can use this to reset expandos
removeScriptPathExpando("game"); removeScriptPathExpando("game");

View file

@ -23,7 +23,7 @@
function loadDirectory(%path, %type, %dsoType) function loadDirectory(%path, %type, %dsoType)
{ {
if( %type $= "" ) if( %type $= "" )
%type = "ed.tscript"; %type = "ed." @ $TorqueScriptFileExtension;
if( %dsoType $= "" ) if( %dsoType $= "" )
%dsoType = "edso"; %dsoType = "edso";

View file

@ -37,7 +37,7 @@ function GuiFormManager::InitLayouts( %libraryName, %layoutName, %layoutObj )
} }
// Load up all Layouts in the layout base path. // Load up all Layouts in the layout base path.
loadDirectory( %libraryObj.basePath, "tscript", "dso" ); loadDirectory( %libraryObj.basePath, "" @ $TorqueScriptFileExtension, "dso" );
} }
@ -77,7 +77,7 @@ function GuiFormManager::RegisterLayout( %libraryName, %layoutName, %layoutObj )
layoutName = %layoutName; layoutName = %layoutName;
layoutLibrary = %libraryObj; layoutLibrary = %libraryObj;
layoutObj = %layoutObj; layoutObj = %layoutObj;
layoutFile = %libraryObj.basePath @ %layoutName @ ".tscript"; layoutFile = %libraryObj.basePath @ %layoutName @ "." @ $TorqueScriptFileExtension;
}; };
// Tag Layout Object Properly so it can reset itself. // Tag Layout Object Properly so it can reset itself.
@ -192,7 +192,7 @@ function GuiFormManager::SaveLayout( %library, %layoutName, %newName )
// Do any form layout specifics saving. // Do any form layout specifics saving.
GuiFormManager::SaveLayoutContent( %layoutObjRef.layoutObj ); GuiFormManager::SaveLayoutContent( %layoutObjRef.layoutObj );
%newFile = %libraryObj.basePath @ "/" @ %newName @ ".tscript"; %newFile = %libraryObj.basePath @ "/" @ %newName @ "." @ $TorqueScriptFileExtension;
if( %newName $= "" ) if( %newName $= "" )
{ {
%newName = %layoutObjRef.layoutName; %newName = %layoutObjRef.layoutName;

View file

@ -112,8 +112,8 @@ function ProjectBase::_onProjectOpen( %this, %data )
setCurrentDirectory( %this.gamePath ); setCurrentDirectory( %this.gamePath );
// Set ^game expando // Set ^game expando
setScriptPathExpando("project", %this.gamePath ); se" @ $TorqueScriptFileExtension @ "PathExpando("project", %this.gamePath );
setScriptPathExpando("game", %this.gamePath @ "/game" ); se" @ $TorqueScriptFileExtension @ "PathExpando("game", %this.gamePath @ "/game" );
%this.onProjectOpen( %data ); %this.onProjectOpen( %data );
%this.setActive(); %this.setActive();

View file

@ -206,7 +206,7 @@ function ForestEditorGui::newMesh( %this )
ForestEditMeshTree.scrollVisible( %item ); ForestEditMeshTree.scrollVisible( %item );
ForestEditMeshTree.addSelection( %item ); ForestEditMeshTree.addSelection( %item );
ForestDataManager.setDirty( %name, "art/forest/managedItemData.tscript" ); ForestDataManager.setDirty( %name, "art/forest/managedItemData." @ $TorqueScriptFileExtension );
%element = new ForestBrushElement() %element = new ForestBrushElement()
{ {
@ -255,7 +255,7 @@ function ForestEditorGui::deleteMesh( %this )
function ForestEditorGui::okDeleteMesh( %this, %mesh ) function ForestEditorGui::okDeleteMesh( %this, %mesh )
{ {
// Remove mesh from file // Remove mesh from file
ForestDataManager.removeObjectFromFile( %mesh, "art/forest/managedItemData.tscript" ); ForestDataManager.removeObjectFromFile( %mesh, "art/forest/managedItemData." @ $TorqueScriptFileExtension );
// Submitting undo actions is handled in code. // Submitting undo actions is handled in code.
%this.deleteMeshSafe( %mesh ); %this.deleteMeshSafe( %mesh );
@ -371,7 +371,7 @@ function ForestEditMeshTree::onDoubleClick( %this )
parentGroup = ForestBrushGroup; parentGroup = ForestBrushGroup;
}; };
//ForestDataManager.setDirty( %element, "art/forest/brushes.tscript" ); //ForestDataManager.setDirty( %element, "art/forest/brushes." @ $TorqueScriptFileExtension );
ForestEditBrushTree.clearSelection(); ForestEditBrushTree.clearSelection();
ForestEditBrushTree.buildVisibleTree( true ); ForestEditBrushTree.buildVisibleTree( true );

View file

@ -24,12 +24,12 @@ function initializeForestEditor()
{ {
echo(" % - Initializing Forest Editor"); echo(" % - Initializing Forest Editor");
exec( "./forestEditor.tscript" ); exec( "./forestEditor." @ $TorqueScriptFileExtension );
exec( "./forestEditorGui.gui" ); exec( "./forestEditorGui.gui" );
exec( "./forestEditToolbar.ed.gui" ); exec( "./forestEditToolbar.ed.gui" );
exec( "./forestEditorGui.tscript" ); exec( "./forestEditorGui." @ $TorqueScriptFileExtension );
exec( "./tools.tscript" ); exec( "./tools." @ $TorqueScriptFileExtension );
ForestEditorGui.setVisible( false ); ForestEditorGui.setVisible( false );
ForestEditorPalleteWindow.setVisible( false ); ForestEditorPalleteWindow.setVisible( false );
@ -84,16 +84,16 @@ function destroyForestEditor()
// NOTE: debugging helper. // NOTE: debugging helper.
function reinitForest() function reinitForest()
{ {
exec( "./main.tscript" ); exec( "./main." @ $TorqueScriptFileExtension );
exec( "./forestEditorGui.tscript" ); exec( "./forestEditorGui." @ $TorqueScriptFileExtension );
exec( "./tools.tscript" ); exec( "./tools." @ $TorqueScriptFileExtension );
} }
function ForestEditorPlugin::onWorldEditorStartup( %this ) function ForestEditorPlugin::onWorldEditorStartup( %this )
{ {
new PersistenceManager( ForestDataManager ); new PersistenceManager( ForestDataManager );
%brushPath = "tools/forestEditor/brushes.tscript"; %brushPath = "tools/forestEditor/brushes." @ $TorqueScriptFileExtension;
if ( !isFile( %brushPath ) ) if ( !isFile( %brushPath ) )
%successfulFile = createPath( %brushPath ); %successfulFile = createPath( %brushPath );
@ -205,7 +205,7 @@ function ForestEditorPlugin::onActivated( %this )
} }
if ( %this.showError ) if ( %this.showError )
toolsMessageBoxOK( "Error", "Your tools/forestEditor folder does not contain a valid brushes.tscript. Brushes you create will not be saved!" ); toolsMessageBoxOK( "Error", "Your tools/forestEditor folder does not contain a valid brushes." @ $TorqueScriptFileExtension @ ". Brushes you create will not be saved!" );
} }
function ForestEditorPlugin::onDeactivated( %this ) function ForestEditorPlugin::onDeactivated( %this )
@ -262,7 +262,7 @@ function ForestEditorPlugin::onSaveMission( %this, %missionFile )
} }
} }
ForestBrushGroup.save( "tools/forestEditor/brushes.tscript" ); ForestBrushGroup.save( "tools/forestEditor/brushes." @ $TorqueScriptFileExtension );
} }
function ForestEditorPlugin::onEditorSleep( %this ) function ForestEditorPlugin::onEditorSleep( %this )

View file

@ -1049,7 +1049,7 @@
}; };
new GuiCheckBoxCtrl() { new GuiCheckBoxCtrl() {
useInactiveState = "0"; useInactiveState = "0";
text = " Force update materials.tscript"; text = " Force update materials." @ $TorqueScriptFileExtension;
groupNum = "-1"; groupNum = "-1";
buttonType = "ToggleButton"; buttonType = "ToggleButton";
useMouseEvents = "0"; useMouseEvents = "0";
@ -1063,7 +1063,7 @@
canSave = "1"; canSave = "1";
Visible = "1"; Visible = "1";
tooltipprofile = "ToolsGuiToolTipProfile"; tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Forces update of materials.tscript (even if Materials already exist)"; ToolTip = "Forces update of materials." @ $TorqueScriptFileExtension @ " (even if Materials already exist)";
hovertime = "1000"; hovertime = "1000";
internalName = "forceUpdateMaterials"; internalName = "forceUpdateMaterials";
canSaveDynamicFields = "0"; canSaveDynamicFields = "0";
@ -1510,4 +1510,4 @@
}; };
}; };
//--- OBJECT WRITE END --- //--- OBJECT WRITE END ---
exec("./assimpImport.ed.tscript"); exec("./assimpImport.ed." @ $TorqueScriptFileExtension);

View file

@ -280,7 +280,7 @@ function AssimpImportDlg::showDialog(%this, %shapePath, %cmd)
// Check for an existing TSShapeConstructor object. Need to exec the script // Check for an existing TSShapeConstructor object. Need to exec the script
// manually as the resource may not have been loaded yet // manually as the resource may not have been loaded yet
%csPath = filePath(%this.path) @ "/" @ fileBase(%this.path) @ ".tscript"; %csPath = filePath(%this.path) @ "/" @ fileBase(%this.path) @ "." @ $TorqueScriptFileExtension;
if (isFile(%csPath)) if (isFile(%csPath))
exec(%csPath); exec(%csPath);

View file

@ -991,7 +991,7 @@
}; };
new GuiCheckBoxCtrl() { new GuiCheckBoxCtrl() {
useInactiveState = "0"; useInactiveState = "0";
text = " Force update materials.tscript"; text = " Force update materials." @ $TorqueScriptFileExtension;
groupNum = "-1"; groupNum = "-1";
buttonType = "ToggleButton"; buttonType = "ToggleButton";
useMouseEvents = "0"; useMouseEvents = "0";
@ -1005,7 +1005,7 @@
canSave = "1"; canSave = "1";
Visible = "1"; Visible = "1";
tooltipprofile = "ToolsGuiToolTipProfile"; tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Forces update of materials.tscript (even if Materials already exist)"; ToolTip = "Forces update of materials." @ $TorqueScriptFileExtension @ " (even if Materials already exist)";
hovertime = "1000"; hovertime = "1000";
internalName = "forceUpdateMaterials"; internalName = "forceUpdateMaterials";
canSaveDynamicFields = "0"; canSaveDynamicFields = "0";
@ -1255,7 +1255,7 @@ function ColladaImportDlg::showDialog(%this, %shapePath, %cmd)
// Check for an existing TSShapeConstructor object. Need to exec the script // Check for an existing TSShapeConstructor object. Need to exec the script
// manually as the DAE resource may not have been loaded yet // manually as the DAE resource may not have been loaded yet
%csPath = filePath(%this.path) @ "/" @ fileBase(%this.path) @ ".tscript"; %csPath = filePath(%this.path) @ "/" @ fileBase(%this.path) @ "." @ $TorqueScriptFileExtension;
if (isFile(%csPath)) if (isFile(%csPath))
exec(%csPath); exec(%csPath);

View file

@ -187,7 +187,7 @@ function SettingsInspector::changeEditorSetting(%this, %varName, %value)
//Bit of a hack, but if we were editing the theme, reexec the profiles for GUI //Bit of a hack, but if we were editing the theme, reexec the profiles for GUI
if(ESettingsWindow.selectedPageText $= "Theme") if(ESettingsWindow.selectedPageText $= "Theme")
exec("tools/gui/profiles.ed.tscript"); exec("tools/gui/profiles.ed." @ $TorqueScriptFileExtension);
} }
else else
%success = ProjectSettings.write(); %success = ProjectSettings.write();

View file

@ -20,9 +20,9 @@
// IN THE SOFTWARE. // IN THE SOFTWARE.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
exec("./fileDialogBase.ed.tscript"); exec("./fileDialogBase.ed." @ $TorqueScriptFileExtension);
exec("./openFileDialog.ed.tscript"); exec("./openFileDialog.ed." @ $TorqueScriptFileExtension);
exec("./saveFileDialog.ed.tscript"); exec("./saveFileDialog.ed." @ $TorqueScriptFileExtension);
exec("./saveChangesMBDlg.ed.gui"); exec("./saveChangesMBDlg.ed.gui");
exec("./simViewDlg.ed.gui"); exec("./simViewDlg.ed.gui");
exec("./colorPicker.ed.gui"); exec("./colorPicker.ed.gui");
@ -30,16 +30,16 @@ exec("./materialSelector.ed.gui");
exec("./scriptEditorDlg.ed.gui"); exec("./scriptEditorDlg.ed.gui");
exec("./colladaImport.ed.gui"); exec("./colladaImport.ed.gui");
exec("./GuiEaseEditDlg.ed.gui"); exec("./GuiEaseEditDlg.ed.gui");
exec("./GuiEaseEditDlg.ed.tscript"); exec("./GuiEaseEditDlg.ed." @ $TorqueScriptFileExtension);
exec("./guiObjectInspector.ed.tscript"); exec("./guiObjectInspector.ed." @ $TorqueScriptFileExtension);
exec("./uvEditor.ed.gui"); exec("./uvEditor.ed.gui");
exec("./objectSelection.ed.tscript"); exec("./objectSelection.ed." @ $TorqueScriptFileExtension);
exec("./postFxManager.gui"); exec("./postFxManager.gui");
exec("./assimpImport.ed.gui"); exec("./assimpImport.ed.gui");
exec("./fieldTypes/assetDependencies.tscript"); exec("./fieldTypes/assetDependencies." @ $TorqueScriptFileExtension);
exec("./fieldTypes/fieldTypes.tscript"); exec("./fieldTypes/fieldTypes." @ $TorqueScriptFileExtension);
exec("./fieldTypes/listField.tscript"); exec("./fieldTypes/listField." @ $TorqueScriptFileExtension);
exec("./fieldTypes/range.tscript"); exec("./fieldTypes/range." @ $TorqueScriptFileExtension);
exec("./fieldTypes/moduleDependencies.tscript"); exec("./fieldTypes/moduleDependencies." @ $TorqueScriptFileExtension);
exec("./fieldTypes/buttonField.tscript"); exec("./fieldTypes/buttonField." @ $TorqueScriptFileExtension);

View file

@ -143,7 +143,7 @@ function GuiObjectInspectorMethodList::init( %this, %object )
%methods = %object.dumpMethods(); %methods = %object.dumpMethods();
%count = %methods.count(); %count = %methods.count();
%methodsGroup = %this.insertItem( 0, "Methods" ); %methodsGroup = %this.insertItem( 0, "Methods" );
%parentScripted = %this.insertItem( %methodsGroup, "Scripted" ); %paren" @ $TorqueScriptFileExtension @ "ed = %this.insertItem( %methodsGroup, "Scripted" );
%parentNative = %this.insertItem( %methodsGroup, "Native" ); %parentNative = %this.insertItem( %methodsGroup, "Native" );
for( %i = 0; %i < %count; %i ++ ) for( %i = 0; %i < %count; %i ++ )
@ -158,7 +158,7 @@ function GuiObjectInspectorMethodList::init( %this, %object )
%tooltip = %prototype; %tooltip = %prototype;
if( isFile( %fileName ) ) if( isFile( %fileName ) )
{ {
%parent = %parentScripted; %parent = %paren" @ $TorqueScriptFileExtension @ "ed;
%tooltip = %tooltip NL "Declared in: " @ %fileName @ ":" @ %lineNumber; %tooltip = %tooltip NL "Declared in: " @ %fileName @ ":" @ %lineNumber;
} }
else else

View file

@ -1573,7 +1573,7 @@ function MaterialSelector::updateMaterialTags( %this, %material, %tag, %tagValue
// their auto-generated or new material // their auto-generated or new material
if( %material.getFilename() !$= "" && if( %material.getFilename() !$= "" &&
%material.getFilename() !$= "tools/gui/MaterialSelector.ed.gui" && %material.getFilename() !$= "tools/gui/MaterialSelector.ed.gui" &&
%material.getFilename() !$= "tools/materialEditor/scripts/materialEditor.ed.tscript" ) %material.getFilename() !$= "tools/materialEditor/scripts/materialEditor.ed." @ $TorqueScriptFileExtension )
{ {
MaterialSelectorPerMan.setDirty( %material ); MaterialSelectorPerMan.setDirty( %material );
MaterialSelectorPerMan.saveDirty(); MaterialSelectorPerMan.saveDirty();
@ -1761,7 +1761,7 @@ function MaterialSelector::deleteMaterial( %this, %materialName, %secondFilter,
if( %materialName.getFilename() !$= "" && if( %materialName.getFilename() !$= "" &&
%materialName.getFilename() !$= "tools/gui/MaterialSelector.ed.gui" && %materialName.getFilename() !$= "tools/gui/MaterialSelector.ed.gui" &&
%materialName.getFilename() !$= "tools/materialEditor/scripts/materialEditor.ed.tscript" ) %materialName.getFilename() !$= "tools/materialEditor/scripts/materialEditor.ed." @ $TorqueScriptFileExtension )
{ {
MaterialSelectorPerMan.removeObjectFromFile(%materialName); MaterialSelectorPerMan.removeObjectFromFile(%materialName);
MaterialSelectorPerMan.saveDirty(); MaterialSelectorPerMan.saveDirty();

View file

@ -22,7 +22,7 @@
function execEditorProfilesCS() function execEditorProfilesCS()
{ {
exec("./profiles.ed.tscript"); exec("./profiles.ed." @ $TorqueScriptFileExtension);
} }
$Gui::clipboardFile = expandFilename("./clipboard.gui"); $Gui::clipboardFile = expandFilename("./clipboard.gui");

View file

@ -34,22 +34,22 @@ function initializeGuiEditor()
// Scripts. // Scripts.
exec( "./scripts/guiEditor.ed.tscript" ); exec( "./scripts/guiEditor.ed." @ $TorqueScriptFileExtension );
exec( "./scripts/guiEditorTreeView.ed.tscript" ); exec( "./scripts/guiEditorTreeView.ed." @ $TorqueScriptFileExtension );
exec( "./scripts/guiEditorInspector.ed.tscript" ); exec( "./scripts/guiEditorInspector.ed." @ $TorqueScriptFileExtension );
exec( "./scripts/guiEditorProfiles.ed.tscript" ); exec( "./scripts/guiEditorProfiles.ed." @ $TorqueScriptFileExtension );
exec( "./scripts/guiEditorGroup.ed.tscript" ); exec( "./scripts/guiEditorGroup.ed." @ $TorqueScriptFileExtension );
exec( "./scripts/guiEditorUndo.ed.tscript" ); exec( "./scripts/guiEditorUndo.ed." @ $TorqueScriptFileExtension );
exec( "./scripts/guiEditorCanvas.ed.tscript" ); exec( "./scripts/guiEditorCanvas.ed." @ $TorqueScriptFileExtension );
exec( "./scripts/guiEditorContentList.ed.tscript" ); exec( "./scripts/guiEditorContentList.ed." @ $TorqueScriptFileExtension );
exec( "./scripts/guiEditorStatusBar.ed.tscript" ); exec( "./scripts/guiEditorStatusBar.ed." @ $TorqueScriptFileExtension );
exec( "./scripts/guiEditorToolbox.ed.tscript" ); exec( "./scripts/guiEditorToolbox.ed." @ $TorqueScriptFileExtension );
exec( "./scripts/guiEditorSelectDlg.ed.tscript" ); exec( "./scripts/guiEditorSelectDlg.ed." @ $TorqueScriptFileExtension );
exec( "./scripts/guiEditorNewGuiDialog.ed.tscript" ); exec( "./scripts/guiEditorNewGuiDialog.ed." @ $TorqueScriptFileExtension );
exec( "./scripts/fileDialogs.ed.tscript" ); exec( "./scripts/fileDialogs.ed." @ $TorqueScriptFileExtension );
exec( "./scripts/guiEditorPrefsDlg.ed.tscript" ); exec( "./scripts/guiEditorPrefsDlg.ed." @ $TorqueScriptFileExtension );
exec( "./scripts/EditorChooseGUI.ed.tscript" ); exec( "./scripts/EditorChooseGUI.ed." @ $TorqueScriptFileExtension );
} }
function destroyGuiEditor() function destroyGuiEditor()

View file

@ -21,7 +21,7 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
$GUI_EDITOR_DEFAULT_PROFILE_FILENAME = "art/gui/customProfiles.tscript"; $GUI_EDITOR_DEFAULT_PROFILE_FILENAME = "art/gui/customProfiles." @ $TorqueScriptFileExtension;
$GUI_EDITOR_DEFAULT_PROFILE_CATEGORY = "Other"; $GUI_EDITOR_DEFAULT_PROFILE_CATEGORY = "Other";
@ -127,7 +127,7 @@ function GuiEditor::deleteProfile( %this, %profile )
function GuiEditor::showSaveProfileDialog( %this, %currentFileName ) function GuiEditor::showSaveProfileDialog( %this, %currentFileName )
{ {
getSaveFileName( "TorqueScript Files|*.tscript", %this @ ".doSaveProfile", %currentFileName ); getSaveFileName( "TorqueScript Files|*." @ $TorqueScriptFileExtension, %this @ ".doSaveProfile", %currentFileName );
} }
//--------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------

View file

@ -40,9 +40,9 @@ if(!$Tools::loaded)
//We may need to lean on certain EditorSettings, and specifically default values if the settings.xml //We may need to lean on certain EditorSettings, and specifically default values if the settings.xml
//isn't found //isn't found
exec("tools/worldEditor/scripts/editorPrefs.ed.tscript"); exec("tools/worldEditor/scripts/editorPrefs.ed." @ $TorqueScriptFileExtension);
exec( "tools/gui/profiles.ed.tscript" ); exec( "tools/gui/profiles.ed." @ $TorqueScriptFileExtension );
exec("tools/gui/EditorLoadingGui.gui"); exec("tools/gui/EditorLoadingGui.gui");
} }
@ -77,14 +77,14 @@ function onStart()
} }
// Common GUI stuff. // Common GUI stuff.
exec( "./gui/cursors.ed.tscript" ); exec( "./gui/cursors.ed." @ $TorqueScriptFileExtension );
exec( "./gui/messageBoxes/messageBox.ed.tscript" ); exec( "./gui/messageBoxes/messageBox.ed." @ $TorqueScriptFileExtension );
exec( "./editorClasses/gui/panels/navPanelProfiles.ed.tscript" ); exec( "./editorClasses/gui/panels/navPanelProfiles.ed." @ $TorqueScriptFileExtension );
// Make sure we get editor profiles before any GUI's // Make sure we get editor profiles before any GUI's
// BUG: these dialogs are needed earlier in the init sequence, and should be moved to // BUG: these dialogs are needed earlier in the init sequence, and should be moved to
// common, along with the guiProfiles they depend on. // common, along with the guiProfiles they depend on.
exec( "./gui/guiDialogs.ed.tscript" ); exec( "./gui/guiDialogs.ed." @ $TorqueScriptFileExtension );
//%toggle = $Scripts::ignoreDSOs; //%toggle = $Scripts::ignoreDSOs;
//$Scripts::ignoreDSOs = true; //$Scripts::ignoreDSOs = true;
@ -98,12 +98,12 @@ function onStart()
$editors[%i] = getWord( $Tools::loadFirst, %i ); $editors[%i] = getWord( $Tools::loadFirst, %i );
} }
%pattern = $Tools::resourcePath @ "/*/main.tscript"; %pattern = $Tools::resourcePath @ "/*/main." @ $TorqueScriptFileExtension;
%folder = findFirstFile( %pattern ); %folder = findFirstFile( %pattern );
if ( %folder $= "") if ( %folder $= "")
{ {
// if we have absolutely no matches for main.tscript, we look for main.tscript.dso // if we have absolutely no matches for main.tscript, we look for main.tscript.dso
%pattern = $Tools::resourcePath @ "/*/main.tscript.dso"; %pattern = $Tools::resourcePath @ "/*/main." @ $TorqueScriptFileExtension @ ".dso";
%folder = findFirstFile( %pattern ); %folder = findFirstFile( %pattern );
} }
while ( %folder !$= "" ) while ( %folder !$= "" )
@ -130,7 +130,7 @@ function onStart()
%count = $editors[count]; %count = $editors[count];
for ( %i = 0; %i < %count; %i++ ) for ( %i = 0; %i < %count; %i++ )
{ {
exec( "./" @ $editors[%i] @ "/main.tscript" ); exec( "./" @ $editors[%i] @ "/main." @ $TorqueScriptFileExtension );
%initializeFunction = "initialize" @ $editors[%i]; %initializeFunction = "initialize" @ $editors[%i];
if( isFunction( %initializeFunction ) ) if( isFunction( %initializeFunction ) )
@ -355,7 +355,7 @@ function Tools::LoadResources( %path )
for( %i = 0; %i < %wordCount; %i++ ) for( %i = 0; %i < %wordCount; %i++ )
{ {
%resource = GetField( %resourcesList, %i ); %resource = GetField( %resourcesList, %i );
if( isFile( %resourcesPath @ %resource @ "/resourceDatabase.tscript") ) if( isFile( %resourcesPath @ %resource @ "/resourceDatabase." @ $TorqueScriptFileExtension) )
ResourceObject::load( %path, %resource ); ResourceObject::load( %path, %resource );
} }
} }

View file

@ -36,10 +36,10 @@ function initializeMaterialEditor()
exec("~/materialEditor/gui/materialInstancesView.ed.gui"); exec("~/materialEditor/gui/materialInstancesView.ed.gui");
// Load Client Scripts. // Load Client Scripts.
exec("./scripts/materialEditor.ed.tscript"); exec("./scripts/materialEditor.ed." @ $TorqueScriptFileExtension);
exec("./scripts/materialEditorUndo.ed.tscript"); exec("./scripts/materialEditorUndo.ed." @ $TorqueScriptFileExtension);
exec("./scripts/materialInstanceView.ed.tscript"); exec("./scripts/materialInstanceView.ed." @ $TorqueScriptFileExtension);
//exec("./gui/profiles.ed.tscript"); //exec("./gui/profiles.ed." @ $TorqueScriptFileExtension);
MaterialEditorPreviewWindow.setVisible( false ); MaterialEditorPreviewWindow.setVisible( false );
//matEd_cubemapEditor.setVisible( false ); //matEd_cubemapEditor.setVisible( false );
@ -91,7 +91,7 @@ function MaterialEditorPlugin::onWorldEditorStartup( %this )
MaterialEditorPlugin.map = %map; MaterialEditorPlugin.map = %map;
MaterialEditorGui.fileSpec = "Torque Material Files (materials.tscript)|materials.tscript|All Files (*.*)|*.*|"; MaterialEditorGui.fileSpec = "Torque Material Files (materials." @ $TorqueScriptFileExtension @ ")|materials." @ $TorqueScriptFileExtension @ "|All Files (*.*)|*.*|";
MaterialEditorGui.textureFormats = "Image Files (*.png, *.jpg, *.dds, *.bmp, *.gif, *.jng. *.tga)|*.png;*.jpg;*.dds;*.bmp;*.gif;*.jng;*.tga|All Files (*.*)|*.*|"; MaterialEditorGui.textureFormats = "Image Files (*.png, *.jpg, *.dds, *.bmp, *.gif, *.jng. *.tga)|*.png;*.jpg;*.dds;*.bmp;*.gif;*.jng;*.tga|All Files (*.*)|*.*|";
MaterialEditorGui.modelFormats = "DTS Files (*.dts)|*.dts"; MaterialEditorGui.modelFormats = "DTS Files (*.dts)|*.dts";
MaterialEditorGui.lastTexturePath = ""; MaterialEditorGui.lastTexturePath = "";

View file

@ -475,7 +475,7 @@ function MaterialEditorGui::isMatEditorMaterial(%this, %material)
{ {
return ( %material.getFilename() $= "" || return ( %material.getFilename() $= "" ||
%material.getFilename() $= "tools/gui/materialSelector.ed.gui" || %material.getFilename() $= "tools/gui/materialSelector.ed.gui" ||
%material.getFilename() $= "tools/materialEditor/scripts/materialEditor.ed.tscript" ); %material.getFilename() $= "tools/materialEditor/scripts/materialEditor.ed." @ $TorqueScriptFileExtension );
} }
function MaterialEditorGui::setMaterialNotDirty(%this) function MaterialEditorGui::setMaterialNotDirty(%this)
@ -521,13 +521,13 @@ function MaterialEditorGui::setMaterialDirty(%this)
%k = %pos + 1; %k = %pos + 1;
} }
%savePath = getSubStr( %shapePath , 0 , %k ); %savePath = getSubStr( %shapePath , 0 , %k );
%savePath = %savePath @ "materials.tscript"; %savePath = %savePath @ "materials." @ $TorqueScriptFileExtension;
matEd_PersistMan.setDirty(MaterialEditorGui.currentMaterial, %savePath); matEd_PersistMan.setDirty(MaterialEditorGui.currentMaterial, %savePath);
} }
else else
{ {
matEd_PersistMan.setDirty(MaterialEditorGui.currentMaterial, "art/materials.tscript"); matEd_PersistMan.setDirty(MaterialEditorGui.currentMaterial, "art/materials." @ $TorqueScriptFileExtension);
} }
} }
else else
@ -1840,7 +1840,7 @@ function MaterialEditorGui::createNewCubemap( %this, %cubemap )
parentGroup = RootGroup; parentGroup = RootGroup;
}; };
matEd_cubemapEdPerMan.setDirty( %cubemap, "art/materials.tscript" ); matEd_cubemapEdPerMan.setDirty( %cubemap, "art/materials." @ $TorqueScriptFileExtension );
matEd_cubemapEdPerMan.saveDirty(); matEd_cubemapEdPerMan.saveDirty();
return %cubemap; return %cubemap;
@ -1857,7 +1857,7 @@ function MaterialEditorGui::setCubemapDirty(%this)
// materials created in the materail selector are given that as its filename, so we run another check // materials created in the materail selector are given that as its filename, so we run another check
if( MaterialEditorGui.isMatEditorMaterial( %cubemap ) ) if( MaterialEditorGui.isMatEditorMaterial( %cubemap ) )
matEd_cubemapEdPerMan.setDirty(%cubemap, "art/materials.tscript"); matEd_cubemapEdPerMan.setDirty(%cubemap, "art/materials." @ $TorqueScriptFileExtension);
else else
matEd_cubemapEdPerMan.setDirty(%cubemap); matEd_cubemapEdPerMan.setDirty(%cubemap);
} }
@ -2384,7 +2384,7 @@ function MaterialEditorGui::switchMaterial( %this, %material )
and updates the engines libraries accordingly in order to make this change per and updates the engines libraries accordingly in order to make this change per
object/per objects instances/per target. Before this functionality is enacted, object/per objects instances/per target. Before this functionality is enacted,
there is a popup beforehand that will ask if you are sure if you want to make there is a popup beforehand that will ask if you are sure if you want to make
this change. Making this change will physically alter possibly two materials.tscript this change. Making this change will physically alter possibly two materials." @ $TorqueScriptFileExtension @ "
files in order to move the (%fromMaterial, %toMaterial), replacing the files in order to move the (%fromMaterial, %toMaterial), replacing the
(%fromMaterials)'s mapTo to "unmapped_mat". (%fromMaterials)'s mapTo to "unmapped_mat".
-------------------------------------------------------------------------------*/ -------------------------------------------------------------------------------*/
@ -2424,7 +2424,7 @@ function MaterialEditorGui::changeMaterial(%this, %fromMaterial, %toMaterial)
%k = %count + 1; %k = %count + 1;
} }
%fileName = getSubStr( %sourcePath , 0 , %k ); %fileName = getSubStr( %sourcePath , 0 , %k );
%fileName = %fileName @ "materials.tscript"; %fileName = %fileName @ "materials." @ $TorqueScriptFileExtension;
%action.toMaterialNewFname = %fileName; %action.toMaterialNewFname = %fileName;

View file

@ -326,7 +326,7 @@ function ActionChangeMaterial::redo(%this)
MaterialEditorGui.currentObject = %this.object; MaterialEditorGui.currentObject = %this.object;
if( %this.toMaterial.getFilename() !$= "tools/gui/materialSelector.ed.gui" || if( %this.toMaterial.getFilename() !$= "tools/gui/materialSelector.ed.gui" ||
%this.toMaterial.getFilename() !$= "tools/materialEditor/scripts/materialEditor.ed.tscript") %this.toMaterial.getFilename() !$= "tools/materialEditor/scripts/materialEditor.ed." @ $TorqueScriptFileExtension)
{ {
matEd_PersistMan.removeObjectFromFile(%this.toMaterial); matEd_PersistMan.removeObjectFromFile(%this.toMaterial);
} }
@ -357,7 +357,7 @@ function ActionChangeMaterial::undo(%this)
MaterialEditorGui.currentObject = %this.object; MaterialEditorGui.currentObject = %this.object;
if( %this.toMaterial.getFilename() !$= "tools/gui/materialSelector.ed.gui" || if( %this.toMaterial.getFilename() !$= "tools/gui/materialSelector.ed.gui" ||
%this.toMaterial.getFilename() !$= "tools/materialEditor/scripts/materialEditor.ed.tscript") %this.toMaterial.getFilename() !$= "tools/materialEditor/scripts/materialEditor.ed." @ $TorqueScriptFileExtension)
{ {
matEd_PersistMan.removeObjectFromFile(%this.toMaterial); matEd_PersistMan.removeObjectFromFile(%this.toMaterial);
} }
@ -442,7 +442,7 @@ function ActionDeleteMaterial::redo(%this)
} }
if( %this.oldMaterial.getFilename() !$= "tools/gui/materialSelector.ed.gui" || if( %this.oldMaterial.getFilename() !$= "tools/gui/materialSelector.ed.gui" ||
%this.oldMaterial.getFilename() !$= "tools/materialEditor/scripts/materialEditor.ed.tscript") %this.oldMaterial.getFilename() !$= "tools/materialEditor/scripts/materialEditor.ed." @ $TorqueScriptFileExtension)
{ {
matEd_PersistMan.removeObjectFromFile(%this.oldMaterial); matEd_PersistMan.removeObjectFromFile(%this.oldMaterial);
} }

View file

@ -24,10 +24,10 @@ function initializeMeshRoadEditor()
{ {
echo(" % - Initializing Mesh Road Editor"); echo(" % - Initializing Mesh Road Editor");
exec( "./meshRoadEditor.tscript" ); exec( "./meshRoadEditor." @ $TorqueScriptFileExtension );
exec( "./meshRoadEditorGui.gui" ); exec( "./meshRoadEditorGui.gui" );
exec( "./meshRoadEditorToolbar.gui"); exec( "./meshRoadEditorToolbar.gui");
exec( "./meshRoadEditorGui.tscript" ); exec( "./meshRoadEditorGui." @ $TorqueScriptFileExtension );
MeshRoadEditorGui.setVisible( false ); MeshRoadEditorGui.setVisible( false );
MeshRoadEditorOptionsWindow.setVisible( false ); MeshRoadEditorOptionsWindow.setVisible( false );

View file

@ -24,9 +24,9 @@ function initializeMissionAreaEditor()
{ {
echo(" % - Initializing Mission Area Editor"); echo(" % - Initializing Mission Area Editor");
exec( "./missionAreaEditor.ed.tscript" ); exec( "./missionAreaEditor.ed." @ $TorqueScriptFileExtension );
exec( "./missionAreaEditorGui.ed.gui" ); exec( "./missionAreaEditorGui.ed.gui" );
exec( "./missionAreaEditorGui.ed.tscript" ); exec( "./missionAreaEditorGui.ed." @ $TorqueScriptFileExtension );
// Add ourselves to EditorGui, where all the other tools reside // Add ourselves to EditorGui, where all the other tools reside
MissionAreaEditorGui.setVisible( false ); MissionAreaEditorGui.setVisible( false );

View file

@ -34,7 +34,7 @@ function initializeNavEditor()
echo(" % - Initializing Navigation Editor"); echo(" % - Initializing Navigation Editor");
// Execute all relevant scripts and GUIs. // Execute all relevant scripts and GUIs.
exec("./navEditor.tscript"); exec("./navEditor." @ $TorqueScriptFileExtension);
exec("./NavEditorGui.gui"); exec("./NavEditorGui.gui");
exec("./NavEditorToolbar.gui"); exec("./NavEditorToolbar.gui");
exec("./NavEditorConsoleDlg.gui"); exec("./NavEditorConsoleDlg.gui");

View file

@ -30,10 +30,10 @@ function initializeParticleEditor()
echo( " % - Initializing Particle Editor" ); echo( " % - Initializing Particle Editor" );
exec( "./ParticleEditor.ed.gui" ); exec( "./ParticleEditor.ed.gui" );
exec( "./particleEditor.ed.tscript" ); exec( "./particleEditor.ed." @ $TorqueScriptFileExtension );
exec( "./particleEditorUndo.ed.tscript" ); exec( "./particleEditorUndo.ed." @ $TorqueScriptFileExtension );
exec( "./particleEmitterEditor.ed.tscript" ); exec( "./particleEmitterEditor.ed." @ $TorqueScriptFileExtension );
exec( "./particleParticleEditor.ed.tscript" ); exec( "./particleParticleEditor.ed." @ $TorqueScriptFileExtension );
PE_Window.setVisible( false ); PE_Window.setVisible( false );
EditorGui.add( PE_Window ); EditorGui.add( PE_Window );

Some files were not shown because too many files have changed in this diff Show more