[Steps] Add PredictMeter() and GetDisplayBPMType() Lua bindings.
This commit is contained in:
+11
-9
@@ -41,8 +41,8 @@ static const char *DisplayBPMNames[] =
|
||||
"Specified",
|
||||
"Random",
|
||||
};
|
||||
|
||||
XToString( DisplayBPM );
|
||||
LuaXType( DisplayBPM );
|
||||
|
||||
Steps::Steps(): m_StepsType(StepsType_Invalid),
|
||||
parent(NULL), m_pNoteData(new NoteData), m_bNoteDataIsFilled(false),
|
||||
@@ -548,14 +548,11 @@ public:
|
||||
lua_pushboolean(L, p->HasSignificantTimingChanges());
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int HasAttacks( T* p, lua_State *L )
|
||||
{
|
||||
lua_pushboolean(L, p->HasAttacks());
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static int GetRadarValues( T* p, lua_State *L )
|
||||
{
|
||||
PlayerNumber pn = Enum::Check<PlayerNumber>(L, 1);
|
||||
@@ -563,16 +560,14 @@ public:
|
||||
rv.PushSelf(L);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int GetTimingData( T* p, lua_State *L )
|
||||
{
|
||||
p->m_Timing.PushSelf(L);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int GetHash( T* p, lua_State *L ) { lua_pushnumber( L, p->GetHash() ); return 1; }
|
||||
|
||||
// untested
|
||||
/*
|
||||
static int GetSMNoteData( T* p, lua_State *L )
|
||||
{
|
||||
RString out;
|
||||
@@ -580,13 +575,12 @@ public:
|
||||
lua_pushstring( L, out );
|
||||
return 1;
|
||||
}
|
||||
|
||||
*/
|
||||
static int GetChartName(T *p, lua_State *L)
|
||||
{
|
||||
lua_pushstring(L, p->GetChartName());
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int GetDisplayBpms( T* p, lua_State *L )
|
||||
{
|
||||
DisplayBpms temp;
|
||||
@@ -618,6 +612,12 @@ public:
|
||||
lua_pushboolean( L, p->GetDisplayBPM() == DISPLAY_BPM_RANDOM );
|
||||
return 1;
|
||||
}
|
||||
DEFINE_METHOD( PredictMeter, PredictMeter() )
|
||||
static int GetDisplayBPMType( T* p, lua_State *L )
|
||||
{
|
||||
LuaHelpers::Push( L, p->GetDisplayBPM() );
|
||||
return 1;
|
||||
}
|
||||
|
||||
LunaSteps()
|
||||
{
|
||||
@@ -643,6 +643,8 @@ public:
|
||||
ADD_METHOD( IsDisplayBpmSecret );
|
||||
ADD_METHOD( IsDisplayBpmConstant );
|
||||
ADD_METHOD( IsDisplayBpmRandom );
|
||||
ADD_METHOD( PredictMeter );
|
||||
ADD_METHOD( GetDisplayBPMType );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user