Bazaar developer reference

CvLuaGame::lGetCustomOption(lua_State *)

Defined in
Lua/CvLuaGame.cpp, line 2109
Class
CvLuaGame
Hook name
CivHooks::CvLuaGame_lGetCustomOption

Hooks

static bool BeforeCvLuaGame_lGetCustomOption(lua_State* L, int& result);static void AfterCvLuaGame_lGetCustomOption(lua_State* L, int& result);static int ReplaceCvLuaGame_lGetCustomOption(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaGame_lGetCustomOption>(host, &BeforeCvLuaGame_lGetCustomOption);CivRegisterAfter<CivHooks::CvLuaGame_lGetCustomOption>(host, &AfterCvLuaGame_lGetCustomOption);CivRegisterReplace<CivHooks::CvLuaGame_lGetCustomOption>(host, &ReplaceCvLuaGame_lGetCustomOption);

Code

2109int CvLuaGame::lGetCustomOption(lua_State* L)2110{2111	const char* szOptionName = luaL_checkstring(L, 1);2112	int i = 0;2113	if(CvPreGame::GetGameOption(szOptionName, i))2114	{2115		lua_pushinteger(L, i);2116		return 1;2117	}21182119	return 0;2120}

Calls

Called by