mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-26 15:49:30 +00:00
Parametrize script extension, default to 'tscript'
This commit is contained in:
parent
b8b62292bd
commit
099dd4f1f3
542 changed files with 774 additions and 783 deletions
|
|
@ -2,7 +2,7 @@
|
|||
ModuleId="CoreModule"
|
||||
VersionId="1"
|
||||
Description="Module that implements the core engine-level setup for the game."
|
||||
ScriptFile="Core.cs"
|
||||
ScriptFile="Core.tscript"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy"
|
||||
Group="Core"/>
|
||||
|
|
@ -27,10 +27,10 @@ function CoreModule::onCreate(%this)
|
|||
ModuleDatabase.LoadExplicit( "Core_PostFX" );
|
||||
ModuleDatabase.LoadExplicit( "Core_GameObjects" );
|
||||
|
||||
exec("data/defaults.cs");
|
||||
exec("data/defaults.tscript");
|
||||
%prefPath = getPrefpath();
|
||||
if ( isFile( %prefPath @ "/clientPrefs.cs" ) )
|
||||
exec( %prefPath @ "/clientPrefs.cs" );
|
||||
if ( isFile( %prefPath @ "/clientPrefs.tscript" ) )
|
||||
exec( %prefPath @ "/clientPrefs.tscript" );
|
||||
|
||||
// Seed the random number generator.
|
||||
setRandomSeed();
|
||||
|
|
@ -44,7 +44,7 @@ function CoreModule::onCreate(%this)
|
|||
createCanvas($appName);
|
||||
|
||||
//load canvas
|
||||
//exec("./console/main.cs");
|
||||
//exec("./console/main.tscript");
|
||||
|
||||
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.cs") && !$isDedicated)
|
||||
exec("tools/main.cs");
|
||||
if(isFile("tools/main.tscript") && !$isDedicated)
|
||||
exec("tools/main.tscript");
|
||||
}
|
||||
|
||||
//This is used to build the remap keybind sets for the different actionMaps.
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
ModuleId="Core_ClientServer"
|
||||
VersionId="1"
|
||||
Description="Default module for the game."
|
||||
ScriptFile="Core_ClientServer.cs"
|
||||
ScriptFile="Core_ClientServer.tscript"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy"
|
||||
Group="Core">
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@
|
|||
function Core_ClientServer::onCreate( %this )
|
||||
{
|
||||
echo("\n--------- Initializing Directory: scripts ---------");
|
||||
exec( "./scripts/client/client.cs" );
|
||||
exec( "./scripts/server/server.cs" );
|
||||
exec( "./scripts/client/client.tscript" );
|
||||
exec( "./scripts/server/server.tscript" );
|
||||
|
||||
$Game::MainScene = getScene(0);
|
||||
|
||||
|
|
@ -52,11 +52,11 @@ function Core_ClientServer::onDestroy( %this )
|
|||
|
||||
echo("Exporting client prefs");
|
||||
%prefPath = getPrefpath();
|
||||
export("$pref::*", %prefPath @ "/clientPrefs.cs", false);
|
||||
export("$pref::*", %prefPath @ "/clientPrefs.tscript", false);
|
||||
|
||||
echo("Exporting server prefs");
|
||||
export("$Pref::Server::*", %prefPath @ "/serverPrefs.cs", false);
|
||||
BanList::Export(%prefPath @ "/banlist.cs");
|
||||
export("$Pref::Server::*", %prefPath @ "/serverPrefs.tscript", false);
|
||||
BanList::Export(%prefPath @ "/banlist.tscript");
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -9,16 +9,16 @@ function initClient()
|
|||
$Client::GameTypeQuery = $appName;
|
||||
$Client::MissionTypeQuery = "Any";
|
||||
|
||||
exec( "./message.cs" );
|
||||
exec( "./connectionToServer.cs" );
|
||||
exec( "./levelDownload.cs" );
|
||||
exec( "./levelLoad.cs" );
|
||||
exec( "./message.tscript" );
|
||||
exec( "./connectionToServer.tscript" );
|
||||
exec( "./levelDownload.tscript" );
|
||||
exec( "./levelLoad.tscript" );
|
||||
|
||||
//load prefs
|
||||
exec( "data/defaults.cs" );
|
||||
exec( "data/defaults.tscript" );
|
||||
%prefPath = getPrefpath();
|
||||
if ( isFile( %prefPath @ "/clientPrefs.cs" ) )
|
||||
exec( %prefPath @ "/clientPrefs.cs" );
|
||||
if ( isFile( %prefPath @ "/clientPrefs.tscript" ) )
|
||||
exec( %prefPath @ "/clientPrefs.tscript" );
|
||||
|
||||
callOnModules("initClient");
|
||||
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
// Functions that process commands sent from the server.
|
||||
|
||||
// Game event descriptions, which may or may not include text messages, can be
|
||||
// sent using the message* functions in core/scripts/server/message.cs. Those
|
||||
// sent using the message* functions in core/scripts/server/message.tscript. Those
|
||||
// functions do commandToClient with the tag ServerMessage, which invokes the
|
||||
// function below.
|
||||
|
||||
|
|
@ -27,21 +27,21 @@ function initServer()
|
|||
//load prefs
|
||||
|
||||
//Force-load the defaults just so we don't have any mistakes
|
||||
exec( "./defaults.cs" );
|
||||
exec( "./defaults.tscript" );
|
||||
|
||||
//Then, if the user has saved preferences, we load those over-top the defaults
|
||||
%prefPath = getPrefpath();
|
||||
if ( isFile( %prefPath @ "/serverPrefs.cs" ) )
|
||||
exec( %prefPath @ "/serverPrefs.cs" );
|
||||
if ( isFile( %prefPath @ "/serverPrefs.tscript" ) )
|
||||
exec( %prefPath @ "/serverPrefs.tscript" );
|
||||
|
||||
exec( "./audio.cs" );
|
||||
exec( "./commands.cs" );
|
||||
exec( "./kickban.cs" );
|
||||
exec( "./message.cs" );
|
||||
exec( "./levelDownload.cs" );
|
||||
exec( "./levelLoad.cs" );
|
||||
exec( "./levelInfo.cs" );
|
||||
exec( "./connectionToClient.cs" );
|
||||
exec( "./audio.tscript" );
|
||||
exec( "./commands.tscript" );
|
||||
exec( "./kickban.tscript" );
|
||||
exec( "./message.tscript" );
|
||||
exec( "./levelDownload.tscript" );
|
||||
exec( "./levelLoad.tscript" );
|
||||
exec( "./levelInfo.tscript" );
|
||||
exec( "./connectionToClient.tscript" );
|
||||
|
||||
// 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.cs", false );
|
||||
export( "$Pref::Server::*", %prefPath@"/serverPrefs.tscript", false );
|
||||
|
||||
BanList::Export(%prefPath@"/banlist.cs");
|
||||
BanList::Export(%prefPath@"/banlist.tscript");
|
||||
|
||||
// Increase the server session number. This is used to make sure we're
|
||||
// working with the server session we think we are.
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
ModuleId="Core_Console"
|
||||
VersionId="1"
|
||||
Description="Module that implements the core engine-level setup for the game."
|
||||
ScriptFile="Core_Console.cs"
|
||||
ScriptFile="Core_Console.tscript"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy"
|
||||
Group="Core"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
function Core_Console::onCreate(%this)
|
||||
{
|
||||
exec("./scripts/profiles.cs");
|
||||
exec("./scripts/console.cs");
|
||||
exec("./scripts/profiles.tscript");
|
||||
exec("./scripts/console.tscript");
|
||||
|
||||
exec("./guis/console.gui");
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
ModuleId="Core_GameObjects"
|
||||
VersionId="1"
|
||||
Description="Module that implements the core engine-level setup for the game."
|
||||
ScriptFile="Core_GameObjects.cs"
|
||||
ScriptFile="Core_GameObjects.tscript"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy"
|
||||
Group="Core">
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ function Core_GameObjects::initServer( %this )
|
|||
|
||||
function Core_GameObjects::onCreateGameServer(%this)
|
||||
{
|
||||
%this.registerDatablock("./datablocks/defaultDatablocks.cs");
|
||||
%this.registerDatablock("./datablocks/defaultDatablocks.tscript");
|
||||
}
|
||||
|
||||
function Core_GameObjects::onDestroyGameServer(%this)
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
|
||||
function Core_GUI::onCreate(%this)
|
||||
{
|
||||
exec("./scripts/profiles.cs");
|
||||
exec("./scripts/canvas.cs");
|
||||
exec("./scripts/cursor.cs");
|
||||
}
|
||||
|
||||
function Core_GUI::onDestroy(%this)
|
||||
{
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
ModuleId="Core_GUI"
|
||||
VersionId="1"
|
||||
Description="Module that implements the core engine-level setup for the game."
|
||||
ScriptFile="Core_GUI.cs"
|
||||
ScriptFile="Core_GUI.tscript"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy"
|
||||
Group="Core"
|
||||
|
|
|
|||
11
Templates/BaseGame/game/core/gui/Core_GUI.tscript
Normal file
11
Templates/BaseGame/game/core/gui/Core_GUI.tscript
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
function Core_GUI::onCreate(%this)
|
||||
{
|
||||
exec("./scripts/profiles.tscript");
|
||||
exec("./scripts/canvas.tscript");
|
||||
exec("./scripts/cursor.tscript");
|
||||
}
|
||||
|
||||
function Core_GUI::onDestroy(%this)
|
||||
{
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
|
||||
function Core_Lighting::onCreate(%this)
|
||||
{
|
||||
exec("./scripts/lighting.cs");
|
||||
|
||||
//Advanced/Deferred
|
||||
exec("./scripts/advancedLighting_Shaders.cs");
|
||||
exec("./scripts/deferredShading.cs");
|
||||
exec("./scripts/advancedLighting_Init.cs");
|
||||
|
||||
//Basic/Forward
|
||||
exec("./scripts/basicLighting_shadowFilter.cs");
|
||||
exec("./scripts/shadowMaps_Init.cs");
|
||||
exec("./scripts/basicLighting_Init.cs");
|
||||
|
||||
}
|
||||
|
||||
function Core_Lighting::onDestroy(%this)
|
||||
{
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
ModuleId="Core_Lighting"
|
||||
VersionId="1"
|
||||
Description="Module that implements the core engine-level setup for the game."
|
||||
ScriptFile="Core_Lighting.cs"
|
||||
ScriptFile="Core_Lighting.tscript"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy"
|
||||
Group="Core">
|
||||
|
|
|
|||
20
Templates/BaseGame/game/core/lighting/Core_Lighting.tscript
Normal file
20
Templates/BaseGame/game/core/lighting/Core_Lighting.tscript
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
function Core_Lighting::onCreate(%this)
|
||||
{
|
||||
exec("./scripts/lighting.tscript");
|
||||
|
||||
//Advanced/Deferred
|
||||
exec("./scripts/advancedLighting_Shaders.tscript");
|
||||
exec("./scripts/deferredShading.tscript");
|
||||
exec("./scripts/advancedLighting_Init.tscript");
|
||||
|
||||
//Basic/Forward
|
||||
exec("./scripts/basicLighting_shadowFilter.tscript");
|
||||
exec("./scripts/shadowMaps_Init.tscript");
|
||||
exec("./scripts/basicLighting_Init.tscript");
|
||||
|
||||
}
|
||||
|
||||
function Core_Lighting::onDestroy(%this)
|
||||
{
|
||||
}
|
||||
|
|
@ -39,8 +39,8 @@ $pref::LightManager::sgUseDynamicShadows = "1";
|
|||
$pref::LightManager::sgUseToneMapping = "";
|
||||
*/
|
||||
|
||||
//exec( "./shaders.cs" );
|
||||
//exec( "./deferredShading.cs" );
|
||||
//exec( "./shaders.tscript" );
|
||||
//exec( "./deferredShading.tscript" );
|
||||
|
||||
function onActivateAdvancedLM()
|
||||
{
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//exec( "./shadowFilter.cs" );
|
||||
//exec( "./shadowFilter.tscript" );
|
||||
|
||||
singleton GFXStateBlockData( BL_ProjectedShadowSBData )
|
||||
{
|
||||
|
|
@ -26,12 +26,12 @@ function initLightingSystems(%manager)
|
|||
|
||||
// First exec the scripts for the different light managers
|
||||
// in the lighting folder.
|
||||
/*%pattern = "./lighting/*//*init.cs";
|
||||
/*%pattern = "./lighting/*//*init.tscript";
|
||||
%file = findFirstFile( %pattern );
|
||||
if ( %file $= "" )
|
||||
{
|
||||
// Try for DSOs next.
|
||||
%pattern = "./lighting/*//*init.cs.dso";
|
||||
%pattern = "./lighting/*//*init.tscript.dso";
|
||||
%file = findFirstFile( %pattern );
|
||||
}
|
||||
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
|
||||
function Core_PostFX::onCreate(%this)
|
||||
{
|
||||
//
|
||||
exec("./scripts/postFxManager.cs");
|
||||
exec("./scripts/postFx.cs");
|
||||
|
||||
//Load the default config
|
||||
loadPresetHandler("./scripts/default.postfxpreset.cs");
|
||||
}
|
||||
|
||||
function Core_PostFX::onDestroy(%this)
|
||||
{
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
ModuleId="Core_PostFX"
|
||||
VersionId="1"
|
||||
Description="Module that implements the core engine-level setup for the game."
|
||||
ScriptFile="Core_PostFX.cs"
|
||||
ScriptFile="Core_PostFX.tscript"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy"
|
||||
Group="Core"
|
||||
|
|
|
|||
14
Templates/BaseGame/game/core/postFX/Core_PostFX.tscript
Normal file
14
Templates/BaseGame/game/core/postFX/Core_PostFX.tscript
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
function Core_PostFX::onCreate(%this)
|
||||
{
|
||||
//
|
||||
exec("./scripts/postFxManager.tscript");
|
||||
exec("./scripts/postFx.tscript");
|
||||
|
||||
//Load the default config
|
||||
loadPresetHandler("./scripts/default.postfxpreset.tscript");
|
||||
}
|
||||
|
||||
function Core_PostFX::onDestroy(%this)
|
||||
{
|
||||
}
|
||||
|
|
@ -581,7 +581,7 @@ function DepthOfFieldPostFX::autoFocus( %this )
|
|||
/*
|
||||
function reloadDOF()
|
||||
{
|
||||
exec( "./dof.cs" );
|
||||
exec( "./dof.tscript" );
|
||||
DepthOfFieldPostFX.reload();
|
||||
DepthOfFieldPostFX.disable();
|
||||
DepthOfFieldPostFX.enable();
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
// http://www.iryoku.com/mlaa/
|
||||
|
||||
// NOTE: This is currently disabled in favor of FXAA. See
|
||||
// core\scripts\client\canvas.cs if you want to re-enable it.
|
||||
// core\scripts\client\canvas.tscript if you want to re-enable it.
|
||||
|
||||
singleton GFXStateBlockData( MLAA_EdgeDetectStateBlock : PFX_DefaultStateBlock )
|
||||
{
|
||||
|
|
@ -39,12 +39,12 @@ function postFXInit()
|
|||
if (!$Server::Dedicated)
|
||||
{
|
||||
//init the postFX
|
||||
%pattern = "./*.cs";
|
||||
%pattern = "./*.tscript";
|
||||
%file = findFirstFile( %pattern );
|
||||
if ( %file $= "" )
|
||||
{
|
||||
// Try for DSOs next.
|
||||
%pattern = "core/postFX/*.cs.dso";
|
||||
%pattern = "core/postFX/*.tscript.dso";
|
||||
%file = findFirstFile( %pattern );
|
||||
}
|
||||
|
||||
|
|
@ -40,15 +40,15 @@ function PostFXManager::registerPostEffect(%this, %postEffect)
|
|||
}
|
||||
|
||||
// Used to name the saved files.
|
||||
$PostFXManager::fileExtension = ".postfxpreset.cs";
|
||||
$PostFXManager::fileExtension = ".postfxpreset.tscript";
|
||||
|
||||
// The filter string for file open/save dialogs.
|
||||
$PostFXManager::fileFilter = "Post Effect Presets|*.postfxpreset.cs";
|
||||
$PostFXManager::fileFilter = "Post Effect Presets|*.postfxpreset.tscript";
|
||||
|
||||
// Enable / disable PostFX when loading presets or just apply the settings?
|
||||
$PostFXManager::forceEnableFromPresets = true;
|
||||
|
||||
$PostFXManager::defaultPreset = "core/postFX/scripts/default.postfxpreset.cs";
|
||||
$PostFXManager::defaultPreset = "core/postFX/scripts/default.postfxpreset.tscript";
|
||||
|
||||
$PostFXManager::currentPreset = "";
|
||||
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
ModuleId="Core_Rendering"
|
||||
VersionId="1"
|
||||
Description="Module that implements the core engine-level setup for the game."
|
||||
ScriptFile="Core_Rendering.cs"
|
||||
ScriptFile="Core_Rendering.tscript"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy"
|
||||
Group="Core">
|
||||
|
|
|
|||
|
|
@ -25,16 +25,16 @@ function Core_Rendering::onCreate(%this)
|
|||
$Terrain::NormalTextureFormat = ProjectSettings.value("Terrain/NormalTextureFormat", 12);
|
||||
$Terrain::OrmTextureFormat = ProjectSettings.value("Terrain/OrmTextureFormat", 12);
|
||||
|
||||
exec("./scripts/graphicsOptions.cs");
|
||||
exec("./scripts/terrainSettings.cs");
|
||||
exec("./scripts/renderManager.cs");
|
||||
exec("./scripts/gfxData/clouds.cs");
|
||||
exec("./scripts/gfxData/commonMaterialData.cs");
|
||||
exec("./scripts/gfxData/scatterSky.cs");
|
||||
exec("./scripts/gfxData/shaders.cs");
|
||||
exec("./scripts/gfxData/terrainBlock.cs");
|
||||
exec("./scripts/gfxData/water.cs");
|
||||
exec("./scripts/gfxData/warningTerrainMat.cs");
|
||||
exec("./scripts/graphicsOptions." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/terrainSettings." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/renderManager." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/gfxData/clouds." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/gfxData/commonMaterialData." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/gfxData/scatterSky." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/gfxData/shaders." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/gfxData/terrainBlock." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/gfxData/water." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/gfxData/warningTerrainMat." @ $TorqueScriptFileExtension);
|
||||
|
||||
loadTerrainSettings();
|
||||
}
|
||||
|
|
@ -50,10 +50,10 @@ function Core_Rendering::initClient(%this)
|
|||
initLightingSystems("Advanced Lighting");
|
||||
|
||||
//load prefs
|
||||
exec("data/defaults.cs");
|
||||
exec("data/defaults." @ $TorqueScriptFileExtension);
|
||||
%prefPath = getPrefpath();
|
||||
if ( isFile( %prefPath @ "/clientPrefs.cs" ) )
|
||||
exec( %prefPath @ "/clientPrefs.cs" );
|
||||
if ( isFile( %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension ) )
|
||||
exec( %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension );
|
||||
|
||||
configureCanvas();
|
||||
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
|
||||
function Core_SFX::onCreate(%this)
|
||||
{
|
||||
exec("./scripts/audio.cs");
|
||||
exec("./scripts/audioData.cs");
|
||||
exec("./scripts/audioAmbience.cs");
|
||||
exec("./scripts/audioDescriptions.cs");
|
||||
exec("./scripts/audioEnvironments.cs");
|
||||
exec("./scripts/audioStates.cs");
|
||||
|
||||
}
|
||||
|
||||
function Core_SFX::onDestroy(%this)
|
||||
{
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
ModuleId="Core_SFX"
|
||||
VersionId="1"
|
||||
Description="Module that implements the core engine-level setup for the game."
|
||||
ScriptFile="Core_SFX.cs"
|
||||
ScriptFile="Core_SFX.tscript"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy"
|
||||
Group="Core">
|
||||
|
|
|
|||
15
Templates/BaseGame/game/core/sfx/Core_SFX.tscript
Normal file
15
Templates/BaseGame/game/core/sfx/Core_SFX.tscript
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
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");
|
||||
|
||||
}
|
||||
|
||||
function Core_SFX::onDestroy(%this)
|
||||
{
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue