"Ozean wird im CR zum Regionstyp Mahlstrom, verliert im CR aber seinen Namen"

Maelstrom wird jetzt programmatisch in terrain_name gemacht (auch wenn es besser in terrain::name() sein sollte).
This commit is contained in:
Enno Rehling 2007-03-04 22:27:32 +00:00
parent 6dd3e9b1d4
commit 68e2ec932f
4 changed files with 27 additions and 34 deletions

View File

@ -1270,11 +1270,7 @@ report_computer(const char * filename, report_context * ctx)
else fprintf(F, "REGION %d %d %d\n", region_x(r, f), region_y(r, f), r->planep->id);
}
if (r->land && strlen(rname(r, f->locale))) fprintf(F, "\"%s\";Name\n", rname(r, f->locale));
if (is_cursed(r->attribs,C_MAELSTROM, 0))
tname = "maelstrom";
else {
tname = terrain_name(r);
}
fprintf(F, "\"%s\";Terrain\n", add_translation(tname, locale_string(f->locale, tname)));
if (sr->mode!=see_unit) fprintf(F, "\"%s\";visibility\n", visibility[sr->mode]);

View File

@ -741,13 +741,7 @@ trailinto(const region * r, const struct locale * lang)
char ref[32];
const char * s;
if (r) {
const char * tname;
if (is_cursed(r->attribs, C_MAELSTROM, 0)) {
/* das kostet. evtl. wäre ein FL_CURSED gut? */
tname = "maelstrom";
} else {
tname = terrain_name(r);
}
const char * tname = terrain_name(r);
strcat(strcpy(ref, tname), "_trail");
s = locale_string(lang, ref);
if (s && *s) {
@ -836,11 +830,8 @@ describe(FILE * F, const region * r, int partial, faction * f)
/* Terrain */
bufp += strxcpy(bufp, ", ");
if (is_cursed(r->attribs,C_MAELSTROM, 0)) {
tname = "maelstrom";
} else {
tname = terrain_name(r);
}
bufp += strxcpy(bufp, LOC(f->locale, tname));
/* Bäume */

View File

@ -2572,7 +2572,7 @@ aftermath(battle * b)
* stehen in fig->run.items. Dann werden die Fliehenden auf
* die leere (tote) alte Einheit gemapt */
#ifdef SIMPLE_ESCAPE
if (!fval(df, FIG_NOLOOT)){
if (!fval(df, FIG_NOLOOT)) {
loot_items(df);
}
#else

View File

@ -123,7 +123,13 @@ oldterrain(const struct terrain_type * terrain)
const char *
terrain_name(const struct region * r)
{
if (r->terrain->name!=NULL) return r->terrain->name(r);
if (r->terrain->name!=NULL) {
return r->terrain->name(r);
} else if (fval(r->terrain, SEA_REGION)) {
if (is_cursed(r->attribs, C_MAELSTROM, 0)) {
return "maelstrom";
}
}
return r->terrain->_name;
}