Bazaar developer reference

CvCity::setProduction(int)

Defined in
CvCity.cpp, line 5366
Class
CvCity
Hook name
CivHooks::CvCity_setProduction

Hooks

static bool BeforeCvCity_setProduction(CvCity* self, int iNewValue);static void AfterCvCity_setProduction(CvCity* self, int iNewValue);static void ReplaceCvCity_setProduction(void (*original)(CvCity*, int), CvCity* self, int iNewValue);CivRegisterBefore<CivHooks::CvCity_setProduction>(host, &BeforeCvCity_setProduction);CivRegisterAfter<CivHooks::CvCity_setProduction>(host, &AfterCvCity_setProduction);CivRegisterReplace<CivHooks::CvCity_setProduction>(host, &ReplaceCvCity_setProduction);

Code

5366void CvCity::setProduction(int iNewValue)5367{5368	VALIDATE_OBJECT5369	if(isProductionUnit())5370	{5371		setUnitProduction(getProductionUnit(), iNewValue);5372	}5373	else if(isProductionBuilding())5374	{5375		m_pCityBuildings->SetBuildingProduction(getProductionBuilding(), iNewValue);5376	}5377	else if(isProductionProject())5378	{5379		setProjectProduction(getProductionProject(), iNewValue);5380	}5381	else if(isProductionSpecialist())5382	{5383		setSpecialistProduction(getProductionSpecialist(), iNewValue);5384	}5385}

Calls

Called by