Consistent user warnings.
This commit is contained in:
@@ -75,8 +75,7 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou
|
||||
const CourseDifficulty cd = StringToCourseDifficulty( sParams[1] );
|
||||
if( cd == DIFFICULTY_INVALID )
|
||||
{
|
||||
LOG->UserLog( "Course file '%s' contains an invalid #METER string: \"%s\"",
|
||||
sPath.c_str(), sParams[1].c_str() );
|
||||
LOG->UserLog( RageLog::LogType_CourseFile, sPath, "contains an invalid #METER string: \"%s\"", sParams[1].c_str() );
|
||||
continue;
|
||||
}
|
||||
out.m_iCustomMeter[cd] = max( atoi(sParams[2]), 0 );
|
||||
@@ -114,8 +113,7 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou
|
||||
|
||||
if( attack.fSecsRemaining <= 0.0f)
|
||||
{
|
||||
LOG->UserLog( "Course file \"%s\" has an attack with a nonpositive length: %s",
|
||||
sPath.c_str(), sBits[1].c_str() );
|
||||
LOG->UserLog( RageLog::LogType_CourseFile, sPath, "has an attack with a nonpositive length: %s", sBits[1].c_str() );
|
||||
attack.fSecsRemaining = 0.0f;
|
||||
}
|
||||
|
||||
@@ -127,8 +125,7 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG->UserLog( "Course file \"%s\" has an unexpected value named '%s'",
|
||||
sPath.c_str(), sBits[0].c_str() );
|
||||
LOG->UserLog( RageLog::LogType_CourseFile, sPath, "has an unexpected value named '%s'", sBits[0].c_str() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,16 +165,14 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG->UserLog( "Course file '%s' contains a random_within_group entry '%s' that is invalid. "
|
||||
"Song should be in the format '<group>/*'.",
|
||||
sPath.c_str(), sSong.c_str() );
|
||||
LOG->UserLog( RageLog::LogType_CourseFile, sPath, "contains a random_within_group entry \"%s\" that is invalid. "
|
||||
"Song should be in the format \"<group>/*\".", sSong.c_str() );
|
||||
}
|
||||
|
||||
if( !SONGMAN->DoesSongGroupExist(new_entry.songCriteria.m_sGroupName) )
|
||||
{
|
||||
LOG->UserLog( "Course file '%s' random_within_group entry '%s' specifies a group that doesn't exist. "
|
||||
"This entry will be ignored.",
|
||||
sPath.c_str(), sSong.c_str() );
|
||||
LOG->UserLog( RageLog::LogType_CourseFile, sPath, "random_within_group entry \"%s\" specifies a group that doesn't exist. "
|
||||
"This entry will be ignored.", sSong.c_str() );
|
||||
continue; // skip this #SONG
|
||||
}
|
||||
}
|
||||
@@ -200,9 +195,8 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou
|
||||
|
||||
if( new_entry.pSong == NULL )
|
||||
{
|
||||
LOG->UserLog( "Course file '%s' contains a fixed song entry '%s' that does not exist. "
|
||||
"This entry will be ignored.",
|
||||
sPath.c_str(), sSong.c_str());
|
||||
LOG->UserLog( RageLog::LogType_CourseFile, sPath, "contains a fixed song entry \"%s\" that does not exist. "
|
||||
"This entry will be ignored.", sSong.c_str());
|
||||
continue; // skip this #SONG
|
||||
}
|
||||
}
|
||||
@@ -215,8 +209,8 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou
|
||||
new_entry.stepsCriteria.m_iHighMeter = new_entry.stepsCriteria.m_iLowMeter;
|
||||
else if( retval != 2 )
|
||||
{
|
||||
LOG->UserLog( "Course file '%s' contains an invalid difficulty setting: \"%s\", 3..6 used instead",
|
||||
sPath.c_str(), sParams[2].c_str() );
|
||||
LOG->UserLog( RageLog::LogType_CourseFile, sPath, "contains an invalid difficulty setting: \"%s\", 3..6 used instead",
|
||||
sParams[2].c_str() );
|
||||
new_entry.stepsCriteria.m_iLowMeter = 3;
|
||||
new_entry.stepsCriteria.m_iHighMeter = 6;
|
||||
}
|
||||
@@ -271,7 +265,7 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG->UserLog( "Unexpected value named '%s'", sValueName.c_str() );
|
||||
LOG->UserLog( RageLog::LogType_CourseFile, sPath, "contains an unexpected value named \"%s\"", sValueName.c_str() );
|
||||
}
|
||||
}
|
||||
static TitleSubst tsub("Courses");
|
||||
@@ -342,7 +336,7 @@ bool CourseLoaderCRS::LoadFromCRSFile( const RString &_sPath, Course &out )
|
||||
if( !msd.ReadFile(sPath) )
|
||||
{
|
||||
|
||||
LOG->UserLog( "Error opening CRS file '%s': %s.", sPath.c_str(), msd.GetError().c_str() );
|
||||
LOG->UserLog( RageLog::LogType_CourseFile, sPath, "couldn't be opened: %s.", msd.GetError().c_str() );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -371,14 +365,14 @@ bool CourseLoaderCRS::LoadEditFromFile( const RString &sEditFilePath, ProfileSlo
|
||||
int iBytes = FILEMAN->GetFileSizeInBytes( sEditFilePath );
|
||||
if( iBytes > MAX_EDIT_COURSE_SIZE_BYTES )
|
||||
{
|
||||
LOG->UserLog( "The edit '%s' is unreasonably large. It won't be loaded.", sEditFilePath.c_str() );
|
||||
LOG->UserLog( RageLog::LogType_EditFile, sEditFilePath, "is unreasonably large. It won't be loaded." );
|
||||
return false;
|
||||
}
|
||||
|
||||
MsdFile msd;
|
||||
if( !msd.ReadFile( sEditFilePath ) )
|
||||
{
|
||||
LOG->UserLog( "Error opening edit file \"%s\": %s", sEditFilePath.c_str(), msd.GetError().c_str() );
|
||||
LOG->UserLog( RageLog::LogType_EditFile, sEditFilePath, "couldn't be opened: %s", msd.GetError().c_str() );
|
||||
return false;
|
||||
}
|
||||
Course *pCourse = new Course;
|
||||
|
||||
Reference in New Issue
Block a user