CvLuaGame::lIsOption(lua_State *)
- Defined in
- Lua/CvLuaGame.cpp, line 1466
- Class
- CvLuaGame
- Hook name
CivHooks::CvLuaGame_lIsOption
Hooks
static bool BeforeCvLuaGame_lIsOption(lua_State* L, int& result);static void AfterCvLuaGame_lIsOption(lua_State* L, int& result);static int ReplaceCvLuaGame_lIsOption(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaGame_lIsOption>(host, &BeforeCvLuaGame_lIsOption);CivRegisterAfter<CivHooks::CvLuaGame_lIsOption>(host, &AfterCvLuaGame_lIsOption);CivRegisterReplace<CivHooks::CvLuaGame_lIsOption>(host, &ReplaceCvLuaGame_lIsOption);
Code
1464//bool isOption(GameOptionTypes eIndex);1465//bool isOption(const char* pszOption);1466int CvLuaGame::lIsOption(lua_State* L)1467{1468 CvGame& kGame = GC.getGame();1469 bool bResult = false;1470 if(lua_isnumber(L, 1))1471 bResult = kGame.isOption((GameOptionTypes)lua_tointeger(L, 1));1472 else1473 bResult = kGame.isOption(lua_tostring(L, 1));14741475 lua_pushboolean(L, bResult);1476 return 1;1477}
Calls
- CvGame::isOption(const char *) const
- CvGame::isOption(GameOptionTypes) const
- CvGlobals::getGame()
lua_isnumberlua_pushbooleanlua_tointegerlua_tolstring