rework how the IsGameEnabled() Lua binding works; it now takes a string as a parameter.
This commit is contained in:
+4
-5
@@ -3130,12 +3130,11 @@ public:
|
|||||||
}
|
}
|
||||||
static int IsGameEnabled( T* p, lua_State *L )
|
static int IsGameEnabled( T* p, lua_State *L )
|
||||||
{
|
{
|
||||||
Game *pGame = Luna<Game>::check( L, 1 );
|
const Game *pGame = p->StringToGame(SArg(1));
|
||||||
|
if(pGame)
|
||||||
lua_pushboolean(L, p->IsGameEnabled( pGame ) );
|
lua_pushboolean(L, p->IsGameEnabled( pGame ) );
|
||||||
|
else
|
||||||
// string version; will clean this up later after finding a good home -aj
|
lua_pushnil(L);
|
||||||
//lua_pushbool(L, p->IsGameEnabled( p->StringToGame(SArg(1)) ) );
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user