diff --git a/Engine/source/app/mainLoop.cpp b/Engine/source/app/mainLoop.cpp index 5d13c41be..13a331075 100644 --- a/Engine/source/app/mainLoop.cpp +++ b/Engine/source/app/mainLoop.cpp @@ -570,6 +570,7 @@ bool StandardMainLoop::handleCommandLine( S32 argc, const char **argv ) Platform::setMainDotCsDir(buffer); Platform::setCurrentDirectory(buffer); + Con::setVariable("TorqueScriptFileExtension", TORQUE_SCRIPT_EXTENSION); Con::evaluate(script, false, useDefaultScript ? defaultScriptName : argv[1]); delete[] script; diff --git a/Engine/source/console/console.cpp b/Engine/source/console/console.cpp index 44708f341..39d4b204d 100644 --- a/Engine/source/console/console.cpp +++ b/Engine/source/console/console.cpp @@ -1197,6 +1197,13 @@ bool executeFile(const char* fileName, bool noCalls, bool journalScript) 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! Con::errorf(ConsoleLogEntry::Script, "exec: invalid script file name %s.", scriptFilenameBuffer); execDepth--; diff --git a/Templates/BaseGame/game/core/Core.module b/Templates/BaseGame/game/core/Core.module index 9ea624fbd..81e086605 100644 --- a/Templates/BaseGame/game/core/Core.module +++ b/Templates/BaseGame/game/core/Core.module @@ -2,7 +2,7 @@ ModuleId="CoreModule" VersionId="1" Description="Module that implements the core engine-level setup for the game." - ScriptFile="Core.tscript" + ScriptFile="Core" CreateFunction="onCreate" DestroyFunction="onDestroy" Group="Core"/> \ No newline at end of file diff --git a/Templates/BaseGame/game/core/Core.tscript b/Templates/BaseGame/game/core/Core.tscript index 76ca3af86..07122e787 100644 --- a/Templates/BaseGame/game/core/Core.tscript +++ b/Templates/BaseGame/game/core/Core.tscript @@ -27,10 +27,10 @@ function CoreModule::onCreate(%this) ModuleDatabase.LoadExplicit( "Core_PostFX" ); ModuleDatabase.LoadExplicit( "Core_GameObjects" ); - exec("data/defaults.tscript"); + exec("data/defaults." @ $TorqueScriptFileExtension); %prefPath = getPrefpath(); - if ( isFile( %prefPath @ "/clientPrefs.tscript" ) ) - exec( %prefPath @ "/clientPrefs.tscript" ); + if ( isFile( %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension ) ) + exec( %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension ); // Seed the random number generator. setRandomSeed(); @@ -44,7 +44,7 @@ function CoreModule::onCreate(%this) createCanvas($appName); //load canvas - //exec("./console/main.tscript"); + //exec("./console/main." @ $TorqueScriptFileExtension); ModuleDatabase.LoadExplicit( "Core_Console" ); @@ -62,8 +62,8 @@ function CoreModule::onCreate(%this) // If we have editors, initialize them here as well if (isToolBuild()) { - if(isFile("tools/main.tscript") && !$isDedicated) - exec("tools/main.tscript"); + if(isFile("tools/main." @ $TorqueScriptFileExtension) && !$isDedicated) + exec("tools/main." @ $TorqueScriptFileExtension); } //This is used to build the remap keybind sets for the different actionMaps. diff --git a/Templates/BaseGame/game/core/clientServer/Core_ClientServer.module b/Templates/BaseGame/game/core/clientServer/Core_ClientServer.module index 3d5c801c2..ec72cbc70 100644 --- a/Templates/BaseGame/game/core/clientServer/Core_ClientServer.module +++ b/Templates/BaseGame/game/core/clientServer/Core_ClientServer.module @@ -2,7 +2,7 @@ ModuleId="Core_ClientServer" VersionId="1" Description="Default module for the game." - ScriptFile="Core_ClientServer.tscript" + ScriptFile="Core_ClientServer" CreateFunction="onCreate" DestroyFunction="onDestroy" Group="Core"> diff --git a/Templates/BaseGame/game/core/clientServer/Core_ClientServer.tscript b/Templates/BaseGame/game/core/clientServer/Core_ClientServer.tscript index 867fd925d..60a3705de 100644 --- a/Templates/BaseGame/game/core/clientServer/Core_ClientServer.tscript +++ b/Templates/BaseGame/game/core/clientServer/Core_ClientServer.tscript @@ -15,8 +15,8 @@ function Core_ClientServer::onCreate( %this ) { echo("\n--------- Initializing Directory: scripts ---------"); - exec( "./scripts/client/client.tscript" ); - exec( "./scripts/server/server.tscript" ); + exec( "./scripts/client/client." @ $TorqueScriptFileExtension ); + exec( "./scripts/server/server." @ $TorqueScriptFileExtension ); $Game::MainScene = getScene(0); @@ -52,11 +52,11 @@ function Core_ClientServer::onDestroy( %this ) echo("Exporting client prefs"); %prefPath = getPrefpath(); - export("$pref::*", %prefPath @ "/clientPrefs.tscript", false); + export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false); echo("Exporting server prefs"); - export("$Pref::Server::*", %prefPath @ "/serverPrefs.tscript", false); - BanList::Export(%prefPath @ "/banlist.tscript"); + export("$Pref::Server::*", %prefPath @ "/serverPrefs." @ $TorqueScriptFileExtension, false); + BanList::Export(%prefPath @ "/banlist." @ $TorqueScriptFileExtension); } //----------------------------------------------------------------------------- diff --git a/Templates/BaseGame/game/core/clientServer/scripts/client/client.tscript b/Templates/BaseGame/game/core/clientServer/scripts/client/client.tscript index 6c443cd1b..b583bbc60 100644 --- a/Templates/BaseGame/game/core/clientServer/scripts/client/client.tscript +++ b/Templates/BaseGame/game/core/clientServer/scripts/client/client.tscript @@ -9,16 +9,16 @@ function initClient() $Client::GameTypeQuery = $appName; $Client::MissionTypeQuery = "Any"; - exec( "./message.tscript" ); - exec( "./connectionToServer.tscript" ); - exec( "./levelDownload.tscript" ); - exec( "./levelLoad.tscript" ); + exec( "./message." @ $TorqueScriptFileExtension ); + exec( "./connectionToServer." @ $TorqueScriptFileExtension ); + exec( "./levelDownload." @ $TorqueScriptFileExtension ); + exec( "./levelLoad." @ $TorqueScriptFileExtension ); //load prefs - exec( "data/defaults.tscript" ); + exec( "data/defaults." @ $TorqueScriptFileExtension ); %prefPath = getPrefpath(); - if ( isFile( %prefPath @ "/clientPrefs.tscript" ) ) - exec( %prefPath @ "/clientPrefs.tscript" ); + if ( isFile( %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension ) ) + exec( %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension ); callOnModules("initClient"); diff --git a/Templates/BaseGame/game/core/clientServer/scripts/server/server.tscript b/Templates/BaseGame/game/core/clientServer/scripts/server/server.tscript index 25042232d..9d65ade2d 100644 --- a/Templates/BaseGame/game/core/clientServer/scripts/server/server.tscript +++ b/Templates/BaseGame/game/core/clientServer/scripts/server/server.tscript @@ -27,21 +27,21 @@ function initServer() //load prefs //Force-load the defaults just so we don't have any mistakes - exec( "./defaults.tscript" ); + exec( "./defaults." @ $TorqueScriptFileExtension ); //Then, if the user has saved preferences, we load those over-top the defaults %prefPath = getPrefpath(); - if ( isFile( %prefPath @ "/serverPrefs.tscript" ) ) - exec( %prefPath @ "/serverPrefs.tscript" ); + if ( isFile( %prefPath @ "/serverPrefs." @ $TorqueScriptFileExtension ) ) + exec( %prefPath @ "/serverPrefs." @ $TorqueScriptFileExtension ); - exec( "./audio.tscript" ); - exec( "./commands.tscript" ); - exec( "./kickban.tscript" ); - exec( "./message.tscript" ); - exec( "./levelDownload.tscript" ); - exec( "./levelLoad.tscript" ); - exec( "./levelInfo.tscript" ); - exec( "./connectionToClient.tscript" ); + exec( "./audio." @ $TorqueScriptFileExtension ); + exec( "./commands." @ $TorqueScriptFileExtension ); + exec( "./kickban." @ $TorqueScriptFileExtension ); + exec( "./message." @ $TorqueScriptFileExtension ); + exec( "./levelDownload." @ $TorqueScriptFileExtension ); + exec( "./levelLoad." @ $TorqueScriptFileExtension ); + exec( "./levelInfo." @ $TorqueScriptFileExtension ); + exec( "./connectionToClient." @ $TorqueScriptFileExtension ); // Server::Status is returned in the Game Info Query and represents the // current status of the server. This string sould be very short. @@ -250,9 +250,9 @@ function destroyServer() // Save any server settings %prefPath = getPrefpath(); echo( "Exporting server prefs..." ); - export( "$Pref::Server::*", %prefPath@"/serverPrefs.tscript", false ); + export( "$Pref::Server::*", %prefPath@"/serverPrefs." @ $TorqueScriptFileExtension, false ); - BanList::Export(%prefPath@"/banlist.tscript"); + BanList::Export(%prefPath@"/banlist." @ $TorqueScriptFileExtension); // Increase the server session number. This is used to make sure we're // working with the server session we think we are. diff --git a/Templates/BaseGame/game/core/console/Core_Console.module b/Templates/BaseGame/game/core/console/Core_Console.module index c596a7882..62839d63a 100644 --- a/Templates/BaseGame/game/core/console/Core_Console.module +++ b/Templates/BaseGame/game/core/console/Core_Console.module @@ -2,7 +2,7 @@ ModuleId="Core_Console" VersionId="1" Description="Module that implements the core engine-level setup for the game." - ScriptFile="Core_Console.tscript" + ScriptFile="Core_Console" CreateFunction="onCreate" DestroyFunction="onDestroy" Group="Core" diff --git a/Templates/BaseGame/game/core/console/Core_Console.tscript b/Templates/BaseGame/game/core/console/Core_Console.tscript index f59a749d9..76b3f1296 100644 --- a/Templates/BaseGame/game/core/console/Core_Console.tscript +++ b/Templates/BaseGame/game/core/console/Core_Console.tscript @@ -1,8 +1,8 @@ function Core_Console::onCreate(%this) { - exec("./scripts/profiles.tscript"); - exec("./scripts/console.tscript"); + exec("./scripts/profiles." @ $TorqueScriptFileExtension); + exec("./scripts/console." @ $TorqueScriptFileExtension); exec("./guis/console.gui"); } diff --git a/Templates/BaseGame/game/core/gameObjects/Core_GameObjects.module b/Templates/BaseGame/game/core/gameObjects/Core_GameObjects.module index f119850ba..5f891be1f 100644 --- a/Templates/BaseGame/game/core/gameObjects/Core_GameObjects.module +++ b/Templates/BaseGame/game/core/gameObjects/Core_GameObjects.module @@ -2,7 +2,7 @@ ModuleId="Core_GameObjects" VersionId="1" Description="Module that implements the core engine-level setup for the game." - ScriptFile="Core_GameObjects.tscript" + ScriptFile="Core_GameObjects" CreateFunction="onCreate" DestroyFunction="onDestroy" Group="Core"> diff --git a/Templates/BaseGame/game/core/gameObjects/Core_GameObjects.tscript b/Templates/BaseGame/game/core/gameObjects/Core_GameObjects.tscript index 270ad6fef..2314dc43d 100644 --- a/Templates/BaseGame/game/core/gameObjects/Core_GameObjects.tscript +++ b/Templates/BaseGame/game/core/gameObjects/Core_GameObjects.tscript @@ -12,7 +12,7 @@ function Core_GameObjects::initServer( %this ) function Core_GameObjects::onCreateGameServer(%this) { - %this.registerDatablock("./datablocks/defaultDatablocks.tscript"); + %this.registerDatablock("./datablocks/defaultDatablocks." @ $TorqueScriptFileExtension); } function Core_GameObjects::onDestroyGameServer(%this) diff --git a/Templates/BaseGame/game/core/gui/Core_GUI.module b/Templates/BaseGame/game/core/gui/Core_GUI.module index 9e26f45b8..3e66cdc1a 100644 --- a/Templates/BaseGame/game/core/gui/Core_GUI.module +++ b/Templates/BaseGame/game/core/gui/Core_GUI.module @@ -2,7 +2,7 @@ ModuleId="Core_GUI" VersionId="1" Description="Module that implements the core engine-level setup for the game." - ScriptFile="Core_GUI.tscript" + ScriptFile="Core_GUI" CreateFunction="onCreate" DestroyFunction="onDestroy" Group="Core" diff --git a/Templates/BaseGame/game/core/gui/Core_GUI.tscript b/Templates/BaseGame/game/core/gui/Core_GUI.tscript index ac06bef3d..8c086a8cc 100644 --- a/Templates/BaseGame/game/core/gui/Core_GUI.tscript +++ b/Templates/BaseGame/game/core/gui/Core_GUI.tscript @@ -1,9 +1,9 @@ function Core_GUI::onCreate(%this) { - exec("./scripts/profiles.tscript"); - exec("./scripts/canvas.tscript"); - exec("./scripts/cursor.tscript"); + exec("./scripts/profiles." @ $TorqueScriptFileExtension); + exec("./scripts/canvas." @ $TorqueScriptFileExtension); + exec("./scripts/cursor." @ $TorqueScriptFileExtension); } function Core_GUI::onDestroy(%this) diff --git a/Templates/BaseGame/game/core/lighting/Core_Lighting.module b/Templates/BaseGame/game/core/lighting/Core_Lighting.module index 11f6806df..f2757dfe3 100644 --- a/Templates/BaseGame/game/core/lighting/Core_Lighting.module +++ b/Templates/BaseGame/game/core/lighting/Core_Lighting.module @@ -2,7 +2,7 @@ ModuleId="Core_Lighting" VersionId="1" Description="Module that implements the core engine-level setup for the game." - ScriptFile="Core_Lighting.tscript" + ScriptFile="Core_Lighting" CreateFunction="onCreate" DestroyFunction="onDestroy" Group="Core"> diff --git a/Templates/BaseGame/game/core/lighting/Core_Lighting.tscript b/Templates/BaseGame/game/core/lighting/Core_Lighting.tscript index 86a6b7f5c..be8490dfe 100644 --- a/Templates/BaseGame/game/core/lighting/Core_Lighting.tscript +++ b/Templates/BaseGame/game/core/lighting/Core_Lighting.tscript @@ -1,17 +1,17 @@ function Core_Lighting::onCreate(%this) { - exec("./scripts/lighting.tscript"); + exec("./scripts/lighting." @ $TorqueScriptFileExtension); //Advanced/Deferred - exec("./scripts/advancedLighting_Shaders.tscript"); - exec("./scripts/deferredShading.tscript"); - exec("./scripts/advancedLighting_Init.tscript"); + exec("./scripts/advancedLighting_Shaders." @ $TorqueScriptFileExtension); + exec("./scripts/deferredShading." @ $TorqueScriptFileExtension); + exec("./scripts/advancedLighting_Init." @ $TorqueScriptFileExtension); //Basic/Forward - exec("./scripts/basicLighting_shadowFilter.tscript"); - exec("./scripts/shadowMaps_Init.tscript"); - exec("./scripts/basicLighting_Init.tscript"); + exec("./scripts/basicLighting_shadowFilter." @ $TorqueScriptFileExtension); + exec("./scripts/shadowMaps_Init." @ $TorqueScriptFileExtension); + exec("./scripts/basicLighting_Init." @ $TorqueScriptFileExtension); } diff --git a/Templates/BaseGame/game/core/lighting/scripts/advancedLighting_Init.tscript b/Templates/BaseGame/game/core/lighting/scripts/advancedLighting_Init.tscript index c0d88ee2c..3b427a6f1 100644 --- a/Templates/BaseGame/game/core/lighting/scripts/advancedLighting_Init.tscript +++ b/Templates/BaseGame/game/core/lighting/scripts/advancedLighting_Init.tscript @@ -39,8 +39,8 @@ $pref::LightManager::sgUseDynamicShadows = "1"; $pref::LightManager::sgUseToneMapping = ""; */ -//exec( "./shaders.tscript" ); -//exec( "./deferredShading.tscript" ); +//exec( "./shaders." @ $TorqueScriptFileExtension ); +//exec( "./deferredShading." @ $TorqueScriptFileExtension ); function onActivateAdvancedLM() { diff --git a/Templates/BaseGame/game/core/lighting/scripts/basicLighting_Init.tscript b/Templates/BaseGame/game/core/lighting/scripts/basicLighting_Init.tscript index c1ef9f84f..88d8f7f53 100644 --- a/Templates/BaseGame/game/core/lighting/scripts/basicLighting_Init.tscript +++ b/Templates/BaseGame/game/core/lighting/scripts/basicLighting_Init.tscript @@ -20,7 +20,7 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -//exec( "./shadowFilter.tscript" ); +//exec( "./shadowFilter." @ $TorqueScriptFileExtension ); singleton GFXStateBlockData( BL_ProjectedShadowSBData ) { diff --git a/Templates/BaseGame/game/core/lighting/scripts/lighting.tscript b/Templates/BaseGame/game/core/lighting/scripts/lighting.tscript index 4af701f27..6bcfd18ae 100644 --- a/Templates/BaseGame/game/core/lighting/scripts/lighting.tscript +++ b/Templates/BaseGame/game/core/lighting/scripts/lighting.tscript @@ -26,12 +26,12 @@ function initLightingSystems(%manager) // First exec the scripts for the different light managers // in the lighting folder. - /*%pattern = "./lighting/*//*init.tscript"; + /*%pattern = "./lighting/*//*init." @ $TorqueScriptFileExtension; %file = findFirstFile( %pattern ); if ( %file $= "" ) { // Try for DSOs next. - %pattern = "./lighting/*//*init.tscript.dso"; + %pattern = "./lighting/*//*init." @ $TorqueScriptFileExtension @ ".dso"; %file = findFirstFile( %pattern ); } diff --git a/Templates/BaseGame/game/core/postFX/Core_PostFX.module b/Templates/BaseGame/game/core/postFX/Core_PostFX.module index 88dc5ab18..95c45ecc2 100644 --- a/Templates/BaseGame/game/core/postFX/Core_PostFX.module +++ b/Templates/BaseGame/game/core/postFX/Core_PostFX.module @@ -2,7 +2,7 @@ ModuleId="Core_PostFX" VersionId="1" Description="Module that implements the core engine-level setup for the game." - ScriptFile="Core_PostFX.tscript" + ScriptFile="Core_PostFX" CreateFunction="onCreate" DestroyFunction="onDestroy" Group="Core" diff --git a/Templates/BaseGame/game/core/postFX/Core_PostFX.tscript b/Templates/BaseGame/game/core/postFX/Core_PostFX.tscript index 7b90a8046..cb61d9274 100644 --- a/Templates/BaseGame/game/core/postFX/Core_PostFX.tscript +++ b/Templates/BaseGame/game/core/postFX/Core_PostFX.tscript @@ -2,11 +2,11 @@ function Core_PostFX::onCreate(%this) { // - exec("./scripts/postFxManager.tscript"); - exec("./scripts/postFx.tscript"); + exec("./scripts/postFxManager." @ $TorqueScriptFileExtension); + exec("./scripts/postFx." @ $TorqueScriptFileExtension); //Load the default config - loadPresetHandler("./scripts/default.postfxpreset.tscript"); + loadPresetHandler("./scripts/default.postfxpreset." @ $TorqueScriptFileExtension); } function Core_PostFX::onDestroy(%this) diff --git a/Templates/BaseGame/game/core/postFX/scripts/DepthOfField/DepthOfFieldPostFX.tscript b/Templates/BaseGame/game/core/postFX/scripts/DepthOfField/DepthOfFieldPostFX.tscript index 0609cfa91..29e1bb117 100644 --- a/Templates/BaseGame/game/core/postFX/scripts/DepthOfField/DepthOfFieldPostFX.tscript +++ b/Templates/BaseGame/game/core/postFX/scripts/DepthOfField/DepthOfFieldPostFX.tscript @@ -581,7 +581,7 @@ function DepthOfFieldPostFX::autoFocus( %this ) /* function reloadDOF() { - exec( "./dof.tscript" ); + exec( "./dof." @ $TorqueScriptFileExtension ); DepthOfFieldPostFX.reload(); DepthOfFieldPostFX.disable(); DepthOfFieldPostFX.enable(); diff --git a/Templates/BaseGame/game/core/postFX/scripts/postFx.tscript b/Templates/BaseGame/game/core/postFX/scripts/postFx.tscript index e15495c0c..cbea8fe1f 100644 --- a/Templates/BaseGame/game/core/postFX/scripts/postFx.tscript +++ b/Templates/BaseGame/game/core/postFX/scripts/postFx.tscript @@ -39,12 +39,12 @@ function postFXInit() if (!$Server::Dedicated) { //init the postFX - %pattern = "./*.tscript"; + %pattern = "./*." @ $TorqueScriptFileExtension; %file = findFirstFile( %pattern ); if ( %file $= "" ) { // Try for DSOs next. - %pattern = "core/postFX/*.tscript.dso"; + %pattern = "core/postFX/*." @ $TorqueScriptFileExtension @ ".dso"; %file = findFirstFile( %pattern ); } diff --git a/Templates/BaseGame/game/core/postFX/scripts/postFxManager.tscript b/Templates/BaseGame/game/core/postFX/scripts/postFxManager.tscript index c1ee7c3ab..cf0080923 100644 --- a/Templates/BaseGame/game/core/postFX/scripts/postFxManager.tscript +++ b/Templates/BaseGame/game/core/postFX/scripts/postFxManager.tscript @@ -40,15 +40,15 @@ function PostFXManager::registerPostEffect(%this, %postEffect) } // Used to name the saved files. -$PostFXManager::fileExtension = ".postfxpreset.tscript"; +$PostFXManager::fileExtension = ".postfxpreset." @ $TorqueScriptFileExtension; // The filter string for file open/save dialogs. -$PostFXManager::fileFilter = "Post Effect Presets|*.postfxpreset.tscript"; +$PostFXManager::fileFilter = "Post Effect Presets|*.postfxpreset." @ $TorqueScriptFileExtension; // Enable / disable PostFX when loading presets or just apply the settings? $PostFXManager::forceEnableFromPresets = true; -$PostFXManager::defaultPreset = "core/postFX/scripts/default.postfxpreset.tscript"; +$PostFXManager::defaultPreset = "core/postFX/scripts/default.postfxpreset." @ $TorqueScriptFileExtension; $PostFXManager::currentPreset = ""; diff --git a/Templates/BaseGame/game/core/rendering/Core_Rendering.module b/Templates/BaseGame/game/core/rendering/Core_Rendering.module index 537a6e381..d43e38b20 100644 --- a/Templates/BaseGame/game/core/rendering/Core_Rendering.module +++ b/Templates/BaseGame/game/core/rendering/Core_Rendering.module @@ -2,7 +2,7 @@ ModuleId="Core_Rendering" VersionId="1" Description="Module that implements the core engine-level setup for the game." - ScriptFile="Core_Rendering.tscript" + ScriptFile="Core_Rendering" CreateFunction="onCreate" DestroyFunction="onDestroy" Group="Core"> diff --git a/Templates/BaseGame/game/core/rendering/Core_Rendering.tscript b/Templates/BaseGame/game/core/rendering/Core_Rendering.tscript index 5dee77e57..ab67dfccb 100644 --- a/Templates/BaseGame/game/core/rendering/Core_Rendering.tscript +++ b/Templates/BaseGame/game/core/rendering/Core_Rendering.tscript @@ -35,8 +35,6 @@ function Core_Rendering::onCreate(%this) exec("./scripts/gfxData/terrainBlock." @ $TorqueScriptFileExtension); exec("./scripts/gfxData/water." @ $TorqueScriptFileExtension); exec("./scripts/gfxData/warningTerrainMat." @ $TorqueScriptFileExtension); - - loadTerrainSettings(); } function Core_Rendering::onDestroy(%this) diff --git a/Templates/BaseGame/game/core/sfx/Core_SFX.module b/Templates/BaseGame/game/core/sfx/Core_SFX.module index f92d76d5c..e76ed3fcb 100644 --- a/Templates/BaseGame/game/core/sfx/Core_SFX.module +++ b/Templates/BaseGame/game/core/sfx/Core_SFX.module @@ -2,7 +2,7 @@ ModuleId="Core_SFX" VersionId="1" Description="Module that implements the core engine-level setup for the game." - ScriptFile="Core_SFX.tscript" + ScriptFile="Core_SFX" CreateFunction="onCreate" DestroyFunction="onDestroy" Group="Core"> diff --git a/Templates/BaseGame/game/core/sfx/Core_SFX.tscript b/Templates/BaseGame/game/core/sfx/Core_SFX.tscript index b7d59d7cc..f0babb90f 100644 --- a/Templates/BaseGame/game/core/sfx/Core_SFX.tscript +++ b/Templates/BaseGame/game/core/sfx/Core_SFX.tscript @@ -1,12 +1,12 @@ function Core_SFX::onCreate(%this) { - exec("./scripts/audio.tscript"); - exec("./scripts/audioData.tscript"); - exec("./scripts/audioAmbience.tscript"); - exec("./scripts/audioDescriptions.tscript"); - exec("./scripts/audioEnvironments.tscript"); - exec("./scripts/audioStates.tscript"); + exec("./scripts/audio." @ $TorqueScriptFileExtension); + exec("./scripts/audioData." @ $TorqueScriptFileExtension); + exec("./scripts/audioAmbience." @ $TorqueScriptFileExtension); + exec("./scripts/audioDescriptions." @ $TorqueScriptFileExtension); + exec("./scripts/audioEnvironments." @ $TorqueScriptFileExtension); + exec("./scripts/audioStates." @ $TorqueScriptFileExtension); } diff --git a/Templates/BaseGame/game/core/utility/Core_Utility.module b/Templates/BaseGame/game/core/utility/Core_Utility.module index 4bd3797d7..2baba2fa3 100644 --- a/Templates/BaseGame/game/core/utility/Core_Utility.module +++ b/Templates/BaseGame/game/core/utility/Core_Utility.module @@ -2,7 +2,7 @@ ModuleId="Core_Utility" VersionId="1" Description="Module that implements the core engine-level setup for the game." - ScriptFile="Core_Utility.tscript" + ScriptFile="Core_Utility" CreateFunction="onCreate" DestroyFunction="onDestroy" Group="Core"> diff --git a/Templates/BaseGame/game/core/utility/Core_Utility.tscript b/Templates/BaseGame/game/core/utility/Core_Utility.tscript index d3c2899e0..02dbc975b 100644 --- a/Templates/BaseGame/game/core/utility/Core_Utility.tscript +++ b/Templates/BaseGame/game/core/utility/Core_Utility.tscript @@ -1,14 +1,14 @@ function Core_Utility::onCreate(%this) { - exec("./scripts/parseArgs.tscript"); - exec("./scripts/globals.tscript"); - exec("./scripts/helperFunctions.tscript"); - exec("./scripts/gameObjectManagement.tscript"); - exec("./scripts/persistanceManagement.tscript"); - exec("./scripts/module.tscript"); - exec("./scripts/scene.tscript"); - exec("./scripts/input.tscript"); + exec("./scripts/parseArgs." @ $TorqueScriptFileExtension); + exec("./scripts/globals." @ $TorqueScriptFileExtension); + exec("./scripts/helperFunctions." @ $TorqueScriptFileExtension); + exec("./scripts/gameObjectManagement." @ $TorqueScriptFileExtension); + exec("./scripts/persistanceManagement." @ $TorqueScriptFileExtension); + exec("./scripts/module." @ $TorqueScriptFileExtension); + exec("./scripts/scene." @ $TorqueScriptFileExtension); + exec("./scripts/input." @ $TorqueScriptFileExtension); } function Core_Utility::onDestroy(%this) diff --git a/Templates/BaseGame/game/core/utility/scripts/helperFunctions.tscript b/Templates/BaseGame/game/core/utility/scripts/helperFunctions.tscript index 69b2f9f28..6da8298e7 100644 --- a/Templates/BaseGame/game/core/utility/scripts/helperFunctions.tscript +++ b/Templates/BaseGame/game/core/utility/scripts/helperFunctions.tscript @@ -39,9 +39,9 @@ function loadMaterials() // the folder exists if( IsDirectory( "materialEditor" ) ) { - for( %file = findFirstFile( "materialEditor/*.tscript.dso" ); + for( %file = findFirstFile( "materialEditor/*." @ $TorqueScriptFileExtension @ ".dso" ); %file !$= ""; - %file = findNextFile( "materialEditor/*.tscript.dso" )) + %file = findNextFile( "materialEditor/*." @ $TorqueScriptFileExtension @ ".dso" )) { // Only execute, if we don't have the source file. %csFileName = getSubStr( %file, 0, strlen( %file ) - 4 ); @@ -49,9 +49,9 @@ function loadMaterials() exec( %csFileName ); } - for( %file = findFirstFile( "materialEditor/*.tscript" ); + for( %file = findFirstFile( "materialEditor/*." @ $TorqueScriptFileExtension ); %file !$= ""; - %file = findNextFile( "materialEditor/*.tscript" )) + %file = findNextFile( "materialEditor/*." @ $TorqueScriptFileExtension )) { exec( %file ); } @@ -477,11 +477,11 @@ function compileFiles(%pattern) $Scripts::OverrideDSOPath = %path; $Scripts::ignoreDSOs = false; - %mainCsFile = makeFullPath("main.tscript"); + %mainCsFile = makeFullPath("main." @ $TorqueScriptFileExtension); for (%file = findFirstFileMultiExpr(%pattern); %file !$= ""; %file = findNextFileMultiExpr(%pattern)) { - // we don't want to try and compile the primary main.tscript + // we don't want to try and compile the primary main if(%mainCsFile !$= %file) compile(%file, true); } @@ -502,7 +502,7 @@ function displayHelp() error( "Torque Demo command line options:\n"@ - " -log Logging behavior; see main.tscript comments for details\n"@ + " -log Logging behavior; see main." @ $TorqueScriptFileExtension @ " comments for details\n"@ " -game Reset list of mods to only contain \n"@ " Works like the -game argument\n"@ " -dir Add to list of directories\n"@ @@ -518,8 +518,8 @@ function loadDir(%dir) { pushback($userDirs, %dir, ";"); - if (isScriptFile(%dir @ "/main.tscript")) - exec(%dir @ "/main.tscript"); + if (isScriptFile(%dir @ "/main." @ $TorqueScriptFileExtension)) + exec(%dir @ "/main." @ $TorqueScriptFileExtension); } function loadDirs(%dirPath) @@ -528,7 +528,7 @@ function loadDirs(%dirPath) if (%dirPath !$= "") loadDirs(%dirPath); - if(exec(%token @ "/main.tscript") != true) + if(exec(%token @ "/main." @ $TorqueScriptFileExtension) != true) { error("Error: Unable to find specified directory: " @ %token ); $dirCount--; diff --git a/Templates/BaseGame/game/core/utility/scripts/module.tscript b/Templates/BaseGame/game/core/utility/scripts/module.tscript index 63b1d43d4..5a8304aaa 100644 --- a/Templates/BaseGame/game/core/utility/scripts/module.tscript +++ b/Templates/BaseGame/game/core/utility/scripts/module.tscript @@ -51,9 +51,9 @@ function loadModuleMaterials(%moduleGroup) // Load any materials files for which we only have DSOs. - for( %file = findFirstFile( %modulePath @ "/*/materials.tscript.dso" ); + for( %file = findFirstFile( %modulePath @ "/*/materials." @ $TorqueScriptFileExtension @ ".dso" ); %file !$= ""; - %file = findNextFile( %modulePath @ "/*/materials.tscript.dso" )) + %file = findNextFile( %modulePath @ "/*/materials." @ $TorqueScriptFileExtension @ ".dso" )) { // Only execute, if we don't have the source file. %csFileName = getSubStr( %file, 0, strlen( %file ) - 4 ); @@ -63,9 +63,9 @@ function loadModuleMaterials(%moduleGroup) // Load all source material files. - for( %file = findFirstFile( %modulePath @ "/*/materials.tscript" ); + for( %file = findFirstFile( %modulePath @ "/*/materials." @ $TorqueScriptFileExtension ); %file !$= ""; - %file = findNextFile( %modulePath @ "/*/materials.tscript" )) + %file = findNextFile( %modulePath @ "/*/materials." @ $TorqueScriptFileExtension )) { exec( %file ); } diff --git a/Templates/BaseGame/game/core/utility/scripts/parseArgs.tscript b/Templates/BaseGame/game/core/utility/scripts/parseArgs.tscript index 8ae7fe721..51975d635 100644 --- a/Templates/BaseGame/game/core/utility/scripts/parseArgs.tscript +++ b/Templates/BaseGame/game/core/utility/scripts/parseArgs.tscript @@ -355,7 +355,7 @@ function parseArgs() %i++; } else - error("Error: Missing Command Line argument. Usage: -prefs "); + error("Error: Missing Command Line argument. Usage: -prefs "); //------------------- diff --git a/Templates/BaseGame/game/core/utility/scripts/persistanceManagement.tscript b/Templates/BaseGame/game/core/utility/scripts/persistanceManagement.tscript index 9aa7fcc92..90d0a8744 100644 --- a/Templates/BaseGame/game/core/utility/scripts/persistanceManagement.tscript +++ b/Templates/BaseGame/game/core/utility/scripts/persistanceManagement.tscript @@ -112,7 +112,7 @@ function TestPManager::testNewObject(%doNotSave) }; // Flag it as dirty - TestPManager.setDirty(AudioNew, "core/scripts/client/audio.tscript"); + TestPManager.setDirty(AudioNew, "core/scripts/client/audio." @ $TorqueScriptFileExtension); // Test adding a new unnamed object %obj = new SFXDescription() @@ -123,12 +123,12 @@ function TestPManager::testNewObject(%doNotSave) }; // Flag it as dirty - TestPManager.setDirty(%obj, "core/scripts/client/audio.tscript"); + TestPManager.setDirty(%obj, "core/scripts/client/audio." @ $TorqueScriptFileExtension); // Test adding an "empty" object new SFXDescription(AudioEmpty); - TestPManager.setDirty(AudioEmpty, "core/scripts/client/audio.tscript"); + TestPManager.setDirty(AudioEmpty, "core/scripts/client/audio." @ $TorqueScriptFileExtension); // Unless %doNotSave is set (by a batch/combo test) // then go ahead and save now @@ -165,7 +165,7 @@ function TestPManager::testNewGroup(%doNotSave) }; // Flag this as dirty - TestPManager.setDirty(TestGroup, "core/scripts/client/audio.tscript"); + TestPManager.setDirty(TestGroup, "core/scripts/client/audio." @ $TorqueScriptFileExtension); // Test adding a new unnamed SimGroup %group = new SimGroup() @@ -193,7 +193,7 @@ function TestPManager::testNewGroup(%doNotSave) }; // Flag this as dirty - TestPManager.setDirty(%group, "core/scripts/client/audio.tscript"); + TestPManager.setDirty(%group, "core/scripts/client/audio." @ $TorqueScriptFileExtension); // Test adding a new unnamed SimSet %set = new SimSet() @@ -221,7 +221,7 @@ function TestPManager::testNewGroup(%doNotSave) }; // Flag this as dirty - TestPManager.setDirty(%set, "core/scripts/client/audio.tscript"); + TestPManager.setDirty(%set, "core/scripts/client/audio." @ $TorqueScriptFileExtension); // Unless %doNotSave is set (by a batch/combo test) // then go ahead and save now @@ -257,7 +257,7 @@ function TestPManager::testMoveObject(%doNotSave) }; // Flag this as dirty - TestPManager.setDirty(MoveGroup1, "core/scripts/client/audio.tscript"); + TestPManager.setDirty(MoveGroup1, "core/scripts/client/audio." @ $TorqueScriptFileExtension); new SimGroup(MoveGroup2) { @@ -273,7 +273,7 @@ function TestPManager::testMoveObject(%doNotSave) }; // Flag this as dirty - TestPManager.setDirty(MoveGroup2, "core/scripts/client/audio.tscript"); + TestPManager.setDirty(MoveGroup2, "core/scripts/client/audio." @ $TorqueScriptFileExtension); // Unless %doNotSave is set (by a batch/combo test) // then go ahead and save now diff --git a/Templates/BaseGame/game/data/ExampleModule/ExampleModule.module b/Templates/BaseGame/game/data/ExampleModule/ExampleModule.module index 7e6ae8207..091b7c55c 100644 --- a/Templates/BaseGame/game/data/ExampleModule/ExampleModule.module +++ b/Templates/BaseGame/game/data/ExampleModule/ExampleModule.module @@ -4,7 +4,7 @@ ModuleId="ExampleModule" VersionId="1" Group="Game" - scriptFile="ExampleModule.tscript" + scriptFile="ExampleModule" CreateFunction="onCreate" DestroyFunction="onDestroy"> diff --git a/Templates/BaseGame/game/data/ui/UI.tscript b/Templates/BaseGame/game/data/ui/UI.tscript index 7194f504c..90d408052 100644 --- a/Templates/BaseGame/game/data/ui/UI.tscript +++ b/Templates/BaseGame/game/data/ui/UI.tscript @@ -30,55 +30,55 @@ function UI::initClient(%this) { //Load UI stuff //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 - %this.queueExec("./scripts/profiles.tscript"); + %this.queueExec("./scripts/profiles." @ $TorqueScriptFileExtension); //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/chooseLevelDlg.tscript"); + %this.queueExec("./guis/chooseLevelDlg." @ $TorqueScriptFileExtension); %this.queueExec("./guis/chooseLevelDlg.gui"); - %this.queueExec("./guis/joinServerMenu.tscript"); + %this.queueExec("./guis/joinServerMenu." @ $TorqueScriptFileExtension); %this.queueExec("./guis/joinServerMenu.gui"); %this.queueExec("./guis/loadingGui.gui"); - %this.queueExec("./guis/optionsMenu.tscript"); + %this.queueExec("./guis/optionsMenu." @ $TorqueScriptFileExtension); %this.queueExec("./guis/optionsMenu.gui"); - %this.queueExec("./guis/pauseMenu.tscript"); + %this.queueExec("./guis/pauseMenu." @ $TorqueScriptFileExtension); %this.queueExec("./guis/pauseMenu.gui"); %this.queueExec("./guis/remapDlg.gui"); %this.queueExec("./guis/remapConfirmDlg.gui"); - %this.queueExec("./guis/profiler.tscript"); + %this.queueExec("./guis/profiler." @ $TorqueScriptFileExtension); %this.queueExec("./guis/profiler.gui"); %this.queueExec("./guis/netGraphGui.gui"); %this.queueExec("./guis/RecordingsDlg.gui"); - %this.queueExec("./guis/guiMusicPlayer.tscript"); + %this.queueExec("./guis/guiMusicPlayer." @ $TorqueScriptFileExtension); %this.queueExec("./guis/guiMusicPlayer.gui"); - %this.queueExec("./guis/startupGui.tscript"); + %this.queueExec("./guis/startupGui." @ $TorqueScriptFileExtension); %this.queueExec("./guis/startupGui.gui"); // Load Editor Dialogs %this.queueExec("./guis/messageBoxDlg.gui"); //Load scripts - %this.queueExec("./scripts/controlsMenu.tscript"); - %this.queueExec("./scripts/messageBoxes.tscript"); - %this.queueExec("./scripts/help.tscript"); - %this.queueExec("./scripts/cursors.tscript"); - %this.queueExec("./scripts/utility.tscript"); + %this.queueExec("./scripts/controlsMenu." @ $TorqueScriptFileExtension); + %this.queueExec("./scripts/messageBoxes." @ $TorqueScriptFileExtension); + %this.queueExec("./scripts/help." @ $TorqueScriptFileExtension); + %this.queueExec("./scripts/cursors." @ $TorqueScriptFileExtension); + %this.queueExec("./scripts/utility." @ $TorqueScriptFileExtension); } function UI::onCreateClientConnection(%this){} diff --git a/Templates/BaseGame/game/data/ui/guis/optionsMenu.tscript b/Templates/BaseGame/game/data/ui/guis/optionsMenu.tscript index b160cc4eb..eba6e173b 100644 --- a/Templates/BaseGame/game/data/ui/guis/optionsMenu.tscript +++ b/Templates/BaseGame/game/data/ui/guis/optionsMenu.tscript @@ -99,7 +99,7 @@ function OptionsMenu::apply(%this) if(%actionMap == GlobalActionMap.getId()) continue; - %actionMap.save( %prefPath @ "/keybinds.tscript", %append ); + %actionMap.save( %prefPath @ "/keybinds." @ $TorqueScriptFileExtension, %append ); if(%append != true) %append = true; @@ -107,7 +107,7 @@ function OptionsMenu::apply(%this) } %prefPath = getPrefpath(); - export("$pref::*", %prefPath @ "/clientPrefs.tscript", false); + export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false); } function OptionsMenu::resetToDefaults(%this) @@ -290,7 +290,7 @@ function OptionsMenu::applyDisplaySettings(%this) echo("Exporting client prefs"); %prefPath = getPrefpath(); - export("$pref::*", %prefPath @ "/clientPrefs.tscript", false); + export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false); } function OptionsMenu::populateGraphicsSettingsList(%this) @@ -386,7 +386,7 @@ function OptionsMenu::applyGraphicsSettings(%this) echo("Exporting client prefs"); %prefPath = getPrefpath(); - export("$pref::*", %prefPath @ "/clientPrefs.tscript", false); + export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false); } function updateDisplaySettings() diff --git a/Templates/BaseGame/game/tools/MainEditor/MainEditor.module b/Templates/BaseGame/game/tools/MainEditor/MainEditor.module index fa96e1655..0b796cd00 100644 --- a/Templates/BaseGame/game/tools/MainEditor/MainEditor.module +++ b/Templates/BaseGame/game/tools/MainEditor/MainEditor.module @@ -2,7 +2,7 @@ ModuleId="MainEditor" VersionId="1" Description="Tool that can be used to view/edit an object." - ScriptFile="MainEditor.tscript" + ScriptFile="MainEditor" CreateFunction="onCreate" DestroyFunction="onDestroy" Group="Tools"> diff --git a/Templates/BaseGame/game/tools/MainEditor/MainEditor.tscript b/Templates/BaseGame/game/tools/MainEditor/MainEditor.tscript index 1c6284776..8d5b844cc 100644 --- a/Templates/BaseGame/game/tools/MainEditor/MainEditor.tscript +++ b/Templates/BaseGame/game/tools/MainEditor/MainEditor.tscript @@ -2,12 +2,12 @@ function MainEditor::onCreate( %this ) { echo("\n--------- Initializing MainEditor ---------"); - //exec("tools/gui/profiles.ed.tscript"); - //exec("./scripts/GuiProfiles.tscript"); + //exec("tools/gui/profiles.ed." @ $TorqueScriptFileExtension); + //exec("./scripts/GuiProfiles." @ $TorqueScriptFileExtension); exec("./guis/MainEditorWindow.gui"); - //exec("./scripts/newEditorGui.tscript"); + //exec("./scripts/newEditorGui." @ $TorqueScriptFileExtension); $UsePanelLayout = false; $AssetBrowserPanelState = true; diff --git a/Templates/BaseGame/game/tools/Tools.module b/Templates/BaseGame/game/tools/Tools.module index ba4edc0cf..93dee7e7a 100644 --- a/Templates/BaseGame/game/tools/Tools.module +++ b/Templates/BaseGame/game/tools/Tools.module @@ -2,7 +2,7 @@ ModuleId="ToolsModule" VersionId="1" Description="Module that implements the tools and editor suite." - ScriptFile="Tools.tscript" + ScriptFile="Tools" CreateFunction="onCreate" DestroyFunction="onDestroy" Group="Tools"> diff --git a/Templates/BaseGame/game/tools/VPathEditor/main.tscript b/Templates/BaseGame/game/tools/VPathEditor/main.tscript index 7527212bc..27ad718ec 100644 --- a/Templates/BaseGame/game/tools/VPathEditor/main.tscript +++ b/Templates/BaseGame/game/tools/VPathEditor/main.tscript @@ -6,12 +6,12 @@ function InitializeVPathEditor() { // Gui. - exec( "./GUI/Profiles.tscript" ); + exec( "./GUI/Profiles." @ $TorqueScriptFileExtension ); exec( "./GUI/VPathEditor.gui" ); // Scripts. - exec( "./Scripts/Plugin.tscript" ); - exec( "./Scripts/Editor.tscript" ); + exec( "./Scripts/Plugin." @ $TorqueScriptFileExtension ); + exec( "./Scripts/Editor." @ $TorqueScriptFileExtension ); } function DestroyVPathEditor() diff --git a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Controller/main.tscript b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Controller/main.tscript index 0890dac11..56a22f816 100644 --- a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Controller/main.tscript +++ b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Controller/main.tscript @@ -6,8 +6,8 @@ function VerveEditor::InitControllerScripts() { // Core. - exec( "./VController.tscript" ); - exec( "./VControllerProperties.tscript" ); + exec( "./VController." @ $TorqueScriptFileExtension ); + exec( "./VControllerProperties." @ $TorqueScriptFileExtension ); // Custom. // Exec Custom Controller Scripts. diff --git a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Events/main.tscript b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Events/main.tscript index 19d747db3..178cae07a 100644 --- a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Events/main.tscript +++ b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Events/main.tscript @@ -3,28 +3,28 @@ // Copyright (C) - Violent Tulip //----------------------------------------------------------------------------- -function VerveEditor::InitEventScripts() +function VerveEditor::InitEven" @ $TorqueScriptFileExtension @ "s() { // Core. - exec( "./VEvent.tscript" ); + exec( "./VEvent." @ $TorqueScriptFileExtension ); // Built-In. - exec( "./VCameraShakeEvent.tscript" ); - exec( "./VDirectorEvent.tscript" ); - exec( "./VFadeEvent.tscript" ); - exec( "./VLightObjectAnimationEvent.tscript" ); - exec( "./VLightObjectToggleEvent.tscript" ); - exec( "./VMotionEvent.tscript" ); - exec( "./VParticleEffectToggleEvent.tscript" ); - exec( "./VPostEffectToggleEvent.tscript" ); - exec( "./VSceneJumpEvent.tscript" ); - exec( "./VScriptEvent.tscript" ); - exec( "./VShapeAnimationEvent.tscript" ); - exec( "./VSlowMoEvent.tscript" ); - exec( "./VSoundEffectEvent.tscript" ); - exec( "./VSpawnSphereSpawnTargetEvent.tscript" ); + exec( "./VCameraShakeEvent." @ $TorqueScriptFileExtension ); + exec( "./VDirectorEvent." @ $TorqueScriptFileExtension ); + exec( "./VFadeEvent." @ $TorqueScriptFileExtension ); + exec( "./VLightObjectAnimationEvent." @ $TorqueScriptFileExtension ); + exec( "./VLightObjectToggleEvent." @ $TorqueScriptFileExtension ); + exec( "./VMotionEvent." @ $TorqueScriptFileExtension ); + exec( "./VParticleEffectToggleEvent." @ $TorqueScriptFileExtension ); + exec( "./VPostEffectToggleEvent." @ $TorqueScriptFileExtension ); + exec( "./VSceneJumpEvent." @ $TorqueScriptFileExtension ); + exec( "./VScriptEvent." @ $TorqueScriptFileExtension ); + exec( "./VShapeAnimationEvent." @ $TorqueScriptFileExtension ); + exec( "./VSlowMoEvent." @ $TorqueScriptFileExtension ); + exec( "./VSoundEffectEvent." @ $TorqueScriptFileExtension ); + exec( "./VSpawnSphereSpawnTargetEvent." @ $TorqueScriptFileExtension ); // Custom. // Exec Custom Event Scripts. } -VerveEditor::InitEventScripts(); +VerveEditor::InitEven" @ $TorqueScriptFileExtension @ "s(); diff --git a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Groups/main.tscript b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Groups/main.tscript index 0ce3b0bf8..440b1d697 100644 --- a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Groups/main.tscript +++ b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Groups/main.tscript @@ -6,15 +6,15 @@ function VerveEditor::InitGroupScripts() { // Core. - exec( "./VGroup.tscript" ); + exec( "./VGroup." @ $TorqueScriptFileExtension ); // Built In. - exec( "./VCameraGroup.tscript" ); - exec( "./VDirectorGroup.tscript" ); - exec( "./VLightObjectGroup.tscript" ); - exec( "./VParticleEffectGroup.tscript" ); - exec( "./VSceneObjectGroup.tscript" ); - exec( "./VSpawnSphereGroup.tscript" ); + exec( "./VCameraGroup." @ $TorqueScriptFileExtension ); + exec( "./VDirectorGroup." @ $TorqueScriptFileExtension ); + exec( "./VLightObjectGroup." @ $TorqueScriptFileExtension ); + exec( "./VParticleEffectGroup." @ $TorqueScriptFileExtension ); + exec( "./VSceneObjectGroup." @ $TorqueScriptFileExtension ); + exec( "./VSpawnSphereGroup." @ $TorqueScriptFileExtension ); // Custom. // Exec Custom Group Scripts. diff --git a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/Fields/main.tscript b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/Fields/main.tscript index c062f2ac5..2bfde4966 100644 --- a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/Fields/main.tscript +++ b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/Fields/main.tscript @@ -5,21 +5,21 @@ function VerveEditor::InitInspectorFieldScripts() { - exec( "./TypeBool.tscript" ); - exec( "./TypeData.tscript" ); - exec( "./TypeEnum.tscript" ); - exec( "./TypeString.tscript" ); + exec( "./TypeBool." @ $TorqueScriptFileExtension ); + exec( "./TypeData." @ $TorqueScriptFileExtension ); + exec( "./TypeEnum." @ $TorqueScriptFileExtension ); + exec( "./TypeString." @ $TorqueScriptFileExtension ); - exec( "./TypeVCameraGroupEnum.tscript" ); - exec( "./TypeVCommandEnum.tscript" ); - exec( "./TypeVControllerDataEnum.tscript" ); - exec( "./TypeVGroupEnum.tscript" ); - exec( "./TypeVLightAnimationDataEnum.tscript" ); - exec( "./TypeVPathOrientationModeEnum.tscript" ); - exec( "./TypeVPostEffectEnum.tscript" ); - exec( "./TypeVSceneEnum.tscript" ); - exec( "./TypeVSFXProfileEnum.tscript" ); - exec( "./TypeVShapeAnimationEnum.tscript" ); - exec( "./TypeToggleEnum.tscript" ); + exec( "./TypeVCameraGroupEnum." @ $TorqueScriptFileExtension ); + exec( "./TypeVCommandEnum." @ $TorqueScriptFileExtension ); + exec( "./TypeVControllerDataEnum." @ $TorqueScriptFileExtension ); + exec( "./TypeVGroupEnum." @ $TorqueScriptFileExtension ); + exec( "./TypeVLightAnimationDataEnum." @ $TorqueScriptFileExtension ); + exec( "./TypeVPathOrientationModeEnum." @ $TorqueScriptFileExtension ); + exec( "./TypeVPostEffectEnum." @ $TorqueScriptFileExtension ); + exec( "./TypeVSceneEnum." @ $TorqueScriptFileExtension ); + exec( "./TypeVSFXProfileEnum." @ $TorqueScriptFileExtension ); + exec( "./TypeVShapeAnimationEnum." @ $TorqueScriptFileExtension ); + exec( "./TypeToggleEnum." @ $TorqueScriptFileExtension ); } VerveEditor::InitInspectorFieldScripts(); \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/main.tscript b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/main.tscript index f81afb890..bcbc87906 100644 --- a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/main.tscript +++ b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/main.tscript @@ -5,16 +5,16 @@ function VerveEditor::InitInspectorScripts() { - exec( "./Controls.tscript" ); - exec( "./CutCopyPaste.tscript" ); - exec( "./EventNotify.tscript" ); - exec( "./Factory.tscript" ); - exec( "./FactoryControls.tscript" ); - exec( "./FieldNotify.tscript" ); - exec( "./Lists.tscript" ); - exec( "./Properties.tscript" ); - exec( "./Selection.tscript" ); + exec( "./Controls." @ $TorqueScriptFileExtension ); + exec( "./CutCopyPaste." @ $TorqueScriptFileExtension ); + exec( "./EventNotify." @ $TorqueScriptFileExtension ); + exec( "./Factory." @ $TorqueScriptFileExtension ); + exec( "./FactoryControls." @ $TorqueScriptFileExtension ); + exec( "./FieldNotify." @ $TorqueScriptFileExtension ); + exec( "./Lists." @ $TorqueScriptFileExtension ); + exec( "./Properties." @ $TorqueScriptFileExtension ); + exec( "./Selection." @ $TorqueScriptFileExtension ); - exec( "./Fields/main.tscript" ); + exec( "./Fields/main." @ $TorqueScriptFileExtension ); } VerveEditor::InitInspectorScripts(); \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Tracks/main.tscript b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Tracks/main.tscript index afe6db883..3203862e3 100644 --- a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Tracks/main.tscript +++ b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Tracks/main.tscript @@ -6,23 +6,23 @@ function VerveEditor::InitTrackScripts() { // Core. - exec( "./VTrack.tscript" ); + exec( "./VTrack." @ $TorqueScriptFileExtension ); // Built-In. - exec( "./VCameraShakeTrack.tscript" ); - exec( "./VDirectorTrack.tscript" ); - exec( "./VFadeTrack.tscript" ); - exec( "./VLightObjectAnimationTrack.tscript" ); - exec( "./VLightObjectToggleTrack.tscript" ); - exec( "./VMotionTrack.tscript" ); - exec( "./VParticleEffectToggleTrack.tscript" ); - exec( "./VPostEffectToggleTrack.tscript" ); - exec( "./VSceneJumpTrack.tscript" ); - exec( "./VScriptEventTrack.tscript" ); - exec( "./VShapeAnimationTrack.tscript" ); - exec( "./VSlowMoTrack.tscript" ); - exec( "./VSoundEffectTrack.tscript" ); - exec( "./VSpawnSphereSpawnTargetTrack.tscript" ); + exec( "./VCameraShakeTrack." @ $TorqueScriptFileExtension ); + exec( "./VDirectorTrack." @ $TorqueScriptFileExtension ); + exec( "./VFadeTrack." @ $TorqueScriptFileExtension ); + exec( "./VLightObjectAnimationTrack." @ $TorqueScriptFileExtension ); + exec( "./VLightObjectToggleTrack." @ $TorqueScriptFileExtension ); + exec( "./VMotionTrack." @ $TorqueScriptFileExtension ); + exec( "./VParticleEffectToggleTrack." @ $TorqueScriptFileExtension ); + exec( "./VPostEffectToggleTrack." @ $TorqueScriptFileExtension ); + exec( "./VSceneJumpTrack." @ $TorqueScriptFileExtension ); + exec( "./VScriptEventTrack." @ $TorqueScriptFileExtension ); + exec( "./VShapeAnimationTrack." @ $TorqueScriptFileExtension ); + exec( "./VSlowMoTrack." @ $TorqueScriptFileExtension ); + exec( "./VSoundEffectTrack." @ $TorqueScriptFileExtension ); + exec( "./VSpawnSphereSpawnTargetTrack." @ $TorqueScriptFileExtension ); // Custom. // Exec Custom Track Scripts. diff --git a/Templates/BaseGame/game/tools/VerveEditor/Torque/main.tscript b/Templates/BaseGame/game/tools/VerveEditor/Torque/main.tscript index 33b68455c..423b65908 100644 --- a/Templates/BaseGame/game/tools/VerveEditor/Torque/main.tscript +++ b/Templates/BaseGame/game/tools/VerveEditor/Torque/main.tscript @@ -12,7 +12,7 @@ function VerveEditor::InitTorqueScripts() { // Core. - exec( "./ObjectClasses.tscript" ); - exec( "./Selection.tscript" ); + exec( "./ObjectClasses." @ $TorqueScriptFileExtension ); + exec( "./Selection." @ $TorqueScriptFileExtension ); } VerveEditor::InitTorqueScripts(); diff --git a/Templates/BaseGame/game/tools/VerveEditor/main.tscript b/Templates/BaseGame/game/tools/VerveEditor/main.tscript index b0b42fb74..f50360412 100644 --- a/Templates/BaseGame/game/tools/VerveEditor/main.tscript +++ b/Templates/BaseGame/game/tools/VerveEditor/main.tscript @@ -8,34 +8,34 @@ function InitializeVerveEditor() $Verve::UseSeparateWindow = true; // Preferences. - exec( "./DefaultPrefs.tscript" ); + exec( "./DefaultPrefs." @ $TorqueScriptFileExtension ); // GUI. - exec( "./GUI/GuiProfiles.tscript" ); + exec( "./GUI/GuiProfiles." @ $TorqueScriptFileExtension ); exec( "./GUI/VerveEditorGroupBuilder.gui" ); exec( "./GUI/VerveEditorImportPathNodes.gui" ); // Scripts. - exec( "./Scripts/Plugin.tscript" ); - exec( "./Scripts/Utility.tscript" ); + exec( "./Scripts/Plugin." @ $TorqueScriptFileExtension ); + exec( "./Scripts/Utility." @ $TorqueScriptFileExtension ); - exec( "./Scripts/EditorControls.tscript" ); - exec( "./Scripts/EditorHistory.tscript" ); - exec( "./Scripts/EditorMenu.tscript" ); - exec( "./Scripts/EditorPreferences.tscript" ); - exec( "./Scripts/EditorWindow.tscript" ); - exec( "./Scripts/Persistence.tscript" ); - exec( "./Scripts/ScrollNotify.tscript" ); - exec( "./Scripts/VObject.tscript" ); + exec( "./Scripts/EditorControls." @ $TorqueScriptFileExtension ); + exec( "./Scripts/EditorHistory." @ $TorqueScriptFileExtension ); + exec( "./Scripts/EditorMenu." @ $TorqueScriptFileExtension ); + exec( "./Scripts/EditorPreferences." @ $TorqueScriptFileExtension ); + exec( "./Scripts/EditorWindow." @ $TorqueScriptFileExtension ); + exec( "./Scripts/Persistence." @ $TorqueScriptFileExtension ); + exec( "./Scripts/ScrollNotify." @ $TorqueScriptFileExtension ); + exec( "./Scripts/VObject." @ $TorqueScriptFileExtension ); - exec( "./Scripts/Inspector/main.tscript" ); + exec( "./Scripts/Inspector/main." @ $TorqueScriptFileExtension ); - exec( "./Scripts/Controller/main.tscript" ); - exec( "./Scripts/Groups/main.tscript" ); - exec( "./Scripts/Tracks/main.tscript" ); - exec( "./Scripts/Events/main.tscript" ); + exec( "./Scripts/Controller/main." @ $TorqueScriptFileExtension ); + exec( "./Scripts/Groups/main." @ $TorqueScriptFileExtension ); + exec( "./Scripts/Tracks/main." @ $TorqueScriptFileExtension ); + exec( "./Scripts/Events/main." @ $TorqueScriptFileExtension ); - exec( "./Torque/main.tscript" ); + exec( "./Torque/main." @ $TorqueScriptFileExtension ); // Register Events. VerveEditor::RegisterEvent( "VGroupObjectUpdate" ); diff --git a/Templates/BaseGame/game/tools/assetBrowser/main.tscript b/Templates/BaseGame/game/tools/assetBrowser/main.tscript index 4950a1a1b..723545d22 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/main.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/main.tscript @@ -51,7 +51,7 @@ function initializeAssetBrowser() AssetFilterTypeList.add("TerrainMaterialAsset"); } - exec("./scripts/profiles.tscript"); + exec("./scripts/profiles." @ $TorqueScriptFileExtension); exec("./guis/assetBrowser.gui"); exec("./guis/addModuleWindow.gui"); @@ -72,42 +72,42 @@ function initializeAssetBrowser() exec("./guis/assetNameEdit.gui"); exec("./guis/createNewCollectionSet.gui"); - exec("./scripts/assetBrowser.tscript"); - exec("./scripts/popupMenus.tscript"); - exec("./scripts/addModuleWindow.tscript"); - exec("./scripts/assetImport.tscript"); - exec("./scripts/assetImportConfig.tscript"); - exec("./scripts/gameObjectCreator.tscript"); - exec("./scripts/newAsset.tscript"); - exec("./scripts/editAsset.tscript"); - exec("./scripts/editModule.tscript"); - exec("./scripts/selectModule.tscript"); - exec("./scripts/assetImportConfigEditor.tscript"); - exec("./scripts/directoryHandling.tscript"); - exec("./scripts/selectPath.tscript"); - exec("./scripts/looseFileAudit.tscript"); + exec("./scripts/assetBrowser." @ $TorqueScriptFileExtension); + exec("./scripts/popupMenus." @ $TorqueScriptFileExtension); + exec("./scripts/addModuleWindow." @ $TorqueScriptFileExtension); + exec("./scripts/assetImport." @ $TorqueScriptFileExtension); + exec("./scripts/assetImportConfig." @ $TorqueScriptFileExtension); + exec("./scripts/gameObjectCreator." @ $TorqueScriptFileExtension); + exec("./scripts/newAsset." @ $TorqueScriptFileExtension); + exec("./scripts/editAsset." @ $TorqueScriptFileExtension); + exec("./scripts/editModule." @ $TorqueScriptFileExtension); + exec("./scripts/selectModule." @ $TorqueScriptFileExtension); + exec("./scripts/assetImportConfigEditor." @ $TorqueScriptFileExtension); + exec("./scripts/directoryHandling." @ $TorqueScriptFileExtension); + exec("./scripts/selectPath." @ $TorqueScriptFileExtension); + exec("./scripts/looseFileAudit." @ $TorqueScriptFileExtension); //Processing for the different asset types - exec("./scripts/assetTypes/component.tscript"); - exec("./scripts/assetTypes/cpp.tscript"); - exec("./scripts/assetTypes/gameObject.tscript"); - exec("./scripts/assetTypes/gui.tscript"); - exec("./scripts/assetTypes/image.tscript"); - exec("./scripts/assetTypes/level.tscript"); - exec("./scripts/assetTypes/material.tscript"); - exec("./scripts/assetTypes/postFX.tscript"); - exec("./scripts/assetTypes/script.tscript"); - exec("./scripts/assetTypes/shape.tscript"); - exec("./scripts/assetTypes/shapeAnimation.tscript"); - exec("./scripts/assetTypes/sound.tscript"); - exec("./scripts/assetTypes/stateMachine.tscript"); - exec("./scripts/assetTypes/cubemap.tscript"); - exec("./scripts/assetTypes/folder.tscript"); - exec("./scripts/assetTypes/terrain.tscript"); - exec("./scripts/assetTypes/terrainMaterial.tscript"); - exec("./scripts/assetTypes/datablockObjects.tscript"); - exec("./scripts/assetTypes/looseFiles.tscript"); - exec("./scripts/assetTypes/prefab.tscript"); + exec("./scripts/assetTypes/component." @ $TorqueScriptFileExtension); + exec("./scripts/assetTypes/cpp." @ $TorqueScriptFileExtension); + exec("./scripts/assetTypes/gameObject." @ $TorqueScriptFileExtension); + exec("./scripts/assetTypes/gui." @ $TorqueScriptFileExtension); + exec("./scripts/assetTypes/image." @ $TorqueScriptFileExtension); + exec("./scripts/assetTypes/level." @ $TorqueScriptFileExtension); + exec("./scripts/assetTypes/material." @ $TorqueScriptFileExtension); + exec("./scripts/assetTypes/postFX." @ $TorqueScriptFileExtension); + exec("./scripts/assetTypes/script." @ $TorqueScriptFileExtension); + exec("./scripts/assetTypes/shape." @ $TorqueScriptFileExtension); + exec("./scripts/assetTypes/shapeAnimation." @ $TorqueScriptFileExtension); + exec("./scripts/assetTypes/sound." @ $TorqueScriptFileExtension); + exec("./scripts/assetTypes/stateMachine." @ $TorqueScriptFileExtension); + exec("./scripts/assetTypes/cubemap." @ $TorqueScriptFileExtension); + exec("./scripts/assetTypes/folder." @ $TorqueScriptFileExtension); + exec("./scripts/assetTypes/terrain." @ $TorqueScriptFileExtension); + exec("./scripts/assetTypes/terrainMaterial." @ $TorqueScriptFileExtension); + exec("./scripts/assetTypes/datablockObjects." @ $TorqueScriptFileExtension); + exec("./scripts/assetTypes/looseFiles." @ $TorqueScriptFileExtension); + exec("./scripts/assetTypes/prefab." @ $TorqueScriptFileExtension); new ScriptObject( AssetBrowserPlugin ) { diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/addModuleWindow.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/addModuleWindow.tscript index 175b77bd6..7a704613e 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/addModuleWindow.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/addModuleWindow.tscript @@ -46,13 +46,13 @@ function AssetBrowser_addModuleWindow::CreateNewModule(%this) %moduleFilePath = "data/" @ %newModuleName; %moduleDefinitionFilePath = %moduleFilePath @ "/" @ %newModuleName @ ".module"; - %moduleScriptFilePath = %moduleFilePath @ "/" @ %newModuleName @ ".tscript"; + %moduleScriptFilePath = %moduleFilePath @ "/" @ %newModuleName @ "." @ $TorqueScriptFileExtension; %newModule = new ModuleDefinition() { ModuleId = %newModuleName; versionId = 1; - ScriptFile = %newModuleName @ ".tscript"; + ScriptFile = %newModuleName @ "." @ $TorqueScriptFileExtension; CreateFunction="onCreate"; DestroyFunction="onDestroy"; Group = "Game"; @@ -70,7 +70,7 @@ function AssetBrowser_addModuleWindow::CreateNewModule(%this) %file = new FileObject(); %templateFile = new FileObject(); - %moduleTemplateCodeFilePath = AssetBrowser.templateFilesPath @ "module.tscript.template"; + %moduleTemplateCodeFilePath = AssetBrowser.templateFilesPath @ "module." @ $TorqueScriptFileExtension @ ".template"; if(%file.openForWrite(%moduleScriptFilePath) && %templateFile.openForRead(%moduleTemplateCodeFilePath)) { diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/addPackageWindow.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/addPackageWindow.tscript index 28fc0103c..06d43a430 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/addPackageWindow.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/addPackageWindow.tscript @@ -41,13 +41,13 @@ function AssetBrowser_addPackageWindow::CreateNewPackage(%this) %moduleFilePath = "data/" @ %newPackageName; %moduleDefinitionFilePath = %moduleFilePath @ "/" @ %newPackageName @ ".module"; - %moduleScriptFilePath = %moduleFilePath @ "/" @ %newPackageName @ ".tscript"; + %moduleScriptFilePath = %moduleFilePath @ "/" @ %newPackageName @ "." @ $TorqueScriptFileExtension; %newPackage = new ModuleDefinition() { ModuleId = %newPackageName; versionId = 1; - ScriptFile = %newPackageName @ ".tscript"; + ScriptFile = %newPackageName @ "." @ $TorqueScriptFileExtension; CreateFunction="onCreate"; DestroyFunction="onDestroy"; Group = "Game"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.tscript index d93e28f48..2189b579f 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.tscript @@ -151,7 +151,7 @@ function getAssetTypeByFilename(%filePath) return "ShapeAsset"; else if( isSoundFormat(%fileExt)) return "SoundAsset"; - else if( %fileExt $= ".tscript" || %fileExt $= ".tscript.dso" ) + else if( %fileExt $= "." @ $TorqueScriptFileExtension || %fileExt $= "." @ $TorqueScriptFileExtension @ ".dso" ) return "ScriptAsset"; else if( %fileExt $= ".gui" || %fileExt $= ".gui.dso" ) return "GUIAsset"; @@ -188,7 +188,7 @@ function AssetBrowser::onDropFile( %this, %filePath ) %assetItem = %this.addImportingAsset("ShapeAsset", %filePath); else if( isSoundFormat(%fileExt)) %assetItem = %this.addImportingAsset("SoundAsset", %filePath); - else if( %fileExt $= ".tscript" || %fileExt $= ".tscript.dso" ) + else if( %fileExt $= "." @ $TorqueScriptFileExtension || %fileExt $= "." @ $TorqueScriptFileExtension @ ".dso" ) %assetItem = %this.addImportingAsset("ScriptAsset", %filePath); else if( %fileExt $= ".gui" || %fileExt $= ".gui.dso" ) %assetItem = %this.addImportingAsset("GUIAsset", %filePath); @@ -238,13 +238,13 @@ function AssetBrowser::onDropZipFile(%this, %filePath) %this.importAssetListArray.add("SoundAsset", %filePath); else if( (%fileExt $= ".gui") || (%fileExt $= ".gui.dso")) %this.importAssetListArray.add("GUIAsset", %filePath); - //else if( (%fileExt $= ".tscript") || (%fileExt $= ".dso")) + //else if( (%fileExt $= "." @ $TorqueScriptFileExtension) || (%fileExt $= ".dso")) // %this.importAssetListArray.add("Script", %filePath); else if( (%fileExt $= ".mis")) %this.importAssetListArray.add("LevelAsset", %filePath);*/ // For now, if it's a .tscript file, we'll assume it's a behavior. - //if (fileExt(%fileFrom) !$= ".tscript") + //if (fileExt(%fileFrom) !$= "." @ $TorqueScriptFileExtension) // continue; %fileTo = expandFilename("^tools/assetBrowser/importTemp/") @ %fileFrom; @@ -286,13 +286,13 @@ function AssetBrowser::onDropFolder(%this, %filePath) %this.importAssetListArray.add("SoundAsset", %filePath); else if( (%fileExt $= ".gui") || (%fileExt $= ".gui.dso")) %this.importAssetListArray.add("GUIAsset", %filePath); - //else if( (%fileExt $= ".tscript") || (%fileExt $= ".dso")) + //else if( (%fileExt $= "." @ $TorqueScriptFileExtension) || (%fileExt $= ".dso")) // %this.importAssetListArray.add("Script", %filePath); else if( (%fileExt $= ".mis")) %this.importAssetListArray.add("LevelAsset", %filePath); // For now, if it's a .tscript file, we'll assume it's a behavior. - if (fileExt(%fileFrom) !$= ".tscript") + if (fileExt(%fileFrom) !$= "." @ $TorqueScriptFileExtension) continue; %fileTo = expandFilename("^game/behaviors/") @ fileName(%fileFrom); @@ -942,7 +942,7 @@ function ImportAssetWindow::addNewImportingAsset(%this, %filterType) %type = "ShapeAsset"; else if( isSoundFormat(%fileExt)) %type = "SoundAsset"; - else if( %fileExt $= ".tscript" || %fileExt $= ".tscript.dso" ) + else if( %fileExt $= "." @ $TorqueScriptFileExtension || %fileExt $= "." @ $TorqueScriptFileExtension @ ".dso" ) %type = "ScriptAsset"; else if( %fileExt $= ".gui" || %fileExt $= ".gui.dso" ) %type = "GUIAsset"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/component.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/component.tscript index d12825922..8d0b6eaee 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/component.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/component.tscript @@ -6,7 +6,7 @@ function AssetBrowser::createComponentAsset(%this) %assetName = AssetBrowser.newAssetSettings.assetName; %tamlpath = %modulePath @ "/components/" @ %assetName @ ".asset.taml"; - %scriptPath = %modulePath @ "/components/" @ %assetName @ ".tscript"; + %scriptPath = %modulePath @ "/components/" @ %assetName @ "." @ $TorqueScriptFileExtension; %asset = new ComponentAsset() { @@ -17,7 +17,7 @@ function AssetBrowser::createComponentAsset(%this) friendlyName = AssetBrowser.newAssetSettings.friendlyName; componentType = AssetBrowser.newAssetSettings.componentGroup; description = AssetBrowser.newAssetSettings.description; - scriptFile = %assetName @ ".tscript"; + scriptFile = %assetName @ "." @ $TorqueScriptFileExtension; }; TamlWrite(%asset, %tamlpath); @@ -25,7 +25,7 @@ function AssetBrowser::createComponentAsset(%this) %file = new FileObject(); %templateFile = new FileObject(); - %templateCodeFilePath = %this.templateFilesPath @ "componentFile.tscript.template"; + %templateCodeFilePath = %this.templateFilesPath @ "componentFile." @ $TorqueScriptFileExtension @ ".template"; if(%file.openForWrite(%scriptPath) && %templateFile.openForRead(%templateCodeFilePath)) { diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gameObject.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gameObject.tscript index 617c6f8ba..6b1e37977 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gameObject.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gameObject.tscript @@ -14,10 +14,10 @@ function AssetBrowser::createGameObjectAsset(%this) function AssetBrowser::editGameObjectAsset(%this, %assetDef) { //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; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.tscript index afb3179e8..c4e2b99c7 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.tscript @@ -9,13 +9,13 @@ function AssetBrowser::createGUIAsset(%this) %tamlpath = %assetPath @ %assetName @ ".asset.taml"; %guipath = %assetPath @ %assetName @ ".gui"; - %scriptPath = %assetPath @ %assetName @ ".tscript"; + %scriptPath = %assetPath @ %assetName @ "." @ $TorqueScriptFileExtension; %asset = new GUIAsset() { AssetName = %assetName; versionId = 1; - scriptFile = %assetName @ ".tscript"; + scriptFile = %assetName @ "." @ $TorqueScriptFileExtension; guiFile = %assetName @ ".gui"; }; @@ -48,7 +48,7 @@ function AssetBrowser::createGUIAsset(%this) 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)) { diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/level.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/level.tscript index 4de3a4a11..d57f1594c 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/level.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/level.tscript @@ -29,7 +29,7 @@ function AssetBrowser::createLevelAsset(%this) versionId = 1; LevelFile = %assetName @ ".mis"; DecalsFile = %assetName @ ".mis.decals"; - PostFXPresetFile = %assetName @ ".postfxpreset.tscript"; + PostFXPresetFile = %assetName @ ".postfxpreset." @ $TorqueScriptFileExtension; ForestFile = %assetName @ ".forest"; NavmeshFile = %assetName @ ".nav"; LevelName = AssetBrowser.newAssetSettings.levelName; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.tscript index c12928a0c..f4ba45999 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.tscript @@ -323,14 +323,14 @@ function AssetBrowser::importMaterialAsset(%this, %assetItem) %assetPath = AssetBrowser.dirHandler.currentAddress @ "/"; %tamlpath = %assetPath @ %assetName @ ".asset.taml"; %sgfPath = %assetPath @ %assetName @ ".sgf"; - %scriptPath = %assetPath @ %assetName @ ".tscript"; + %scriptPath = %assetPath @ %assetName @ "." @ $TorqueScriptFileExtension; %newAsset = new MaterialAsset() { assetName = %assetName; versionId = 1; shaderGraph = %sgfPath; - scriptFile = %assetName @ ".tscript"; + scriptFile = %assetName @ "." @ $TorqueScriptFileExtension; originalFilePath = %filePath; materialDefinitionName = %assetName; }; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/postFX.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/postFX.tscript index 35afb4025..06ca879f6 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/postFX.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/postFX.tscript @@ -6,7 +6,7 @@ function AssetBrowser::createPostEffectAsset(%this) %assetPath = AssetBrowser.dirHandler.currentAddress @ "/"; %tamlpath = %assetPath @ %assetName @ ".asset.taml"; - %scriptPath = %assetPath @ %assetName @ ".tscript"; + %scriptPath = %assetPath @ %assetName @ "." @ $TorqueScriptFileExtension; %hlslPath = %assetPath @ %assetName @ "P.hlsl"; %glslPath = %assetPath @ %assetName @ "P.glsl"; @@ -14,7 +14,7 @@ function AssetBrowser::createPostEffectAsset(%this) { AssetName = %assetName; versionId = 1; - scriptFile = %assetName @ ".tscript"; + scriptFile = %assetName @ "." @ $TorqueScriptFileExtension; hlslShader = %assetName @ "P.hlsl"; glslShader = %assetName @ "P.glsl"; }; @@ -27,7 +27,7 @@ function AssetBrowser::createPostEffectAsset(%this) %file = new FileObject(); %templateFile = new FileObject(); - %postFXTemplateCodeFilePath = %this.templateFilesPath @ "postFXFile.tscript.template"; + %postFXTemplateCodeFilePath = %this.templateFilesPath @ "postFXFile." @ $TorqueScriptFileExtension @ ".template"; if(%file.openForWrite(%scriptPath) && %templateFile.openForRead(%postFXTemplateCodeFilePath)) { diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/script.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/script.tscript index b78a5c64f..708c3add2 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/script.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/script.tscript @@ -8,13 +8,13 @@ function AssetBrowser::createScriptAsset(%this) %assetPath = AssetBrowser.dirHandler.currentAddress @ "/"; %tamlpath = %assetPath @ %assetName @ ".asset.taml"; - %scriptPath = %assetPath @ %assetName @ ".tscript"; + %scriptPath = %assetPath @ %assetName @ "." @ $TorqueScriptFileExtension; %asset = new ScriptAsset() { AssetName = %assetName; versionId = 1; - scriptFile = %assetName @ ".tscript"; + scriptFile = %assetName @ "." @ $TorqueScriptFileExtension; }; TamlWrite(%asset, %tamlpath); @@ -32,7 +32,7 @@ function AssetBrowser::createScriptAsset(%this) return %tamlpath; } -function AssetBrowser::editScriptAsset(%this, %assetDef) +function AssetBrowser::edi" @ $TorqueScriptFileExtension @ "Asset(%this, %assetDef) { %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) %previewData.previewImage = "tools/assetBrowser/art/serverScriptIcon"; else - %previewData.previewImage = "tools/assetBrowser/art/clientScriptIcon"; + %previewData.previewImage = "tools/assetBrowser/art/clien" @ $TorqueScriptFileExtension @ "Icon"; %previewData.assetFriendlyName = %assetDef.assetName; %previewData.assetDesc = %assetDef.description; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.tscript index 4b4cbfd53..fb53a25fa 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.tscript @@ -9,13 +9,13 @@ function AssetBrowser::createTerrainMaterialAsset(%this) %assetPath = AssetBrowser.dirHandler.currentAddress @ "/"; %tamlpath = %assetPath @ %assetName @ ".asset.taml"; - %scriptPath = %assetPath @ %assetName @ ".tscript"; + %scriptPath = %assetPath @ %assetName @ "." @ $TorqueScriptFileExtension; %asset = new TerrainMaterialAsset() { AssetName = %assetName; versionId = 1; - scriptFile = %assetName @ ".tscript"; + scriptFile = %assetName @ "." @ $TorqueScriptFileExtension; materialDefinitionName = %assetName; }; @@ -33,7 +33,7 @@ function AssetBrowser::createTerrainMaterialAsset(%this) %file = new FileObject(); %templateFile = new FileObject(); - %templateFilePath = %this.templateFilesPath @ "terrainMaterial.tscript.template"; + %templateFilePath = %this.templateFilesPath @ "terrainMaterial." @ $TorqueScriptFileExtension @ ".template"; if(%file.openForWrite(%scriptPath) && %templateFile.openForRead(%templateFilePath)) { diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/editModule.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/editModule.tscript index f7c56454c..4d5a22ff1 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/editModule.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/editModule.tscript @@ -232,7 +232,7 @@ function AssetBrowser::RefreshModuleDependencies(%this, %moduleDef) //AssetBrowser.RefreshModuleDependencies(16823); %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 %file = makeFullPath(findFirstFileMultiExpr( %filePattern, true)); diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/gameObjectCreator.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/gameObjectCreator.tscript index 06bfd26e9..4ed01b458 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/gameObjectCreator.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/gameObjectCreator.tscript @@ -74,7 +74,7 @@ function GameObjectCreateBtn::onClick(%this) %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 @ "::onRemove(%this)\n{\n\n}\n"); @@ -86,7 +86,7 @@ function GameObjectCreateBtn::onClick(%this) //set up the paths %tamlPath = %path @ %className @ ".taml"; - %scriptPath = %path @ %className @ ".tscript"; + %scriptPath = %path @ %className @ "." @ $TorqueScriptFileExtension; saveGameObject(%className, %tamlPath, %scriptPath); %asset = new GameObjectAsset() diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/looseFileAudit.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/looseFileAudit.tscript index 0d3891b2b..350a8b117 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/looseFileAudit.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/looseFileAudit.tscript @@ -23,7 +23,7 @@ function LooseFileAuditWindow::buildPopupMenus(%this) superClass = "MenuBuilder"; 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[2] = "Make a Material Asset" TAB "" TAB "LooseFileAuditWindow.importMaterial();"; item[3] = "Make a Terrain Material Asset" TAB "" TAB "LooseFileAuditWindow.importTerrMat();"; @@ -159,7 +159,7 @@ function LooseFileList::onRightMouseDown(%this, %itemId) { ImageLooseFilePopup.showPopup(Canvas); } - else if(%ext $= ".tscript") + else if(%ext $= "." @ $TorqueScriptFileExtension) { ScriptLooseFilePopup.showPopup(Canvas); } @@ -199,7 +199,7 @@ function LooseFileAuditWindow::importImage(%this) LooseFileList.expandItem(0); } -function LooseFileAuditWindow::importScript(%this) +function LooseFileAuditWindow::impor" @ $TorqueScriptFileExtension @ "(%this) { if(!ImportAssetWindow.isAwake()) ImportAssetWindow.showDialog(); diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/popupMenus.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/popupMenus.tscript index 31909cf07..8dec147cd 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/popupMenus.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/popupMenus.tscript @@ -329,7 +329,7 @@ function AssetBrowser::buildPopupMenus(%this) //isPopup = true; 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[ 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.\");"; diff --git a/Templates/BaseGame/game/tools/componentEditor/main.tscript b/Templates/BaseGame/game/tools/componentEditor/main.tscript index da48b1ce1..7dc10a11f 100644 --- a/Templates/BaseGame/game/tools/componentEditor/main.tscript +++ b/Templates/BaseGame/game/tools/componentEditor/main.tscript @@ -21,15 +21,15 @@ //----------------------------------------------------------------------------- //Scripts -exec("./scripts/componentEditor.ed.tscript"); -exec("./scripts/stateMachineEditor.ed.tscript"); -exec("./scripts/superToolTipDlg.ed.tscript"); +exec("./scripts/componentEditor.ed." @ $TorqueScriptFileExtension); +exec("./scripts/stateMachineEditor.ed." @ $TorqueScriptFileExtension); +exec("./scripts/superToolTipDlg.ed." @ $TorqueScriptFileExtension); //gui exec("./gui/superToolTipDlg.ed.gui"); exec("./gui/stateMachineDlg.ed.gui"); //field types -exec("./interface/materialFieldType.tscript"); -exec("./interface/typeMaskFieldType.tscript"); -exec("./interface/stateMachineField.tscript"); \ No newline at end of file +exec("./interface/materialFieldType." @ $TorqueScriptFileExtension); +exec("./interface/typeMaskFieldType." @ $TorqueScriptFileExtension); +exec("./interface/stateMachineField." @ $TorqueScriptFileExtension); \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/convexEditor/main.tscript b/Templates/BaseGame/game/tools/convexEditor/main.tscript index 6ecf9d2f0..6ecb12b6c 100644 --- a/Templates/BaseGame/game/tools/convexEditor/main.tscript +++ b/Templates/BaseGame/game/tools/convexEditor/main.tscript @@ -24,12 +24,12 @@ function initializeConvexEditor() { echo(" % - Initializing Sketch Tool"); - exec( "./convexEditor.tscript" ); + exec( "./convexEditor." @ $TorqueScriptFileExtension ); exec( "./convexEditorGui.gui" ); exec( "./convexEditorToolbar.ed.gui" ); - exec( "./convexEditorGui.tscript" ); + exec( "./convexEditorGui." @ $TorqueScriptFileExtension ); exec( "./convexEditorSidebarGui.gui" ); - exec( "./materials.tscript" ); + exec( "./materials." @ $TorqueScriptFileExtension ); ConvexEditorGui.setVisible( false ); ConvexEditorOptionsWindow.setVisible( false ); diff --git a/Templates/BaseGame/game/tools/datablockEditor/datablockEditor.tscript b/Templates/BaseGame/game/tools/datablockEditor/datablockEditor.tscript index da4ef561c..8d5ac4932 100644 --- a/Templates/BaseGame/game/tools/datablockEditor/datablockEditor.tscript +++ b/Templates/BaseGame/game/tools/datablockEditor/datablockEditor.tscript @@ -23,7 +23,7 @@ // Main code for the Datablock Editor plugin. -$DATABLOCK_EDITOR_DEFAULT_FILENAME = "art/datablocks/managedDatablocks.tscript"; +$DATABLOCK_EDITOR_DEFAULT_FILENAME = "art/datablocks/managedDatablocks." @ $TorqueScriptFileExtension; //============================================================================================= // Initialization. @@ -375,7 +375,7 @@ function DatablockEditorPlugin::flagDatablockAsDirty(%this, %datablock, %dirty ) function DatablockEditorPlugin::showSaveNewFileDialog(%this) { %currentFile = %this.getSelectedDatablock().getFilename(); - getSaveFilename( "TorqueScript Files|*.tscript|All Files|*.*", %this @ ".saveNewFileFinish", %currentFile, false ); + getSaveFilename( "TorqueScript Files|*." @ $TorqueScriptFileExtension @ "|All Files|*.*", %this @ ".saveNewFileFinish", %currentFile, false ); } //--------------------------------------------------------------------------------------------- diff --git a/Templates/BaseGame/game/tools/datablockEditor/main.tscript b/Templates/BaseGame/game/tools/datablockEditor/main.tscript index 1eadf0902..f577263cf 100644 --- a/Templates/BaseGame/game/tools/datablockEditor/main.tscript +++ b/Templates/BaseGame/game/tools/datablockEditor/main.tscript @@ -27,8 +27,8 @@ function initializeDatablockEditor() { echo( " - Initializing Datablock Editor" ); - exec("./datablockEditor.tscript"); - exec("./datablockEditorUndo.tscript"); + exec("./datablockEditor." @ $TorqueScriptFileExtension); + exec("./datablockEditorUndo." @ $TorqueScriptFileExtension); exec("./DatablockEditorTreeWindow.ed.gui"); exec("./DatablockEditorInspectorWindow.ed.gui"); exec("./DatablockEditorCreatePrompt.ed.gui"); diff --git a/Templates/BaseGame/game/tools/debugger/main.tscript b/Templates/BaseGame/game/tools/debugger/main.tscript index cf126d38e..9d4f7f798 100644 --- a/Templates/BaseGame/game/tools/debugger/main.tscript +++ b/Templates/BaseGame/game/tools/debugger/main.tscript @@ -33,7 +33,7 @@ function initializeDebugger() echo(" % - Initializing Debugger"); // Load the scripts. - exec("./scripts/debugger.ed.tscript"); + exec("./scripts/debugger.ed." @ $TorqueScriptFileExtension); // And the guis. exec("./gui/breakConditionDlg.ed.gui"); diff --git a/Templates/BaseGame/game/tools/decalEditor/main.tscript b/Templates/BaseGame/game/tools/decalEditor/main.tscript index 1a157309b..d948f1133 100644 --- a/Templates/BaseGame/game/tools/decalEditor/main.tscript +++ b/Templates/BaseGame/game/tools/decalEditor/main.tscript @@ -24,12 +24,12 @@ function initializeDecalEditor() { 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.tscript" ); - exec( "./decalEditorActions.tscript" ); + exec( "./decalEditorGui." @ $TorqueScriptFileExtension ); + exec( "./decalEditorActions." @ $TorqueScriptFileExtension ); // Add ourselves to EditorGui, where all the other tools reside DecalEditorGui.setVisible( false ); @@ -66,9 +66,9 @@ function destroyDecalEditor() // JCF: helper for during development function reinitDecalEditor() { - exec( "./main.tscript" ); - exec( "./decalEditor.tscript" ); - exec( "./decalEditorGui.tscript" ); + exec( "./main." @ $TorqueScriptFileExtension ); + exec( "./decalEditor." @ $TorqueScriptFileExtension ); + exec( "./decalEditorGui." @ $TorqueScriptFileExtension ); } function DecalEditorPlugin::onWorldEditorStartup( %this ) diff --git a/Templates/BaseGame/game/tools/editorClasses/main.tscript b/Templates/BaseGame/game/tools/editorClasses/main.tscript index ce4eae662..c85830ddc 100644 --- a/Templates/BaseGame/game/tools/editorClasses/main.tscript +++ b/Templates/BaseGame/game/tools/editorClasses/main.tscript @@ -34,7 +34,7 @@ function initializeEditorClasses() // Load Editor Profiles //----------------------------------------------------------------------------- - exec("./scripts/fileLoader.ed.tscript"); + exec("./scripts/fileLoader.ed." @ $TorqueScriptFileExtension); loadDirectory( expandFilename("./gui/panels") ); @@ -43,39 +43,39 @@ function initializeEditorClasses() // Setup Preferences Manager //----------------------------------------------------------------------------- - exec("./scripts/preferencesManager.ed.tscript"); + exec("./scripts/preferencesManager.ed." @ $TorqueScriptFileExtension); initPreferencesManager(); //----------------------------------------------------------------------------- // Load Form Managers //----------------------------------------------------------------------------- - exec("./scripts/guiFormLibraryManager.ed.tscript"); - exec("./scripts/guiFormContentManager.ed.tscript"); - exec("./scripts/guiFormReferenceManager.ed.tscript"); - exec("./scripts/guiFormLayoutManager.ed.tscript"); - exec("./scripts/guiFormMessageManager.ed.tscript"); - exec("./scripts/expandos.ed.tscript"); - exec("./scripts/utility.ed.tscript"); + exec("./scripts/guiFormLibraryManager.ed." @ $TorqueScriptFileExtension); + exec("./scripts/guiFormContentManager.ed." @ $TorqueScriptFileExtension); + exec("./scripts/guiFormReferenceManager.ed." @ $TorqueScriptFileExtension); + exec("./scripts/guiFormLayoutManager.ed." @ $TorqueScriptFileExtension); + exec("./scripts/guiFormMessageManager.ed." @ $TorqueScriptFileExtension); + exec("./scripts/expandos.ed." @ $TorqueScriptFileExtension); + exec("./scripts/utility.ed." @ $TorqueScriptFileExtension); setupBaseExpandos(); // User Display - exec("./scripts/contextPopup.ed.tscript"); + exec("./scripts/contextPopup.ed." @ $TorqueScriptFileExtension); // Project Support - exec("./scripts/projects/projectEvents.ed.tscript"); - exec("./scripts/projects/projectInternalInterface.ed.tscript"); + exec("./scripts/projects/projectEvents.ed." @ $TorqueScriptFileExtension); + exec("./scripts/projects/projectInternalInterface.ed." @ $TorqueScriptFileExtension); // Input - exec("./scripts/input/inputEvents.ed.tscript"); - exec("./scripts/input/dragDropEvents.ed.tscript"); - exec("./scripts/input/applicationEvents.ed.tscript"); + exec("./scripts/input/inputEvents.ed." @ $TorqueScriptFileExtension); + exec("./scripts/input/dragDropEvents.ed." @ $TorqueScriptFileExtension); + exec("./scripts/input/applicationEvents.ed." @ $TorqueScriptFileExtension); // Form Class - exec("./scripts/guiFormClass.ed.tscript"); - exec("./scripts/guiClasses/guiThumbnailPopup.ed.tscript"); - exec("./scripts/guiClasses/guiThumbnail.ed.tscript"); - exec("./scripts/RSSNews/RSSFeedScript.ed.tscript"); + exec("./scripts/guiFormClass.ed." @ $TorqueScriptFileExtension); + exec("./scripts/guiClasses/guiThumbnailPopup.ed." @ $TorqueScriptFileExtension); + exec("./scripts/guiClasses/guiThumbnail.ed." @ $TorqueScriptFileExtension); + exec("./scripts/RSSNews/RSSFeedScript.ed." @ $TorqueScriptFileExtension); loadDirectory( expandFilename("./scripts/core") ); loadDirectory( expandFilename("./scripts/platform") ); diff --git a/Templates/BaseGame/game/tools/editorClasses/scripts/RSSNews/RSSFeedScript.ed.tscript b/Templates/BaseGame/game/tools/editorClasses/scripts/RSSNews/RSSFeedScript.ed.tscript index 526316f8c..8b12dbe72 100644 --- a/Templates/BaseGame/game/tools/editorClasses/scripts/RSSNews/RSSFeedScript.ed.tscript +++ b/Templates/BaseGame/game/tools/editorClasses/scripts/RSSNews/RSSFeedScript.ed.tscript @@ -28,7 +28,7 @@ $RSSFeed::userAgent = "TorqueGameEngineAdvances/1.1"; $RSSFeed::maxNewHeadlines = 10; // Load up the helper objects -exec( "./RSSStructs.ed.tscript" ); +exec( "./RSSStructs.ed." @ $TorqueScriptFileExtension ); function RSSFeedObject::onConnected(%this) { @@ -93,7 +93,7 @@ function RSSFeedObject::onDisconnect(%this) { // Create collection and load cache. %ret = constructRSSHeadlineCollection(); - %ret.loadFromFile( "RSSCache.tscript" ); + %ret.loadFromFile( "RSSCache." @ $TorqueScriptFileExtension ); // Ok, we have a full buffer now, hopefully. Let's process it. //echo(" - Got " @ $RSSFeed::lineCount @ " lines."); @@ -137,7 +137,7 @@ function RSSFeedObject::onDisconnect(%this) eval( %this._callback @ "(" @ %params @ ");" ); } - %ret.writeToFile( "RSSCache.tscript", false ); + %ret.writeToFile( "RSSCache." @ $TorqueScriptFileExtension, false ); } function RSSUpdate::initialize( %callback ) diff --git a/Templates/BaseGame/game/tools/editorClasses/scripts/expandos.ed.tscript b/Templates/BaseGame/game/tools/editorClasses/scripts/expandos.ed.tscript index 6d2804fe3..771dcc861 100644 --- a/Templates/BaseGame/game/tools/editorClasses/scripts/expandos.ed.tscript +++ b/Templates/BaseGame/game/tools/editorClasses/scripts/expandos.ed.tscript @@ -26,11 +26,11 @@ function setupBaseExpandos() // FIXME TGEA doesnt currently have these due to the way it's built return; - setScriptPathExpando("tools", getExecutablePath() @ "/tools", true); - setScriptPathExpando("tool", getExecutablePath() , true); - setScriptPathExpando("toolResources", getExecutablePath() @ "/resources", true); + se" @ $TorqueScriptFileExtension @ "PathExpando("tools", getExecutablePath() @ "/tools", true); + se" @ $TorqueScriptFileExtension @ "PathExpando("tool", getExecutablePath() , 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 removeScriptPathExpando("game"); diff --git a/Templates/BaseGame/game/tools/editorClasses/scripts/fileLoader.ed.tscript b/Templates/BaseGame/game/tools/editorClasses/scripts/fileLoader.ed.tscript index d954b9635..9d414e453 100644 --- a/Templates/BaseGame/game/tools/editorClasses/scripts/fileLoader.ed.tscript +++ b/Templates/BaseGame/game/tools/editorClasses/scripts/fileLoader.ed.tscript @@ -23,7 +23,7 @@ function loadDirectory(%path, %type, %dsoType) { if( %type $= "" ) - %type = "ed.tscript"; + %type = "ed." @ $TorqueScriptFileExtension; if( %dsoType $= "" ) %dsoType = "edso"; diff --git a/Templates/BaseGame/game/tools/editorClasses/scripts/guiFormLayoutManager.ed.tscript b/Templates/BaseGame/game/tools/editorClasses/scripts/guiFormLayoutManager.ed.tscript index af1fc1fd7..b5e93d831 100644 --- a/Templates/BaseGame/game/tools/editorClasses/scripts/guiFormLayoutManager.ed.tscript +++ b/Templates/BaseGame/game/tools/editorClasses/scripts/guiFormLayoutManager.ed.tscript @@ -37,7 +37,7 @@ function GuiFormManager::InitLayouts( %libraryName, %layoutName, %layoutObj ) } // 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; layoutLibrary = %libraryObj; layoutObj = %layoutObj; - layoutFile = %libraryObj.basePath @ %layoutName @ ".tscript"; + layoutFile = %libraryObj.basePath @ %layoutName @ "." @ $TorqueScriptFileExtension; }; // 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. GuiFormManager::SaveLayoutContent( %layoutObjRef.layoutObj ); - %newFile = %libraryObj.basePath @ "/" @ %newName @ ".tscript"; + %newFile = %libraryObj.basePath @ "/" @ %newName @ "." @ $TorqueScriptFileExtension; if( %newName $= "" ) { %newName = %layoutObjRef.layoutName; diff --git a/Templates/BaseGame/game/tools/editorClasses/scripts/projects/projectInternalInterface.ed.tscript b/Templates/BaseGame/game/tools/editorClasses/scripts/projects/projectInternalInterface.ed.tscript index d78f0a67a..446870317 100644 --- a/Templates/BaseGame/game/tools/editorClasses/scripts/projects/projectInternalInterface.ed.tscript +++ b/Templates/BaseGame/game/tools/editorClasses/scripts/projects/projectInternalInterface.ed.tscript @@ -112,8 +112,8 @@ function ProjectBase::_onProjectOpen( %this, %data ) setCurrentDirectory( %this.gamePath ); // Set ^game expando - setScriptPathExpando("project", %this.gamePath ); - setScriptPathExpando("game", %this.gamePath @ "/game" ); + se" @ $TorqueScriptFileExtension @ "PathExpando("project", %this.gamePath ); + se" @ $TorqueScriptFileExtension @ "PathExpando("game", %this.gamePath @ "/game" ); %this.onProjectOpen( %data ); %this.setActive(); diff --git a/Templates/BaseGame/game/tools/forestEditor/forestEditorGui.tscript b/Templates/BaseGame/game/tools/forestEditor/forestEditorGui.tscript index add65f731..820689b6a 100644 --- a/Templates/BaseGame/game/tools/forestEditor/forestEditorGui.tscript +++ b/Templates/BaseGame/game/tools/forestEditor/forestEditorGui.tscript @@ -206,7 +206,7 @@ function ForestEditorGui::newMesh( %this ) ForestEditMeshTree.scrollVisible( %item ); ForestEditMeshTree.addSelection( %item ); - ForestDataManager.setDirty( %name, "art/forest/managedItemData.tscript" ); + ForestDataManager.setDirty( %name, "art/forest/managedItemData." @ $TorqueScriptFileExtension ); %element = new ForestBrushElement() { @@ -255,7 +255,7 @@ function ForestEditorGui::deleteMesh( %this ) function ForestEditorGui::okDeleteMesh( %this, %mesh ) { // 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. %this.deleteMeshSafe( %mesh ); @@ -371,7 +371,7 @@ function ForestEditMeshTree::onDoubleClick( %this ) parentGroup = ForestBrushGroup; }; - //ForestDataManager.setDirty( %element, "art/forest/brushes.tscript" ); + //ForestDataManager.setDirty( %element, "art/forest/brushes." @ $TorqueScriptFileExtension ); ForestEditBrushTree.clearSelection(); ForestEditBrushTree.buildVisibleTree( true ); diff --git a/Templates/BaseGame/game/tools/forestEditor/main.tscript b/Templates/BaseGame/game/tools/forestEditor/main.tscript index e22070265..99d1bab88 100644 --- a/Templates/BaseGame/game/tools/forestEditor/main.tscript +++ b/Templates/BaseGame/game/tools/forestEditor/main.tscript @@ -24,12 +24,12 @@ function initializeForestEditor() { echo(" % - Initializing Forest Editor"); - exec( "./forestEditor.tscript" ); + exec( "./forestEditor." @ $TorqueScriptFileExtension ); exec( "./forestEditorGui.gui" ); exec( "./forestEditToolbar.ed.gui" ); - exec( "./forestEditorGui.tscript" ); - exec( "./tools.tscript" ); + exec( "./forestEditorGui." @ $TorqueScriptFileExtension ); + exec( "./tools." @ $TorqueScriptFileExtension ); ForestEditorGui.setVisible( false ); ForestEditorPalleteWindow.setVisible( false ); @@ -84,16 +84,16 @@ function destroyForestEditor() // NOTE: debugging helper. function reinitForest() { - exec( "./main.tscript" ); - exec( "./forestEditorGui.tscript" ); - exec( "./tools.tscript" ); + exec( "./main." @ $TorqueScriptFileExtension ); + exec( "./forestEditorGui." @ $TorqueScriptFileExtension ); + exec( "./tools." @ $TorqueScriptFileExtension ); } function ForestEditorPlugin::onWorldEditorStartup( %this ) { new PersistenceManager( ForestDataManager ); - %brushPath = "tools/forestEditor/brushes.tscript"; + %brushPath = "tools/forestEditor/brushes." @ $TorqueScriptFileExtension; if ( !isFile( %brushPath ) ) %successfulFile = createPath( %brushPath ); @@ -205,7 +205,7 @@ function ForestEditorPlugin::onActivated( %this ) } 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 ) @@ -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 ) diff --git a/Templates/BaseGame/game/tools/gui/assimpImport.ed.gui b/Templates/BaseGame/game/tools/gui/assimpImport.ed.gui index 05f146058..a9ba1f768 100644 --- a/Templates/BaseGame/game/tools/gui/assimpImport.ed.gui +++ b/Templates/BaseGame/game/tools/gui/assimpImport.ed.gui @@ -1049,7 +1049,7 @@ }; new GuiCheckBoxCtrl() { useInactiveState = "0"; - text = " Force update materials.tscript"; + text = " Force update materials." @ $TorqueScriptFileExtension; groupNum = "-1"; buttonType = "ToggleButton"; useMouseEvents = "0"; @@ -1063,7 +1063,7 @@ canSave = "1"; Visible = "1"; 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"; internalName = "forceUpdateMaterials"; canSaveDynamicFields = "0"; @@ -1510,4 +1510,4 @@ }; }; //--- OBJECT WRITE END --- -exec("./assimpImport.ed.tscript"); +exec("./assimpImport.ed." @ $TorqueScriptFileExtension); diff --git a/Templates/BaseGame/game/tools/gui/assimpImport.ed.tscript b/Templates/BaseGame/game/tools/gui/assimpImport.ed.tscript index 98156e3e6..054e31e51 100644 --- a/Templates/BaseGame/game/tools/gui/assimpImport.ed.tscript +++ b/Templates/BaseGame/game/tools/gui/assimpImport.ed.tscript @@ -280,7 +280,7 @@ function AssimpImportDlg::showDialog(%this, %shapePath, %cmd) // Check for an existing TSShapeConstructor object. Need to exec the script // 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)) exec(%csPath); diff --git a/Templates/BaseGame/game/tools/gui/colladaImport.ed.gui b/Templates/BaseGame/game/tools/gui/colladaImport.ed.gui index 5f27843c4..d098bffe6 100644 --- a/Templates/BaseGame/game/tools/gui/colladaImport.ed.gui +++ b/Templates/BaseGame/game/tools/gui/colladaImport.ed.gui @@ -991,7 +991,7 @@ }; new GuiCheckBoxCtrl() { useInactiveState = "0"; - text = " Force update materials.tscript"; + text = " Force update materials." @ $TorqueScriptFileExtension; groupNum = "-1"; buttonType = "ToggleButton"; useMouseEvents = "0"; @@ -1005,7 +1005,7 @@ canSave = "1"; Visible = "1"; 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"; internalName = "forceUpdateMaterials"; canSaveDynamicFields = "0"; @@ -1255,7 +1255,7 @@ function ColladaImportDlg::showDialog(%this, %shapePath, %cmd) // Check for an existing TSShapeConstructor object. Need to exec the script // 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)) exec(%csPath); diff --git a/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.tscript b/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.tscript index 6f85edf1d..55842264c 100644 --- a/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.tscript +++ b/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.tscript @@ -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 if(ESettingsWindow.selectedPageText $= "Theme") - exec("tools/gui/profiles.ed.tscript"); + exec("tools/gui/profiles.ed." @ $TorqueScriptFileExtension); } else %success = ProjectSettings.write(); diff --git a/Templates/BaseGame/game/tools/gui/guiDialogs.ed.tscript b/Templates/BaseGame/game/tools/gui/guiDialogs.ed.tscript index 3ce99d510..fdb16e1b4 100644 --- a/Templates/BaseGame/game/tools/gui/guiDialogs.ed.tscript +++ b/Templates/BaseGame/game/tools/gui/guiDialogs.ed.tscript @@ -20,9 +20,9 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- -exec("./fileDialogBase.ed.tscript"); -exec("./openFileDialog.ed.tscript"); -exec("./saveFileDialog.ed.tscript"); +exec("./fileDialogBase.ed." @ $TorqueScriptFileExtension); +exec("./openFileDialog.ed." @ $TorqueScriptFileExtension); +exec("./saveFileDialog.ed." @ $TorqueScriptFileExtension); exec("./saveChangesMBDlg.ed.gui"); exec("./simViewDlg.ed.gui"); exec("./colorPicker.ed.gui"); @@ -30,16 +30,16 @@ exec("./materialSelector.ed.gui"); exec("./scriptEditorDlg.ed.gui"); exec("./colladaImport.ed.gui"); exec("./GuiEaseEditDlg.ed.gui"); -exec("./GuiEaseEditDlg.ed.tscript"); -exec("./guiObjectInspector.ed.tscript"); +exec("./GuiEaseEditDlg.ed." @ $TorqueScriptFileExtension); +exec("./guiObjectInspector.ed." @ $TorqueScriptFileExtension); exec("./uvEditor.ed.gui"); -exec("./objectSelection.ed.tscript"); +exec("./objectSelection.ed." @ $TorqueScriptFileExtension); exec("./postFxManager.gui"); exec("./assimpImport.ed.gui"); -exec("./fieldTypes/assetDependencies.tscript"); -exec("./fieldTypes/fieldTypes.tscript"); -exec("./fieldTypes/listField.tscript"); -exec("./fieldTypes/range.tscript"); -exec("./fieldTypes/moduleDependencies.tscript"); -exec("./fieldTypes/buttonField.tscript"); +exec("./fieldTypes/assetDependencies." @ $TorqueScriptFileExtension); +exec("./fieldTypes/fieldTypes." @ $TorqueScriptFileExtension); +exec("./fieldTypes/listField." @ $TorqueScriptFileExtension); +exec("./fieldTypes/range." @ $TorqueScriptFileExtension); +exec("./fieldTypes/moduleDependencies." @ $TorqueScriptFileExtension); +exec("./fieldTypes/buttonField." @ $TorqueScriptFileExtension); diff --git a/Templates/BaseGame/game/tools/gui/guiObjectInspector.ed.tscript b/Templates/BaseGame/game/tools/gui/guiObjectInspector.ed.tscript index 33b65f6bd..f6ef84fff 100644 --- a/Templates/BaseGame/game/tools/gui/guiObjectInspector.ed.tscript +++ b/Templates/BaseGame/game/tools/gui/guiObjectInspector.ed.tscript @@ -143,7 +143,7 @@ function GuiObjectInspectorMethodList::init( %this, %object ) %methods = %object.dumpMethods(); %count = %methods.count(); %methodsGroup = %this.insertItem( 0, "Methods" ); - %parentScripted = %this.insertItem( %methodsGroup, "Scripted" ); + %paren" @ $TorqueScriptFileExtension @ "ed = %this.insertItem( %methodsGroup, "Scripted" ); %parentNative = %this.insertItem( %methodsGroup, "Native" ); for( %i = 0; %i < %count; %i ++ ) @@ -158,7 +158,7 @@ function GuiObjectInspectorMethodList::init( %this, %object ) %tooltip = %prototype; if( isFile( %fileName ) ) { - %parent = %parentScripted; + %parent = %paren" @ $TorqueScriptFileExtension @ "ed; %tooltip = %tooltip NL "Declared in: " @ %fileName @ ":" @ %lineNumber; } else diff --git a/Templates/BaseGame/game/tools/gui/materialSelector.ed.gui b/Templates/BaseGame/game/tools/gui/materialSelector.ed.gui index ac00234a6..b3ad85549 100644 --- a/Templates/BaseGame/game/tools/gui/materialSelector.ed.gui +++ b/Templates/BaseGame/game/tools/gui/materialSelector.ed.gui @@ -1573,7 +1573,7 @@ function MaterialSelector::updateMaterialTags( %this, %material, %tag, %tagValue // their auto-generated or new material if( %material.getFilename() !$= "" && %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.saveDirty(); @@ -1761,7 +1761,7 @@ function MaterialSelector::deleteMaterial( %this, %materialName, %secondFilter, if( %materialName.getFilename() !$= "" && %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.saveDirty(); diff --git a/Templates/BaseGame/game/tools/gui/profiles.ed.tscript b/Templates/BaseGame/game/tools/gui/profiles.ed.tscript index 93f67ba66..6e8c7b9ea 100644 --- a/Templates/BaseGame/game/tools/gui/profiles.ed.tscript +++ b/Templates/BaseGame/game/tools/gui/profiles.ed.tscript @@ -22,7 +22,7 @@ function execEditorProfilesCS() { - exec("./profiles.ed.tscript"); + exec("./profiles.ed." @ $TorqueScriptFileExtension); } $Gui::clipboardFile = expandFilename("./clipboard.gui"); diff --git a/Templates/BaseGame/game/tools/guiEditor/main.tscript b/Templates/BaseGame/game/tools/guiEditor/main.tscript index 29aab72a6..f88be5997 100644 --- a/Templates/BaseGame/game/tools/guiEditor/main.tscript +++ b/Templates/BaseGame/game/tools/guiEditor/main.tscript @@ -34,22 +34,22 @@ function initializeGuiEditor() // Scripts. - exec( "./scripts/guiEditor.ed.tscript" ); - exec( "./scripts/guiEditorTreeView.ed.tscript" ); - exec( "./scripts/guiEditorInspector.ed.tscript" ); - exec( "./scripts/guiEditorProfiles.ed.tscript" ); - exec( "./scripts/guiEditorGroup.ed.tscript" ); - exec( "./scripts/guiEditorUndo.ed.tscript" ); - exec( "./scripts/guiEditorCanvas.ed.tscript" ); - exec( "./scripts/guiEditorContentList.ed.tscript" ); - exec( "./scripts/guiEditorStatusBar.ed.tscript" ); - exec( "./scripts/guiEditorToolbox.ed.tscript" ); - exec( "./scripts/guiEditorSelectDlg.ed.tscript" ); + exec( "./scripts/guiEditor.ed." @ $TorqueScriptFileExtension ); + exec( "./scripts/guiEditorTreeView.ed." @ $TorqueScriptFileExtension ); + exec( "./scripts/guiEditorInspector.ed." @ $TorqueScriptFileExtension ); + exec( "./scripts/guiEditorProfiles.ed." @ $TorqueScriptFileExtension ); + exec( "./scripts/guiEditorGroup.ed." @ $TorqueScriptFileExtension ); + exec( "./scripts/guiEditorUndo.ed." @ $TorqueScriptFileExtension ); + exec( "./scripts/guiEditorCanvas.ed." @ $TorqueScriptFileExtension ); + exec( "./scripts/guiEditorContentList.ed." @ $TorqueScriptFileExtension ); + exec( "./scripts/guiEditorStatusBar.ed." @ $TorqueScriptFileExtension ); + exec( "./scripts/guiEditorToolbox.ed." @ $TorqueScriptFileExtension ); + exec( "./scripts/guiEditorSelectDlg.ed." @ $TorqueScriptFileExtension ); - exec( "./scripts/guiEditorNewGuiDialog.ed.tscript" ); - exec( "./scripts/fileDialogs.ed.tscript" ); - exec( "./scripts/guiEditorPrefsDlg.ed.tscript" ); - exec( "./scripts/EditorChooseGUI.ed.tscript" ); + exec( "./scripts/guiEditorNewGuiDialog.ed." @ $TorqueScriptFileExtension ); + exec( "./scripts/fileDialogs.ed." @ $TorqueScriptFileExtension ); + exec( "./scripts/guiEditorPrefsDlg.ed." @ $TorqueScriptFileExtension ); + exec( "./scripts/EditorChooseGUI.ed." @ $TorqueScriptFileExtension ); } function destroyGuiEditor() diff --git a/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorProfiles.ed.tscript b/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorProfiles.ed.tscript index f6829865b..433f103ae 100644 --- a/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorProfiles.ed.tscript +++ b/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorProfiles.ed.tscript @@ -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"; @@ -127,7 +127,7 @@ function GuiEditor::deleteProfile( %this, %profile ) function GuiEditor::showSaveProfileDialog( %this, %currentFileName ) { - getSaveFileName( "TorqueScript Files|*.tscript", %this @ ".doSaveProfile", %currentFileName ); + getSaveFileName( "TorqueScript Files|*." @ $TorqueScriptFileExtension, %this @ ".doSaveProfile", %currentFileName ); } //--------------------------------------------------------------------------------------------- diff --git a/Templates/BaseGame/game/tools/main.tscript b/Templates/BaseGame/game/tools/main.tscript index 943bb5209..8c0cd26a4 100644 --- a/Templates/BaseGame/game/tools/main.tscript +++ b/Templates/BaseGame/game/tools/main.tscript @@ -40,9 +40,9 @@ if(!$Tools::loaded) //We may need to lean on certain EditorSettings, and specifically default values if the settings.xml //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"); } @@ -77,14 +77,14 @@ function onStart() } // Common GUI stuff. - exec( "./gui/cursors.ed.tscript" ); - exec( "./gui/messageBoxes/messageBox.ed.tscript" ); - exec( "./editorClasses/gui/panels/navPanelProfiles.ed.tscript" ); + exec( "./gui/cursors.ed." @ $TorqueScriptFileExtension ); + exec( "./gui/messageBoxes/messageBox.ed." @ $TorqueScriptFileExtension ); + exec( "./editorClasses/gui/panels/navPanelProfiles.ed." @ $TorqueScriptFileExtension ); // 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 // common, along with the guiProfiles they depend on. - exec( "./gui/guiDialogs.ed.tscript" ); + exec( "./gui/guiDialogs.ed." @ $TorqueScriptFileExtension ); //%toggle = $Scripts::ignoreDSOs; //$Scripts::ignoreDSOs = true; @@ -98,12 +98,12 @@ function onStart() $editors[%i] = getWord( $Tools::loadFirst, %i ); } - %pattern = $Tools::resourcePath @ "/*/main.tscript"; + %pattern = $Tools::resourcePath @ "/*/main." @ $TorqueScriptFileExtension; %folder = findFirstFile( %pattern ); if ( %folder $= "") { // 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 ); } while ( %folder !$= "" ) @@ -130,7 +130,7 @@ function onStart() %count = $editors[count]; for ( %i = 0; %i < %count; %i++ ) { - exec( "./" @ $editors[%i] @ "/main.tscript" ); + exec( "./" @ $editors[%i] @ "/main." @ $TorqueScriptFileExtension ); %initializeFunction = "initialize" @ $editors[%i]; if( isFunction( %initializeFunction ) ) @@ -355,7 +355,7 @@ function Tools::LoadResources( %path ) for( %i = 0; %i < %wordCount; %i++ ) { %resource = GetField( %resourcesList, %i ); - if( isFile( %resourcesPath @ %resource @ "/resourceDatabase.tscript") ) + if( isFile( %resourcesPath @ %resource @ "/resourceDatabase." @ $TorqueScriptFileExtension) ) ResourceObject::load( %path, %resource ); } } diff --git a/Templates/BaseGame/game/tools/materialEditor/main.tscript b/Templates/BaseGame/game/tools/materialEditor/main.tscript index 6a729c4ba..5bca2fa6f 100644 --- a/Templates/BaseGame/game/tools/materialEditor/main.tscript +++ b/Templates/BaseGame/game/tools/materialEditor/main.tscript @@ -36,10 +36,10 @@ function initializeMaterialEditor() exec("~/materialEditor/gui/materialInstancesView.ed.gui"); // Load Client Scripts. - exec("./scripts/materialEditor.ed.tscript"); - exec("./scripts/materialEditorUndo.ed.tscript"); - exec("./scripts/materialInstanceView.ed.tscript"); - //exec("./gui/profiles.ed.tscript"); + exec("./scripts/materialEditor.ed." @ $TorqueScriptFileExtension); + exec("./scripts/materialEditorUndo.ed." @ $TorqueScriptFileExtension); + exec("./scripts/materialInstanceView.ed." @ $TorqueScriptFileExtension); + //exec("./gui/profiles.ed." @ $TorqueScriptFileExtension); MaterialEditorPreviewWindow.setVisible( false ); //matEd_cubemapEditor.setVisible( false ); @@ -91,7 +91,7 @@ function MaterialEditorPlugin::onWorldEditorStartup( %this ) 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.modelFormats = "DTS Files (*.dts)|*.dts"; MaterialEditorGui.lastTexturePath = ""; diff --git a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript index 91b3e3ef1..bcb2b2c29 100644 --- a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript @@ -475,7 +475,7 @@ function MaterialEditorGui::isMatEditorMaterial(%this, %material) { return ( %material.getFilename() $= "" || %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) @@ -521,13 +521,13 @@ function MaterialEditorGui::setMaterialDirty(%this) %k = %pos + 1; } %savePath = getSubStr( %shapePath , 0 , %k ); - %savePath = %savePath @ "materials.tscript"; + %savePath = %savePath @ "materials." @ $TorqueScriptFileExtension; matEd_PersistMan.setDirty(MaterialEditorGui.currentMaterial, %savePath); } else { - matEd_PersistMan.setDirty(MaterialEditorGui.currentMaterial, "art/materials.tscript"); + matEd_PersistMan.setDirty(MaterialEditorGui.currentMaterial, "art/materials." @ $TorqueScriptFileExtension); } } else @@ -1840,7 +1840,7 @@ function MaterialEditorGui::createNewCubemap( %this, %cubemap ) parentGroup = RootGroup; }; - matEd_cubemapEdPerMan.setDirty( %cubemap, "art/materials.tscript" ); + matEd_cubemapEdPerMan.setDirty( %cubemap, "art/materials." @ $TorqueScriptFileExtension ); matEd_cubemapEdPerMan.saveDirty(); 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 if( MaterialEditorGui.isMatEditorMaterial( %cubemap ) ) - matEd_cubemapEdPerMan.setDirty(%cubemap, "art/materials.tscript"); + matEd_cubemapEdPerMan.setDirty(%cubemap, "art/materials." @ $TorqueScriptFileExtension); else 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 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 - 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 (%fromMaterials)'s mapTo to "unmapped_mat". -------------------------------------------------------------------------------*/ @@ -2424,7 +2424,7 @@ function MaterialEditorGui::changeMaterial(%this, %fromMaterial, %toMaterial) %k = %count + 1; } %fileName = getSubStr( %sourcePath , 0 , %k ); - %fileName = %fileName @ "materials.tscript"; + %fileName = %fileName @ "materials." @ $TorqueScriptFileExtension; %action.toMaterialNewFname = %fileName; diff --git a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditorUndo.ed.tscript b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditorUndo.ed.tscript index c5ed0a046..4f08ed9e0 100644 --- a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditorUndo.ed.tscript +++ b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditorUndo.ed.tscript @@ -326,7 +326,7 @@ function ActionChangeMaterial::redo(%this) MaterialEditorGui.currentObject = %this.object; 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); } @@ -357,7 +357,7 @@ function ActionChangeMaterial::undo(%this) MaterialEditorGui.currentObject = %this.object; 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); } @@ -442,7 +442,7 @@ function ActionDeleteMaterial::redo(%this) } 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); } diff --git a/Templates/BaseGame/game/tools/meshRoadEditor/main.tscript b/Templates/BaseGame/game/tools/meshRoadEditor/main.tscript index edb060856..3f5df2c7e 100644 --- a/Templates/BaseGame/game/tools/meshRoadEditor/main.tscript +++ b/Templates/BaseGame/game/tools/meshRoadEditor/main.tscript @@ -24,10 +24,10 @@ function initializeMeshRoadEditor() { echo(" % - Initializing Mesh Road Editor"); - exec( "./meshRoadEditor.tscript" ); + exec( "./meshRoadEditor." @ $TorqueScriptFileExtension ); exec( "./meshRoadEditorGui.gui" ); exec( "./meshRoadEditorToolbar.gui"); - exec( "./meshRoadEditorGui.tscript" ); + exec( "./meshRoadEditorGui." @ $TorqueScriptFileExtension ); MeshRoadEditorGui.setVisible( false ); MeshRoadEditorOptionsWindow.setVisible( false ); diff --git a/Templates/BaseGame/game/tools/missionAreaEditor/main.tscript b/Templates/BaseGame/game/tools/missionAreaEditor/main.tscript index e3fbefdaf..2fabe6d59 100644 --- a/Templates/BaseGame/game/tools/missionAreaEditor/main.tscript +++ b/Templates/BaseGame/game/tools/missionAreaEditor/main.tscript @@ -24,9 +24,9 @@ function initializeMissionAreaEditor() { echo(" % - Initializing Mission Area Editor"); - exec( "./missionAreaEditor.ed.tscript" ); + exec( "./missionAreaEditor.ed." @ $TorqueScriptFileExtension ); exec( "./missionAreaEditorGui.ed.gui" ); - exec( "./missionAreaEditorGui.ed.tscript" ); + exec( "./missionAreaEditorGui.ed." @ $TorqueScriptFileExtension ); // Add ourselves to EditorGui, where all the other tools reside MissionAreaEditorGui.setVisible( false ); diff --git a/Templates/BaseGame/game/tools/navEditor/main.tscript b/Templates/BaseGame/game/tools/navEditor/main.tscript index 3724a9f5e..03b0bb2b6 100644 --- a/Templates/BaseGame/game/tools/navEditor/main.tscript +++ b/Templates/BaseGame/game/tools/navEditor/main.tscript @@ -34,7 +34,7 @@ function initializeNavEditor() echo(" % - Initializing Navigation Editor"); // Execute all relevant scripts and GUIs. - exec("./navEditor.tscript"); + exec("./navEditor." @ $TorqueScriptFileExtension); exec("./NavEditorGui.gui"); exec("./NavEditorToolbar.gui"); exec("./NavEditorConsoleDlg.gui"); diff --git a/Templates/BaseGame/game/tools/particleEditor/main.tscript b/Templates/BaseGame/game/tools/particleEditor/main.tscript index 8c59d4dbc..d00645623 100644 --- a/Templates/BaseGame/game/tools/particleEditor/main.tscript +++ b/Templates/BaseGame/game/tools/particleEditor/main.tscript @@ -30,10 +30,10 @@ function initializeParticleEditor() echo( " % - Initializing Particle Editor" ); exec( "./ParticleEditor.ed.gui" ); - exec( "./particleEditor.ed.tscript" ); - exec( "./particleEditorUndo.ed.tscript" ); - exec( "./particleEmitterEditor.ed.tscript" ); - exec( "./particleParticleEditor.ed.tscript" ); + exec( "./particleEditor.ed." @ $TorqueScriptFileExtension ); + exec( "./particleEditorUndo.ed." @ $TorqueScriptFileExtension ); + exec( "./particleEmitterEditor.ed." @ $TorqueScriptFileExtension ); + exec( "./particleParticleEditor.ed." @ $TorqueScriptFileExtension ); PE_Window.setVisible( false ); EditorGui.add( PE_Window ); diff --git a/Templates/BaseGame/game/tools/particleEditor/particleEditorUndo.ed.tscript b/Templates/BaseGame/game/tools/particleEditor/particleEditorUndo.ed.tscript index 8cc87de1c..80e8588f1 100644 --- a/Templates/BaseGame/game/tools/particleEditor/particleEditorUndo.ed.tscript +++ b/Templates/BaseGame/game/tools/particleEditor/particleEditorUndo.ed.tscript @@ -190,7 +190,7 @@ function ActionDeleteEmitter::redo( %this ) // Remove from file. if( %emitter.getFileName() !$= "" - && %emitter.getFilename() !$= "tools/particleEditor/particleEmitterEditor.ed.tscript" ) + && %emitter.getFilename() !$= "tools/particleEditor/particleEmitterEditor.ed." @ $TorqueScriptFileExtension ) PE_EmitterSaver.removeObjectFromFile( %emitter ); // Select DefaultEmitter or first in list. @@ -449,7 +449,7 @@ function ActionDeleteParticle::redo( %this ) // Remove from file. if( %particle.getFileName() !$= "" - && %particle.getFilename() !$= "tools/particleEditor/particleParticleEditor.ed.tscript" ) + && %particle.getFilename() !$= "tools/particleEditor/particleParticleEditor.ed." @ $TorqueScriptFileExtension ) PE_ParticleSaver.removeObjectFromFile( %particleId ); // Remove from dropdown. diff --git a/Templates/BaseGame/game/tools/particleEditor/particleEmitterEditor.ed.tscript b/Templates/BaseGame/game/tools/particleEditor/particleEmitterEditor.ed.tscript index e2be044b3..f3825cfe2 100644 --- a/Templates/BaseGame/game/tools/particleEditor/particleEmitterEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/particleEditor/particleEmitterEditor.ed.tscript @@ -21,7 +21,7 @@ //----------------------------------------------------------------------------- -$PE_EMITTEREDITOR_DEFAULT_FILENAME = "art/particles/managedParticleEmitterData.tscript"; +$PE_EMITTEREDITOR_DEFAULT_FILENAME = "art/particles/managedParticleEmitterData." @ $TorqueScriptFileExtension; //============================================================================================= @@ -500,7 +500,7 @@ function PE_EmitterEditor::setEmitterDirty( %this ) %emitter = PE_EmitterEditor.currEmitter; - if( %emitter.getFilename() $= "" || %emitter.getFilename() $= "tools/particleEditor/particleEmitterEditor.ed.tscript" ) + if( %emitter.getFilename() $= "" || %emitter.getFilename() $= "tools/particleEditor/particleEmitterEditor.ed." @ $TorqueScriptFileExtension ) PE_EmitterSaver.setDirty( %emitter, $PE_EMITTEREDITOR_DEFAULT_FILENAME ); else PE_EmitterSaver.setDirty( %emitter ); diff --git a/Templates/BaseGame/game/tools/particleEditor/particleParticleEditor.ed.tscript b/Templates/BaseGame/game/tools/particleEditor/particleParticleEditor.ed.tscript index 9cdfc4e88..2dd764ce7 100644 --- a/Templates/BaseGame/game/tools/particleEditor/particleParticleEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/particleEditor/particleParticleEditor.ed.tscript @@ -21,7 +21,7 @@ //----------------------------------------------------------------------------- -$PE_PARTICLEEDITOR_DEFAULT_FILENAME = "art/particles/managedParticleData.tscript"; +$PE_PARTICLEEDITOR_DEFAULT_FILENAME = "art/particles/managedParticleData." @ $TorqueScriptFileExtension; //============================================================================================= @@ -407,7 +407,7 @@ function PE_ParticleEditor::setParticleDirty( %this ) %particle = PE_ParticleEditor.currParticle; - if( %particle.getFilename() $= "" || %particle.getFilename() $= "tools/particleEditor/particleParticleEditor.ed.tscript" ) + if( %particle.getFilename() $= "" || %particle.getFilename() $= "tools/particleEditor/particleParticleEditor.ed." @ $TorqueScriptFileExtension ) PE_ParticleSaver.setDirty( %particle, $PE_PARTICLEEDITOR_DEFAULT_FILENAME ); else PE_ParticleSaver.setDirty( %particle ); diff --git a/Templates/BaseGame/game/tools/riverEditor/main.tscript b/Templates/BaseGame/game/tools/riverEditor/main.tscript index 48661259c..19070038f 100644 --- a/Templates/BaseGame/game/tools/riverEditor/main.tscript +++ b/Templates/BaseGame/game/tools/riverEditor/main.tscript @@ -24,10 +24,10 @@ function initializeRiverEditor() { echo(" % - Initializing River Editor"); - exec( "./riverEditor.tscript" ); + exec( "./riverEditor." @ $TorqueScriptFileExtension ); exec( "./RiverEditorGui.gui" ); exec( "./RiverEditorToolbar.gui" ); - exec( "./riverEditorGui.tscript" ); + exec( "./riverEditorGui." @ $TorqueScriptFileExtension ); // Add ourselves to EditorGui, where all the other tools reside RiverEditorGui.setVisible( false ); diff --git a/Templates/BaseGame/game/tools/roadEditor/main.tscript b/Templates/BaseGame/game/tools/roadEditor/main.tscript index 38718f18a..f54976c62 100644 --- a/Templates/BaseGame/game/tools/roadEditor/main.tscript +++ b/Templates/BaseGame/game/tools/roadEditor/main.tscript @@ -24,10 +24,10 @@ function initializeRoadEditor() { echo( " - Initializing Road and Path Editor" ); - exec( "./roadEditor.tscript" ); + exec( "./roadEditor." @ $TorqueScriptFileExtension ); exec( "./RoadEditorGui.gui" ); exec( "./RoadEditorToolbar.gui"); - exec( "./roadEditorGui.tscript" ); + exec( "./roadEditorGui." @ $TorqueScriptFileExtension ); // Add ourselves to EditorGui, where all the other tools reside RoadEditorGui.setVisible( false ); diff --git a/Templates/BaseGame/game/tools/shapeEditor/main.tscript b/Templates/BaseGame/game/tools/shapeEditor/main.tscript index bdf2b85cb..02ba758a8 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/main.tscript +++ b/Templates/BaseGame/game/tools/shapeEditor/main.tscript @@ -28,7 +28,7 @@ function initializeShapeEditor() { echo(" % - Initializing Shape Editor"); - exec("./gui/Profiles.ed.tscript"); + exec("./gui/Profiles.ed." @ $TorqueScriptFileExtension); exec("./gui/shapeEdPreviewWindow.ed.gui"); exec("./gui/shapeEdAnimWindow.ed.gui"); @@ -37,9 +37,9 @@ function initializeShapeEditor() exec("./gui/shapeEdSelectWindow.ed.gui"); exec("./gui/shapeEdPropWindow.ed.gui"); - exec("./scripts/shapeEditor.ed.tscript"); - exec("./scripts/shapeEditorHints.ed.tscript"); - exec("./scripts/shapeEditorActions.ed.tscript"); + exec("./scripts/shapeEditor.ed." @ $TorqueScriptFileExtension); + exec("./scripts/shapeEditorHints.ed." @ $TorqueScriptFileExtension); + exec("./scripts/shapeEditorActions.ed." @ $TorqueScriptFileExtension); // Add windows to editor gui ShapeEdPreviewGui.setVisible(false); diff --git a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript index dbb989550..6959226c0 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript @@ -253,7 +253,7 @@ function ShapeEditor::createConstructor( %this, %path ) function ShapeEditor::saveConstructor( %this, %constructor ) { - %savepath = filePath( %constructor.baseShape ) @ "/" @ fileBase( %constructor.baseShape ) @ ".tscript"; + %savepath = filePath( %constructor.baseShape ) @ "/" @ fileBase( %constructor.baseShape ) @ "." @ $TorqueScriptFileExtension; new PersistenceManager( shapeEd_perMan ); shapeEd_perMan.setDirty( %constructor, %savepath ); shapeEd_perMan.saveDirtyObject( %constructor ); @@ -3041,7 +3041,7 @@ function ShapeEditor::addLODFromFile( %this, %dest, %filename, %size, %allowUnma { // Get (or create) a TSShapeConstructor object for the source shape. Need to // exec the script manually as the resource may not have been loaded yet - %csPath = filePath( %filename ) @ "/" @ fileBase( %filename ) @ ".tscript"; + %csPath = filePath( %filename ) @ "/" @ fileBase( %filename ) @ "." @ $TorqueScriptFileExtension; if ( isFile( %csPath ) ) exec( %csPath ); diff --git a/Templates/BaseGame/game/tools/worldEditor/main.tscript b/Templates/BaseGame/game/tools/worldEditor/main.tscript index 005c8e42f..fed24607e 100644 --- a/Templates/BaseGame/game/tools/worldEditor/main.tscript +++ b/Templates/BaseGame/game/tools/worldEditor/main.tscript @@ -25,8 +25,8 @@ function initializeWorldEditor() echo(" % - Initializing World Editor"); // Load GUI - exec("./gui/profiles.ed.tscript"); - exec("./scripts/cursors.ed.tscript"); + exec("./gui/profiles.ed." @ $TorqueScriptFileExtension); + exec("./scripts/cursors.ed." @ $TorqueScriptFileExtension); exec("./gui/guiCreateNewTerrainGui.gui" ); exec("./gui/GenericPromptDialog.ed.gui" ); @@ -51,32 +51,32 @@ function initializeWorldEditor() exec("tools/gui/postFxEditor.gui" ); // Load Scripts. - exec("./scripts/menus.ed.tscript"); - exec("./scripts/menuHandlers.ed.tscript"); - exec("./scripts/editor.ed.tscript"); - exec("./scripts/editorInputCommands.tscript"); - exec("./scripts/editor.keybinds.tscript"); - exec("./scripts/undoManager.ed.tscript"); - exec("./scripts/lighting.ed.tscript"); - exec("./scripts/EditorGui.ed.tscript"); - exec("./scripts/editorPrefs.ed.tscript"); - exec("./scripts/editorRender.ed.tscript"); - exec("./scripts/editorPlugin.ed.tscript"); - exec("./scripts/EditorChooseLevelGui.ed.tscript"); - exec("./scripts/cameraBookmarks.ed.tscript"); - exec("./scripts/ManageSFXParametersWindow.ed.tscript"); - exec("./scripts/AddFMODProjectDlg.ed.tscript"); - exec("./scripts/SelectObjectsWindow.ed.tscript"); - exec("./scripts/cameraCommands.ed.tscript"); - exec("./scripts/probeBake.ed.tscript"); - exec("./scripts/visibility/visibilityLayer.ed.tscript"); - exec("./scripts/visibility/lightViz.tscript"); - exec("./scripts/visibility/shadowViz.tscript"); - exec("./scripts/visibility/probeViz.tscript"); - exec("./scripts/visibility/miscViz.tscript"); + exec("./scripts/menus.ed." @ $TorqueScriptFileExtension); + exec("./scripts/menuHandlers.ed." @ $TorqueScriptFileExtension); + exec("./scripts/editor.ed." @ $TorqueScriptFileExtension); + exec("./scripts/editorInputCommands." @ $TorqueScriptFileExtension); + exec("./scripts/editor.keybinds." @ $TorqueScriptFileExtension); + exec("./scripts/undoManager.ed." @ $TorqueScriptFileExtension); + exec("./scripts/lighting.ed." @ $TorqueScriptFileExtension); + exec("./scripts/EditorGui.ed." @ $TorqueScriptFileExtension); + exec("./scripts/editorPrefs.ed." @ $TorqueScriptFileExtension); + exec("./scripts/editorRender.ed." @ $TorqueScriptFileExtension); + exec("./scripts/editorPlugin.ed." @ $TorqueScriptFileExtension); + exec("./scripts/EditorChooseLevelGui.ed." @ $TorqueScriptFileExtension); + exec("./scripts/cameraBookmarks.ed." @ $TorqueScriptFileExtension); + exec("./scripts/ManageSFXParametersWindow.ed." @ $TorqueScriptFileExtension); + exec("./scripts/AddFMODProjectDlg.ed." @ $TorqueScriptFileExtension); + exec("./scripts/SelectObjectsWindow.ed." @ $TorqueScriptFileExtension); + exec("./scripts/cameraCommands.ed." @ $TorqueScriptFileExtension); + exec("./scripts/probeBake.ed." @ $TorqueScriptFileExtension); + exec("./scripts/visibility/visibilityLayer.ed." @ $TorqueScriptFileExtension); + exec("./scripts/visibility/lightViz." @ $TorqueScriptFileExtension); + exec("./scripts/visibility/shadowViz." @ $TorqueScriptFileExtension); + exec("./scripts/visibility/probeViz." @ $TorqueScriptFileExtension); + exec("./scripts/visibility/miscViz." @ $TorqueScriptFileExtension); - exec("tools/gui/postFxEditor.tscript" ); - exec("tools/gui/renderTargetVisualizer.ed.tscript"); + exec("tools/gui/postFxEditor." @ $TorqueScriptFileExtension ); + exec("tools/gui/renderTargetVisualizer.ed." @ $TorqueScriptFileExtension); // Load Custom Editors loadDirectory(expandFilename("./scripts/editors")); diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/AddFMODProjectDlg.ed.tscript b/Templates/BaseGame/game/tools/worldEditor/scripts/AddFMODProjectDlg.ed.tscript index bfd0a6172..1a2494ae1 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/AddFMODProjectDlg.ed.tscript +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/AddFMODProjectDlg.ed.tscript @@ -140,7 +140,7 @@ function AddFMODProjectDlg::onOK( %this ) // If an event script exists from a previous instantiation, // delete it first. - %eventFileName = %fileName @ ".tscript"; + %eventFileName = %fileName @ "." @ $TorqueScriptFileExtension; if( isFile( %eventFileName ) ) fileDelete( %eventFileName ); @@ -164,7 +164,7 @@ function AddFMODProjectDlg::onOK( %this ) { // Save the object. - %objName.setFileName( "scripts/client/audioData.tscript" ); + %objName.setFileName( "scripts/client/audioData." @ $TorqueScriptFileExtension ); %this.persistenceMgr.setDirty( %objName ); %this.persistenceMgr.saveDirty(); } diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/ManageSFXParametersWindow.ed.tscript b/Templates/BaseGame/game/tools/worldEditor/scripts/ManageSFXParametersWindow.ed.tscript index 6a0b48fdf..f788c7edb 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/ManageSFXParametersWindow.ed.tscript +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/ManageSFXParametersWindow.ed.tscript @@ -26,7 +26,7 @@ //============================================================================= /// File to save newly created SFXParameters in by default. -$SFX_PARAMETER_FILE = "scripts/client/audioData.tscript"; +$SFX_PARAMETER_FILE = "scripts/client/audioData." @ $TorqueScriptFileExtension; $SFX_PARAMETER_CHANNELS[ 0 ] = "Volume"; $SFX_PARAMETER_CHANNELS[ 1 ] = "Pitch"; diff --git a/Templates/Modules/Verve/Verve.module b/Templates/Modules/Verve/Verve.module index c2c8f9247..0806f0543 100644 --- a/Templates/Modules/Verve/Verve.module +++ b/Templates/Modules/Verve/Verve.module @@ -2,7 +2,7 @@ ModuleId="Verve" VersionId="1" Description="Module that implements Verve." - ScriptFile="Verve.tscript" + ScriptFile="Verve" CreateFunction="create" DestroyFunction="destroy" Group="Game"> diff --git a/Templates/Modules/Verve/Verve.tscript b/Templates/Modules/Verve/Verve.tscript index c9695ca89..8af7b656f 100644 --- a/Templates/Modules/Verve/Verve.tscript +++ b/Templates/Modules/Verve/Verve.tscript @@ -2,14 +2,14 @@ function Verve::create( %this ) { exec("data/Verve/gui/verveCinematic.gui"); - exec("data/Verve/scripts/server/verveCinematicController.tscript"); - exec("data/Verve/scripts/server/verveCinematicTrigger.tscript"); - exec("data/Verve/scripts/server/vervePathTutorialData.tscript"); + exec("data/Verve/scripts/server/verveCinematicController." @ $TorqueScriptFileExtension); + exec("data/Verve/scripts/server/verveCinematicTrigger." @ $TorqueScriptFileExtension); + exec("data/Verve/scripts/server/vervePathTutorialData." @ $TorqueScriptFileExtension); if(isObject(DatablockFilesList)) { - DatablockFilesList.add( "data/Verve/scripts/datablocks/verve/VerveActorData.tscript" ); - DatablockFilesList.add( "data/Verve/scripts/datablocks/verve/VervePathTutorialData.tscript" ); + DatablockFilesList.add( "data/Verve/scripts/datablocks/verve/VerveActorData." @ $TorqueScriptFileExtension ); + DatablockFilesList.add( "data/Verve/scripts/datablocks/verve/VervePathTutorialData." @ $TorqueScriptFileExtension ); } } diff --git a/Templates/Modules/Verve/scripts/datablocks/datablockExec.tscript b/Templates/Modules/Verve/scripts/datablocks/datablockExec.tscript index 1115993a7..9061bcb72 100644 --- a/Templates/Modules/Verve/scripts/datablocks/datablockExec.tscript +++ b/Templates/Modules/Verve/scripts/datablocks/datablockExec.tscript @@ -24,45 +24,45 @@ // a server is constructed. // Do the sounds first -- later scripts/datablocks may need them -exec("./audioProfiles.tscript"); +exec("./audioProfiles." @ $TorqueScriptFileExtension); // LightFlareData and LightAnimData(s) -exec("./lights.tscript"); +exec("./lights." @ $TorqueScriptFileExtension); // Do the various effects next -- later scripts/datablocks may need them -exec("./particles.tscript"); -exec("./environment.tscript"); +exec("./particles." @ $TorqueScriptFileExtension); +exec("./environment." @ $TorqueScriptFileExtension); -exec("./triggers.tscript"); +exec("./triggers." @ $TorqueScriptFileExtension); // Add a rigid example -exec("./rigidShape.tscript"); +exec("./rigidShape." @ $TorqueScriptFileExtension); -exec("./health.tscript"); +exec("./health." @ $TorqueScriptFileExtension); // Load our supporting weapon datablocks, effects and such. They must be // loaded before any weapon that uses them. -exec("./weapon.tscript"); -exec("./weapons/grenadefx.tscript"); -exec("./weapons/rocketfx.tscript"); +exec("./weapon." @ $TorqueScriptFileExtension); +exec("./weapons/grenadefx." @ $TorqueScriptFileExtension); +exec("./weapons/rocketfx." @ $TorqueScriptFileExtension); // Load the weapon datablocks -exec("./weapons/Lurker.tscript"); -exec("./weapons/Ryder.tscript"); -exec("./weapons/ProxMine.tscript"); -exec("./weapons/Turret.tscript"); +exec("./weapons/Lurker." @ $TorqueScriptFileExtension); +exec("./weapons/Ryder." @ $TorqueScriptFileExtension); +exec("./weapons/ProxMine." @ $TorqueScriptFileExtension); +exec("./weapons/Turret." @ $TorqueScriptFileExtension); -exec("./teleporter.tscript"); +exec("./teleporter." @ $TorqueScriptFileExtension); // Load the default player datablocks -exec("./player.tscript"); +exec("./player." @ $TorqueScriptFileExtension); // Load our other player datablocks -exec("./aiPlayer.tscript"); +exec("./aiPlayer." @ $TorqueScriptFileExtension); // Load the vehicle datablocks -exec("./vehicles/cheetahCar.tscript"); +exec("./vehicles/cheetahCar." @ $TorqueScriptFileExtension); // Load Verve Data. -exec("./verve/VerveActorData.tscript"); -exec("./verve/VervePathTutorialData.tscript"); \ No newline at end of file +exec("./verve/VerveActorData." @ $TorqueScriptFileExtension); +exec("./verve/VervePathTutorialData." @ $TorqueScriptFileExtension); \ No newline at end of file diff --git a/Templates/Modules/inputTest/inputTest.module b/Templates/Modules/inputTest/inputTest.module index 217624791..fb81c3ad1 100644 --- a/Templates/Modules/inputTest/inputTest.module +++ b/Templates/Modules/inputTest/inputTest.module @@ -2,7 +2,7 @@ ModuleId="inputTest" VersionId="1" Description="Input Monitor Module." - ScriptFile="inputTest.tscript" + ScriptFile="inputTest" CreateFunction="create" DestroyFunction="destroy" Group="Game" diff --git a/Templates/Modules/inputTest/inputTest.tscript b/Templates/Modules/inputTest/inputTest.tscript index 4534ca4d6..7dad50618 100644 --- a/Templates/Modules/inputTest/inputTest.tscript +++ b/Templates/Modules/inputTest/inputTest.tscript @@ -13,12 +13,12 @@ function inputTest::destroy( %this ) function inputTest::initClient( %this ) { - %this.queueExec("/scripts/customProfiles.tscript"); - %this.queueExec("/scripts/inputMonitor.tscript"); + %this.queueExec("/scripts/customProfiles." @ $TorqueScriptFileExtension); + %this.queueExec("/scripts/inputMonitor." @ $TorqueScriptFileExtension); %this.queueExec("/scripts/gui/inputMonitor.gui"); - %this.queueExec("/scripts/joystickSettings.tscript"); + %this.queueExec("/scripts/joystickSettings." @ $TorqueScriptFileExtension); %this.queueExec("/scripts/gui/joystickSettings.gui"); - %this.queueExec("/scripts/menuButtons.tscript"); + %this.queueExec("/scripts/menuButtons." @ $TorqueScriptFileExtension); } function onSDLDeviceConnected(%sdlIndex, %deviceName, %deviceType) diff --git a/Templates/Modules/vr/VR.module b/Templates/Modules/vr/VR.module index 050a6112d..04e9cde22 100644 --- a/Templates/Modules/vr/VR.module +++ b/Templates/Modules/vr/VR.module @@ -2,7 +2,7 @@ ModuleId="VR" VersionId="1" Description="Module that implements the core engine-level setup for the game." - ScriptFile="VR.tscript" + ScriptFile="VR" CreateFunction="onCreate" DestroyFunction="onDestroy" Group="Game"> diff --git a/Templates/Modules/vr/VR.tscript b/Templates/Modules/vr/VR.tscript index c03597032..2a7522dfc 100644 --- a/Templates/Modules/vr/VR.tscript +++ b/Templates/Modules/vr/VR.tscript @@ -1,7 +1,7 @@ function VR::onCreate(%this) { - exec("./scripts/oculusVR.tscript"); + exec("./scripts/oculusVR." @ $TorqueScriptFileExtension); } function VR::onDestroy(%this) diff --git a/Tools/CMake/torque3d.cmake b/Tools/CMake/torque3d.cmake index 32db3160b..2711bd8a4 100644 --- a/Tools/CMake/torque3d.cmake +++ b/Tools/CMake/torque3d.cmake @@ -647,8 +647,8 @@ endif() if(NOT EXISTS "${projectOutDir}/${PROJECT_NAME}.torsion") CONFIGURE_FILE("${cmakeDir}/template.torsion.in" "${projectOutDir}/${PROJECT_NAME}.torsion") endif() -if(EXISTS "${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/game/main.cs.in") - CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/game/main.cs.in" "${projectOutDir}/main.cs") +if(EXISTS "${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/game/main.${TORQUE_SCRIPT_EXTENSION}.in") + CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/game/main.${TORQUE_SCRIPT_EXTENSION}.in" "${projectOutDir}/main.${TORQUE_SCRIPT_EXTENSION}") endif() if(WIN32) if(NOT EXISTS "${projectSrcDir}/torque.rc")