forked from github/server
the awkwardly named 'young tree' is now called 'sapling'
This commit is contained in:
parent
127f32d0ef
commit
d5c94df710
5 changed files with 25 additions and 19 deletions
|
@ -1281,18 +1281,18 @@ report_computer(const char * filename, report_context * ctx)
|
||||||
#endif
|
#endif
|
||||||
if (fval(r->terrain, LAND_REGION)) {
|
if (fval(r->terrain, LAND_REGION)) {
|
||||||
int trees = rtrees(r, 2);
|
int trees = rtrees(r, 2);
|
||||||
int ytrees = rtrees(r, 1);
|
int saplings = rtrees(r, 1);
|
||||||
# ifdef RESOURCECOMPAT
|
# ifdef RESOURCECOMPAT
|
||||||
if (trees > 0) fprintf(F, "%d;Baeume\n", trees);
|
if (trees > 0) fprintf(F, "%d;Baeume\n", trees);
|
||||||
if (ytrees > 0) fprintf(F, "%d;Schoesslinge\n", ytrees);
|
if (saplings > 0) fprintf(F, "%d;Schoesslinge\n", saplings);
|
||||||
if (fval(r, RF_MALLORN) && (trees > 0 || ytrees > 0))
|
if (fval(r, RF_MALLORN) && (trees > 0 || saplings > 0))
|
||||||
fprintf(F, "1;Mallorn\n");
|
fprintf(F, "1;Mallorn\n");
|
||||||
# endif
|
# endif
|
||||||
if (!fval(r, RF_MALLORN)) {
|
if (!fval(r, RF_MALLORN)) {
|
||||||
if (ytrees) pos = report_resource(pos, "rm_youngtrees", f->locale, ytrees, -1);
|
if (saplings) pos = report_resource(pos, "rm_sapling", f->locale, saplings, -1);
|
||||||
if (trees) pos = report_resource(pos, "rm_trees", f->locale, trees, -1);
|
if (trees) pos = report_resource(pos, "rm_trees", f->locale, trees, -1);
|
||||||
} else {
|
} else {
|
||||||
if (ytrees) pos = report_resource(pos, "rm_youngmallorn", f->locale, ytrees, -1);
|
if (saplings) pos = report_resource(pos, "rm_mallornsapling", f->locale, saplings, -1);
|
||||||
if (trees) pos = report_resource(pos, "rm_mallorn", f->locale, trees, -1);
|
if (trees) pos = report_resource(pos, "rm_mallorn", f->locale, trees, -1);
|
||||||
}
|
}
|
||||||
fprintf(F, "%d;Bauern\n", rpeasants(r));
|
fprintf(F, "%d;Bauern\n", rpeasants(r));
|
||||||
|
|
|
@ -776,7 +776,7 @@ describe(FILE * F, const region * r, int partial, faction * f)
|
||||||
boolean dh;
|
boolean dh;
|
||||||
direction_t d;
|
direction_t d;
|
||||||
int trees;
|
int trees;
|
||||||
int ytrees;
|
int saplings;
|
||||||
attrib *a;
|
attrib *a;
|
||||||
const char *tname;
|
const char *tname;
|
||||||
struct edge {
|
struct edge {
|
||||||
|
@ -844,10 +844,10 @@ describe(FILE * F, const region * r, int partial, faction * f)
|
||||||
/* Bäume */
|
/* Bäume */
|
||||||
|
|
||||||
trees = rtrees(r,2);
|
trees = rtrees(r,2);
|
||||||
ytrees = rtrees(r,1);
|
saplings = rtrees(r,1);
|
||||||
if (production(r)) {
|
if (production(r)) {
|
||||||
if (trees > 0 || ytrees > 0) {
|
if (trees > 0 || saplings > 0) {
|
||||||
bufp += sprintf(bufp, ", %d/%d ", trees, ytrees);
|
bufp += sprintf(bufp, ", %d/%d ", trees, saplings);
|
||||||
if (fval(r, RF_MALLORN)) {
|
if (fval(r, RF_MALLORN)) {
|
||||||
if (trees == 1) {
|
if (trees == 1) {
|
||||||
bufp += strxcpy(bufp, LOC(f->locale, "nr_mallorntree"));
|
bufp += strxcpy(bufp, LOC(f->locale, "nr_mallorntree"));
|
||||||
|
|
|
@ -128,6 +128,8 @@ region_getresource(const region& r, const char * type)
|
||||||
if (rtype==rt_find("money")) return rmoney(&r);
|
if (rtype==rt_find("money")) return rmoney(&r);
|
||||||
if (rtype==rt_find("peasant")) return rpeasants(&r);
|
if (rtype==rt_find("peasant")) return rpeasants(&r);
|
||||||
} else {
|
} else {
|
||||||
|
if (strcmp(type, "seed")==0) return rtrees(&r, 0);
|
||||||
|
if (strcmp(type, "sapling")==0) return rtrees(&r, 1);
|
||||||
if (strcmp(type, "tree")==0) return rtrees(&r, 2);
|
if (strcmp(type, "tree")==0) return rtrees(&r, 2);
|
||||||
if (strcmp(type, "grave")==0) return deathcount(&r);
|
if (strcmp(type, "grave")==0) return deathcount(&r);
|
||||||
if (strcmp(type, "chaos")==0) return chaoscount(&r);
|
if (strcmp(type, "chaos")==0) return chaoscount(&r);
|
||||||
|
@ -143,7 +145,11 @@ region_setresource(region& r, const char * type, int value)
|
||||||
if (rtype==rt_find("money")) rsetmoney(&r, value);
|
if (rtype==rt_find("money")) rsetmoney(&r, value);
|
||||||
if (rtype==rt_find("peasant")) return rsetpeasants(&r, value);
|
if (rtype==rt_find("peasant")) return rsetpeasants(&r, value);
|
||||||
} else {
|
} else {
|
||||||
if (strcmp(type, "tree")==0) {
|
if (strcmp(type, "seed")==0) {
|
||||||
|
return rsettrees(&r, 0, value);
|
||||||
|
} else if (strcmp(type, "sapling")==0) {
|
||||||
|
return rsettrees(&r, 1, value);
|
||||||
|
} else if (strcmp(type, "tree")==0) {
|
||||||
rsettrees(&r, 2, value);
|
rsettrees(&r, 2, value);
|
||||||
} else if (strcmp(type, "grave")==0) {
|
} else if (strcmp(type, "grave")==0) {
|
||||||
int fallen = value-deathcount(&r);
|
int fallen = value-deathcount(&r);
|
||||||
|
|
|
@ -237,7 +237,7 @@ addmenulist(menulist ** SP, const char *s, int *val)
|
||||||
|
|
||||||
static int peasants, money, trees, horses, iron, laen, chaotisch;
|
static int peasants, money, trees, horses, iron, laen, chaotisch;
|
||||||
|
|
||||||
static int ytrees, seeds;
|
static int saplings, seeds;
|
||||||
|
|
||||||
static int ironlevel, laenlevel, stone, stonelevel;
|
static int ironlevel, laenlevel, stone, stonelevel;
|
||||||
|
|
||||||
|
@ -248,7 +248,7 @@ get_region(region *r) {
|
||||||
peasants = rpeasants(r);
|
peasants = rpeasants(r);
|
||||||
money = rmoney(r);
|
money = rmoney(r);
|
||||||
trees = rtrees(r,2);
|
trees = rtrees(r,2);
|
||||||
ytrees = rtrees(r,1);
|
saplings = rtrees(r,1);
|
||||||
seeds = rtrees(r,0);
|
seeds = rtrees(r,0);
|
||||||
horses = rhorses(r);
|
horses = rhorses(r);
|
||||||
iron = -1;
|
iron = -1;
|
||||||
|
@ -280,7 +280,7 @@ put_region(region *r) {
|
||||||
rsetpeasants(r, peasants);
|
rsetpeasants(r, peasants);
|
||||||
rsetmoney(r,money);
|
rsetmoney(r,money);
|
||||||
rsettrees(r,2,trees);
|
rsettrees(r,2,trees);
|
||||||
rsettrees(r,1,ytrees);
|
rsettrees(r,1,saplings);
|
||||||
rsettrees(r,0,seeds);
|
rsettrees(r,0,seeds);
|
||||||
rsethorses(r, horses);
|
rsethorses(r, horses);
|
||||||
|
|
||||||
|
@ -315,11 +315,11 @@ create_region_menu(menulist ** menu, region * r)
|
||||||
addmenulist(menu, "Silver", &money);
|
addmenulist(menu, "Silver", &money);
|
||||||
if (fval(r, RF_MALLORN)) {
|
if (fval(r, RF_MALLORN)) {
|
||||||
addmenulist(menu, "Mallorntrees", &trees);
|
addmenulist(menu, "Mallorntrees", &trees);
|
||||||
addmenulist(menu, "Mallornsprouts", &ytrees);
|
addmenulist(menu, "Mallornsaplings", &saplings);
|
||||||
addmenulist(menu, "Mallornseeds", &seeds);
|
addmenulist(menu, "Mallornseeds", &seeds);
|
||||||
} else {
|
} else {
|
||||||
addmenulist(menu, "Trees", &trees);
|
addmenulist(menu, "Trees", &trees);
|
||||||
addmenulist(menu, "Sprouts", &ytrees);
|
addmenulist(menu, "Saplings", &saplings);
|
||||||
addmenulist(menu, "Seeds", &seeds);
|
addmenulist(menu, "Seeds", &seeds);
|
||||||
}
|
}
|
||||||
addmenulist(menu, "Horses", &horses);
|
addmenulist(menu, "Horses", &horses);
|
||||||
|
|
|
@ -6613,14 +6613,14 @@
|
||||||
<text locale="en">laen</text>
|
<text locale="en">laen</text>
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<string name="rm_youngtrees">
|
<string name="rm_sapling">
|
||||||
<text locale="de">Schößlinge</text>
|
<text locale="de">Schößlinge</text>
|
||||||
<text locale="en">young trees</text>
|
<text locale="en">saplings</text>
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<string name="rm_youngmallorn">
|
<string name="rm_mallornsapling">
|
||||||
<text locale="de">Mallornschößlinge</text>
|
<text locale="de">Mallornschößlinge</text>
|
||||||
<text locale="en">young mallorn</text>
|
<text locale="en">mallorn saplings</text>
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<string name="rm_trees">
|
<string name="rm_trees">
|
||||||
|
|
Loading…
Reference in a new issue