Add GetStepOfAllTypes binding.
This commit is contained in:
@@ -11,6 +11,8 @@ StepMania 5.0 $next | 2011????
|
|||||||
2011/08/22
|
2011/08/22
|
||||||
----------
|
----------
|
||||||
* [PrefsManager, X11Helper] Added ShowMouseCursor preference. [AJ]
|
* [PrefsManager, X11Helper] Added ShowMouseCursor preference. [AJ]
|
||||||
|
* [UnlockManager] Added GetStepOfAllTypes Lua binding. This gets the locked
|
||||||
|
Steps for all game types based on the difficulty specified. [Wolfman2000]
|
||||||
|
|
||||||
2011/08/21
|
2011/08/21
|
||||||
----------
|
----------
|
||||||
|
|||||||
@@ -799,6 +799,27 @@ public:
|
|||||||
if( pSong ) { pSong->PushSelf(L); return 1; }
|
if( pSong ) { pSong->PushSelf(L); return 1; }
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
// Get all of the steps locked based on difficulty (similar to In The Groove 2).
|
||||||
|
static int GetStepOfAllTypes( T* p, lua_State *L )
|
||||||
|
{
|
||||||
|
Song *pSong = p->m_Song.ToSong();
|
||||||
|
if (pSong)
|
||||||
|
{
|
||||||
|
const vector<Steps*>& allSteps = pSong->GetAllSteps();
|
||||||
|
vector<Steps*> toRet;
|
||||||
|
FOREACH_CONST(Steps*, allSteps, step)
|
||||||
|
{
|
||||||
|
if ((*step)->GetDifficulty() == p->m_dc)
|
||||||
|
{
|
||||||
|
toRet.push_back(*step);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LuaHelpers::CreateTableFromArray<Steps*>( toRet, L );
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: Add a function to just get all steps.
|
// TODO: Add a function to just get all steps.
|
||||||
static int GetStepByStepsType( T* p, lua_State *L )
|
static int GetStepByStepsType( T* p, lua_State *L )
|
||||||
{
|
{
|
||||||
@@ -866,6 +887,7 @@ public:
|
|||||||
ADD_METHOD( GetRequirePassChallengeSteps );
|
ADD_METHOD( GetRequirePassChallengeSteps );
|
||||||
ADD_METHOD( GetSong );
|
ADD_METHOD( GetSong );
|
||||||
ADD_METHOD( GetCourse );
|
ADD_METHOD( GetCourse );
|
||||||
|
ADD_METHOD( GetStepOfAllTypes );
|
||||||
ADD_METHOD( GetStepByStepsType );
|
ADD_METHOD( GetStepByStepsType );
|
||||||
ADD_METHOD( song );
|
ADD_METHOD( song );
|
||||||
ADD_METHOD( steps );
|
ADD_METHOD( steps );
|
||||||
|
|||||||
Reference in New Issue
Block a user