forked from github/server
Durchreisemeldungen fehlen Kleiner Bug bei der Änderung von attrib::nexttype
This commit is contained in:
parent
23247f1831
commit
caab8471ed
|
@ -1146,63 +1146,61 @@ statistics(FILE * F, const region * r, const faction * f)
|
||||||
static void
|
static void
|
||||||
durchreisende(FILE * F, const region * r, const faction * f)
|
durchreisende(FILE * F, const region * r, const faction * f)
|
||||||
{
|
{
|
||||||
attrib *ru;
|
|
||||||
int maxtravel;
|
|
||||||
int counter;
|
|
||||||
|
|
||||||
maxtravel = counter = 0;
|
|
||||||
|
|
||||||
/* Wieviele sind aufzulisten? Für die Grammatik. */
|
|
||||||
|
|
||||||
if (fval(r, RF_TRAVELUNIT)) {
|
if (fval(r, RF_TRAVELUNIT)) {
|
||||||
for (ru = a_find(r->attribs, &at_travelunit); ru && ru->type!=&at_travelunit; ru = ru->next) {
|
attrib *abegin = a_find(r->attribs, &at_travelunit), *a;
|
||||||
unit * u = (unit*)ru->data.v;
|
int counter = 0, maxtravel = 0;
|
||||||
if (cansee_durchgezogen(f, r, u, 0) > 0 && r!=u->region) {
|
char * str = buf;
|
||||||
if (u->ship && !fval(u, UFL_OWNER))
|
|
||||||
continue;
|
/* Wieviele sind aufzulisten? Für die Grammatik. */
|
||||||
maxtravel++;
|
for (a = abegin; a && a->type==&at_travelunit; a = a->next) {
|
||||||
|
unit * u = (unit*)a->data.v;
|
||||||
|
|
||||||
|
if (r!=u->region && (u->ship==NULL || fval(u, UFL_OWNER))) {
|
||||||
|
if (cansee_durchgezogen(f, r, u, 0)) {
|
||||||
|
++maxtravel;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!maxtravel)
|
if (maxtravel==0) {
|
||||||
return;
|
return;
|
||||||
} else return;
|
}
|
||||||
|
|
||||||
|
/* Auflisten. */
|
||||||
|
*str = '\0';
|
||||||
|
rnl(F);
|
||||||
|
|
||||||
|
for (a = abegin; a && a->type==&at_travelunit; a = a->next) {
|
||||||
|
unit * u = (unit*)a->data.v;
|
||||||
|
|
||||||
/* Auflisten. */
|
if (r!=u->region && (u->ship==NULL || fval(u, UFL_OWNER))) {
|
||||||
|
if (cansee_durchgezogen(f, r, u, 0)) {
|
||||||
buf[0] = 0;
|
++counter;
|
||||||
rnl(F);
|
if (u->ship != NULL) {
|
||||||
|
if (counter == 1) {
|
||||||
for (ru = a_find(r->attribs, &at_travelunit); ru && ru->type==&at_travelunit; ru = ru->next) {
|
str += strxcpy(str, "Die ");
|
||||||
unit * u = (unit*)ru->data.v;
|
} else {
|
||||||
if (cansee_durchgezogen(f, r, u, 0) > 0 && r!=u->region) {
|
str += strxcpy(str, "die ");
|
||||||
if (u->ship && !fval(u, UFL_OWNER))
|
}
|
||||||
continue;
|
str += strxcpy(str, shipname(u->ship));
|
||||||
counter++;
|
} else {
|
||||||
if (u->ship != (ship *) NULL) {
|
str += strxcpy(str, unitname(u));
|
||||||
if (counter == 1) {
|
}
|
||||||
scat("Die ");
|
if (counter + 1 < maxtravel) {
|
||||||
} else {
|
str += strxcpy(str, ", ");
|
||||||
scat("die ");
|
} else if (counter + 1 == maxtravel) {
|
||||||
}
|
str += strxcpy(str, "und ");
|
||||||
scat(shipname(u->ship));
|
}
|
||||||
} else {
|
}
|
||||||
scat(unitname(u));
|
}
|
||||||
}
|
}
|
||||||
if (counter + 1 < maxtravel) {
|
if (maxtravel == 1) {
|
||||||
scat(", ");
|
str += strxcpy(str, " hat die Region durchquert.");
|
||||||
} else if (counter + 1 == maxtravel) {
|
rparagraph(F, buf, 0, 0, 0);
|
||||||
scat(" und ");
|
} else {
|
||||||
}
|
str += strxcpy(str, " haben die Region durchquert.");
|
||||||
}
|
rparagraph(F, buf, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (maxtravel == 1) {
|
|
||||||
scat(" hat die Region durchquert.");
|
|
||||||
rparagraph(F, buf, 0, 0, 0);
|
|
||||||
} else {
|
|
||||||
scat(" haben die Region durchquert.");
|
|
||||||
rparagraph(F, buf, 0, 0, 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue