forked from github/server
bug 2634 display number of ships to all factions.
This commit is contained in:
parent
63f4853875
commit
bf867eb2d6
|
@ -1718,23 +1718,23 @@ nr_ship(struct stream *out, const region *r, const ship * sh, const faction * f,
|
||||||
char buffer[1024];
|
char buffer[1024];
|
||||||
char ch;
|
char ch;
|
||||||
sbstring sbs;
|
sbstring sbs;
|
||||||
|
const char *stname;
|
||||||
|
|
||||||
sbs_init(&sbs, buffer, sizeof(buffer));
|
sbs_init(&sbs, buffer, sizeof(buffer));
|
||||||
newline(out);
|
newline(out);
|
||||||
|
|
||||||
|
stname = locale_plural(f->locale, sh->type->_name, sh->number, true);
|
||||||
if (captain && captain->faction == f) {
|
if (captain && captain->faction == f) {
|
||||||
int n = 0, p = 0;
|
int n = 0, p = 0;
|
||||||
const char *stname;
|
|
||||||
|
|
||||||
getshipweight(sh, &n, &p);
|
getshipweight(sh, &n, &p);
|
||||||
n = (n + 99) / 100; /* 1 Silber = 1 GE */
|
n = (n + 99) / 100; /* 1 Silber = 1 GE */
|
||||||
|
|
||||||
stname = locale_plural(f->locale, sh->type->_name, sh->number, true);
|
|
||||||
sbs_printf(&sbs, "%s, %d %s, (%d/%d)", shipname(sh), sh->number,
|
sbs_printf(&sbs, "%s, %d %s, (%d/%d)", shipname(sh), sh->number,
|
||||||
stname, n, ship_capacity(sh) / 100);
|
stname, n, ship_capacity(sh) / 100);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sbs_printf(&sbs, "%s, %s", shipname(sh), LOC(f->locale, sh->type->_name));
|
sbs_printf(&sbs, "%s, %d %s", shipname(sh), sh->number, stname);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ship_finished(sh)) {
|
if (!ship_finished(sh)) {
|
||||||
|
|
Loading…
Reference in New Issue