Bazaar developer reference

CvLuaCity::lChangePopulation(lua_State *)

Defined in
Lua/CvLuaCity.cpp, line 2136
Class
CvLuaCity
Hook name
CivHooks::CvLuaCity_lChangePopulation

Hooks

static bool BeforeCvLuaCity_lChangePopulation(lua_State* L, int& result);static void AfterCvLuaCity_lChangePopulation(lua_State* L, int& result);static int ReplaceCvLuaCity_lChangePopulation(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaCity_lChangePopulation>(host, &BeforeCvLuaCity_lChangePopulation);CivRegisterAfter<CivHooks::CvLuaCity_lChangePopulation>(host, &AfterCvLuaCity_lChangePopulation);CivRegisterReplace<CivHooks::CvLuaCity_lChangePopulation>(host, &ReplaceCvLuaCity_lChangePopulation);

Code

2135//void changePopulation(int iChange);2136int CvLuaCity::lChangePopulation(lua_State* L)2137{2138	CvCity* pkCity = GetInstance(L);2139	int iChange = lua_tointeger(L, 2);2140	int bReassignPop = lua_toboolean(L, 3);2141	CvAssertMsg(bReassignPop != 0, "It is super dangerous to set this to false.  Ken would love to see why you are doing this.");2142	pkCity->changePopulation(iChange, bReassignPop);21432144	return 1;2145//	return BasicLuaMethod(L, &CvCity::changePopulation);2146}

Calls

Called by