Removed hard coded directory paths

- Removed references to core directory.
- Switch some references to tools directory
- Added preferences variables where appropriate
This commit is contained in:
DavidWyand-GG 2013-03-07 18:56:53 -05:00
parent 853b70255b
commit 4b1334db9f
25 changed files with 75 additions and 18 deletions

View file

@ -330,7 +330,12 @@ void Forest::createNewFile()
// We need to construct a default file name
String missionName( Con::getVariable( "$Client::MissionFile" ) );
missionName.replace( "tools/levels", "levels" );
String levelDirectory( Con::getVariable( "$pref::Directories::Level" ) );
if ( levelDirectory.isEmpty() )
{
levelDirectory = "levels";
}
missionName.replace( "tools/levels", levelDirectory );
missionName = Platform::makeRelativePathName(missionName, Platform::getMainDotCsDir());
Torque::Path basePath( missionName );