forked from github/server
weltkarte
This commit is contained in:
parent
893a2605f5
commit
74cce04268
|
@ -280,6 +280,21 @@ has_laen(region *r) {
|
|||
}
|
||||
#endif
|
||||
|
||||
static int
|
||||
crwritemap(void)
|
||||
{
|
||||
FILE * F = fopen("world.cr", "w+");
|
||||
region * r;
|
||||
for (r=regions;r;r=r->next) {
|
||||
plane * p = rplane(r);
|
||||
fprintf(F, "REGION %d %d %d\n", r->x, r->y, p?p->id:0);
|
||||
fprintf(F, "\"%s\";Name\n\"%s\";Terrain\n", rname(r, default_locale), LOC(default_locale, terrain[rterrain(r)].name));
|
||||
}
|
||||
fclose(F);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
drawmap(boolean maponly) {
|
||||
int x, x1, y1, y2, s, q;
|
||||
|
@ -715,6 +730,9 @@ movearound(int rx, int ry) {
|
|||
DisplayRegList(1);
|
||||
ch = 999999;
|
||||
break;
|
||||
case 'W':
|
||||
crwritemap();
|
||||
break;
|
||||
case 'q':
|
||||
if (yes_no(0, "Wirklich beenden?", 'n'))
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue