Es gibt auch noch ältere Berge und Gletscher ohne Eisen.
This commit is contained in:
Enno Rehling 2005-12-19 18:56:20 +00:00
parent 8e508a9e99
commit 18153f5614
2 changed files with 23 additions and 13 deletions

View File

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

View File

@ -64,8 +64,8 @@
<herb name="h15"/> <herb name="h15"/>
<herb name="h16"/> <herb name="h16"/>
<herb name="h17"/> <herb name="h17"/>
<resource name="iron" chance="1.0" level="1" base="3" div="50"/> <resource name="iron" chance="0.9" level="1" base="3" div="50"/>
<resource name="stone" chance="1.0" level="1" base="2" div="100"/> <resource name="stone" chance="0.9" level="1" base="2" div="100"/>
<resource name="laen" chance="0.05" level="1" base="4" div="100"/> <resource name="laen" chance="0.05" level="1" base="4" div="100"/>
</terrain> </terrain>
@ -73,8 +73,8 @@
<herb name="h15"/> <herb name="h15"/>
<herb name="h16"/> <herb name="h16"/>
<herb name="h17"/> <herb name="h17"/>
<resource name="iron" chance="1.0" level="1" base="3" div="50"/> <resource name="iron" chance="0.9" level="1" base="3" div="50"/>
<resource name="stone" chance="1.0" level="1" base="2" div="100"/> <resource name="stone" chance="0.9" level="1" base="2" div="100"/>
</terrain> </terrain>
<terrain name="firewall" size="100" road="250" land="no" walk="no" sail="no" fly="no" forbidden="yes"/> <terrain name="firewall" size="100" road="250" land="no" walk="no" sail="no" fly="no" forbidden="yes"/>