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