- Tag-Modify-Name zum Umbenennen getagter Regionen.

This commit is contained in:
Christian Schlittchen 2001-12-15 10:55:05 +00:00
parent bd4a75a9fd
commit 28b566a8a1

View file

@ -493,17 +493,20 @@ modify_block(void)
int c, s = 0; int c, s = 0;
region *r; region *r;
tagregion *t; tagregion *t;
char *name;
win = openwin(70, 4, "< Tag-Regionen modifizieren >"); win = openwin(70, 4, "< Tag-Regionen modifizieren >");
wmove(win, 1, 2); wmove(win, 1, 2);
wAddstr("Bauern, Pferde, Silber, Chaosstatus (b/p/s/c,q)?"); wAddstr("Name, Peasants, Horses, Silver, Chaos (n/p/h/s/c,q)?");
wrefresh(win); wrefresh(win);
c = getch(); c = getch();
if (c == 'q') { if (c == 'q') {
delwin(win); delwin(win);
return; return;
} }
if (c == 'c') {
switch(c) {
case 'c':
wmove(win, 2, 2); wmove(win, 2, 2);
wAddstr("Chaosstatus (s)etzen oder (l)öschen?"); wAddstr("Chaosstatus (s)etzen oder (l)öschen?");
wrefresh(win); wrefresh(win);
@ -512,17 +515,23 @@ modify_block(void)
} else { } else {
s = 0; s = 0;
} }
c = 'c'; break;
case 'n':
name = my_input(win, 2, 2, "Name: ", NULL);
break;
} }
for (t=Tagged; t; t=t->next) { for (t=Tagged; t; t=t->next) {
r=t->r; r=t->r;
if (production(r)) { if (production(r)) {
switch (c) { switch (c) {
case 'b': case 'n':
rsetpeasants(r, production(r)*3+rand()%(production(r)*3)); rsetname(r, name);
break; break;
case 'p': case 'p':
rsetpeasants(r, production(r)*3+rand()%(production(r)*3));
break;
case 'h':
rsethorses(r, rand()%(production(r) / 10)); rsethorses(r, rand()%(production(r) / 10));
break; break;
case 's': case 's':