add IsAnExtraStageAndSelectionLocked. add metircs MinDifficultyForExtra, LockExtraStageSelection
This commit is contained in:
@@ -4125,6 +4125,8 @@ GradeTierForExtra2="Grade_Tier03"
|
||||
AllowLateJoin=false
|
||||
ProfileRecordFeats=true
|
||||
CategoryRecordFeats=true
|
||||
MinDifficultyForExtra="Difficulty_Hard"
|
||||
LockExtraStageSelection=true
|
||||
|
||||
[ScreenMiniMenuContext]
|
||||
Fallback="ScreenMiniMenu"
|
||||
|
||||
@@ -142,7 +142,7 @@ void BPMDisplay::SetBPMRange( const DisplayBpms &bpms )
|
||||
m_fPercentInState = 1;
|
||||
}
|
||||
|
||||
if( GAMESTATE->IsAnExtraStage() )
|
||||
if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
|
||||
RunCommands( SET_EXTRA_COMMAND );
|
||||
else if( !AllIdentical )
|
||||
RunCommands( SET_CHANGING_COMMAND );
|
||||
@@ -233,7 +233,7 @@ void BPMDisplay::SetFromGameState()
|
||||
{
|
||||
if( GAMESTATE->m_pCurSong.Get() )
|
||||
{
|
||||
if( GAMESTATE->IsAnExtraStage() )
|
||||
if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
|
||||
CycleRandomly();
|
||||
else
|
||||
SetBpmFromSong( GAMESTATE->m_pCurSong );
|
||||
|
||||
@@ -96,6 +96,7 @@ Song* GameState::GetDefaultSong() const
|
||||
return sid.ToSong();
|
||||
}
|
||||
|
||||
static const ThemeMetric<Difficulty> MIN_DIFFICULTY_FOR_EXTRA ("GameState","MinDifficultyForExtra");
|
||||
static const ThemeMetric<Grade> GRADE_TIER_FOR_EXTRA_1 ("GameState","GradeTierForExtra1");
|
||||
static const ThemeMetric<bool> ALLOW_EXTRA_2 ("GameState","AllowExtra2");
|
||||
static const ThemeMetric<Grade> GRADE_TIER_FOR_EXTRA_2 ("GameState","GradeTierForExtra2");
|
||||
@@ -949,6 +950,12 @@ bool GameState::IsAnExtraStage() const
|
||||
return !IsEventMode() && !IsCourseMode() && m_iAwardedExtraStages[m_MasterPlayerNumber] > 0;
|
||||
}
|
||||
|
||||
static ThemeMetric<bool> LOCK_EXTRA_STAGE_SELECTION("GameState","LockExtraStageSelection");
|
||||
bool GameState::IsAnExtraStageAndSelectionLocked() const
|
||||
{
|
||||
return IsAnExtraStage() && LOCK_EXTRA_STAGE_SELECTION;
|
||||
}
|
||||
|
||||
bool GameState::IsExtraStage() const
|
||||
{
|
||||
if( m_MasterPlayerNumber == PlayerNumber_Invalid )
|
||||
@@ -1223,9 +1230,17 @@ bool GameState::HasEarnedExtraStageInternal() const
|
||||
|
||||
FOREACH_EnabledPlayer( pn )
|
||||
{
|
||||
if( m_pCurSteps[pn]->GetDifficulty() != Difficulty_Hard &&
|
||||
m_pCurSteps[pn]->GetDifficulty() != Difficulty_Challenge )
|
||||
Difficulty dc = m_pCurSteps[pn]->GetDifficulty();
|
||||
switch( dc )
|
||||
{
|
||||
case Difficulty_Edit:
|
||||
continue; /* not hard enough! */
|
||||
break;
|
||||
default:
|
||||
if( dc < MIN_DIFFICULTY_FOR_EXTRA )
|
||||
continue; /* not hard enough! */
|
||||
break;
|
||||
}
|
||||
|
||||
if( IsExtraStage() )
|
||||
{
|
||||
|
||||
@@ -145,6 +145,7 @@ public:
|
||||
int GetSmallestNumStagesLeftForAnyHumanPlayer() const;
|
||||
bool IsFinalStageForAnyHumanPlayer() const;
|
||||
bool IsAnExtraStage() const;
|
||||
bool IsAnExtraStageAndSelectionLocked() const;
|
||||
bool IsExtraStage() const;
|
||||
bool IsExtraStage2() const;
|
||||
Stage GetCurrentStage() const;
|
||||
|
||||
@@ -128,7 +128,7 @@ void MusicWheel::BeginScreen()
|
||||
|
||||
WheelBase::BeginScreen();
|
||||
|
||||
if( GAMESTATE->IsAnExtraStage() )
|
||||
if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
|
||||
{
|
||||
m_WheelState = STATE_LOCKED;
|
||||
SCREENMAN->PlayStartSound();
|
||||
@@ -566,7 +566,7 @@ void MusicWheel::BuildWheelItemDatas( vector<MusicWheelItemData *> &arrayWheelIt
|
||||
arrayWheelItemDatas.push_back( new MusicWheelItemData(TYPE_PORTAL, NULL, "", NULL, RageColor(1,0,0,1), 0) );
|
||||
}
|
||||
|
||||
if( GAMESTATE->IsAnExtraStage() )
|
||||
if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
|
||||
{
|
||||
Song* pSong;
|
||||
Steps* pSteps;
|
||||
|
||||
@@ -530,14 +530,14 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
||||
{
|
||||
if( input.MenuI == m_GameButtonPreviousSong )
|
||||
{
|
||||
if( GAMESTATE->IsAnExtraStage() )
|
||||
if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
|
||||
m_soundLocked.Play();
|
||||
else
|
||||
ChangeDifficulty( input.pn, -1 );
|
||||
}
|
||||
else if( input.MenuI == m_GameButtonNextSong )
|
||||
{
|
||||
if( GAMESTATE->IsAnExtraStage() )
|
||||
if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
|
||||
m_soundLocked.Play();
|
||||
else
|
||||
ChangeDifficulty( input.pn, +1 );
|
||||
@@ -554,14 +554,14 @@ bool ScreenSelectMusic::DetectCodes( const InputEventPlus &input )
|
||||
{
|
||||
if( CodeDetector::EnteredEasierDifficulty(input.GameI.controller) )
|
||||
{
|
||||
if( GAMESTATE->IsAnExtraStage() )
|
||||
if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
|
||||
m_soundLocked.Play();
|
||||
else
|
||||
ChangeDifficulty( input.pn, -1 );
|
||||
}
|
||||
else if( CodeDetector::EnteredHarderDifficulty(input.GameI.controller) )
|
||||
{
|
||||
if( GAMESTATE->IsAnExtraStage() )
|
||||
if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
|
||||
m_soundLocked.Play();
|
||||
else
|
||||
ChangeDifficulty( input.pn, +1 );
|
||||
@@ -575,12 +575,12 @@ bool ScreenSelectMusic::DetectCodes( const InputEventPlus &input )
|
||||
}
|
||||
else if( CodeDetector::EnteredNextSort(input.GameI.controller) )
|
||||
{
|
||||
if( GAMESTATE->IsAnExtraStage() )
|
||||
if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
|
||||
m_soundLocked.Play();
|
||||
else
|
||||
m_MusicWheel.NextSort();
|
||||
}
|
||||
else if( !GAMESTATE->IsAnExtraStage() && CodeDetector::DetectAndAdjustMusicOptions(input.GameI.controller) )
|
||||
else if( !GAMESTATE->IsAnExtraStageAndSelectionLocked() && CodeDetector::DetectAndAdjustMusicOptions(input.GameI.controller) )
|
||||
{
|
||||
m_soundOptionsChange.Play();
|
||||
|
||||
@@ -830,7 +830,7 @@ void ScreenSelectMusic::MenuStart( const InputEventPlus &input )
|
||||
bIsRepeat = true;
|
||||
|
||||
/* Don't complain about repeats if the user didn't get to pick. */
|
||||
if( GAMESTATE->IsAnExtraStage() )
|
||||
if( GAMESTATE->IsAnExtraStageAndSelectionLocked() )
|
||||
bIsRepeat = false;
|
||||
|
||||
if( bIsRepeat )
|
||||
|
||||
Reference in New Issue
Block a user