[Course] Added #SCRIPTER tag and GetScripter Lua binding.
This commit is contained in:
@@ -24,6 +24,7 @@ sm-ssc v1.2.5 | 20110???
|
|||||||
* [Song] Added Origin (#ORIGIN tag in .ssc) [AJ]
|
* [Song] Added Origin (#ORIGIN tag in .ssc) [AJ]
|
||||||
* [UnlockManager] Added GetPoints(UnlockRequirement),
|
* [UnlockManager] Added GetPoints(UnlockRequirement),
|
||||||
GetPointsForProfile(Profile,UnlockRequirement) Lua bindings. [AJ]
|
GetPointsForProfile(Profile,UnlockRequirement) Lua bindings. [AJ]
|
||||||
|
* [Course] Added #SCRIPTER tag and GetScripter Lua binding. [AJ]
|
||||||
|
|
||||||
20110428
|
20110428
|
||||||
--------
|
--------
|
||||||
|
|||||||
+12
-9
@@ -91,7 +91,7 @@ int CourseEntry::GetNumModChanges() const
|
|||||||
Course::Course(): m_bIsAutogen(false), m_sPath(""), m_sMainTitle(""),
|
Course::Course(): m_bIsAutogen(false), m_sPath(""), m_sMainTitle(""),
|
||||||
m_sMainTitleTranslit(""), m_sSubTitle(""), m_sSubTitleTranslit(""),
|
m_sMainTitleTranslit(""), m_sSubTitle(""), m_sSubTitleTranslit(""),
|
||||||
m_sBannerPath(""), m_sBackgroundPath(""), m_sCDTitlePath(""),
|
m_sBannerPath(""), m_sBackgroundPath(""), m_sCDTitlePath(""),
|
||||||
m_sGroupName(""), m_bRepeat(false), m_fGoalSeconds(0),
|
m_sGroupName(""), m_sScripter(""), m_bRepeat(false), m_fGoalSeconds(0),
|
||||||
m_bShuffle(false), m_iLives(-1), m_bSortByMeter(false),
|
m_bShuffle(false), m_iLives(-1), m_bSortByMeter(false),
|
||||||
m_bIncomplete(false), m_vEntries(), m_SortOrder_TotalDifficulty(0),
|
m_bIncomplete(false), m_vEntries(), m_SortOrder_TotalDifficulty(0),
|
||||||
m_SortOrder_Ranking(0), m_LoadedFromProfile(ProfileSlot_Invalid),
|
m_SortOrder_Ranking(0), m_LoadedFromProfile(ProfileSlot_Invalid),
|
||||||
@@ -175,6 +175,7 @@ void Course::Init()
|
|||||||
m_sMainTitleTranslit = "";
|
m_sMainTitleTranslit = "";
|
||||||
m_sSubTitle = "";
|
m_sSubTitle = "";
|
||||||
m_sSubTitleTranslit = "";
|
m_sSubTitleTranslit = "";
|
||||||
|
m_sScripter = "";
|
||||||
|
|
||||||
m_sBannerPath = "";
|
m_sBannerPath = "";
|
||||||
m_sBackgroundPath = "";
|
m_sBackgroundPath = "";
|
||||||
@@ -1091,6 +1092,7 @@ public:
|
|||||||
static int GetGroupName( T* p, lua_State *L ) { lua_pushstring(L, p->m_sGroupName ); return 1; }
|
static int GetGroupName( T* p, lua_State *L ) { lua_pushstring(L, p->m_sGroupName ); return 1; }
|
||||||
static int IsAutogen( T* p, lua_State *L ) { lua_pushboolean(L, p->m_bIsAutogen ); return 1; }
|
static int IsAutogen( T* p, lua_State *L ) { lua_pushboolean(L, p->m_bIsAutogen ); return 1; }
|
||||||
static int GetEstimatedNumStages( T* p, lua_State *L ) { lua_pushnumber(L, p->GetEstimatedNumStages() ); return 1; }
|
static int GetEstimatedNumStages( T* p, lua_State *L ) { lua_pushnumber(L, p->GetEstimatedNumStages() ); return 1; }
|
||||||
|
static int GetScripter( T* p, lua_State *L ) { lua_pushstring(L, p->m_sScripter ); return 1; }
|
||||||
static int GetTotalSeconds( T* p, lua_State *L )
|
static int GetTotalSeconds( T* p, lua_State *L )
|
||||||
{
|
{
|
||||||
StepsType st = Enum::Check<StepsType>(L, 1);
|
StepsType st = Enum::Check<StepsType>(L, 1);
|
||||||
@@ -1111,28 +1113,29 @@ public:
|
|||||||
|
|
||||||
LunaCourse()
|
LunaCourse()
|
||||||
{
|
{
|
||||||
ADD_METHOD( GetPlayMode ); // [sm-ssc] returns PlayMode enum now
|
ADD_METHOD( GetPlayMode );
|
||||||
ADD_METHOD( GetDisplayFullTitle );
|
ADD_METHOD( GetDisplayFullTitle );
|
||||||
ADD_METHOD( GetTranslitFullTitle );
|
ADD_METHOD( GetTranslitFullTitle );
|
||||||
ADD_METHOD( HasMods );
|
ADD_METHOD( HasMods );
|
||||||
ADD_METHOD( HasTimedMods );
|
ADD_METHOD( HasTimedMods );
|
||||||
ADD_METHOD( GetCourseType ); // [sm-ssc] returns CourseType enum now
|
ADD_METHOD( GetCourseType );
|
||||||
ADD_METHOD( GetCourseEntry );
|
ADD_METHOD( GetCourseEntry );
|
||||||
ADD_METHOD( GetCourseEntries );
|
ADD_METHOD( GetCourseEntries );
|
||||||
ADD_METHOD( GetAllTrails );
|
ADD_METHOD( GetAllTrails );
|
||||||
ADD_METHOD( GetBannerPath );
|
ADD_METHOD( GetBannerPath );
|
||||||
ADD_METHOD( GetBackgroundPath ); // sm-ssc addition
|
ADD_METHOD( GetBackgroundPath );
|
||||||
ADD_METHOD( GetCourseDir ); // sm-ssc addition
|
ADD_METHOD( GetCourseDir );
|
||||||
ADD_METHOD( GetGroupName );
|
ADD_METHOD( GetGroupName );
|
||||||
ADD_METHOD( IsAutogen );
|
ADD_METHOD( IsAutogen );
|
||||||
ADD_METHOD( GetEstimatedNumStages );
|
ADD_METHOD( GetEstimatedNumStages );
|
||||||
|
ADD_METHOD( GetScripter );
|
||||||
ADD_METHOD( GetTotalSeconds );
|
ADD_METHOD( GetTotalSeconds );
|
||||||
ADD_METHOD( IsEndless );
|
ADD_METHOD( IsEndless );
|
||||||
ADD_METHOD( IsNonstop ); // sm-ssc addition
|
ADD_METHOD( IsNonstop );
|
||||||
ADD_METHOD( IsOni ); // sm-ssc addition
|
ADD_METHOD( IsOni );
|
||||||
ADD_METHOD( GetGoalSeconds );
|
ADD_METHOD( GetGoalSeconds );
|
||||||
ADD_METHOD( HasBanner ); // sm-ssc addition
|
ADD_METHOD( HasBanner );
|
||||||
ADD_METHOD( HasBackground ); // sm-ssc addition
|
ADD_METHOD( HasBackground );
|
||||||
ADD_METHOD( IsAnEdit );
|
ADD_METHOD( IsAnEdit );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
+2
-1
@@ -161,9 +161,10 @@ public:
|
|||||||
|
|
||||||
RString m_sMainTitle, m_sMainTitleTranslit;
|
RString m_sMainTitle, m_sMainTitleTranslit;
|
||||||
RString m_sSubTitle, m_sSubTitleTranslit;
|
RString m_sSubTitle, m_sSubTitleTranslit;
|
||||||
|
RString m_sScripter;
|
||||||
|
|
||||||
RString m_sBannerPath;
|
RString m_sBannerPath;
|
||||||
RString m_sBackgroundPath; // after 9 years yes finally -aj
|
RString m_sBackgroundPath;
|
||||||
RString m_sCDTitlePath;
|
RString m_sCDTitlePath;
|
||||||
RString m_sGroupName;
|
RString m_sGroupName;
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou
|
|||||||
out.m_sMainTitle = sParams[1];
|
out.m_sMainTitle = sParams[1];
|
||||||
else if( 0 == stricmp(sValueName, "COURSETRANSLIT") )
|
else if( 0 == stricmp(sValueName, "COURSETRANSLIT") )
|
||||||
out.m_sMainTitleTranslit = sParams[1];
|
out.m_sMainTitleTranslit = sParams[1];
|
||||||
|
else if( 0 == stricmp(sValueName, "SCRIPTER") )
|
||||||
|
out.m_sScripter = sParams[1];
|
||||||
else if( 0 == stricmp(sValueName, "REPEAT") )
|
else if( 0 == stricmp(sValueName, "REPEAT") )
|
||||||
{
|
{
|
||||||
RString str = sParams[1];
|
RString str = sParams[1];
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ bool CourseWriterCRS::Write( const Course &course, RageFileBasic &f, bool bSavin
|
|||||||
f.PutLine( ssprintf("#COURSE:%s;", course.m_sMainTitle.c_str()) );
|
f.PutLine( ssprintf("#COURSE:%s;", course.m_sMainTitle.c_str()) );
|
||||||
if( course.m_sMainTitleTranslit != "" )
|
if( course.m_sMainTitleTranslit != "" )
|
||||||
f.PutLine( ssprintf("#COURSETRANSLIT:%s;", course.m_sMainTitleTranslit.c_str()) );
|
f.PutLine( ssprintf("#COURSETRANSLIT:%s;", course.m_sMainTitleTranslit.c_str()) );
|
||||||
|
if( course.m_sScripter != "" )
|
||||||
|
f.PutLine( ssprintf("#SCRIPTER:%s;", course.m_sScripter.c_str()) );
|
||||||
if( course.m_bRepeat )
|
if( course.m_bRepeat )
|
||||||
f.PutLine( "#REPEAT:YES;" );
|
f.PutLine( "#REPEAT:YES;" );
|
||||||
if( course.m_iLives != -1 )
|
if( course.m_iLives != -1 )
|
||||||
|
|||||||
Reference in New Issue
Block a user