forked from github/server
"road anstatt straße im cr" fixed again, differently
This commit is contained in:
parent
e780097a3b
commit
09683fd891
7 changed files with 305 additions and 283 deletions
|
@ -1116,9 +1116,9 @@ cr_borders(seen_region ** seen, const region * r, const faction * f, int seemode
|
|||
}
|
||||
}
|
||||
if (cs) {
|
||||
const char * bname = b->type->name(b, r, f, 0); /* bug 1326 - I hate this */
|
||||
const char * bname = b->type->name(b, r, f, GF_PURE);
|
||||
fprintf(F, "GRENZE %d\n", ++g);
|
||||
fprintf(F, "\"%s\";typ\n", LOC(default_locale, mkname("border", bname)));
|
||||
fprintf(F, "\"%s\";typ\n", LOC(default_locale, bname));
|
||||
fprintf(F, "%d;richtung\n", d);
|
||||
if (!b->type->transparent(b, f)) fputs("1;opaque\n", F);
|
||||
/* hack: */
|
||||
|
|
|
@ -840,7 +840,7 @@ describe(FILE * F, const region * r, int partial, faction * f)
|
|||
const char *tname;
|
||||
struct edge {
|
||||
struct edge * next;
|
||||
const char * name;
|
||||
char * name;
|
||||
boolean transparent;
|
||||
boolean block;
|
||||
boolean exist[MAXDIRECTIONS];
|
||||
|
@ -868,10 +868,10 @@ describe(FILE * F, const region * r, int partial, faction * f)
|
|||
b = b->next;
|
||||
continue;
|
||||
}
|
||||
while (e && (e->transparent != transparent || strcmp(name, e->name))) e = e->next;
|
||||
while (e && (e->transparent != transparent || strcmp(name,e->name))) e = e->next;
|
||||
if (!e) {
|
||||
e = calloc(sizeof(struct edge), 1);
|
||||
e->name = name;
|
||||
e->name = strdup(name);
|
||||
e->transparent = transparent;
|
||||
e->next = edges;
|
||||
edges = e;
|
||||
|
@ -989,7 +989,7 @@ describe(FILE * F, const region * r, int partial, faction * f)
|
|||
bytes = (int)strlcpy(bufp, LOC(f->locale, resourcename(oldresourcetype[R_SILVER], rmoney(r)!=1)), size);
|
||||
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
|
||||
}
|
||||
/* horses */
|
||||
/* Pferde */
|
||||
|
||||
if (rhorses(r)) {
|
||||
bytes = snprintf(bufp, size, ", %d ", rhorses(r));
|
||||
|
@ -1152,7 +1152,7 @@ describe(FILE * F, const region * r, int partial, faction * f)
|
|||
if (!e->transparent) bytes = (int)strlcpy(bufp, " versperrt ", size);
|
||||
else bytes = (int)strlcpy(bufp, " befindet sich ", size);
|
||||
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
|
||||
bytes = (int)strlcpy(bufp, LOC(f->locale, mkname("border", e->name)), size);
|
||||
bytes = (int)strlcpy(bufp, e->name, size);
|
||||
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
|
||||
if (!e->transparent) bytes = (int)strlcpy(bufp, " die Sicht.", size);
|
||||
else bytes = (int)strlcpy(bufp, ".", size);
|
||||
|
@ -1163,6 +1163,7 @@ describe(FILE * F, const region * r, int partial, faction * f)
|
|||
if (edges) {
|
||||
while (edges) {
|
||||
e = edges->next;
|
||||
free(edges->name);
|
||||
free(edges);
|
||||
edges = e;
|
||||
}
|
||||
|
|
|
@ -278,11 +278,14 @@ age_borders(void)
|
|||
static const char *
|
||||
b_namewall(const border * b, const region * r, const struct faction * f, int gflags)
|
||||
{
|
||||
const char * bname = "wall";
|
||||
|
||||
unused(f);
|
||||
unused(r);
|
||||
unused(b);
|
||||
if (gflags & GF_ARTICLE) return "a_wall";
|
||||
return "wall";
|
||||
if (gflags & GF_ARTICLE) bname = "a_wall";
|
||||
if (gflags & GF_PURE) return bname;
|
||||
return LOC(f->locale, mkname("border", bname));
|
||||
}
|
||||
|
||||
border_type bt_wall = {
|
||||
|
@ -319,8 +322,9 @@ b_namefogwall(const border * b, const region * r, const struct faction * f, int
|
|||
unused(f);
|
||||
unused(b);
|
||||
unused(r);
|
||||
if (gflags & GF_ARTICLE) return "a_fogwall";
|
||||
return "fogwall";
|
||||
if (gflags & GF_PURE) return "fogwall";
|
||||
if (gflags & GF_ARTICLE) return LOC(f->locale, mkname("border", "a_fogwall"));
|
||||
return LOC(f->locale, mkname("border", "fogwall"));
|
||||
}
|
||||
|
||||
static boolean
|
||||
|
@ -349,11 +353,15 @@ border_type bt_fogwall = {
|
|||
static const char *
|
||||
b_nameillusionwall(const border * b, const region * r, const struct faction * f, int gflags)
|
||||
{
|
||||
/* TODO: UNICODE: f->locale bestimmt die Sprache */
|
||||
int fno = b->data.i;
|
||||
unused(b);
|
||||
unused(r);
|
||||
if (gflags & GF_ARTICLE) return (f && fno==f->subscription)?"an_illusionwall":"a_wall";
|
||||
return (f && fno==f->no)?"illusionwall":"wall";
|
||||
if (gflags & GF_PURE) return (f && fno==f->no)?"illusionwall":"wall";
|
||||
if (gflags & GF_ARTICLE) {
|
||||
return LOC(f->locale, mkname("border", (f && fno==f->subscription)?"an_illusionwall":"a_wall"));
|
||||
}
|
||||
return LOC(f->locale, mkname("border", (f && fno==f->no)?"illusionwall":"wall"));
|
||||
}
|
||||
|
||||
border_type bt_illusionwall = {
|
||||
|
@ -382,23 +390,27 @@ boolean b_blockquestportal(const border * b, const unit * u, const region * r) {
|
|||
static const char *
|
||||
b_namequestportal(const border * b, const region * r, const struct faction * f, int gflags)
|
||||
{
|
||||
/* TODO: UNICODE: f->locale bestimmt die Sprache */
|
||||
const char * bname;
|
||||
int lock = b->data.i;
|
||||
unused(b);
|
||||
unused(r);
|
||||
|
||||
if (gflags & GF_ARTICLE) {
|
||||
if(lock > 0) {
|
||||
return "a_gate_locked";
|
||||
if (lock > 0) {
|
||||
bname = "a_gate_locked";
|
||||
} else {
|
||||
return "a_gate_open";
|
||||
bname = "a_gate_open";
|
||||
}
|
||||
} else {
|
||||
if(lock > 0) {
|
||||
return "gate_locked";
|
||||
if (lock > 0) {
|
||||
bname = "gate_locked";
|
||||
} else {
|
||||
return "gate_open";
|
||||
bname = "gate_open";
|
||||
}
|
||||
}
|
||||
if (gflags & GF_PURE) return bname;
|
||||
return LOC(f->locale, mkname("border", bname));
|
||||
}
|
||||
|
||||
border_type bt_questportal = {
|
||||
|
@ -427,26 +439,27 @@ b_nameroad(const border * b, const region * r, const struct faction * f, int gfl
|
|||
static char buffer[64];
|
||||
|
||||
unused(f);
|
||||
if (gflags & GF_PURE) return "road";
|
||||
if (gflags & GF_ARTICLE) {
|
||||
if (!(gflags & GF_DETAILED)) return "a_road";
|
||||
if (!(gflags & GF_DETAILED)) return LOC(f->locale, mkname("border", "a_road"));
|
||||
else if (r->terrain->max_road<=local) {
|
||||
int remote = (r2==b->from)?b->data.sa[0]:b->data.sa[1];
|
||||
if (r2->terrain->max_road<=remote) {
|
||||
return "a_road";
|
||||
return LOC(f->locale, mkname("border", "a_road"));
|
||||
} else {
|
||||
return "an_incomplete_road";
|
||||
return LOC(f->locale, mkname("border", "an_incomplete_road"));
|
||||
}
|
||||
} else {
|
||||
int percent = max(1, 100*local/r->terrain->max_road);
|
||||
if (local) {
|
||||
snprintf(buffer, sizeof(buffer), "a_road_percent", percent);
|
||||
snprintf(buffer, sizeof(buffer), LOC(f->locale, mkname("border", "road_percent")), percent);
|
||||
} else {
|
||||
return "a_road_connection";
|
||||
return LOC(f->locale, mkname("border", "a_road_connection"));
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (gflags & GF_PLURAL) return "roads";
|
||||
else return "road";
|
||||
else if (gflags & GF_PLURAL) return LOC(f->locale, mkname("border", "roads"));
|
||||
else return LOC(f->locale, mkname("border", "road"));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
|
|
@ -303,6 +303,8 @@ void addmessage(struct region * r, struct faction * f, const char *s, msg_t mtyp
|
|||
/* der, die, das vs. ein, eine */
|
||||
#define GF_DETAILED 32
|
||||
/* mehr Informationen. z.b. straße zu 50% */
|
||||
#define GF_PURE 64
|
||||
/* untranslated */
|
||||
|
||||
#define GUARD_NONE 0
|
||||
#define GUARD_TAX 1
|
||||
|
|
|
@ -312,7 +312,7 @@ guardian_faction(plane * pl, int id)
|
|||
|
||||
if (!f) {
|
||||
f = calloc(1, sizeof(faction));
|
||||
f->banner = strdup("Sie dienen dem grossen Wyrm");
|
||||
f->banner = strdup("Sie dienen dem großen Wyrm");
|
||||
f->passw = strdup(itoa36(rng_int()));
|
||||
f->override = strdup(itoa36(rng_int()));
|
||||
set_email(&f->email, "igjarjuk@eressea.de");
|
||||
|
|
|
@ -545,7 +545,7 @@ sp_summon_familiar(castorder *co)
|
|||
int dh, dh1, bytes;
|
||||
direction_t d;
|
||||
message * msg;
|
||||
char zText[1024], * bufp = zText;
|
||||
char zText[NAMESIZE], * bufp = zText;
|
||||
size_t size = sizeof(zText) - 1;
|
||||
|
||||
if (get_familiar(mage) != NULL ) {
|
||||
|
@ -2810,13 +2810,15 @@ resolve_buddy(variant data)
|
|||
static const char *
|
||||
b_namefirewall(const border * b, const region * r, const faction * f, int gflags)
|
||||
{
|
||||
const char * bname;
|
||||
unused(f);
|
||||
unused(r);
|
||||
unused(b);
|
||||
if (gflags & GF_ARTICLE)
|
||||
return "a_firewall";
|
||||
else
|
||||
return "firewall";
|
||||
if (gflags & GF_ARTICLE) bname = "a_firewall";
|
||||
else bname = "firewall";
|
||||
|
||||
if (gflags & GF_PURE) return bname;
|
||||
return LOC(f->locale, mkname("border", bname));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2955,15 +2957,19 @@ sp_firewall(castorder *co)
|
|||
/* ------------------------------------------------------------- */
|
||||
|
||||
static const char *
|
||||
b_namewisps(const border * b, const region * r, const faction * f, int gflags)
|
||||
wisps_name(const border * b, const region * r, const faction * f, int gflags)
|
||||
{
|
||||
const char * bname;
|
||||
unused(f);
|
||||
unused(r);
|
||||
unused(b);
|
||||
if (gflags & GF_ARTICLE)
|
||||
return "a_wisps";
|
||||
else
|
||||
return "wisps";
|
||||
if (gflags & GF_ARTICLE) {
|
||||
bname = "a_wisps";
|
||||
} else {
|
||||
bname = "wisps";
|
||||
}
|
||||
if (gflags & GF_PURE) return bname;
|
||||
return LOC(f->locale, mkname("border", bname));
|
||||
}
|
||||
|
||||
typedef struct wisps_data {
|
||||
|
@ -3009,7 +3015,7 @@ border_type bt_wisps = {
|
|||
wall_read, /* read */
|
||||
wall_write, /* write */
|
||||
b_blocknone, /* block */
|
||||
b_namewisps, /* name */
|
||||
wisps_name, /* name */
|
||||
b_rvisible, /* rvisible */
|
||||
b_fvisible, /* fvisible */
|
||||
b_uvisible, /* uvisible */
|
||||
|
|
|
@ -7524,13 +7524,13 @@
|
|||
<text locale="en">a massive open door</text>
|
||||
</string>
|
||||
|
||||
<string name="gate_closed">
|
||||
<text locale="de">gewaltiges geschlossenes Tor</text>
|
||||
<string name="gate_locked">
|
||||
<text locale="de">gewaltiges verschlossenes Tor</text>
|
||||
<text locale="en">massive locked door</text>
|
||||
</string>
|
||||
|
||||
<string name="a_gate_closed">
|
||||
<text locale="de">ein gewaltiges geschlossenes Tor</text>
|
||||
<string name="a_gate_locked">
|
||||
<text locale="de">ein gewaltiges verschlossenes Tor</text>
|
||||
<text locale="en">a massive locked door</text>
|
||||
</string>
|
||||
|
||||
|
|
Loading…
Reference in a new issue