Allow modifier strings to set the level of a modifier, eg. "75% drunk".

Allow disabling modifiers, eg. "no left".
This commit is contained in:
Glenn Maynard
2003-09-27 07:30:54 +00:00
parent 45e1f3566d
commit 40d5240536
2 changed files with 105 additions and 50 deletions
+15
View File
@@ -91,11 +91,26 @@ void SongOptions::FromString( CString sOptions )
ASSERT( ret == 1 );
}
CStringArray asParts;
split( sBit, " ", asParts, true );
bool on = true;
if( asParts.size() > 1 )
{
sBit = asParts[1];
if( asParts[0] == "no" )
on = false;
}
if( sBit == "norecover" ) m_DrainType = DRAIN_NO_RECOVER;
else if( sBit == "suddendeath" ) m_DrainType = DRAIN_SUDDEN_DEATH;
else if( sBit == "power-drop" ) m_DrainType = DRAIN_NO_RECOVER;
else if( sBit == "death" ) m_DrainType = DRAIN_SUDDEN_DEATH;
else if( sBit == "failarcade" ) m_FailType = FAIL_ARCADE;
else if( sBit == "failendofsong" ) m_FailType = FAIL_END_OF_SONG;
else if( sBit == "failoff" ) m_FailType = FAIL_OFF;
else if( sBit == "assisttick" ) m_bAssistTick = on;
else if( sBit == "autosync" ) m_bAutoSync = on;
else if( sBit == "savescore" ) m_bSaveScore = on;
}
}