[PlayerOptions] Added IsEasierForSongAndSteps(Song,Steps,PlayerNumber) and IsEasierForCourseAndTrail(Course, Trail) Lua bindings.

This commit is contained in:
AJ Kelly
2011-11-30 00:35:06 -06:00
parent 1234afec1f
commit a49044501e
2 changed files with 25 additions and 0 deletions
+20
View File
@@ -882,6 +882,23 @@ void PlayerOptions::ResetPrefs( ResetPrefsType type )
class LunaPlayerOptions: public Luna<PlayerOptions>
{
public:
static int IsEasierForSongAndSteps( T *p, lua_State *L )
{
Song* pSong = Luna<Song>::check(L,1);
Steps* pSteps = Luna<Steps>::check(L,2);
PlayerNumber pn = Enum::Check<PlayerNumber>(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<Course>::check(L,1);
Trail* pTrail = Luna<Trail>::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 );