Move group into its own class, add Credit and AuthorsNotes fields, Begin exposing methods to lua

This commit is contained in:
Crash Cringle
2025-03-03 23:25:32 -08:00
committed by teejusb
parent 1aa44cacb6
commit 5abaf5318a
7 changed files with 281 additions and 48 deletions
+11
View File
@@ -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