Event mode overrides on locked status

This commit is contained in:
Mike Hawkins
2008-05-15 02:22:14 +00:00
parent dd347e27c5
commit d6d98bd474
3 changed files with 28 additions and 0 deletions
+4
View File
@@ -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 ),
+5
View File
@@ -129,6 +129,11 @@ public:
Preference<float> m_fLifeDifficultyScale;
// Event Mode overrides to show courses/mods/songs/steps without changing their selectable/lock status manually
Preference<bool> m_bEventIgnoresLockStatusCS;
Preference<bool> m_bEventIgnoresLockStatusMod;
Preference<bool> m_bEventIgnoresLockStatusStep;
// Whoever added these: Please add a comment saying what they do. -Chris
Preference<int> m_iRegenComboAfterMiss;
Preference<bool> m_bMercifulDrain; // negative life deltas are scaled by the players life percentage
+19
View File
@@ -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();
}