merge UnlockManager::SongIsRouletteOnly into SongIsLocked
This commit is contained in:
@@ -140,7 +140,11 @@ int UnlockManager::SongIsLocked( const Song *pSong ) const
|
||||
{
|
||||
const UnlockEntry *p = FindSong( pSong );
|
||||
if( p != NULL && p->IsLocked() )
|
||||
{
|
||||
iRet |= LOCKED_LOCK;
|
||||
if( !p->m_sEntryID.empty() && m_RouletteCodes.find( p->m_sEntryID ) != m_RouletteCodes.end() )
|
||||
iRet |= LOCKED_ROULETTE;
|
||||
}
|
||||
}
|
||||
if( PREFSMAN->m_bHiddenSongs && pSong->m_SelectionDisplay == Song::SHOW_NEVER )
|
||||
iRet |= LOCKED_SELECTABLE;
|
||||
@@ -149,23 +153,6 @@ int UnlockManager::SongIsLocked( const Song *pSong ) const
|
||||
return iRet;
|
||||
}
|
||||
|
||||
/* Return true if the song is *only* available in roulette. */
|
||||
bool UnlockManager::SongIsRouletteOnly( const Song *song ) const
|
||||
{
|
||||
if( !PREFSMAN->m_bUseUnlockSystem )
|
||||
return false;
|
||||
|
||||
const UnlockEntry *p = FindSong( song );
|
||||
if( p == NULL )
|
||||
return false;
|
||||
|
||||
/* If the song is locked by a code, and it's a roulette code, honor IsLocked. */
|
||||
if( p->m_sEntryID.empty() || m_RouletteCodes.find( p->m_sEntryID ) == m_RouletteCodes.end() )
|
||||
return false;
|
||||
|
||||
return p->IsLocked();
|
||||
}
|
||||
|
||||
bool UnlockManager::StepsIsLocked( const Song *pSong, const Steps *pSteps ) const
|
||||
{
|
||||
if( !PREFSMAN->m_bUseUnlockSystem )
|
||||
|
||||
Reference in New Issue
Block a user