[GameState] Added GetStageResult(pn) Lua binding.

This commit is contained in:
AJ Kelly
2012-03-28 18:55:17 -05:00
parent 2dd68c8349
commit 59b43867c1
2 changed files with 15 additions and 0 deletions
+8
View File
@@ -9,6 +9,14 @@ ________________________________________________________________________________
StepMania 5.0 alpha 2 | 201203??
--------------------------------------------------------------------------------
2012/03/28
----------
* [ScoreKeeperRave] Actually handle hold scores in HandleHoldScore().
Players should please provide feedback on how this affects gameplay, as this
is a temporary feature. [AJ]
* [GameConstantsAndTypes] Made StageResult Lua-aware. [AJ]
* [GameState] Added GetStageResult(pn) Lua binding. [AJ]
2012/03/27
----------
* [ScreenEditMenu] Don't hardcode stopping the music on pressing the back button.
+7
View File
@@ -2339,6 +2339,12 @@ public:
p->m_SongOptions.Assign( m, so );
return 0;
}
static int GetStageResult( T* p, lua_State *L )
{
PlayerNumber pn = Enum::Check<PlayerNumber>(L, 1);
LuaHelpers::Push( L, p->GetStageResult(pn) );
return 1;
}
static int IsWinner( T* p, lua_State *L )
{
PlayerNumber pn = Enum::Check<PlayerNumber>(L, 1);
@@ -2552,6 +2558,7 @@ public:
ADD_METHOD( ApplyStageModifiers );
ADD_METHOD( ClearStageModifiersIllegalForCourse );
ADD_METHOD( SetSongOptions );
ADD_METHOD( GetStageResult );
ADD_METHOD( IsWinner );
ADD_METHOD( IsDraw );
ADD_METHOD( GetCurrentGame );