Code:
if(rec->GetNumNeedsCityGood() > 0) {
sint32 s;
bool found = false; //not needed?
for(s = 0; s < rec->GetNumNeedsCityGood(); s++) {
if(HasResource > 0) {
rec->GetNeedsCityGood(s) == m_collectingResources->HaveGoodOfType() { //from CityData::CityRadiusFunc and SlicContext::HaveGoodOfType
found = true;
break;
}
}
}
if(!found) //not needed?
return FALSE;
)
:
I was trying to do some research in my C++ book to give you good/better answers. The hard part is that I see resource is a sint32 and I was searching for a sint32 but I seem not able to call the good from the array, atleast from what I see. I did go through the ResourceRecord and UnitRecord. But notice that the index doesn't call the name/type of good, even though I called in my RestrictedToGood code.
Comment