Add lua docs for GetPreferredSortSongsBySectionName, update comment, remove duplicate code
This commit is contained in:
@@ -1871,6 +1871,7 @@
|
|||||||
<Function name='SetPreferredSongs'/>
|
<Function name='SetPreferredSongs'/>
|
||||||
<Function name='ShortenGroupName'/>
|
<Function name='ShortenGroupName'/>
|
||||||
<Function name='SongToPreferredSortSectionName'/>
|
<Function name='SongToPreferredSortSectionName'/>
|
||||||
|
<Function name='GetPreferredSortSongsBySectionName'/>
|
||||||
<Function name='WasLoadedFromAdditionalCourses'/>
|
<Function name='WasLoadedFromAdditionalCourses'/>
|
||||||
<Function name='WasLoadedFromAdditionalSongs'/>
|
<Function name='WasLoadedFromAdditionalSongs'/>
|
||||||
</Class>
|
</Class>
|
||||||
|
|||||||
@@ -5908,6 +5908,9 @@ local args = {
|
|||||||
<Function name='SongToPreferredSortSectionName' return='string' arguments='Song s'>
|
<Function name='SongToPreferredSortSectionName' return='string' arguments='Song s'>
|
||||||
Returns the preferred sort section name for the specified Song.
|
Returns the preferred sort section name for the specified Song.
|
||||||
</Function>
|
</Function>
|
||||||
|
<Function name='GetPreferredSortSongsBySectionName' return='{Song}' arguments='string sSectionName'>
|
||||||
|
Returns a table containing all songs in the specified preferred sort section.
|
||||||
|
</Function>
|
||||||
<Function name='WasLoadedFromAdditionalCourses' return='bool' arguments='Course c'>
|
<Function name='WasLoadedFromAdditionalCourses' return='bool' arguments='Course c'>
|
||||||
[Deprecated] Always returns <code>false</code>.
|
[Deprecated] Always returns <code>false</code>.
|
||||||
</Function>
|
</Function>
|
||||||
|
|||||||
+2
-2
@@ -1245,8 +1245,8 @@ void MusicWheel::ChangeMusic( int iDist )
|
|||||||
bool MusicWheel::ChangeSort( SortOrder new_so, bool allowSameSort ) // return true if change successful
|
bool MusicWheel::ChangeSort( SortOrder new_so, bool allowSameSort ) // return true if change successful
|
||||||
{
|
{
|
||||||
ASSERT( new_so < NUM_SortOrder );
|
ASSERT( new_so < NUM_SortOrder );
|
||||||
// Ignore allowSameSort if we're using SORT_PREFERRED
|
// NOTE(crashcringle): Ignore allowSameSort if we're using SORT_PREFERRED.
|
||||||
// Each player has their own preferred songs which sorts the songs differently -crashcringle
|
// Each player has their own preferred songs which sorts the songs differently
|
||||||
if( GAMESTATE->m_SortOrder == new_so && (!allowSameSort && new_so != SORT_PREFERRED ))
|
if( GAMESTATE->m_SortOrder == new_so && (!allowSameSort && new_so != SORT_PREFERRED ))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
+1
-8
@@ -861,14 +861,7 @@ void SongManager::GetPreferredSortSongsBySectionName( const RString &sSectionNam
|
|||||||
std::vector<Song*> SongManager::GetPreferredSortSongsBySectionName( const RString &sSectionName ) const
|
std::vector<Song*> SongManager::GetPreferredSortSongsBySectionName( const RString &sSectionName ) const
|
||||||
{
|
{
|
||||||
std::vector<Song*> AddTo;
|
std::vector<Song*> AddTo;
|
||||||
for (PreferredSortSection const &v : m_vPreferredSongSort)
|
GetPreferredSortSongsBySectionName(sSectionName, AddTo);
|
||||||
{
|
|
||||||
if (v.sName == sSectionName)
|
|
||||||
{
|
|
||||||
AddTo.insert( AddTo.end(), v.vpSongs.begin(), v.vpSongs.end() );
|
|
||||||
return AddTo;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return AddTo;
|
return AddTo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user