Bazaar developer reference

CvCity::changeProduction(int)

Defined in
CvCity.cpp, line 5389
Class
CvCity
Hook name
CivHooks::CvCity_changeProduction

Hooks

static bool BeforeCvCity_changeProduction(CvCity* self, int iChange);static void AfterCvCity_changeProduction(CvCity* self, int iChange);static void ReplaceCvCity_changeProduction(void (*original)(CvCity*, int), CvCity* self, int iChange);CivRegisterBefore<CivHooks::CvCity_changeProduction>(host, &BeforeCvCity_changeProduction);CivRegisterAfter<CivHooks::CvCity_changeProduction>(host, &AfterCvCity_changeProduction);CivRegisterReplace<CivHooks::CvCity_changeProduction>(host, &ReplaceCvCity_changeProduction);

Code

5389void CvCity::changeProduction(int iChange)5390{5391	VALIDATE_OBJECT5392	if(isProductionUnit())5393	{5394		changeUnitProduction(getProductionUnit(), iChange);5395	}5396	else if(isProductionBuilding())5397	{5398		m_pCityBuildings->ChangeBuildingProduction(getProductionBuilding(), iChange);5399	}5400	else if(isProductionProject())5401	{5402		changeProjectProduction(getProductionProject(), iChange);5403	}5404	else if(isProductionSpecialist())5405	{5406		changeSpecialistProduction(getProductionSpecialist(), iChange);5407	}5408}

Calls

Called by