diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 32501d7047..f408432cc4 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -9,6 +9,10 @@ ________________________________________________________________________________ StepMania 5.0 alpha 2 | 201204?? -------------------------------------------------------------------------------- +2012/04/25 +---------- +* [Profile] Added GetLastPlayedSong and GetLastPlayedCourse Lua bindings. [AJ] + 2012/04/22 ---------- * [LifeMeterBar] Reverted a change from 2010 that messed with how the life meter diff --git a/Utils/make-src-archive.sh b/Utils/make-src-archive.sh index 34a36017f1..e81315e1e4 100755 --- a/Utils/make-src-archive.sh +++ b/Utils/make-src-archive.sh @@ -24,6 +24,12 @@ cp -dpR src $PRODUCTVER/ cp Docs/Copying.MAD Docs/Licenses.txt Docs/Changelog_sm5.txt \ Docs/Changelog_sm-ssc.txt Docs/Changelog_SSCformat.txt \ Docs/credits.txt Docs/KnownIssues.txt \ + Docs/license-ext/readme Docs/license-ext/Scoring-jp.txt \ + Docs/license-ext/theme_lang-ja.txt Docs/vlgothic/Changelog \ + Docs/license-ext/vlgothic/LICENSE Docs/license-ext/vlgothic/LICENSE.en\ + Docs/license-ext/vlgothic/LICENSE_E.mplus Docs/license-ext/vlgothic/LICENSE_J.mplus \ + Docs/license-ext/vlgothic/README Docs/license-ext/vlgothic/README.sazanami \ + Docs/license-ext/vlgothic/README_J.mplus \ Makefile.am aclocal.m4 configure Makefile.in configure.ac \ $PRODUCTVER diff --git a/src/Profile.cpp b/src/Profile.cpp index 1427e414c6..1ad2198154 100644 --- a/src/Profile.cpp +++ b/src/Profile.cpp @@ -2033,6 +2033,24 @@ public: static int GetTotalHands( T* p, lua_State *L ) { lua_pushnumber(L, p->m_iTotalHands ); return 1; } static int GetTotalLifts( T* p, lua_State *L ) { lua_pushnumber(L, p->m_iTotalLifts ); return 1; } static int GetUserTable( T* p, lua_State *L ) { p->m_UserTable.PushSelf(L); return 1; } + static int GetLastPlayedSong( T* p, lua_State *L ) + { + Song *pS = p->m_lastSong.ToSong(); + if( pS ) + pS->PushSelf(L); + else + lua_pushnil( L ); + return 1; + } + static int GetLastPlayedCourse( T* p, lua_State *L ) + { + Course *pC = p->m_lastCourse.ToCourse(); + if( pC ) + pC->PushSelf(L); + else + lua_pushnil( L ); + return 1; + } LunaProfile() { @@ -2080,6 +2098,8 @@ public: ADD_METHOD( GetTotalHands ); ADD_METHOD( GetTotalLifts ); ADD_METHOD( GetUserTable ); + ADD_METHOD( GetLastPlayedSong ); + ADD_METHOD( GetLastPlayedCourse ); } };