diff --git a/stepmania/src/Difficulty.cpp b/stepmania/src/Difficulty.cpp index 7763118c3b..991de43d55 100644 --- a/stepmania/src/Difficulty.cpp +++ b/stepmania/src/Difficulty.cpp @@ -47,7 +47,7 @@ static void LuaDifficulty(lua_State* L) { FOREACH_Difficulty( d ) { - CString s = DifficultyNames[d]; + CString s = DifficultyToString(d); s.MakeUpper(); LUA->SetGlobal( "DIFFICULTY_"+s, d ); } @@ -80,6 +80,18 @@ CourseDifficulty GetNextShownCourseDifficulty( CourseDifficulty cd ) return DIFFICULTY_INVALID; } +static void LuaCourseDifficulty(lua_State* L) +{ + FOREACH_CourseDifficulty( d ) + { + CString s = CourseDifficultyToString(d); + s.MakeUpper(); + LUA->SetGlobal( "COURSE_DIFFICULTY_"+s, d ); + } + LUA->SetGlobal( "NUM_COURSE_DIFFICULTIES", NUM_COURSE_DIFFICULTIES ); +} +REGISTER_WITH_LUA_FUNCTION( LuaCourseDifficulty ); + /* * (c) 2001-2004 Chris Danford * All rights reserved.