fix/cleanup roulette-only songs
This commit is contained in:
@@ -358,14 +358,15 @@ void MusicWheel::GetSongList(vector<Song*> &arraySongs, SongSortOrder so, CStrin
|
|||||||
|
|
||||||
/* If we're on an extra stage, and this song is selected, ignore #SELECTABLE. */
|
/* If we're on an extra stage, and this song is selected, ignore #SELECTABLE. */
|
||||||
if( pSong != GAMESTATE->m_pCurSong ||
|
if( pSong != GAMESTATE->m_pCurSong ||
|
||||||
(!GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2()) ) {
|
(!GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2()) )
|
||||||
|
{
|
||||||
/* Hide songs that asked to be hidden via #SELECTABLE. */
|
/* Hide songs that asked to be hidden via #SELECTABLE. */
|
||||||
if( so!=SORT_ROULETTE && !pSong->NormallyDisplayed() )
|
if( so!=SORT_ROULETTE && !pSong->NormallyDisplayed() )
|
||||||
continue;
|
continue;
|
||||||
/* Don't show in roulette if #SELECTABLE:NO unless some other song in the same
|
if( so!=SORT_ROULETTE && UNLOCKMAN->SongIsRouletteOnly( pSong ) )
|
||||||
* roulette class has previously been unlocked. */
|
continue;
|
||||||
if( so==SORT_ROULETTE && !(pSong->RouletteDisplayed()
|
/* Don't show in roulette if #SELECTABLE:NO. */
|
||||||
|| UNLOCKMAN->SongIsRoulette( pSong )) )
|
if( so==SORT_ROULETTE && !pSong->RouletteDisplayed() )
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,8 +79,8 @@ bool UnlockSystem::SongIsLocked( const Song *song ) const
|
|||||||
return p->IsLocked();
|
return p->IsLocked();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return true if the song is available in roulette (overriding #SELECTABLE). */
|
/* Return true if the song is *only* available in roulette. */
|
||||||
bool UnlockSystem::SongIsRoulette( const Song *song ) const
|
bool UnlockSystem::SongIsRouletteOnly( const Song *song ) const
|
||||||
{
|
{
|
||||||
if( !PREFSMAN->m_bUseUnlockSystem )
|
if( !PREFSMAN->m_bUseUnlockSystem )
|
||||||
return false;
|
return false;
|
||||||
@@ -90,10 +90,10 @@ bool UnlockSystem::SongIsRoulette( const Song *song ) const
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* If the song is locked by a code, and it's a roulette code, honor IsLocked. */
|
/* If the song is locked by a code, and it's a roulette code, honor IsLocked. */
|
||||||
if( p->m_iCode != -1 &&
|
if( p->m_iCode == -1 || m_RouletteCodes.find( p->m_iCode ) == m_RouletteCodes.end() )
|
||||||
m_RouletteCodes.find( p->m_iCode ) != m_RouletteCodes.end() )
|
return false;
|
||||||
return p->IsLocked();
|
|
||||||
return true;
|
return p->IsLocked();
|
||||||
}
|
}
|
||||||
|
|
||||||
const UnlockEntry *UnlockSystem::FindLockEntry( CString songname ) const
|
const UnlockEntry *UnlockSystem::FindLockEntry( CString songname ) const
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ public:
|
|||||||
|
|
||||||
// Used on select screens:
|
// Used on select screens:
|
||||||
bool SongIsLocked( const Song *song ) const;
|
bool SongIsLocked( const Song *song ) const;
|
||||||
bool SongIsRoulette( const Song *song ) const;
|
bool SongIsRouletteOnly( const Song *song ) const;
|
||||||
bool CourseIsLocked( const Course *course ) const;
|
bool CourseIsLocked( const Course *course ) const;
|
||||||
|
|
||||||
// Gets number of unlocks for title screen
|
// Gets number of unlocks for title screen
|
||||||
|
|||||||
Reference in New Issue
Block a user