Bazaar developer reference

CvCity::GetNumWorkablePlots(int) const

Defined in
CvCity.cpp, line 2248
Class
CvCity
Hook name
CivHooks::CvCity_GetNumWorkablePlots

Hooks

static bool BeforeCvCity_GetNumWorkablePlots(const CvCity* self, int iChange, int& result);static void AfterCvCity_GetNumWorkablePlots(const CvCity* self, int iChange, int& result);static int ReplaceCvCity_GetNumWorkablePlots(int (*original)(const CvCity*, int), const CvCity* self, int iChange);CivRegisterBefore<CivHooks::CvCity_GetNumWorkablePlots>(host, &BeforeCvCity_GetNumWorkablePlots);CivRegisterAfter<CivHooks::CvCity_GetNumWorkablePlots>(host, &AfterCvCity_GetNumWorkablePlots);CivRegisterReplace<CivHooks::CvCity_GetNumWorkablePlots>(host, &ReplaceCvCity_GetNumWorkablePlots);

Code

2247/// How many plots this city may work2248int CvCity::GetNumWorkablePlots(int iChange) const2249{2250	int iWorkablePlots = ((6 * (1+getWorkPlotDistance(iChange)) * getWorkPlotDistance(iChange) / 2) + 1);2251	return iWorkablePlots;2252}

Calls

Called by

61 functions in 13 files