loonycyborg: The capital actually isn't producing enough food to contribute to the empire stockpile. A planet will only contribute to the empire stockpile if it's producing more than twice it's population in food, and that extra food isn't being used up by any other planets. Note that the empire pool and empire stockpile aren't the same... in that food is put into the pool, and then dolled out to the planet that produced it with first priority, and then other planets, and only then after every planet has as much as it needs / wants, to the stockpile. The idea is that there are several levels of feeding, where you need food equal to population to prevent starvation, and up to twice population to get maximum growth rate.
I'd like to rewrite the food distribution algorithm though, particularly as fully maxed out population planets have no use for any food more than their population at present, so it's pointless to give them any that could otherwise be stockpiled. It's also just confusing how food distribution and stockpiling works now... which may be unavoidable, but presumably there could be a better reason for it to be unavoidably confusing than the way it is now.
bhelyer: If you're poking around in UpdateFoodDistribution, you could change any lines in UpdateFoodDistrubution and the equivalents for other resources that look like:
Code:
UniverseObject *obj = dynamic_cast<UniverseObject*>(center); // can't use universe_object_cast<UniverseObject*> because ResourceCenter is not derived from UniverseObject
assert(obj);
double need = center->MeterPoints(METER_FARMING);
to just
Code:
double need = center->MeterPoints(METER_FARMING);
Since the casting is (I think) no longer necessary.
Similarly, if you find any code casting from ResourceCenter* or PopCenter* to UniverseObject* before using ->GetMeter(...), then that function can be made public instead of private on the ...Center classes and then accessed directly instead of via the cast.