[SongManager] Ending a group's name in PreferredSongs with "/*" will now load all songs from that group automatically.
This commit is contained in:
@@ -8,6 +8,11 @@ ________________________________________________________________________________
|
||||
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
|
||||
----------
|
||||
* [ProfileManager] Added GetPlayerName(pn) Lua binding. [AJ]
|
||||
|
||||
@@ -1545,6 +1545,24 @@ void SongManager::UpdatePreferredSort(RString sPreferredSongs, RString sPreferre
|
||||
}
|
||||
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 );
|
||||
if( pSong == NULL )
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user