From 4371ebab96e120810743add8f21399cea54122cf Mon Sep 17 00:00:00 2001 From: Christian Schlittchen Date: Sun, 29 Sep 2002 19:13:38 +0000 Subject: [PATCH] Linefeed, Mapper-Changes --- src/common/util/nrmessage.h | 3 ++- src/mapper/map_units.c | 2 +- src/mapper/mapper.c | 36 +++++++++++++++++++++++++++++++++++- 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/src/common/util/nrmessage.h b/src/common/util/nrmessage.h index 6d147fdc4..476b8c611 100644 --- a/src/common/util/nrmessage.h +++ b/src/common/util/nrmessage.h @@ -35,4 +35,5 @@ extern const char * nr_section(const struct message *msg); * fogblock:movement:0 * $unit($unit) konnte von $region($region) nicht nach $direction($direction) ausreisen, der Nebel war zu dicht. * unit:unit region:region direction:int - */ \ No newline at end of file + */ + diff --git a/src/mapper/map_units.c b/src/mapper/map_units.c index 4b0b22714..3e2b145e0 100644 --- a/src/mapper/map_units.c +++ b/src/mapper/map_units.c @@ -82,7 +82,7 @@ make_new_unit(region * r) WINDOW *win; char *fac_nr36; int i, p, anz, q, y; - win = openwin(SX - 10, 8, "< Neue Einheit erschaffen >"); + win = openwin(SX - 10, 17, "< Neue Einheit erschaffen >"); if (r->units) p = r->units->faction->no; diff --git a/src/mapper/mapper.c b/src/mapper/mapper.c index 72ebf9df6..3389fce4b 100644 --- a/src/mapper/mapper.c +++ b/src/mapper/mapper.c @@ -606,10 +606,12 @@ modify_block(void) tagregion *t; char *name = NULL; int div = 0; + int mal = 0; + struct rawmaterial *res; win = openwin(70, 4, "< Tag-Regionen modifizieren >"); wmove(win, 1, 2); - wAddstr("Name, Peasants, Horses, Silver, Chaos (n/p/h/s/c,q)?"); + wAddstr("Name, Peasants, Horses, Silver, Chaos, noResources, Mallorn (n/p/h/s/c/r/m,q)?"); wrefresh(win); c = getch(); if (c == 'q') { @@ -634,6 +636,16 @@ modify_block(void) case 'p': div = atoi(my_input(win, 2, 2, "Divisor: ", "1")); break; + case 'm': + wmove(win, 2, 2); + wAddstr("Mallorn (s)etzen oder (l)öschen?"); + wrefresh(win); + if (getch() == 's') { + mal = 1; + } else { + mal = 0; + } + break; } for (t=Tagged; t; t=t->next) { @@ -653,6 +665,28 @@ modify_block(void) case 's': rsetmoney(r, production(r)*10+rand()%(production(r)*10)); break; + case 'r': + for (res=r->resources;res;res=res->next) { + const item_type * itype = resource2item(res->type->rtype); + if(itype == olditemtype[I_IRON]) { + res->amount = -1; + res->level = -1; + } else if(itype == olditemtype[I_LAEN]) { + res->amount = -1; + res->level = -1; + } else if(itype == olditemtype[I_STONE]) { + res->amount = -1; + res->level = -1; + } + } + break; + case 'm': + if(mal == 1) { + fset(r, RF_MALLORN); + } else { + freset(r, RF_MALLORN); + } + break; } } if (c == 'c') {