[Course] Add IsPlayableIn(StepsType) and IsRanking() Lua bindings.
This commit is contained in:
@@ -12,6 +12,7 @@ StepMania 5.0 Preview 3 | 2011081?
|
|||||||
----------
|
----------
|
||||||
* [RageInput] Added "No input devices were loaded." string to languages. [AJ]
|
* [RageInput] Added "No input devices were loaded." string to languages. [AJ]
|
||||||
* [RageInputDevice] Added localized names for InputDeviceState. [AJ]
|
* [RageInputDevice] Added localized names for InputDeviceState. [AJ]
|
||||||
|
* [Course] Add IsPlayableIn(StepsType) and IsRanking() Lua bindings. [AJ]
|
||||||
|
|
||||||
2011/08/16
|
2011/08/16
|
||||||
----------
|
----------
|
||||||
|
|||||||
+10
-4
@@ -86,8 +86,6 @@ 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_sScripter(""), m_sDescription(""), m_sBannerPath(""), m_sBackgroundPath(""),
|
m_sScripter(""), m_sDescription(""), m_sBannerPath(""), m_sBackgroundPath(""),
|
||||||
@@ -1059,8 +1057,7 @@ public:
|
|||||||
|
|
||||||
LUA_REGISTER_CLASS( CourseEntry )
|
LUA_REGISTER_CLASS( CourseEntry )
|
||||||
|
|
||||||
// Not done with lua yet: still another class.
|
// Now for the Course bindings:
|
||||||
|
|
||||||
/** @brief Allow Lua to have access to the Course. */
|
/** @brief Allow Lua to have access to the Course. */
|
||||||
class LunaCourse: public Luna<Course>
|
class LunaCourse: public Luna<Course>
|
||||||
{
|
{
|
||||||
@@ -1114,6 +1111,13 @@ public:
|
|||||||
static int HasBanner( T* p, lua_State *L ) { lua_pushboolean(L, p->HasBanner() ); return 1; }
|
static int HasBanner( T* p, lua_State *L ) { lua_pushboolean(L, p->HasBanner() ); return 1; }
|
||||||
static int HasBackground( T* p, lua_State *L ) { lua_pushboolean(L, p->HasBackground() ); return 1; }
|
static int HasBackground( T* p, lua_State *L ) { lua_pushboolean(L, p->HasBackground() ); return 1; }
|
||||||
DEFINE_METHOD( IsAnEdit, IsAnEdit() )
|
DEFINE_METHOD( IsAnEdit, IsAnEdit() )
|
||||||
|
static int IsPlayableIn( T* p, lua_State *L )
|
||||||
|
{
|
||||||
|
StepsType st = Enum::Check<StepsType>(L, 1);
|
||||||
|
lua_pushboolean(L, p->IsPlayableIn( st ) );
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
DEFINE_METHOD( IsRanking, IsRanking() )
|
||||||
|
|
||||||
LunaCourse()
|
LunaCourse()
|
||||||
{
|
{
|
||||||
@@ -1142,6 +1146,8 @@ public:
|
|||||||
ADD_METHOD( HasBanner );
|
ADD_METHOD( HasBanner );
|
||||||
ADD_METHOD( HasBackground );
|
ADD_METHOD( HasBackground );
|
||||||
ADD_METHOD( IsAnEdit );
|
ADD_METHOD( IsAnEdit );
|
||||||
|
ADD_METHOD( IsPlayableIn );
|
||||||
|
ADD_METHOD( IsRanking );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user