add song-based branching
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "Grade.h"
|
||||
#include "GameState.h"
|
||||
#include "StageStats.h"
|
||||
#include "SongManager.h"
|
||||
|
||||
#define CHOICES THEME->GetMetric (m_sName,"Choices")
|
||||
#define CONDITION(choice) THEME->GetMetric (m_sName,"Condition"+choice)
|
||||
@@ -34,6 +35,16 @@ bool EvaluateCondition( CString sCondition )
|
||||
CStringArray as;
|
||||
split( sCondition, ",", as, false );
|
||||
|
||||
if( as.size()==3 && as[0].CompareNoCase("song")==0 )
|
||||
{
|
||||
const CString &sOp = as[1];
|
||||
const CString &path = as[2];
|
||||
|
||||
const Song *s = SONGMAN->FindSong( path );
|
||||
if( sOp == "=" )
|
||||
return s == GAMESTATE->m_pCurSong;
|
||||
}
|
||||
|
||||
if( as.size()==3 && as[0].CompareNoCase("topgrade")==0 )
|
||||
{
|
||||
Grade top_grade = GRADE_FAILED;
|
||||
|
||||
Reference in New Issue
Block a user