simpler Lua boilerplate
This commit is contained in:
@@ -191,8 +191,6 @@ bool Trail::ContainsSong( Song* pSong ) const
|
||||
class LunaTrail: public Luna<Trail>
|
||||
{
|
||||
public:
|
||||
LunaTrail() { LUA->Register( Register ); }
|
||||
|
||||
static int GetDifficulty( T* p, lua_State *L ) { lua_pushnumber(L, p->m_CourseDifficulty ); return 1; }
|
||||
static int GetCourseDifficulty( T* p, lua_State *L ) { lua_pushnumber(L, p->m_CourseDifficulty ); return 1; } // deprecated
|
||||
static int GetStepsType( T* p, lua_State *L ) { lua_pushnumber(L, p->m_StepsType ); return 1; }
|
||||
@@ -232,15 +230,15 @@ public:
|
||||
return 2;
|
||||
}
|
||||
|
||||
static void Register(lua_State *L)
|
||||
LunaTrail()
|
||||
{
|
||||
LUA->Register( Register );
|
||||
|
||||
ADD_METHOD( GetDifficulty );
|
||||
ADD_METHOD( GetCourseDifficulty );
|
||||
ADD_METHOD( GetStepsType );
|
||||
ADD_METHOD( GetRadarValues );
|
||||
ADD_METHOD( GetArtists );
|
||||
|
||||
Luna<T>::Register( L );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user