hide tutorial songs in all modes but PLAY_MODE_ARCADE
This commit is contained in:
@@ -1309,15 +1309,21 @@ void MusicWheel::SetOpenGroup(CString group, SortOrder so)
|
||||
|
||||
m_CurWheelItemData.clear();
|
||||
vector<WheelItemData> &from = m_WheelItemDatas[so];
|
||||
unsigned i;
|
||||
for(i = 0; i < from.size(); ++i)
|
||||
for( unsigned i = 0; i < from.size(); ++i )
|
||||
{
|
||||
if((from[i].m_Type == TYPE_SONG ||
|
||||
from[i].m_Type == TYPE_COURSE) &&
|
||||
!from[i].m_sSectionName.empty() &&
|
||||
from[i].m_sSectionName != group)
|
||||
WheelItemData &d = from[i];
|
||||
if( (d.m_Type == TYPE_SONG || d.m_Type == TYPE_COURSE) &&
|
||||
!d.m_sSectionName.empty() &&
|
||||
d.m_sSectionName != group )
|
||||
continue;
|
||||
m_CurWheelItemData.push_back(&from[i]);
|
||||
|
||||
/* Only show tutorial songs in arcade */
|
||||
if( GAMESTATE->m_PlayMode!=PLAY_MODE_ARCADE &&
|
||||
d.m_pSong &&
|
||||
d.m_pSong->IsTutorial() )
|
||||
continue;
|
||||
|
||||
m_CurWheelItemData.push_back(&d);
|
||||
}
|
||||
|
||||
|
||||
@@ -1326,7 +1332,7 @@ void MusicWheel::SetOpenGroup(CString group, SortOrder so)
|
||||
//
|
||||
m_iSelection = 0;
|
||||
|
||||
for( i=0; i<m_CurWheelItemData.size(); i++ )
|
||||
for( unsigned i=0; i<m_CurWheelItemData.size(); i++ )
|
||||
{
|
||||
if( m_CurWheelItemData[i] == old )
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "ProfileManager.h"
|
||||
#include "StageStats.h"
|
||||
#include "StepsUtil.h"
|
||||
#include "Foreach.h"
|
||||
|
||||
#include "NotesLoaderSM.h"
|
||||
#include "NotesLoaderDWI.h"
|
||||
@@ -1184,6 +1185,19 @@ bool Song::IsEasy( StepsType st ) const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Song::IsTutorial() const
|
||||
{
|
||||
FOREACH_CONST( Steps*, m_vpSteps, s )
|
||||
{
|
||||
if( (*s)->m_StepsType == STEPS_TYPE_LIGHTS_CABINET )
|
||||
continue; // ignore
|
||||
if( (*s)->GetDifficulty() != DIFFICULTY_BEGINNER )
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Song::HasEdits( StepsType st ) const
|
||||
{
|
||||
for( unsigned i=0; i<m_vpSteps.size(); i++ )
|
||||
|
||||
@@ -180,6 +180,7 @@ public:
|
||||
Steps* GetStepsByDescription( StepsType st, CString sDescription ) const;
|
||||
Steps* GetClosestNotes( StepsType st, Difficulty dc ) const;
|
||||
bool IsEasy( StepsType st ) const;
|
||||
bool IsTutorial() const;
|
||||
bool HasEdits( StepsType st ) const;
|
||||
SelectionDisplay GetDisplayed() const;
|
||||
bool NormallyDisplayed() const { return GetDisplayed() == SHOW_ALWAYS; }
|
||||
|
||||
Reference in New Issue
Block a user