Bazaar developer reference

CvCityCitizens::DoFoundCity()

Defined in
CvCityCitizens.cpp, line 227
Class
CvCityCitizens
Hook name
CivHooks::CvCityCitizens_DoFoundCity

Hooks

static bool BeforeCvCityCitizens_DoFoundCity(CvCityCitizens* self);static void AfterCvCityCitizens_DoFoundCity(CvCityCitizens* self);static void ReplaceCvCityCitizens_DoFoundCity(void (*original)(CvCityCitizens*), CvCityCitizens* self);CivRegisterBefore<CivHooks::CvCityCitizens_DoFoundCity>(host, &BeforeCvCityCitizens_DoFoundCity);CivRegisterAfter<CivHooks::CvCityCitizens_DoFoundCity>(host, &AfterCvCityCitizens_DoFoundCity);CivRegisterReplace<CivHooks::CvCityCitizens_DoFoundCity>(host, &ReplaceCvCityCitizens_DoFoundCity);

Code

226/// What happens when a City is first founded?227void CvCityCitizens::DoFoundCity()228{229	// always work the home plot (center)230	CvPlot* pHomePlot = GetCityPlotFromIndex(CITY_HOME_PLOT);231	if(pHomePlot != NULL)232	{233		bool bWorkPlot = IsCanWork(pHomePlot);234		SetWorkingPlot(pHomePlot, bWorkPlot, /*bUseUnassignedPool*/ false);235	}236}

Calls

Called by