- NAME ALLIANCE

This commit is contained in:
Enno Rehling 2009-07-10 15:21:29 +00:00
parent 3a7b0a6561
commit 51d8232998
5 changed files with 26 additions and 1 deletions

View File

@ -1484,6 +1484,14 @@ name_cmd(unit * u, struct order * ord)
}
switch (p) {
case P_ALLIANCE:
if (foreign==false && u->faction->alliance) {
alliance * al = u->faction->alliance;
if (al->leader==u->faction) {
s = &al->name;
}
}
break;
case P_BUILDING:
case P_GEBAEUDE:
if (foreign == true) {

View File

@ -2058,6 +2058,12 @@ report_plaintext(const char * filename, report_context * ctx, const char * chars
centre(F, buf, true);
}
}
if (f->alliance) {
m = msg_message("nr_alliance", "leader name id", f->alliance->leader, f->alliance->name, f->alliance->id);
nr_render(m, f->locale, buf, sizeof(buf), f);
msg_release(m);
centre(F, buf, true);
}
{
int maxh = maxheroes(f);
if (maxh) {

View File

@ -362,7 +362,8 @@ const char *parameters[MAXPARAMS] =
"BAEUME",
"XEPOTION",
"XEBALLOON",
"XELAEN"
"XELAEN",
"ALLIANZ"
};

View File

@ -218,6 +218,7 @@ enum {
P_XEPOTION,
P_XEBALLOON,
P_XELAEN,
P_ALLIANCE,
MAXPARAMS,
NOPARAM = (param_t) - 1
};

View File

@ -753,6 +753,15 @@
<text locale="de">"Deine Partei hat $int($units) Migranten und kann maximal $int($maxunits) Migranten aufnehmen."</text>
<text locale="en">"Your faction has $int($units) migrants out of a possible total of $int($maxunits)."</text>
</message>
<message name="nr_alliance" section="nr">
<type>
<arg name="leader" type="faction"/>
<arg name="name" type="string"/>
<arg name="id" type="int"/>
</type>
<text locale="de">"Mitglied der Allianz '$name ($int36($id))', angeführt von $faction($leader)."</text>
<text locale="en">"Member of '$name ($int36($id))', led by $faction($leader)."</text>
</message>
<message name="nr_heroes" section="nr">
<type>
<arg name="units" type="int"/>