Ok, I think I got all of your editing...
Code:
sint32 good;
if (g_theWorld->GetGood(pos, good)){
for(i = 0; i < rec->GetNumIsRestrictedToGood(); i++) {
if(rec->GetIsRestrictedToGood(i) == good) {
return false;
}
}
}
for(i = 0; i < rec->GetNumCantBuildOn(); i++) {
if(rec->GetCantBuildOnIndex(i) == cell->GetTerrain()) {
return false;
}
}
}
return true;
}

)
Comment