From a02d71bfefcdc69ca29e1b34221e598060bc165d Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Thu, 17 Dec 2015 12:40:22 +0100 Subject: [PATCH] https://bugs.eressea.de/view.php?id=2176 generate the reduced production message before writing reports, so it shows in the CR. --- res/core/de/strings.xml | 5 ----- res/core/messages.xml | 5 +++++ src/attributes/reduceproduction.c | 2 +- src/report.c | 8 +------- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/res/core/de/strings.xml b/res/core/de/strings.xml index 1b84e5a6a..ec6862fdb 100644 --- a/res/core/de/strings.xml +++ b/res/core/de/strings.xml @@ -7511,11 +7511,6 @@ - - Die Region ist verwüstet, der Boden karg. - The region is ravaged, the ground infertile. - - Einheit-Nr unitid diff --git a/res/core/messages.xml b/res/core/messages.xml index 3e16e8301..00f0107e9 100644 --- a/res/core/messages.xml +++ b/res/core/messages.xml @@ -1,5 +1,10 @@ + + Die Region ist verwüstet, der Boden karg. + The region is ravaged, the ground infertile. + + diff --git a/src/attributes/reduceproduction.c b/src/attributes/reduceproduction.c index ecf9e4b01..58436bc8e 100644 --- a/src/attributes/reduceproduction.c +++ b/src/attributes/reduceproduction.c @@ -36,7 +36,7 @@ static int age_reduceproduction(attrib * a, void *owner) } a->data.sa[0] = (short)reduce; if (a->data.sa[1] > 0) { - ADDMSG(&r->msgs, msg_message("reduceproduction", "")); + ADDMSG(&r->msgs, msg_message("reduced_production", "")); return AT_AGE_KEEP; } return AT_AGE_REMOVE; diff --git a/src/report.c b/src/report.c index 6e13e834f..7b04e020f 100644 --- a/src/report.c +++ b/src/report.c @@ -1235,13 +1235,6 @@ static void describe(stream *out, const seen_region * sr, faction * f) nr_curses(out, 0, f, TYP_REGION, r); n = 0; - /* Produktionsreduktion */ - a = a_find(r->attribs, &at_reduceproduction); - if (a) { - const char *str = LOC(f->locale, "nr_reduced_production"); - paragraph(out, str, 0, 0, 0); - } - if (edges) newline(out); for (e = edges; e; e = e->next) { @@ -1268,6 +1261,7 @@ static void describe(stream *out, const seen_region * sr, faction * f) first = false; } // TODO name is localized? Works for roads anyway... + // TODO: creating messages during reporting makes them not show up in CR? msg = msg_message("nr_borderlist_postfix", "transparent object", e->transparent, e->name); bytes = (int)nr_render(msg, f->locale, bufp, size, f);