Move group into its own class, add Credit and AuthorsNotes fields, Begin exposing methods to lua
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "Song.h"
|
||||
#include "Group.h"
|
||||
#include "Steps.h"
|
||||
#include "RageUtil.h"
|
||||
#include "RageLog.h"
|
||||
@@ -2274,6 +2275,13 @@ public:
|
||||
lua_pushstring(L, p->m_sGroupName);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int GetGroup( T* p, lua_State *L )
|
||||
{
|
||||
p->GetGroup()->PushSelf(L);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int MusicLengthSeconds( T* p, lua_State *L )
|
||||
{
|
||||
lua_pushnumber(L, p->m_fMusicLengthSeconds);
|
||||
@@ -2493,6 +2501,7 @@ public:
|
||||
ADD_METHOD( IsEnabled );
|
||||
ADD_METHOD(IsCustomSong);
|
||||
ADD_METHOD( GetGroupName );
|
||||
ADD_METHOD( GetGroup );
|
||||
ADD_METHOD( MusicLengthSeconds );
|
||||
ADD_METHOD( GetSampleStart );
|
||||
ADD_METHOD( GetSampleLength );
|
||||
@@ -2536,6 +2545,8 @@ public:
|
||||
};
|
||||
|
||||
LUA_REGISTER_CLASS( Song )
|
||||
|
||||
|
||||
// lua end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user