PlayerOption po1; // Initialize it.
PlayerOption po2; po2.FromString( po1.GetString() ); po2 does not necessarily equal po1 because the note skin might be omitted so po2's note skin will be blank. Passing true to GetString() will include the note skin so po2.FromString( po1.GetString(true) ) will cause po2 to equal po1.
This commit is contained in:
@@ -76,14 +76,14 @@ static void AddPart( vector<RString> &AddTo, float level, RString name )
|
||||
AddTo.push_back( LevelStr + name );
|
||||
}
|
||||
|
||||
RString PlayerOptions::GetString() const
|
||||
RString PlayerOptions::GetString( bool bForceNoteSkin ) const
|
||||
{
|
||||
vector<RString> v;
|
||||
GetMods( v );
|
||||
GetMods( v, bForceNoteSkin );
|
||||
return join( ", ", v );
|
||||
}
|
||||
|
||||
void PlayerOptions::GetMods( vector<RString> &AddTo ) const
|
||||
void PlayerOptions::GetMods( vector<RString> &AddTo, bool bForceNoteSkin ) const
|
||||
{
|
||||
RString sReturn;
|
||||
|
||||
@@ -195,8 +195,8 @@ void PlayerOptions::GetMods( vector<RString> &AddTo ) const
|
||||
AddPart( AddTo, m_fSkew, "Incoming" );
|
||||
}
|
||||
|
||||
// Don't display a string if using the default NoteSkin.
|
||||
if( !m_sNoteSkin.empty() && m_sNoteSkin != NOTESKIN->GAME_BASE_NOTESKIN_NAME.GetValue() )
|
||||
// Don't display a string if using the default NoteSkin unless we force it.
|
||||
if( bForceNoteSkin || (!m_sNoteSkin.empty() && m_sNoteSkin != NOTESKIN->GAME_BASE_NOTESKIN_NAME.GetValue()) )
|
||||
{
|
||||
RString s = m_sNoteSkin;
|
||||
Capitalize( s );
|
||||
|
||||
@@ -16,10 +16,10 @@ public:
|
||||
PlayerOptions() { Init(); };
|
||||
void Init();
|
||||
void Approach( const PlayerOptions& other, float fDeltaSeconds );
|
||||
RString GetString() const;
|
||||
RString GetString( bool bForceNoteSkin = false ) const;
|
||||
RString GetSavedPrefsString() const; // only the basic options that players would want for every song
|
||||
void ResetSavedPrefs();
|
||||
void GetMods( vector<RString> &AddTo ) const;
|
||||
void GetMods( vector<RString> &AddTo, bool bForceNoteSkin = false ) const;
|
||||
void GetLocalizedMods( vector<RString> &AddTo ) const;
|
||||
void FromString( const RString &sOptions, bool bWarnOnInvalid = false );
|
||||
void ChooseRandomModifiers();
|
||||
|
||||
Reference in New Issue
Block a user