diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 1b3eb9096f..0dff34f132 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -8,6 +8,11 @@ ________________________________________________________________________________ StepMania 5.0 $next | 20111xxx -------------------------------------------------------------------------------- +2011/11/30 +---------- +* [PlayerOptions] Added IsEasierForSongAndSteps(Song,Steps,PlayerNumber) and + IsEasierForCourseAndTrail(Course, Trail) Lua bindings. [AJ] + 2011/11/28 ---------- * [ScreenGameplay] Add the SurvivalModOverride metric. Let the themer decide diff --git a/src/PlayerOptions.cpp b/src/PlayerOptions.cpp index 3c69cdd541..3be8fb927d 100644 --- a/src/PlayerOptions.cpp +++ b/src/PlayerOptions.cpp @@ -882,6 +882,23 @@ void PlayerOptions::ResetPrefs( ResetPrefsType type ) class LunaPlayerOptions: public Luna { public: + static int IsEasierForSongAndSteps( T *p, lua_State *L ) + { + Song* pSong = Luna::check(L,1); + Steps* pSteps = Luna::check(L,2); + PlayerNumber pn = Enum::Check(L, 3); + lua_pushboolean(L, p->IsEasierForSongAndSteps(pSong, pSteps, pn) ); + return 1; + } + static int IsEasierForCourseAndTrail( T *p, lua_State *L ) + { + // course, trail + Course* pCourse = Luna::check(L,1); + Trail* pTrail = Luna::check(L,2); + lua_pushboolean(L, p->IsEasierForCourseAndTrail(pCourse, pTrail) ); + return 1; + } + // NoteSkins static int GetNoteSkin( T *p, lua_State *L ) { @@ -1106,6 +1123,9 @@ public: LunaPlayerOptions() { + ADD_METHOD( IsEasierForSongAndSteps ); + ADD_METHOD( IsEasierForCourseAndTrail ); + ADD_METHOD( GetDark ); ADD_METHOD( SetDark ); ADD_METHOD( GetBlind );