Bazaar developer reference

CvLuaGameInfo::pRegisterTypesInfo(lua_State *)

Defined in
Lua/CvLuaGameInfo.cpp, line 95
Class
CvLuaGameInfo
Hook name
CivHooks::CvLuaGameInfo_pRegisterTypesInfo

Hooks

static bool BeforeCvLuaGameInfo_pRegisterTypesInfo(lua_State* L, int& result);static void AfterCvLuaGameInfo_pRegisterTypesInfo(lua_State* L, int& result);static int ReplaceCvLuaGameInfo_pRegisterTypesInfo(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaGameInfo_pRegisterTypesInfo>(host, &BeforeCvLuaGameInfo_pRegisterTypesInfo);CivRegisterAfter<CivHooks::CvLuaGameInfo_pRegisterTypesInfo>(host, &AfterCvLuaGameInfo_pRegisterTypesInfo);CivRegisterReplace<CivHooks::CvLuaGameInfo_pRegisterTypesInfo>(host, &ReplaceCvLuaGameInfo_pRegisterTypesInfo);

Code

95int CvLuaGameInfo::pRegisterTypesInfo(lua_State* L)96{97	lua_newtable(L);98	lua_pushvalue(L, -1);99	lua_setglobal(L, "GameInfoTypes");100101	const CvGlobals::InfosMap& kInfosMap = GC.GetInfoTypes();102	for(CvGlobals::InfosMap::const_iterator it = kInfosMap.begin();103	        it != kInfosMap.end(); ++ it)104	{105		lua_pushinteger(L, (*it).second);106		lua_setfield(L, -2, (*it).first.c_str());107	}108109	return 0;110}

Calls

Called by