diff --git a/src/mapper/map_modify.c b/src/mapper/map_modify.c index 88c82270a..580483203 100644 --- a/src/mapper/map_modify.c +++ b/src/mapper/map_modify.c @@ -1192,7 +1192,7 @@ Create_Island(region *r, int * n, const terrain_type * terrain, int x, int y) { } void -create_island(region *r, int n, terrain_t t) +create_island(region *r, int n, const struct terrain_type * terrain) { short sx=r->x, sy=r->y, i, x = 0, y = 0; direction_t d; @@ -1203,7 +1203,7 @@ create_island(region *r, int n, terrain_t t) r2->msgs = (void *)0; } tradegood = NULL; - terraform(r,t); + terraform_region(r, terrain); if(r->land) settg(r); r->msgs = (void *)(rand()%6); diff --git a/src/mapper/mapper.c b/src/mapper/mapper.c index 5c2eb5697..967568e74 100644 --- a/src/mapper/mapper.c +++ b/src/mapper/mapper.c @@ -1153,7 +1153,20 @@ movearound(short rx, short ry) { case 'I': a=map_input(0,0,0,"Wieviele Regionen?",0,500,0); if (a) { - create_island(r, a, (terrain_t)(rand()%(T_GLACIER)+1)); + const terrain_type * terrain; + int nterrains; + for (terrain=terrains();terrain;terrain=terrain->next) { + if (fval(terrain, NORMAL_TERRAIN)) { + ++nterrains; + } + } + nterrains = rand() % nterrains; + for (terrain=terrains();nterrains;terrain=terrain->next) { + if (fval(terrain, NORMAL_TERRAIN)) { + --nterrains; + } + } + create_island(r, a, terrain); modified=1; } ch = -9; diff --git a/src/mapper/mapper.h b/src/mapper/mapper.h index cd1d7da24..c21ce2000 100644 --- a/src/mapper/mapper.h +++ b/src/mapper/mapper.h @@ -55,7 +55,7 @@ void showregion(struct region * r, char full); int modify_region(struct region * r); void NeueBurg(struct region * r); void NeuesSchiff(struct region * r); -void create_island(struct region *r, int n, terrain_t t); +void create_island(struct region *r, int n, const struct terrain_type * t); void make_ocean_block(short x, short y); void make_new_block(int x, int y); void moveln(const int x);