Bazaar developer reference

CvLuaGame::lGetGreatWorkEraAbbreviation(lua_State *)

Defined in
Lua/CvLuaGame.cpp, line 2829
Class
CvLuaGame
Hook name
CivHooks::CvLuaGame_lGetGreatWorkEraAbbreviation

Hooks

static bool BeforeCvLuaGame_lGetGreatWorkEraAbbreviation(lua_State* L, int& result);static void AfterCvLuaGame_lGetGreatWorkEraAbbreviation(lua_State* L, int& result);static int ReplaceCvLuaGame_lGetGreatWorkEraAbbreviation(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaGame_lGetGreatWorkEraAbbreviation>(host, &BeforeCvLuaGame_lGetGreatWorkEraAbbreviation);CivRegisterAfter<CivHooks::CvLuaGame_lGetGreatWorkEraAbbreviation>(host, &AfterCvLuaGame_lGetGreatWorkEraAbbreviation);CivRegisterReplace<CivHooks::CvLuaGame_lGetGreatWorkEraAbbreviation>(host, &ReplaceCvLuaGame_lGetGreatWorkEraAbbreviation);

Code

2829int CvLuaGame::lGetGreatWorkEraAbbreviation(lua_State* L)2830{2831	const int iIndex = lua_tointeger(L, 1);2832	if (iIndex < GC.getGame().GetGameCulture()->GetNumGreatWorks())2833	{2834		CvString szTooltip = GC.getGame().GetGameCulture()->GetGreatWorkEraAbbreviation(iIndex);2835		lua_pushstring(L, szTooltip);2836		return 1;2837	}2838	return 0;2839}

Calls

Called by