Explorar o código

Improve handling of non-default script filenames

Lukas Aldershaab %!s(int64=4) %!d(string=hai) anos
pai
achega
9ccaa6d3ea
Modificáronse 100 ficheiros con 457 adicións e 451 borrados
  1. 1 0
      Engine/source/app/mainLoop.cpp
  2. 7 0
      Engine/source/console/console.cpp
  3. 1 1
      Templates/BaseGame/game/core/Core.module
  4. 6 6
      Templates/BaseGame/game/core/Core.tscript
  5. 1 1
      Templates/BaseGame/game/core/clientServer/Core_ClientServer.module
  6. 5 5
      Templates/BaseGame/game/core/clientServer/Core_ClientServer.tscript
  7. 7 7
      Templates/BaseGame/game/core/clientServer/scripts/client/client.tscript
  8. 13 13
      Templates/BaseGame/game/core/clientServer/scripts/server/server.tscript
  9. 1 1
      Templates/BaseGame/game/core/console/Core_Console.module
  10. 2 2
      Templates/BaseGame/game/core/console/Core_Console.tscript
  11. 1 1
      Templates/BaseGame/game/core/gameObjects/Core_GameObjects.module
  12. 1 1
      Templates/BaseGame/game/core/gameObjects/Core_GameObjects.tscript
  13. 1 1
      Templates/BaseGame/game/core/gui/Core_GUI.module
  14. 3 3
      Templates/BaseGame/game/core/gui/Core_GUI.tscript
  15. 1 1
      Templates/BaseGame/game/core/lighting/Core_Lighting.module
  16. 7 7
      Templates/BaseGame/game/core/lighting/Core_Lighting.tscript
  17. 2 2
      Templates/BaseGame/game/core/lighting/scripts/advancedLighting_Init.tscript
  18. 1 1
      Templates/BaseGame/game/core/lighting/scripts/basicLighting_Init.tscript
  19. 2 2
      Templates/BaseGame/game/core/lighting/scripts/lighting.tscript
  20. 1 1
      Templates/BaseGame/game/core/postFX/Core_PostFX.module
  21. 3 3
      Templates/BaseGame/game/core/postFX/Core_PostFX.tscript
  22. 1 1
      Templates/BaseGame/game/core/postFX/scripts/DepthOfField/DepthOfFieldPostFX.tscript
  23. 2 2
      Templates/BaseGame/game/core/postFX/scripts/postFx.tscript
  24. 3 3
      Templates/BaseGame/game/core/postFX/scripts/postFxManager.tscript
  25. 1 1
      Templates/BaseGame/game/core/rendering/Core_Rendering.module
  26. 0 2
      Templates/BaseGame/game/core/rendering/Core_Rendering.tscript
  27. 1 1
      Templates/BaseGame/game/core/sfx/Core_SFX.module
  28. 6 6
      Templates/BaseGame/game/core/sfx/Core_SFX.tscript
  29. 1 1
      Templates/BaseGame/game/core/utility/Core_Utility.module
  30. 8 8
      Templates/BaseGame/game/core/utility/Core_Utility.tscript
  31. 10 10
      Templates/BaseGame/game/core/utility/scripts/helperFunctions.tscript
  32. 4 4
      Templates/BaseGame/game/core/utility/scripts/module.tscript
  33. 1 1
      Templates/BaseGame/game/core/utility/scripts/parseArgs.tscript
  34. 8 8
      Templates/BaseGame/game/core/utility/scripts/persistanceManagement.tscript
  35. 1 1
      Templates/BaseGame/game/data/ExampleModule/ExampleModule.module
  36. 6 6
      Templates/BaseGame/game/data/ExampleModule/ExampleModule.tscript
  37. 1 1
      Templates/BaseGame/game/data/gameUI/gameUI.tscript
  38. 1 1
      Templates/BaseGame/game/data/ui/UI.module
  39. 16 16
      Templates/BaseGame/game/data/ui/UI.tscript
  40. 4 4
      Templates/BaseGame/game/data/ui/guis/optionsMenu.tscript
  41. 1 1
      Templates/BaseGame/game/tools/MainEditor/MainEditor.module
  42. 3 3
      Templates/BaseGame/game/tools/MainEditor/MainEditor.tscript
  43. 1 1
      Templates/BaseGame/game/tools/Tools.module
  44. 3 3
      Templates/BaseGame/game/tools/VPathEditor/main.tscript
  45. 2 2
      Templates/BaseGame/game/tools/VerveEditor/Scripts/Controller/main.tscript
  46. 17 17
      Templates/BaseGame/game/tools/VerveEditor/Scripts/Events/main.tscript
  47. 7 7
      Templates/BaseGame/game/tools/VerveEditor/Scripts/Groups/main.tscript
  48. 15 15
      Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/Fields/main.tscript
  49. 10 10
      Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/main.tscript
  50. 15 15
      Templates/BaseGame/game/tools/VerveEditor/Scripts/Tracks/main.tscript
  51. 2 2
      Templates/BaseGame/game/tools/VerveEditor/Torque/main.tscript
  52. 22 22
      Templates/BaseGame/game/tools/VerveEditor/main.tscript
  53. 35 35
      Templates/BaseGame/game/tools/assetBrowser/main.tscript
  54. 3 3
      Templates/BaseGame/game/tools/assetBrowser/scripts/addModuleWindow.tscript
  55. 2 2
      Templates/BaseGame/game/tools/assetBrowser/scripts/addPackageWindow.tscript
  56. 7 7
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.tscript
  57. 3 3
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/component.tscript
  58. 2 2
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gameObject.tscript
  59. 3 3
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.tscript
  60. 1 1
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/level.tscript
  61. 2 2
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.tscript
  62. 3 3
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/postFX.tscript
  63. 5 5
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/script.tscript
  64. 3 3
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.tscript
  65. 1 1
      Templates/BaseGame/game/tools/assetBrowser/scripts/editModule.tscript
  66. 2 2
      Templates/BaseGame/game/tools/assetBrowser/scripts/gameObjectCreator.tscript
  67. 3 3
      Templates/BaseGame/game/tools/assetBrowser/scripts/looseFileAudit.tscript
  68. 1 1
      Templates/BaseGame/game/tools/assetBrowser/scripts/popupMenus.tscript
  69. 6 6
      Templates/BaseGame/game/tools/componentEditor/main.tscript
  70. 3 3
      Templates/BaseGame/game/tools/convexEditor/main.tscript
  71. 2 2
      Templates/BaseGame/game/tools/datablockEditor/datablockEditor.tscript
  72. 2 2
      Templates/BaseGame/game/tools/datablockEditor/main.tscript
  73. 1 1
      Templates/BaseGame/game/tools/debugger/main.tscript
  74. 7 7
      Templates/BaseGame/game/tools/decalEditor/main.tscript
  75. 19 19
      Templates/BaseGame/game/tools/editorClasses/main.tscript
  76. 3 3
      Templates/BaseGame/game/tools/editorClasses/scripts/RSSNews/RSSFeedScript.ed.tscript
  77. 4 4
      Templates/BaseGame/game/tools/editorClasses/scripts/expandos.ed.tscript
  78. 1 1
      Templates/BaseGame/game/tools/editorClasses/scripts/fileLoader.ed.tscript
  79. 3 3
      Templates/BaseGame/game/tools/editorClasses/scripts/guiFormLayoutManager.ed.tscript
  80. 2 2
      Templates/BaseGame/game/tools/editorClasses/scripts/projects/projectInternalInterface.ed.tscript
  81. 3 3
      Templates/BaseGame/game/tools/forestEditor/forestEditorGui.tscript
  82. 9 9
      Templates/BaseGame/game/tools/forestEditor/main.tscript
  83. 3 3
      Templates/BaseGame/game/tools/gui/assimpImport.ed.gui
  84. 1 1
      Templates/BaseGame/game/tools/gui/assimpImport.ed.tscript
  85. 3 3
      Templates/BaseGame/game/tools/gui/colladaImport.ed.gui
  86. 1 1
      Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.tscript
  87. 12 12
      Templates/BaseGame/game/tools/gui/guiDialogs.ed.tscript
  88. 2 2
      Templates/BaseGame/game/tools/gui/guiObjectInspector.ed.tscript
  89. 2 2
      Templates/BaseGame/game/tools/gui/materialSelector.ed.gui
  90. 1 1
      Templates/BaseGame/game/tools/gui/profiles.ed.tscript
  91. 15 15
      Templates/BaseGame/game/tools/guiEditor/main.tscript
  92. 2 2
      Templates/BaseGame/game/tools/guiEditor/scripts/guiEditorProfiles.ed.tscript
  93. 10 10
      Templates/BaseGame/game/tools/main.tscript
  94. 5 5
      Templates/BaseGame/game/tools/materialEditor/main.tscript
  95. 7 7
      Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript
  96. 3 3
      Templates/BaseGame/game/tools/materialEditor/scripts/materialEditorUndo.ed.tscript
  97. 2 2
      Templates/BaseGame/game/tools/meshRoadEditor/main.tscript
  98. 2 2
      Templates/BaseGame/game/tools/missionAreaEditor/main.tscript
  99. 1 1
      Templates/BaseGame/game/tools/navEditor/main.tscript
  100. 4 4
      Templates/BaseGame/game/tools/particleEditor/main.tscript

+ 1 - 0
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;
 

+ 7 - 0
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--;

+ 1 - 1
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"/>

+ 6 - 6
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.

+ 1 - 1
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">

+ 5 - 5
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);
 }
 
 //-----------------------------------------------------------------------------

+ 7 - 7
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");
 

+ 13 - 13
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.

+ 1 - 1
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"

+ 2 - 2
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");
 }

+ 1 - 1
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">

+ 1 - 1
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)

+ 1 - 1
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"

+ 3 - 3
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)

+ 1 - 1
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">

+ 7 - 7
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);
    
 }
 

+ 2 - 2
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()
 {

+ 1 - 1
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 )
 {

+ 2 - 2
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 );
    }
 

+ 1 - 1
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"

+ 3 - 3
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)

+ 1 - 1
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();

+ 2 - 2
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 );
       }
       

+ 3 - 3
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 = "";
 

+ 1 - 1
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">

+ 0 - 2
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)

+ 1 - 1
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">

+ 6 - 6
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);
 
 }
 

+ 1 - 1
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">

+ 8 - 8
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)

+ 10 - 10
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 <logmode>         Logging behavior; see main.tscript comments for details\n"@
+      "  -log <logmode>         Logging behavior; see main." @ $TorqueScriptFileExtension @ " comments for details\n"@
       "  -game <game_name>      Reset list of mods to only contain <game_name>\n"@
       "  <game_name>            Works like the -game argument\n"@
       "  -dir <dir_name>        Add <dir_name> to list of directories\n"@
@@ -518,8 +518,8 @@ function loadDir(%dir)
 {
    pushback($userDirs, %dir, ";");
 
-   if (isScriptFile(%dir @ "/main.tscript"))
-   exec(%dir @ "/main.tscript");
+   if (isScriptFile(%dir @ "/main." @ $TorqueScriptFileExtension))
+   exec(%dir @ "/main." @ $TorqueScriptFileExtension);
 }
 
 function loadDirs(%dirPath)
@@ -528,7 +528,7 @@ function loadDirs(%dirPath)
    if (%dirPath !$= "")
       loadDirs(%dirPath);
 
-   if(exec(%token @ "/main.tscript") != true)
+   if(exec(%token @ "/main." @ $TorqueScriptFileExtension) != true)
    {
       error("Error: Unable to find specified directory: " @ %token );
       $dirCount--;

+ 4 - 4
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 );
       }

+ 1 - 1
Templates/BaseGame/game/core/utility/scripts/parseArgs.tscript

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

+ 8 - 8
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

+ 1 - 1
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">
     <DeclaredAssets

+ 6 - 6
Templates/BaseGame/game/data/ExampleModule/ExampleModule.tscript

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

+ 1 - 1
Templates/BaseGame/game/data/gameUI/gameUI.tscript

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

+ 1 - 1
Templates/BaseGame/game/data/ui/UI.module

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

+ 16 - 16
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){}

+ 4 - 4
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()

+ 1 - 1
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">

+ 3 - 3
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;

+ 1 - 1
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">

+ 3 - 3
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()

+ 2 - 2
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.

+ 17 - 17
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();

+ 7 - 7
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.

+ 15 - 15
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();

+ 10 - 10
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();

+ 15 - 15
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.

+ 2 - 2
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();

+ 22 - 22
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/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/Inspector/main.tscript" );
-    
-    exec( "./Scripts/Controller/main.tscript" );
-    exec( "./Scripts/Groups/main.tscript" );
-    exec( "./Scripts/Tracks/main.tscript" );
-    exec( "./Scripts/Events/main.tscript" );
-    
-    exec( "./Torque/main.tscript" );
+    exec( "./Scripts/Plugin." @ $TorqueScriptFileExtension );
+    exec( "./Scripts/Utility." @ $TorqueScriptFileExtension );
+    
+    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." @ $TorqueScriptFileExtension );
+    
+    exec( "./Scripts/Controller/main." @ $TorqueScriptFileExtension );
+    exec( "./Scripts/Groups/main." @ $TorqueScriptFileExtension );
+    exec( "./Scripts/Tracks/main." @ $TorqueScriptFileExtension );
+    exec( "./Scripts/Events/main." @ $TorqueScriptFileExtension );
+    
+    exec( "./Torque/main." @ $TorqueScriptFileExtension );
     
     // Register Events.
     VerveEditor::RegisterEvent( "VGroupObjectUpdate" );

+ 35 - 35
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 )
    {

+ 3 - 3
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))
    {

+ 2 - 2
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";

+ 7 - 7
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";

+ 3 - 3
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))
    {

+ 2 - 2
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;
    

+ 3 - 3
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))
    {

+ 1 - 1
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;

+ 2 - 2
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;
    };

+ 3 - 3
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))
    {

+ 5 - 5
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;

+ 3 - 3
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))
    {

+ 1 - 1
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));

+ 2 - 2
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()

+ 3 - 3
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();

+ 1 - 1
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.\");";

+ 6 - 6
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");
+exec("./interface/materialFieldType." @ $TorqueScriptFileExtension);
+exec("./interface/typeMaskFieldType." @ $TorqueScriptFileExtension);
+exec("./interface/stateMachineField." @ $TorqueScriptFileExtension);

+ 3 - 3
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 );  

+ 2 - 2
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 );
 }
 
 //---------------------------------------------------------------------------------------------

+ 2 - 2
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");

+ 1 - 1
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");

+ 7 - 7
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 )

+ 19 - 19
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") );

+ 3 - 3
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 )

+ 4 - 4
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");

+ 1 - 1
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"; 
 

+ 3 - 3
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;

+ 2 - 2
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();

+ 3 - 3
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 );

+ 9 - 9
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 )

+ 3 - 3
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);

+ 1 - 1
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);
 

+ 3 - 3
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);
 

+ 1 - 1
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();

+ 12 - 12
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);

+ 2 - 2
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

+ 2 - 2
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();

+ 1 - 1
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");

+ 15 - 15
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()

+ 2 - 2
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 );
 }
 
 //---------------------------------------------------------------------------------------------

+ 10 - 10
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 );
    }
 }

+ 5 - 5
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 = "";   

+ 7 - 7
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;
       

+ 3 - 3
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);
    }

+ 2 - 2
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 );  

+ 2 - 2
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 );  

+ 1 - 1
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");

+ 4 - 4
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 );

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio