* MemoryCardState type for lua
* MEMCARDMAN:GetCardState for lua
This commit is contained in:
@@ -262,7 +262,7 @@ static const char *MemoryCardStateNames[] = {
|
||||
"none",
|
||||
};
|
||||
XToString( MemoryCardState );
|
||||
|
||||
LuaXType( MemoryCardState );
|
||||
|
||||
static const char *PerDifficultyAwardNames[] = {
|
||||
"FullComboW3",
|
||||
|
||||
@@ -238,7 +238,7 @@ enum MemoryCardState
|
||||
};
|
||||
|
||||
const RString& MemoryCardStateToString( MemoryCardState mcs );
|
||||
|
||||
LuaDeclareType( MemoryCardState );
|
||||
|
||||
//
|
||||
// Ranking stuff
|
||||
|
||||
@@ -715,8 +715,16 @@ void MemoryCardManager::UnPauseMountingThread()
|
||||
class LunaMemoryCardManager: public Luna<MemoryCardManager>
|
||||
{
|
||||
public:
|
||||
static int GetCardState( T* p, lua_State *L )
|
||||
{
|
||||
PlayerNumber pn = Enum::Check<PlayerNumber>(L, 1);
|
||||
LuaHelpers::Push( L, p->GetCardState( pn ) );
|
||||
return 1;
|
||||
}
|
||||
|
||||
LunaMemoryCardManager()
|
||||
{
|
||||
ADD_METHOD( GetCardState );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user