Reparatur Irrlichter

https://bugs.eressea.de/view.php?id=2227
This commit is contained in:
Enno Rehling 2016-08-06 14:36:54 +02:00
parent e2808eeea9
commit fef2852c5e
4 changed files with 10 additions and 2 deletions

View File

@ -1160,7 +1160,8 @@ int seemode, FILE * F)
}
}
if (cs) {
const char *bname = mkname("border", b->type->name(b, r, f, GF_PURE));
const char *bname = border_name(b, r, f, GF_PURE);
bname = mkname("border", bname);
fprintf(F, "GRENZE %d\n", ++g);
fprintf(F, "\"%s\";typ\n", LOC(default_locale, bname));
fprintf(F, "%d;richtung\n", d);

View File

@ -677,3 +677,7 @@ int read_borders(gamedata *data)
}
return 0;
}
const char * border_name(const connection *co, const struct region * r, const struct faction * f, int flags) {
return (co->type->name) ? co->type->name(co, r, f, flags) : co->type->__name;
}

View File

@ -148,6 +148,9 @@ extern "C" {
/* game-specific callbacks */
void(*border_convert_cb) (struct connection * con, struct attrib * attr);
const char * border_name(const struct connection *co,
const struct region * r, const struct faction * f, int flags);
#ifdef __cplusplus
}
#endif

View File

@ -915,7 +915,7 @@ static void describe(stream *out, const seen_region * sr, faction * f)
for (b = get_borders(r, r2); b;) {
struct edge *e = edges;
bool transparent = b->type->transparent(b, f);
const char *name = b->type->name(b, r, f, GF_DETAILED | GF_ARTICLE);
const char *name = border_name(b, r, f, GF_DETAILED | GF_ARTICLE);
if (!transparent)
see[d] = false;