Bazaar developer reference

CvLuaGame::lGetGreatWorkEraShort(lua_State *)

Defined in
Lua/CvLuaGame.cpp, line 2842
Class
CvLuaGame
Hook name
CivHooks::CvLuaGame_lGetGreatWorkEraShort

Hooks

static bool BeforeCvLuaGame_lGetGreatWorkEraShort(lua_State* L, int& result);static void AfterCvLuaGame_lGetGreatWorkEraShort(lua_State* L, int& result);static int ReplaceCvLuaGame_lGetGreatWorkEraShort(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaGame_lGetGreatWorkEraShort>(host, &BeforeCvLuaGame_lGetGreatWorkEraShort);CivRegisterAfter<CivHooks::CvLuaGame_lGetGreatWorkEraShort>(host, &AfterCvLuaGame_lGetGreatWorkEraShort);CivRegisterReplace<CivHooks::CvLuaGame_lGetGreatWorkEraShort>(host, &ReplaceCvLuaGame_lGetGreatWorkEraShort);

Code

2842int CvLuaGame::lGetGreatWorkEraShort(lua_State* L)2843{2844	const int iIndex = lua_tointeger(L, 1);2845	if (iIndex < GC.getGame().GetGameCulture()->GetNumGreatWorks())2846	{2847		CvString szTooltip = GC.getGame().GetGameCulture()->GetGreatWorkEraShort(iIndex);2848		lua_pushstring(L, szTooltip);2849		return 1;2850	}2851	return 0;2852}

Calls

Called by