From 91999148d844d9bc4f460dcea433e07ca7fe3b85 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Thu, 29 Sep 2011 22:09:52 -0400 Subject: [PATCH] Add GameState::EditAllowedForExtra metric. --- Docs/Changelog_sm5.txt | 3 +++ Themes/_fallback/metrics.ini | 2 ++ src/GameState.cpp | 4 +++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index ee4ec85322..dcf3d95c26 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -11,6 +11,9 @@ StepMania 5.0 $next | 201110?? 2011/09/29 ---------- * [Fallback theme] Fix ImmediateHoldLetGo function. [Wolfman2000] +* [GameState] Add the EditAllowedForExtra metric. Use this if you want edit + steps to be allowed for accessing the extra stage. By default, this is + false. [Wolfman2000] 2011/09/26 ---------- diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index a930f74334..bfb1aaa55b 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -490,6 +490,8 @@ LockExtraStageSelection=true # [sm-ssc] Normally, in event mode, the premium value is ignored. Set this # metric to true to re-gain that behavior. DisablePremiumInEventMode=false +# Let edit steps be allowed for earning extra stages. +EditAllowedForExtra=false [GrooveRadar] # Polar graph that shows difficulty stuff in depth diff --git a/src/GameState.cpp b/src/GameState.cpp index 22cea682f3..a5b06cf98d 100644 --- a/src/GameState.cpp +++ b/src/GameState.cpp @@ -94,6 +94,7 @@ Song* GameState::GetDefaultSong() const return sid.ToSong(); } +static const ThemeMetric EDIT_ALLOWED_FOR_EXTRA ("GameState","EditAllowedForExtra"); static const ThemeMetric MIN_DIFFICULTY_FOR_EXTRA ("GameState","MinDifficultyForExtra"); static const ThemeMetric GRADE_TIER_FOR_EXTRA_1 ("GameState","GradeTierForExtra1"); static const ThemeMetric ALLOW_EXTRA_2 ("GameState","AllowExtra2"); @@ -1297,7 +1298,8 @@ EarnedExtraStage GameState::CalculateEarnedExtraStage() const switch( dc ) { case Difficulty_Edit: - continue; // can't use edit steps + if( !EDIT_ALLOWED_FOR_EXTRA ) + continue; // can't use edit steps break; default: if( dc < MIN_DIFFICULTY_FOR_EXTRA )