More gentle terraforming: If a region is terraformed and has the same size as before, no need to change the trees. No need to change peasants or money either

This commit is contained in:
Enno Rehling 2005-11-11 22:53:58 +00:00
parent 3081922ad7
commit 29b84b640e
1 changed files with 27 additions and 24 deletions

View File

@ -855,6 +855,8 @@ void
terraform_region(region * r, const terrain_type * terrain)
{
/* Resourcen, die nicht mehr vorkommen können, löschen */
const terrain_type * oldterrain = r->terrain;
rawmaterial **lrm = &r->resources;
while (*lrm) {
rawmaterial *rm = *lrm;
@ -880,7 +882,7 @@ terraform_region(region * r, const terrain_type * terrain)
r->terrain = terrain;
if (!fval(terrain, LAND_REGION)) {
if (r->land) {
if (r->land!=NULL) {
freeland(r->land);
r->land = NULL;
}
@ -969,17 +971,17 @@ terraform_region(region * r, const terrain_type * terrain)
else {
rsetherbtype(r, NULL);
}
}
if (!fval(oldterrain, LAND_REGION)) {
if (rand() % 100 < 3) fset(r, RF_MALLORN);
else freset(r, RF_MALLORN);
if (rand() % 100 < ENCCHANCE) {
fset(r, RF_ENCOUNTER);
}
if (rand() % 100 < 3)
fset(r, RF_MALLORN);
else
freset(r, RF_MALLORN);
}
}
if (oldterrain(terrain)==T_PLAIN) {
if (terrain->size!=oldterrain->size) {
if (terrain==newterrain(T_PLAIN)) {
rsethorses(r, rand() % (terrain->size / 50));
if(rand()%100 < 40) {
rsettrees(r, 2, terrain->size * (30+rand()%40)/1000);
@ -992,7 +994,7 @@ terraform_region(region * r, const terrain_type * terrain)
rsettrees(r, 0, rtrees(r, 2)/2);
}
if (terrain->size>0 && !fval(r, RF_CHAOTIC)) {
if (!fval(r, RF_CHAOTIC)) {
int peasants;
#if REDUCED_PEASANTGROWTH == 1
peasants = (maxworkingpeasants(r) * (20+dice_rand("6d10")))/100;
@ -1003,6 +1005,7 @@ terraform_region(region * r, const terrain_type * terrain)
rsetmoney(r, rpeasants(r) * ((wage(r, NULL, false)+1) + rand() % 5));
}
}
}
/** ENNO:
* ich denke, das das hier nicht sein sollte.