forked from github/server
parent
e2808eeea9
commit
fef2852c5e
|
@ -1160,7 +1160,8 @@ int seemode, FILE * F)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (cs) {
|
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, "GRENZE %d\n", ++g);
|
||||||
fprintf(F, "\"%s\";typ\n", LOC(default_locale, bname));
|
fprintf(F, "\"%s\";typ\n", LOC(default_locale, bname));
|
||||||
fprintf(F, "%d;richtung\n", d);
|
fprintf(F, "%d;richtung\n", d);
|
||||||
|
|
|
@ -677,3 +677,7 @@ int read_borders(gamedata *data)
|
||||||
}
|
}
|
||||||
return 0;
|
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;
|
||||||
|
}
|
||||||
|
|
|
@ -148,6 +148,9 @@ extern "C" {
|
||||||
/* game-specific callbacks */
|
/* game-specific callbacks */
|
||||||
void(*border_convert_cb) (struct connection * con, struct attrib * attr);
|
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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -915,7 +915,7 @@ static void describe(stream *out, const seen_region * sr, faction * f)
|
||||||
for (b = get_borders(r, r2); b;) {
|
for (b = get_borders(r, r2); b;) {
|
||||||
struct edge *e = edges;
|
struct edge *e = edges;
|
||||||
bool transparent = b->type->transparent(b, f);
|
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)
|
if (!transparent)
|
||||||
see[d] = false;
|
see[d] = false;
|
||||||
|
|
Loading…
Reference in New Issue