bindings
This commit is contained in:
@@ -272,6 +272,27 @@ class LunaStageStats: public Luna<StageStats>
|
||||
public:
|
||||
static int GetPlayerStageStats( T* p, lua_State *L ) { p->m_player[Enum::Check<PlayerNumber>(L, 1)].PushSelf(L); return 1; }
|
||||
static int GetMultiPlayerStageStats( T* p, lua_State *L ) { p->m_multiPlayer[Enum::Check<MultiPlayer>(L, 1)].PushSelf(L); return 1; }
|
||||
static int GetPlayedSongs( T* p, lua_State *L )
|
||||
{
|
||||
lua_newtable(L);
|
||||
for( int i = 0; i < (int) p->m_vpPlayedSongs.size(); ++i )
|
||||
{
|
||||
p->m_vpPlayedSongs[i]->PushSelf(L);
|
||||
lua_rawseti( L, -2, i+1 );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
static int GetPossibleSongs( T* p, lua_State *L )
|
||||
{
|
||||
lua_newtable(L);
|
||||
for( int i = 0; i < (int) p->m_vpPossibleSongs.size(); ++i )
|
||||
{
|
||||
p->m_vpPossibleSongs[i]->PushSelf(L);
|
||||
lua_rawseti( L, -2, i+1 );
|
||||
}
|
||||
return 1;
|
||||
|
||||
}
|
||||
static int GetGameplaySeconds( T* p, lua_State *L ) { lua_pushnumber(L, p->m_fGameplaySeconds); return 1; }
|
||||
static int OnePassed( T* p, lua_State *L ) { lua_pushboolean(L, p->OnePassed()); return 1; }
|
||||
static int AllFailed( T* p, lua_State *L ) { lua_pushboolean(L, p->AllFailed()); return 1; }
|
||||
@@ -280,6 +301,8 @@ public:
|
||||
{
|
||||
ADD_METHOD( GetPlayerStageStats );
|
||||
ADD_METHOD( GetMultiPlayerStageStats );
|
||||
ADD_METHOD( GetPlayedSongs );
|
||||
ADD_METHOD( GetPossibleSongs );
|
||||
ADD_METHOD( GetGameplaySeconds );
|
||||
ADD_METHOD( OnePassed );
|
||||
ADD_METHOD( AllFailed );
|
||||
|
||||
Reference in New Issue
Block a user