I am replacing the halfspecialistfood boolean (Why is it a boolean?!??!?!) with a modifier, but it doesn't apply properly, if i set the modifier to 25, and put a citizen in a university nothing happens, if i set two or more each citizen gives 1 back think its because it goes in decimal numbers and its an integer. Here's the code:
do i have to make this function return a float? It seems messy
Code:
int CvCity::foodConsumption(bool /*bNoAngry*/, int iExtra) const
{
VALIDATE_OBJECT
int iPopulation = getPopulation() + iExtra;
int iFoodPerPop = /*2*/ GC.getFOOD_CONSUMPTION_PER_POPULATION();
int iNum = iPopulation * iFoodPerPop;
// Specialists eat less food? (Policies, etc.)
if(GET_PLAYER(getOwner()).getSpecialistFoodModifier() != 0) //OR MORE?
{
int iFoodSpecialists = GetCityCitizens()->GetTotalSpecialistCount() * iFoodPerPop;
int iFoodModifier = GET_PLAYER(getOwner()).getSpecialistFoodModifier();
iFoodSpecialists = iFoodSpecialists * iFoodModifier / 100;
iNum -= iFoodSpecialists;
}
return iNum;
}
do i have to make this function return a float? It seems messy