we need this function and it ISN'T IMPLEMENTED ANYWHERE. bring back DwiCompatibleStringToDifficulty as StringToDifficulty until a better solution is found.

This commit is contained in:
Flameshadowxeroshin
2011-09-11 14:10:36 +00:00
parent deeb6fdb0e
commit 8c5d7fb9e5
+25
View File
@@ -35,6 +35,31 @@ const RString &CourseDifficultyToLocalizedString( CourseDifficulty x )
return g_CourseDifficultyName[x]->GetValue();
}
Difficulty StringToDifficulty( const RString& sDC )
{
RString s2 = sDC;
s2.MakeLower();
if( s2 == "beginner" ) return Difficulty_Beginner;
else if( s2 == "easy" ) return Difficulty_Easy;
else if( s2 == "basic" ) return Difficulty_Easy;
else if( s2 == "light" ) return Difficulty_Easy;
else if( s2 == "medium" ) return Difficulty_Medium;
else if( s2 == "another" ) return Difficulty_Medium;
else if( s2 == "trick" ) return Difficulty_Medium;
else if( s2 == "standard" ) return Difficulty_Medium;
else if( s2 == "difficult") return Difficulty_Medium;
else if( s2 == "hard" ) return Difficulty_Hard;
else if( s2 == "ssr" ) return Difficulty_Hard;
else if( s2 == "maniac" ) return Difficulty_Hard;
else if( s2 == "heavy" ) return Difficulty_Hard;
else if( s2 == "smaniac" ) return Difficulty_Challenge;
else if( s2 == "challenge" ) return Difficulty_Challenge;
else if( s2 == "expert" ) return Difficulty_Challenge;
else if( s2 == "oni" ) return Difficulty_Challenge;
else if( s2 == "edit" ) return Difficulty_Edit;
else return Difficulty_Invalid;
}
LuaFunction( CourseDifficultyToLocalizedString, CourseDifficultyToLocalizedString(Enum::Check<Difficulty>(L, 1)) );
CourseDifficulty GetNextShownCourseDifficulty( CourseDifficulty cd )