forked from github/server
Es gibt auch noch ältere Berge und Gletscher ohne Eisen.
This commit is contained in:
parent
8e508a9e99
commit
18153f5614
|
@ -1060,24 +1060,34 @@ fix_familiars(void)
|
|||
static int
|
||||
fix_resources(void)
|
||||
{
|
||||
boolean started = false;
|
||||
int retval = 0;
|
||||
region * r;
|
||||
region * r, * start = NULL;
|
||||
|
||||
for (r=regions;r;r=r->next) {
|
||||
if (r->terrain->production!=NULL && r->resources==NULL) {
|
||||
if (!started) {
|
||||
if (r->resources==NULL) {
|
||||
if (r->terrain->production!=NULL) {
|
||||
terrain_production * prod = r->terrain->production;
|
||||
while (prod->type && prod->chance<1.0) ++prod;
|
||||
if (prod->type) started = true;
|
||||
}
|
||||
if (started) {
|
||||
|
||||
if (prod->type!=NULL) {
|
||||
terraform_resources(r);
|
||||
if (r->resources!=NULL) {
|
||||
log_warning(("fixing resources in '%s'\n", regionname(r, NULL)));
|
||||
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;
|
||||
|
|
|
@ -64,8 +64,8 @@
|
|||
<herb name="h15"/>
|
||||
<herb name="h16"/>
|
||||
<herb name="h17"/>
|
||||
<resource name="iron" chance="1.0" level="1" base="3" div="50"/>
|
||||
<resource name="stone" chance="1.0" level="1" base="2" div="100"/>
|
||||
<resource name="iron" chance="0.9" level="1" base="3" div="50"/>
|
||||
<resource name="stone" chance="0.9" level="1" base="2" div="100"/>
|
||||
<resource name="laen" chance="0.05" level="1" base="4" div="100"/>
|
||||
</terrain>
|
||||
|
||||
|
@ -73,8 +73,8 @@
|
|||
<herb name="h15"/>
|
||||
<herb name="h16"/>
|
||||
<herb name="h17"/>
|
||||
<resource name="iron" chance="1.0" level="1" base="3" div="50"/>
|
||||
<resource name="stone" chance="1.0" level="1" base="2" div="100"/>
|
||||
<resource name="iron" chance="0.9" level="1" base="3" div="50"/>
|
||||
<resource name="stone" chance="0.9" level="1" base="2" div="100"/>
|
||||
</terrain>
|
||||
|
||||
<terrain name="firewall" size="100" road="250" land="no" walk="no" sail="no" fly="no" forbidden="yes"/>
|
||||
|
|
Loading…
Reference in New Issue