forked from github/server
weltkarte
This commit is contained in:
parent
893a2605f5
commit
74cce04268
|
@ -280,6 +280,21 @@ has_laen(region *r) {
|
||||||
}
|
}
|
||||||
#endif
|
#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
|
void
|
||||||
drawmap(boolean maponly) {
|
drawmap(boolean maponly) {
|
||||||
int x, x1, y1, y2, s, q;
|
int x, x1, y1, y2, s, q;
|
||||||
|
@ -715,6 +730,9 @@ movearound(int rx, int ry) {
|
||||||
DisplayRegList(1);
|
DisplayRegList(1);
|
||||||
ch = 999999;
|
ch = 999999;
|
||||||
break;
|
break;
|
||||||
|
case 'W':
|
||||||
|
crwritemap();
|
||||||
|
break;
|
||||||
case 'q':
|
case 'q':
|
||||||
if (yes_no(0, "Wirklich beenden?", 'n'))
|
if (yes_no(0, "Wirklich beenden?", 'n'))
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue