verbesserte Korrektur-Routine
This commit is contained in:
Enno Rehling 2005-12-19 18:30:51 +00:00
parent df94b39f8c
commit 8e508a9e99
1 changed files with 12 additions and 4 deletions

View File

@ -1060,11 +1060,18 @@ fix_familiars(void)
static int
fix_resources(void)
{
boolean started = false;
int retval = 0;
region * r;
for (r=regions;r;r=r->next) {
if (r->terrain->production!=NULL && r->resources==NULL) {
if (!started) {
terrain_production * prod = r->terrain->production;
while (prod->type && prod->chance<1.0) ++prod;
if (prod->type) started = true;
}
if (started) {
terraform_resources(r);
if (r->resources!=NULL) {
log_warning(("fixing resources in '%s'\n", regionname(r, NULL)));
@ -1072,6 +1079,7 @@ fix_resources(void)
}
}
}
}
return retval;
}