diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index 0d17654887..a244214a7c 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -232,6 +232,10 @@ PrefsManager::PrefsManager() : m_bEnableAttackSoundPlayback ( "EnableAttackSounds", true ), m_bEnableMineSoundPlayback ( "EnableMineHitSound", true ), + m_bEventIgnoredLockStatusCS ( "EventModeShowsHiddenOrLockedCoursesAndSongs", false ), + m_bEventIgnoredLockStatusMod ( "EventModeShowsLockedModifiers", false ), + m_bEventIgnoredLockStatusStep ( "EventModeShowsLockedSteps", false ), + m_bSignProfileData ( "SignProfileData", false ), m_CourseSortOrder ( "CourseSortOrder", COURSE_SORT_SONGS ), m_bSubSortByNumSteps ( "SubSortByNumSteps", false ), diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index 200b2d8449..315926d380 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -129,6 +129,11 @@ public: Preference m_fLifeDifficultyScale; + // Event Mode overrides to show courses/mods/songs/steps without changing their selectable/lock status manually + Preference m_bEventIgnoresLockStatusCS; + Preference m_bEventIgnoresLockStatusMod; + Preference m_bEventIgnoresLockStatusStep; + // Whoever added these: Please add a comment saying what they do. -Chris Preference m_iRegenComboAfterMiss; Preference m_bMercifulDrain; // negative life deltas are scaled by the players life percentage diff --git a/stepmania/src/UnlockManager.cpp b/stepmania/src/UnlockManager.cpp index 79b55640b2..6257a8bd55 100644 --- a/stepmania/src/UnlockManager.cpp +++ b/stepmania/src/UnlockManager.cpp @@ -109,6 +109,7 @@ RString UnlockManager::FindEntryID( const RString &sName ) const int UnlockManager::CourseIsLocked( const Course *pCourse ) const { int iRet = 0; + if( PREFSMAN->m_bUseUnlockSystem ) { const UnlockEntry *p = FindCourse( pCourse ); @@ -130,6 +131,10 @@ int UnlockManager::CourseIsLocked( const Course *pCourse ) const iRet |= LOCKED_DISABLED; } + // Show the course if this is true + if( PREFSMAN->m_bEventMode && PREFSMAN->m_bEventIgnoresLockStatusCS ) + iRet = 0; + return iRet; } @@ -148,8 +153,14 @@ int UnlockManager::SongIsLocked( const Song *pSong ) const } if( PREFSMAN->m_bHiddenSongs && pSong->m_SelectionDisplay == Song::SHOW_NEVER ) iRet |= LOCKED_SELECTABLE; + if( !pSong->m_bEnabled ) iRet |= LOCKED_DISABLED; + + // Check to see if we should show anyways because of Event Mode. + if( PREFSMAN->m_bEventMode && PREFSMAN->m_bEventIgnoresLockStatusCS ) + iRet = 0; + return iRet; } @@ -162,6 +173,10 @@ bool UnlockManager::StepsIsLocked( const Song *pSong, const Steps *pSteps ) cons if( p == NULL ) return false; + // Show the stepchart if this is true + if( PREFSMAN->m_bEventMode && PREFSMAN->m_bEventIgnoresLockStatusSteps ) + return false; + return p->IsLocked(); } @@ -174,6 +189,10 @@ bool UnlockManager::ModifierIsLocked( const RString &sOneMod ) const if( p == NULL ) return false; + // Show the modifier if this is true + if( PREFSMAN->m_bEventMode && PREFSMAN->m_bEventIgnoresLockStatusModifier ) + return false; + return p->IsLocked(); }