citizens_convert() not weighting nationalities by the number of citizens
I checked on GitHub citizenshand.c, and maybe, instead of making a list of all the foreign nationalities, we're going to go through each citizen one by one using this function called citizens_iterate. As we go through each one, we'll keep a count of how many citizens we've seen so far. Then, we'll generate a random number between 1 and that total count. We'll also keep track of which citizen we're currently looking at, and if the random number matches the number of the citizen we're on, we'll convert that citizen to a new nationality using the citizens_nation_move function. What do you think? (another option is using fc_weighted_rand or something similar)
void citizens_convert(struct city *pcity) {
}
At least surprisingly, if not erroneously, citizens_convert() converts citizen of a random nationality, not random citizen. The difference this makes is that all nationalities get the same weight, regardless how many citizens there are. If there's 1 citizen on nationality A and 5 citizens of nationality B, the citizen of A has 50% chance of getting converted and each citizen of B has 10% chance of getting converted.