I left out 'index'
well I tried it and it works!, and well in the editor mode too...but the question of course, is it optimized?
the other stuff I want to do is :
HiddenNationality
Inreasehappiness etc with goods, I think I have something now...
and then the plant good tile improvements
I guess later we can look at pillaging goods, capturing good tiles, and maybe a way of giving a city a good if it built a certain building???
well I tried it and it works!, and well in the editor mode too...but the question of course, is it optimized?
Code:
if(rec->GetNumNeedsCityGoodAnyCity()) { sint32 i, g; bool goodavail = false; for(i = 0; i < m_all_cities->Num(); i++) { for(g = 0; g < g_theResourceDB->NumRecords(); g++) { if(m_all_cities->Access(i).AccessData()->GetCityData()->HasEitherGood(rec->GetNeedsCityGoodAnyCityIndex(g))) goodavail = true; break; } } if(!goodavail) return FALSE; }
the other stuff I want to do is :
HiddenNationality
Inreasehappiness etc with goods, I think I have something now...
and then the plant good tile improvements
I guess later we can look at pillaging goods, capturing good tiles, and maybe a way of giving a city a good if it built a certain building???
Comment