generate the reduced production message before writing reports, so it shows in the CR.
This commit is contained in:
Enno Rehling 2015-12-17 12:40:22 +01:00
parent 9e4344e3c3
commit a02d71bfef
4 changed files with 7 additions and 13 deletions

View File

@ -7511,11 +7511,6 @@
</namespace> </namespace>
<string name="nr_reduced_production">
<text locale="de">Die Region ist verwüstet, der Boden karg.</text>
<text locale="en">The region is ravaged, the ground infertile.</text>
</string>
<string name="par_unit"> <string name="par_unit">
<text locale="de">Einheit-Nr</text> <text locale="de">Einheit-Nr</text>
<text locale="en">unitid</text> <text locale="en">unitid</text>

View File

@ -1,5 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<messages> <messages>
<message name="reduced_production">
<text locale="de">Die Region ist verwüstet, der Boden karg.</text>
<text locale="en">The region is ravaged, the ground infertile.</text>
</message>
<message name="force_leave_ship" section="events"> <message name="force_leave_ship" section="events">
<type> <type>
<arg name="unit" type="unit"/> <arg name="unit" type="unit"/>

View File

@ -36,7 +36,7 @@ static int age_reduceproduction(attrib * a, void *owner)
} }
a->data.sa[0] = (short)reduce; a->data.sa[0] = (short)reduce;
if (a->data.sa[1] > 0) { 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_KEEP;
} }
return AT_AGE_REMOVE; return AT_AGE_REMOVE;

View File

@ -1235,13 +1235,6 @@ static void describe(stream *out, const seen_region * sr, faction * f)
nr_curses(out, 0, f, TYP_REGION, r); nr_curses(out, 0, f, TYP_REGION, r);
n = 0; 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) if (edges)
newline(out); newline(out);
for (e = edges; e; e = e->next) { for (e = edges; e; e = e->next) {
@ -1268,6 +1261,7 @@ static void describe(stream *out, const seen_region * sr, faction * f)
first = false; first = false;
} }
// TODO name is localized? Works for roads anyway... // 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", msg = msg_message("nr_borderlist_postfix", "transparent object",
e->transparent, e->name); e->transparent, e->name);
bytes = (int)nr_render(msg, f->locale, bufp, size, f); bytes = (int)nr_render(msg, f->locale, bufp, size, f);