Let [CustomDifficulty] work for all StepTypes.

This commit is contained in:
Jason Felds
2011-07-13 03:26:08 -04:00
parent 38e11061d9
commit 1234cab213
2 changed files with 25 additions and 33 deletions
+5
View File
@@ -8,6 +8,11 @@ ________________________________________________________________________________
StepMania 5.0 ????????? | 20110??? StepMania 5.0 ????????? | 20110???
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
2011/07/13
----------
* [Difficulty] Allow ALL StepsTypes to use CustomDifficulty properly.
There was some unfair targeting of Couple and Routine. [Wolfman2000]
2011/07/12 2011/07/12
---------- ----------
* [OptionRowHandler] Add a new metric to ScreenOptionsMaster: * [OptionRowHandler] Add a new metric to ScreenOptionsMaster:
-13
View File
@@ -69,17 +69,10 @@ RString GetCustomDifficulty( StepsType st, Difficulty dc, CourseType ct )
const StepsTypeInfo &sti = GAMEMAN->GetStepsTypeInfo( st ); const StepsTypeInfo &sti = GAMEMAN->GetStepsTypeInfo( st );
switch( sti.m_StepsTypeCategory )
{
DEFAULT_FAIL(sti.m_StepsTypeCategory);
case StepsTypeCategory_Single:
case StepsTypeCategory_Double:
if( dc == Difficulty_Edit ) if( dc == Difficulty_Edit )
{ {
return "Edit"; return "Edit";
} }
else
{
// OPTIMIZATION OPPORTUNITY: cache these metrics and cache the splitting // OPTIMIZATION OPPORTUNITY: cache these metrics and cache the splitting
vector<RString> vsNames; vector<RString> vsNames;
split( NAMES, ",", vsNames ); split( NAMES, ",", vsNames );
@@ -105,12 +98,6 @@ RString GetCustomDifficulty( StepsType st, Difficulty dc, CourseType ct )
return RString(); return RString();
return DifficultyToString( dc ); return DifficultyToString( dc );
} }
case StepsTypeCategory_Couple:
return "Couple";
case StepsTypeCategory_Routine:
return "Routine";
}
}
LuaFunction( GetCustomDifficulty, GetCustomDifficulty(Enum::Check<StepsType>(L,1), Enum::Check<Difficulty>(L, 2), Enum::Check<CourseType>(L, 3, true)) ); LuaFunction( GetCustomDifficulty, GetCustomDifficulty(Enum::Check<StepsType>(L,1), Enum::Check<Difficulty>(L, 2), Enum::Check<CourseType>(L, 3, true)) );