forked from github/server
local bugfixes
This commit is contained in:
parent
341bd961f5
commit
94869811fc
5 changed files with 18 additions and 18 deletions
|
@ -1068,7 +1068,7 @@ cr_borders(seen_region ** seen, const region * r, const faction * f, int seemode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (cs) {
|
if (cs) {
|
||||||
const char * bname = mkname("connection", b->type->name(b, r, f, GF_PURE));
|
const char * bname = mkname("border", b->type->name(b, r, f, GF_PURE));
|
||||||
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);
|
||||||
|
|
|
@ -296,7 +296,7 @@ b_namewall(const connection * b, const region * r, const struct faction * f, int
|
||||||
unused(b);
|
unused(b);
|
||||||
if (gflags & GF_ARTICLE) bname = "a_wall";
|
if (gflags & GF_ARTICLE) bname = "a_wall";
|
||||||
if (gflags & GF_PURE) return bname;
|
if (gflags & GF_PURE) return bname;
|
||||||
return LOC(f->locale, mkname("connection", bname));
|
return LOC(f->locale, mkname("border", bname));
|
||||||
}
|
}
|
||||||
|
|
||||||
border_type bt_wall = {
|
border_type bt_wall = {
|
||||||
|
@ -334,8 +334,8 @@ b_namefogwall(const connection * b, const region * r, const struct faction * f,
|
||||||
unused(b);
|
unused(b);
|
||||||
unused(r);
|
unused(r);
|
||||||
if (gflags & GF_PURE) return "fogwall";
|
if (gflags & GF_PURE) return "fogwall";
|
||||||
if (gflags & GF_ARTICLE) return LOC(f->locale, mkname("connection", "a_fogwall"));
|
if (gflags & GF_ARTICLE) return LOC(f->locale, mkname("border", "a_fogwall"));
|
||||||
return LOC(f->locale, mkname("connection", "fogwall"));
|
return LOC(f->locale, mkname("border", "fogwall"));
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean
|
static boolean
|
||||||
|
@ -370,9 +370,9 @@ b_nameillusionwall(const connection * b, const region * r, const struct faction
|
||||||
unused(r);
|
unused(r);
|
||||||
if (gflags & GF_PURE) return (f && fno==f->no)?"illusionwall":"wall";
|
if (gflags & GF_PURE) return (f && fno==f->no)?"illusionwall":"wall";
|
||||||
if (gflags & GF_ARTICLE) {
|
if (gflags & GF_ARTICLE) {
|
||||||
return LOC(f->locale, mkname("connection", (f && fno==f->subscription)?"an_illusionwall":"a_wall"));
|
return LOC(f->locale, mkname("border", (f && fno==f->subscription)?"an_illusionwall":"a_wall"));
|
||||||
}
|
}
|
||||||
return LOC(f->locale, mkname("connection", (f && fno==f->no)?"illusionwall":"wall"));
|
return LOC(f->locale, mkname("border", (f && fno==f->no)?"illusionwall":"wall"));
|
||||||
}
|
}
|
||||||
|
|
||||||
border_type bt_illusionwall = {
|
border_type bt_illusionwall = {
|
||||||
|
@ -420,7 +420,7 @@ b_namequestportal(const connection * b, const region * r, const struct faction *
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (gflags & GF_PURE) return bname;
|
if (gflags & GF_PURE) return bname;
|
||||||
return LOC(f->locale, mkname("connection", bname));
|
return LOC(f->locale, mkname("border", bname));
|
||||||
}
|
}
|
||||||
|
|
||||||
border_type bt_questportal = {
|
border_type bt_questportal = {
|
||||||
|
@ -451,25 +451,25 @@ b_nameroad(const connection * b, const region * r, const struct faction * f, int
|
||||||
unused(f);
|
unused(f);
|
||||||
if (gflags & GF_PURE) return "road";
|
if (gflags & GF_PURE) return "road";
|
||||||
if (gflags & GF_ARTICLE) {
|
if (gflags & GF_ARTICLE) {
|
||||||
if (!(gflags & GF_DETAILED)) return LOC(f->locale, mkname("connection", "a_road"));
|
if (!(gflags & GF_DETAILED)) return LOC(f->locale, mkname("border", "a_road"));
|
||||||
else if (r->terrain->max_road<=local) {
|
else if (r->terrain->max_road<=local) {
|
||||||
int remote = (r2==b->from)?b->data.sa[0]:b->data.sa[1];
|
int remote = (r2==b->from)?b->data.sa[0]:b->data.sa[1];
|
||||||
if (r2->terrain->max_road<=remote) {
|
if (r2->terrain->max_road<=remote) {
|
||||||
return LOC(f->locale, mkname("connection", "a_road"));
|
return LOC(f->locale, mkname("border", "a_road"));
|
||||||
} else {
|
} else {
|
||||||
return LOC(f->locale, mkname("connection", "an_incomplete_road"));
|
return LOC(f->locale, mkname("border", "an_incomplete_road"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int percent = MAX(1, 100*local/r->terrain->max_road);
|
int percent = MAX(1, 100*local/r->terrain->max_road);
|
||||||
if (local) {
|
if (local) {
|
||||||
snprintf(buffer, sizeof(buffer), LOC(f->locale, mkname("connection", "a_road_percent")), percent);
|
snprintf(buffer, sizeof(buffer), LOC(f->locale, mkname("border", "a_road_percent")), percent);
|
||||||
} else {
|
} else {
|
||||||
return LOC(f->locale, mkname("connection", "a_road_connection"));
|
return LOC(f->locale, mkname("border", "a_road_connection"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (gflags & GF_PLURAL) return LOC(f->locale, mkname("connection", "roads"));
|
else if (gflags & GF_PLURAL) return LOC(f->locale, mkname("border", "roads"));
|
||||||
else return LOC(f->locale, mkname("connection", "road"));
|
else return LOC(f->locale, mkname("border", "road"));
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,4 +66,4 @@
|
||||||
#define MOURNING_VERSION 335 /* mourning peasants */
|
#define MOURNING_VERSION 335 /* mourning peasants */
|
||||||
|
|
||||||
#define MIN_VERSION CURSETYPE_VERSION /* minimal datafile we support */
|
#define MIN_VERSION CURSETYPE_VERSION /* minimal datafile we support */
|
||||||
#define RELEASE_VERSION CURSEFLOAT_VERSION /* current datafile */
|
#define RELEASE_VERSION MOURNING_VERSION /* current datafile */
|
||||||
|
|
|
@ -2756,7 +2756,7 @@ b_namefirewall(const connection * b, const region * r, const faction * f, int gf
|
||||||
else bname = "firewall";
|
else bname = "firewall";
|
||||||
|
|
||||||
if (gflags & GF_PURE) return bname;
|
if (gflags & GF_PURE) return bname;
|
||||||
return LOC(f->locale, mkname("connection", bname));
|
return LOC(f->locale, mkname("border", bname));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -2921,7 +2921,7 @@ wisps_name(const connection * b, const region * r, const faction * f, int gflags
|
||||||
bname = "wisps";
|
bname = "wisps";
|
||||||
}
|
}
|
||||||
if (gflags & GF_PURE) return bname;
|
if (gflags & GF_PURE) return bname;
|
||||||
return LOC(f->locale, mkname("connection", bname));
|
return LOC(f->locale, mkname("border", bname));
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct wisps_data {
|
typedef struct wisps_data {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
<xi:include href="../buildings/castle-2.xml" />
|
<xi:include href="../buildings/castle-2.xml" />
|
||||||
|
|
||||||
<building name="watch" capacity="1">
|
<building name="watch" capacity="1" maxsize="10">
|
||||||
<function name="name" value="fort_name"/>
|
<function name="name" value="fort_name"/>
|
||||||
<function name="protection" value="lua_building_protection"/>
|
<function name="protection" value="lua_building_protection"/>
|
||||||
<function name="taxes" value="lua_building_taxes"/>
|
<function name="taxes" value="lua_building_taxes"/>
|
||||||
|
|
Loading…
Reference in a new issue