* MemoryCardState type for lua

* MEMCARDMAN:GetCardState for lua
This commit is contained in:
Vecais Dumais Laacis
2007-08-08 09:29:44 +00:00
parent 1876f49ce4
commit ffa132693c
3 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -262,7 +262,7 @@ static const char *MemoryCardStateNames[] = {
"none",
};
XToString( MemoryCardState );
LuaXType( MemoryCardState );
static const char *PerDifficultyAwardNames[] = {
"FullComboW3",
+1 -1
View File
@@ -238,7 +238,7 @@ enum MemoryCardState
};
const RString& MemoryCardStateToString( MemoryCardState mcs );
LuaDeclareType( MemoryCardState );
//
// Ranking stuff
+8
View File
@@ -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 );
}
};