diff --git a/Docs/Luadoc/Lua.xml b/Docs/Luadoc/Lua.xml index b928b96f2d..3e746894f0 100644 --- a/Docs/Luadoc/Lua.xml +++ b/Docs/Luadoc/Lua.xml @@ -1366,6 +1366,7 @@ + diff --git a/Docs/Luadoc/LuaDocumentation.xml b/Docs/Luadoc/LuaDocumentation.xml index 1dfb848a0e..4c342b1fe5 100644 --- a/Docs/Luadoc/LuaDocumentation.xml +++ b/Docs/Luadoc/LuaDocumentation.xml @@ -3975,6 +3975,9 @@ save yourself some time, copy this for undocumented things: Returns true if the player was disqualified from ranking. + + Sets the Dance Point limits of the stage. + diff --git a/src/PlayerStageStats.cpp b/src/PlayerStageStats.cpp index d50bd83a95..7178216ea2 100644 --- a/src/PlayerStageStats.cpp +++ b/src/PlayerStageStats.cpp @@ -865,6 +865,25 @@ public: } COMMON_RETURN_SELF; } + static int SetDancePointLimits( T* p, lua_State *L ) + { + int actual = IArg(1); + int possible = IArg(2); + if( actual >= 0 && possible > 0 ) + { + p->m_iPossibleDancePoints = possible; + if( actual <= possible ) + { + p->m_iActualDancePoints = actual; + } + else + { + p->m_iActualDancePoints = possible; + } + return 1; + } + COMMON_RETURN_SELF; + } static int FailPlayer( T* p, lua_State *L ) { @@ -915,6 +934,7 @@ public: ADD_METHOD( SetScore ); ADD_METHOD( GetCurMaxScore ); ADD_METHOD( SetCurMaxScore ); + ADD_METHOD( SetDancePointLimits ); ADD_METHOD( FailPlayer ); ADD_METHOD( GetSongsPassed ); ADD_METHOD( GetSongsPlayed );