mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 06:34:36 +00:00
Improve handling of non-default script filenames
This commit is contained in:
parent
099dd4f1f3
commit
9ccaa6d3ea
118 changed files with 534 additions and 528 deletions
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
function loadDirectory(%path, %type, %dsoType)
|
||||
{
|
||||
if( %type $= "" )
|
||||
%type = "ed.tscript";
|
||||
%type = "ed." @ $TorqueScriptFileExtension;
|
||||
if( %dsoType $= "" )
|
||||
%dsoType = "edso";
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue