forked from github/server
Regionsstatistik im NR teilweise übersetzt. Ich bin ja sooo faul.
This commit is contained in:
parent
1b56db93d9
commit
d9d7954a06
|
@ -1419,53 +1419,61 @@ describe(FILE * F, const region * r, int partial, faction * f)
|
|||
static void
|
||||
statistics(FILE * F, const region * r, const faction * f)
|
||||
{
|
||||
const unit *u;
|
||||
int number, p;
|
||||
item *itm, *items = NULL;
|
||||
p = rpeasants(r);
|
||||
number = 0;
|
||||
const unit *u;
|
||||
int number, p;
|
||||
message * m;
|
||||
item *itm, *items = NULL;
|
||||
p = rpeasants(r);
|
||||
number = 0;
|
||||
|
||||
/* zählen */
|
||||
for (u = r->units; u; u = u->next)
|
||||
if (u->faction == f && u->race != new_race[RC_SPELL]) {
|
||||
for (itm=u->items;itm;itm=itm->next) {
|
||||
i_change(&items, itm->type, itm->number);
|
||||
}
|
||||
number += u->number;
|
||||
}
|
||||
/* zählen */
|
||||
for (u = r->units; u; u = u->next)
|
||||
if (u->faction == f && u->race != new_race[RC_SPELL]) {
|
||||
for (itm=u->items;itm;itm=itm->next) {
|
||||
i_change(&items, itm->type, itm->number);
|
||||
}
|
||||
number += u->number;
|
||||
}
|
||||
|
||||
/* Ausgabe */
|
||||
rnl(F);
|
||||
sprintf(buf, "Statistik für %s:", f_regionid(r, f));
|
||||
/* Ausgabe */
|
||||
rnl(F);
|
||||
m = msg_message("nr_stat_header", "region", r);
|
||||
nr_render(m, f->locale, buf, sizeof(buf), f);
|
||||
rps(F, buf);
|
||||
msg_release(m);
|
||||
rnl(F);
|
||||
|
||||
/* Region */
|
||||
if (landregion(rterrain(r)) && rmoney(r)) {
|
||||
m = msg_message("nr_stat_maxentertainment", "max", entertainmoney(r));
|
||||
nr_render(m, f->locale, buf, sizeof(buf), f);
|
||||
rps(F, buf);
|
||||
rnl(F);
|
||||
msg_release(m);
|
||||
}
|
||||
if (production(r) && (!rterrain(r) == T_OCEAN || f->race == new_race[RC_AQUARIAN])) {
|
||||
m = msg_message("nr_stat_salary", "max", fwage(r, f, true));
|
||||
nr_render(m, f->locale, buf, sizeof(buf), f);
|
||||
rps(F, buf);
|
||||
msg_release(m);
|
||||
}
|
||||
if (p) {
|
||||
m = msg_message("nr_stat_recruits", "max", p / RECRUITFRACTION);
|
||||
nr_render(m, f->locale, buf, sizeof(buf), f);
|
||||
rps(F, buf);
|
||||
msg_release(m);
|
||||
|
||||
/* Region */
|
||||
if (landregion(rterrain(r)) && rmoney(r)) {
|
||||
sprintf(buf, "Unterhaltung: max. %d Silber", entertainmoney(r));
|
||||
rps(F, buf);
|
||||
if (!TradeDisabled()) {
|
||||
if (buildingtype_exists(r, bt_find("caravan"))) {
|
||||
sprintf(buf, "Luxusgüter zum angegebenen Preis: %d",
|
||||
(p * 2) / TRADE_FRACTION);
|
||||
} else {
|
||||
sprintf(buf, "Luxusgüter zum angegebenen Preis: %d",
|
||||
p / TRADE_FRACTION);
|
||||
}
|
||||
rps(F, buf);
|
||||
}
|
||||
if (production(r) && (!rterrain(r) == T_OCEAN || f->race == new_race[RC_AQUARIAN])) {
|
||||
sprintf(buf, "Lohn für Arbeit: %d Silber", fwage(r, f, true));
|
||||
rps(F, buf);
|
||||
}
|
||||
if (p) {
|
||||
sprintf(buf, "Rekrutieren: max. %d Bauern",
|
||||
p / RECRUITFRACTION);
|
||||
rps(F, buf);
|
||||
|
||||
if (!TradeDisabled()) {
|
||||
if (buildingtype_exists(r, bt_find("caravan"))) {
|
||||
sprintf(buf, "Luxusgüter zum angegebenen Preis: %d",
|
||||
(p * 2) / TRADE_FRACTION);
|
||||
} else {
|
||||
sprintf(buf, "Luxusgüter zum angegebenen Preis: %d",
|
||||
p / TRADE_FRACTION);
|
||||
}
|
||||
rps(F, buf);
|
||||
}
|
||||
}
|
||||
/* Info über Einheiten */
|
||||
}
|
||||
/* Info über Einheiten */
|
||||
|
||||
sprintf(buf, "Personen: %d", number);
|
||||
rps(F, buf);
|
||||
|
|
|
@ -397,6 +397,38 @@
|
|||
<text locale="fr">"Your faction has $int($population) people in $int($units) units."</text>
|
||||
<text locale="en">"Your faction has $int($population) people in $int($units) units."</text>
|
||||
</message>
|
||||
<message name="nr_stat_header" section="events">
|
||||
<type>
|
||||
<arg name="region" type="region"/>
|
||||
</type>
|
||||
<text locale="de">"Statistik für $region($region):"</text>
|
||||
<text locale="en">"Statistics for $region($region):"</text>
|
||||
<text locale="fr">"Statistics for $region($region):"</text>
|
||||
</message>
|
||||
<message name="nr_stat_maxentertainment" section="events">
|
||||
<type>
|
||||
<arg name="max" type="int"/>
|
||||
</type>
|
||||
<text locale="de">"Unterhaltung: max. $int($max) Silber."</text>
|
||||
<text locale="en">"Entertainment: max. $int($max) silver."</text>
|
||||
<text locale="fr">"Entertainment: max. $int($max) silver."</text>
|
||||
</message>
|
||||
<message name="nr_stat_salary" section="events">
|
||||
<type>
|
||||
<arg name="max" type="int"/>
|
||||
</type>
|
||||
<text locale="de">"Lohn für Arbeit: $int($max) Silber."</text>
|
||||
<text locale="en">"Worker's salary: $int($max) silver."</text>
|
||||
<text locale="fr">"Worker's salary: $int($max) silver."</text>
|
||||
</message>
|
||||
<message name="nr_stat_recruits" section="events">
|
||||
<type>
|
||||
<arg name="max" type="int"/>
|
||||
</type>
|
||||
<text locale="de">"Rekruten: max. $int($max) Bauern."</text>
|
||||
<text locale="en">"Recruits: $int($max) peasants."</text>
|
||||
<text locale="fr">"Recruits: $int($max) peasants."</text>
|
||||
</message>
|
||||
<message name="nr_score" section="events">
|
||||
<type>
|
||||
<arg name="score" type="int"/>
|
||||
|
|
Loading…
Reference in New Issue