[SongManager] Ending a group's name in PreferredSongs with "/*" will now load all songs from that group automatically.

This commit is contained in:
AJ Kelly
2012-06-27 20:25:59 -05:00
parent 1d54ff3724
commit 87d77d6cde
2 changed files with 2135 additions and 2112 deletions
+5
View File
@@ -8,6 +8,11 @@ ________________________________________________________________________________
StepMania 5.0 ???? ?? | 20120??? StepMania 5.0 ???? ?? | 20120???
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
2012/06/27
----------
* [SongManager] Ending a group's name in PreferredSongs with "/*" will now load
all songs from that group automatically. [AJ]
2012/06/21 2012/06/21
---------- ----------
* [ProfileManager] Added GetPlayerName(pn) Lua binding. [AJ] * [ProfileManager] Added GetPlayerName(pn) Lua binding. [AJ]
+18
View File
@@ -1545,6 +1545,24 @@ void SongManager::UpdatePreferredSort(RString sPreferredSongs, RString sPreferre
} }
else else
{ {
/* if the line ends in "/*", check if the section exists,
* and if it does, add all the songs in that group to the list. */
if( EndsWith(sLine,"/*") )
{
RString group = sLine.Left( sLine.length() - RString("/*").length() );
if( DoesSongGroupExist(group) )
{
// add all songs in group
const vector<Song *> &vSongs = GetSongs( group );
FOREACH_CONST( Song*, vSongs, song )
{
if( UNLOCKMAN->SongIsLocked(*song) & LOCKED_SELECTABLE )
continue;
section.vpSongs.push_back( *song );
}
}
}
Song *pSong = FindSong( sLine ); Song *pSong = FindSong( sLine );
if( pSong == NULL ) if( pSong == NULL )
continue; continue;