Bazaar developer reference

CvLuaGame::lIsTechRecommended(lua_State *)

Defined in
Lua/CvLuaGame.cpp, line 2081
Class
CvLuaGame
Hook name
CivHooks::CvLuaGame_lIsTechRecommended

Hooks

static bool BeforeCvLuaGame_lIsTechRecommended(lua_State* L, int& result);static void AfterCvLuaGame_lIsTechRecommended(lua_State* L, int& result);static int ReplaceCvLuaGame_lIsTechRecommended(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaGame_lIsTechRecommended>(host, &BeforeCvLuaGame_lIsTechRecommended);CivRegisterAfter<CivHooks::CvLuaGame_lIsTechRecommended>(host, &AfterCvLuaGame_lIsTechRecommended);CivRegisterReplace<CivHooks::CvLuaGame_lIsTechRecommended>(host, &ReplaceCvLuaGame_lIsTechRecommended);

Code

2081int CvLuaGame::lIsTechRecommended(lua_State* L)2082{2083	TechTypes eTech = (TechTypes)lua_tointeger(L, 1);2084	AdvisorTypes eAdvisor = (AdvisorTypes)lua_tointeger(L, 2);2085	bool bResult = GC.getGame().GetAdvisorRecommender()->IsTechRecommended(eTech, eAdvisor);2086	lua_pushboolean(L, bResult);2087	return 1;2088}

Calls

Called by