racename-attribut verdeckt andere Rasse (ausser bei templates)

This commit is contained in:
Enno Rehling 2004-07-10 22:31:21 +00:00
parent 30358cd7f0
commit fb1696c19e
3 changed files with 29 additions and 21 deletions

View File

@ -678,19 +678,24 @@ cr_output_unit(FILE * F, const region * r,
fprintf(F, "%d;Anzahl\n", u->number); fprintf(F, "%d;Anzahl\n", u->number);
} }
pzTmp = get_racename(u->attribs); pzTmp = get_racename(u->attribs);
if (pzTmp==NULL) { if (pzTmp) {
const char * zRace = rc_name(u->irace, 1); fprintf(F, "\"%s\";Typ\n", pzTmp);
fprintf(F, "\"%s\";Typ\n", if (u->faction==f && fval(u->race, RCF_SHAPESHIFTANY)) {
add_translation(zRace, locale_string(f->locale, zRace)));
}
else fprintf(F, "\"%s\";Typ\n", pzTmp);
if ((pzTmp || u->irace != u->race) && u->faction==f) {
const char * zRace = rc_name(u->race, 1); const char * zRace = rc_name(u->race, 1);
fprintf(F, "\"%s\";wahrerTyp\n", fprintf(F, "\"%s\";wahrerTyp\n",
add_translation(zRace, locale_string(f->locale, zRace))); add_translation(zRace, locale_string(f->locale, zRace)));
} }
} else {
const char * zRace = rc_name(u->irace, 1);
fprintf(F, "\"%s\";Typ\n",
add_translation(zRace, locale_string(f->locale, zRace)));
if (u->faction==f && u->irace!=u->race) {
zRace = rc_name(u->race, 1);
fprintf(F, "\"%s\";wahrerTyp\n",
add_translation(zRace, locale_string(f->locale, zRace)));
}
}
if (u->building) if (u->building)
fprintf(F, "%d;Burg\n", u->building->no); fprintf(F, "%d;Burg\n", u->building->no);

View File

@ -245,18 +245,20 @@ bufunit(const faction * f, const unit * u, int indent, int mode)
} }
pzTmp = get_racename(u->attribs); pzTmp = get_racename(u->attribs);
if (pzTmp || u->irace != u->race) { if (pzTmp) {
if (pzTmp)
scat(pzTmp); scat(pzTmp);
else if (u->faction==f && fval(u->race, RCF_SHAPESHIFTANY)) {
scat(racename(f->locale, u, u->irace));
if (u->faction == f) {
scat(" ("); scat(" (");
scat(racename(f->locale, u, u->race)); scat(racename(f->locale, u, u->race));
scat(")"); scat(")");
} }
} else { } else {
scat(racename(f->locale, u, u->irace));
if (u->faction==f && u->irace!=u->race) {
scat(" (");
scat(racename(f->locale, u, u->race)); scat(racename(f->locale, u, u->race));
scat(")");
}
} }
/* status */ /* status */

View File

@ -26,6 +26,7 @@
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
static FILE * sqlstream = NULL; static FILE * sqlstream = NULL;
static char * sqlfilename = NULL; static char * sqlfilename = NULL;