angefangen mit umstellung

vorsicht, läuft garantiert nicht
This commit is contained in:
Katja Zedel 2002-05-08 11:06:54 +00:00
parent ed67483f1e
commit e6acc66053
5 changed files with 99 additions and 22 deletions

View File

@ -172,7 +172,7 @@ cr_output_str_list(FILE * F, const char *title, const strlist * S, const faction
#include "objtypes.h" #include "objtypes.h"
static void static void
print_curses(FILE * F, const void * obj, typ_t typ, const attrib *a, int self) print_curses(FILE * F, const locale * lang, const void * obj, typ_t typ, const attrib *a, int self)
{ {
boolean header = false; boolean header = false;
while (a) { while (a) {
@ -183,7 +183,7 @@ print_curses(FILE * F, const void * obj, typ_t typ, const attrib *a, int self)
c = (curse *)a->data.v; c = (curse *)a->data.v;
if (c->type->curseinfo) if (c->type->curseinfo)
dh = c->type->curseinfo(obj, typ, c, self); dh = c->type->curseinfo(lang, obj, typ, c, self);
if (dh == 1) { if (dh == 1) {
if (!header) { if (!header) {
header = 1; header = 1;
@ -437,10 +437,10 @@ cr_output_buildings(FILE * F, building * b, unit * u, int fno, faction *f)
if (b->besieged) if (b->besieged)
fprintf(F, "%d;Belagerer\n", b->besieged); fprintf(F, "%d;Belagerer\n", b->besieged);
if(bo != NULL){ if(bo != NULL){
print_curses(F, b, TYP_BUILDING, b->attribs, print_curses(F, f->locale, b, TYP_BUILDING, b->attribs,
(bo->faction == f)? 1 : 0); (bo->faction == f)? 1 : 0);
} else { } else {
print_curses(F, b, TYP_BUILDING, b->attribs, 0); print_curses(F, f->locale, b, TYP_BUILDING, b->attribs, 0);
} }
} }
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */ /* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
@ -483,10 +483,10 @@ cr_output_ship(FILE * F, const ship * s, const unit * u, int fcaptain, const fac
fprintf(F, "%d;Kueste\n", w); fprintf(F, "%d;Kueste\n", w);
if(shipowner(r, s) != NULL){ if(shipowner(r, s) != NULL){
print_curses(F, s, TYP_SHIP, s->attribs, print_curses(F, f->locale, s, TYP_SHIP, s->attribs,
(shipowner(r, s)->faction == f)? 1 : 0); (shipowner(r, s)->faction == f)? 1 : 0);
} else { } else {
print_curses(F, s, TYP_SHIP, s->attribs, 0); print_curses(F, f->locale, s, TYP_SHIP, s->attribs, 0);
} }
} }
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */ /* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
@ -731,7 +731,7 @@ cr_output_unit(FILE * F, const region * r,
if ((u->faction == f || omniscient(f)) && u->botschaften) if ((u->faction == f || omniscient(f)) && u->botschaften)
cr_output_str_list(F, "EINHEITSBOTSCHAFTEN", u->botschaften, f); cr_output_str_list(F, "EINHEITSBOTSCHAFTEN", u->botschaften, f);
print_curses(F, u, TYP_UNIT, u->attribs, (u->faction == f)? 1 : 0); print_curses(F, f->locale, u, TYP_UNIT, u->attribs, (u->faction == f)? 1 : 0);
} }
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */ /* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
@ -1199,7 +1199,7 @@ report_computer(FILE * F, faction * f, const seen_region * seen,
} }
} }
print_curses(F, r, TYP_REGION, r->attribs, 0); print_curses(F, f->locale, r, TYP_REGION, r->attribs, 0);
/* describe both passed and inhabited regions */ /* describe both passed and inhabited regions */
show_active_spells(r); show_active_spells(r);
{ {

View File

@ -664,7 +664,7 @@ hat_in_region(item_t it, region * r, faction * f)
} }
static void static void
print_curses(FILE *F, const void * obj, typ_t typ, const attrib *a, int self, int indent) print_curses(FILE *F, const locale * lang, const void * obj, typ_t typ, const attrib *a, int self, int indent)
{ {
for(;a;a=a->next) { for(;a;a=a->next) {
int dh = 0; int dh = 0;
@ -672,7 +672,7 @@ print_curses(FILE *F, const void * obj, typ_t typ, const attrib *a, int self, in
if (fval(a->type, ATF_CURSE)) { if (fval(a->type, ATF_CURSE)) {
curse *c = (curse *)a->data.v; curse *c = (curse *)a->data.v;
if (c->type->curseinfo) if (c->type->curseinfo)
dh = c->type->curseinfo(obj, typ, c, self); dh = c->type->curseinfo(lang, obj, typ, c, self);
if (dh == 1) { if (dh == 1) {
rnl(F); rnl(F);
rparagraph(F, buf, indent, 0); rparagraph(F, buf, indent, 0);
@ -775,11 +775,11 @@ rpunit(FILE * F, const faction * f, const unit * u, int indent, int mode)
if(ug) { if(ug) {
int i; int i;
for(i=0; i<ug->members; i++) { for(i=0; i<ug->members; i++) {
print_curses(F, u, TYP_UNIT, ug->unit_array[i]->attribs, (u->faction == f)? 1 : 0, indent); print_curses(F, f->locale, u, TYP_UNIT, ug->unit_array[i]->attribs, (u->faction == f)? 1 : 0, indent);
} }
} else } else
#endif /* USE_UGROUPS */ #endif /* USE_UGROUPS */
print_curses(F, u, TYP_UNIT, u->attribs, (u->faction == f)? 1 : 0, indent); print_curses(F, f->locale, u, TYP_UNIT, u->attribs, (u->faction == f)? 1 : 0, indent);
} }
#ifdef USE_UGROUPS #ifdef USE_UGROUPS
@ -1281,7 +1281,7 @@ describe(FILE * F, const region * r, int partial, faction * f)
n = 0; n = 0;
/* Wirkungen permanenter Sprüche */ /* Wirkungen permanenter Sprüche */
print_curses(F, r, TYP_REGION, r->attribs, 0, 0); print_curses(F, f->locale, r, TYP_REGION, r->attribs, 0, 0);
/* Produktionsreduktion */ /* Produktionsreduktion */
a = a_find(r->attribs, &at_reduceproduction); a = a_find(r->attribs, &at_reduceproduction);
@ -1785,10 +1785,10 @@ report_building(FILE *F, const region * r, const building * b, const faction * f
/* Leere Burgen verursachten sonst segfault! */ /* Leere Burgen verursachten sonst segfault! */
if(buildingowner(r,b) != NULL){ if(buildingowner(r,b) != NULL){
print_curses(F, b, TYP_BUILDING, b->attribs, print_curses(F, f->locale, b, TYP_BUILDING, b->attribs,
(buildingowner(r,b)->faction == f)? 1 : 0, 4); (buildingowner(r,b)->faction == f)? 1 : 0, 4);
} else { } else {
print_curses(F, b, TYP_BUILDING, b->attribs, 0, 4); print_curses(F, f->locale, b, TYP_BUILDING, b->attribs, 0, 4);
} }
for (u = r->units; u; u = u->next) for (u = r->units; u; u = u->next)
@ -2181,10 +2181,10 @@ report(FILE *F, faction * f, const faction_list * addresses,
/* Leere Schiffe verursachten sonst segfault! */ /* Leere Schiffe verursachten sonst segfault! */
if(shipowner(r,sh) != NULL){ if(shipowner(r,sh) != NULL){
print_curses(F, sh, TYP_SHIP, sh->attribs, print_curses(F, f->locale, sh, TYP_SHIP, sh->attribs,
(shipowner(r,sh)->faction == f)? 1 : 0, 4); (shipowner(r,sh)->faction == f)? 1 : 0, 4);
} else { } else {
print_curses(F, sh, TYP_SHIP, sh->attribs, 0, 4); print_curses(F, f->locale, sh, TYP_SHIP, sh->attribs, 0, 4);
} }
for (u = r->units; u; u = u->next) for (u = r->units; u; u = u->next)

View File

@ -926,7 +926,7 @@ cinfo_astralblock(void * obj, typ_t typ, curse *c, int self)
} }
/* C_PEACE */ /* C_PEACE */
static int static int
cinfo_peace(void * obj, typ_t typ, curse *c, int self) cinfo_peacezone(void * obj, typ_t typ, curse *c, int self)
{ {
unused(typ); unused(typ);
unused(obj); unused(obj);
@ -1420,7 +1420,7 @@ static curse_type cursedaten[MAXCURSE] =
CURSETYP_NORM, 0, NO_MERGE, CURSETYP_NORM, 0, NO_MERGE,
"Dieser machtvoller Beeinflussungszauber erstickt jeden Streit schon im " "Dieser machtvoller Beeinflussungszauber erstickt jeden Streit schon im "
"Keim.", "Keim.",
(cdesc_fun)cinfo_peace (cdesc_fun)cinfo_peacezone
}, },
{ /* erschwert geordnete Bewegungen */ { /* erschwert geordnete Bewegungen */
"disorientationzone", "disorientationzone",

View File

@ -219,7 +219,7 @@ typedef struct curse_type {
unsigned int mergeflags; unsigned int mergeflags;
const char *info_str; /* Wirkung des curse, wird bei einer gelungenen const char *info_str; /* Wirkung des curse, wird bei einer gelungenen
Zauberanalyse angezeigt */ Zauberanalyse angezeigt */
int (*curseinfo)(const void*, int, curse*, int); int (*curseinfo)(const locale*, const void*, int, curse*, int);
void (*change_vigour)(curse*, int); void (*change_vigour)(curse*, int);
int (*read)(FILE * F, curse * c); int (*read)(FILE * F, curse * c);
int (*write)(FILE * F, const curse * c); int (*write)(FILE * F, const curse * c);

View File

@ -7484,7 +7484,7 @@
<arg name="key" type="int"></arg> <arg name="key" type="int"></arg>
</type> </type>
<text locale="de">"$unit($unit) verschließt eines der Schlösser in $region($region) mit $if($eq($key,1),"dem Achatenen Schlüssel","dem Saphirnen Schlüssel")."</text> <text locale="de">"$unit($unit) verschließt eines der Schlösser in $region($region) mit $if($eq($key,1),"dem Achatenen Schlüssel","dem Saphirnen Schlüssel")."</text>
<text locale="de">"$unit($unit) locks one of the locks in $region($region) with $if($eq($key,1),"the Agate Key","the Sapphire Key")."</text> <text locale="en">"$unit($unit) locks one of the locks in $region($region) with $if($eq($key,1),"the Agate Key","the Sapphire Key")."</text>
</message> </message>
<message name="questportal_unlock" section="events"> <message name="questportal_unlock" section="events">
@ -7494,7 +7494,7 @@
<arg name="key" type="int"></arg> <arg name="key" type="int"></arg>
</type> </type>
<text locale="de">"$unit($unit) öffnet eines der Schlösser in $region($region) mit $if($eq($key,1),"dem Achatenen Schlüssel","dem Saphirnen Schlüssel")."</text> <text locale="de">"$unit($unit) öffnet eines der Schlösser in $region($region) mit $if($eq($key,1),"dem Achatenen Schlüssel","dem Saphirnen Schlüssel")."</text>
<text locale="de">"$unit($unit) unlocks one of the locks in $region($region) with $if($eq($key,1),"the Agate Key","the Sapphire Key")."</text> <text locale="en">"$unit($unit) unlocks one of the locks in $region($region) with $if($eq($key,1),"the Agate Key","the Sapphire Key")."</text>
</message> </message>
<message name="use_questkey_wrongregion" section="events"> <message name="use_questkey_wrongregion" section="events">
@ -7506,5 +7506,82 @@
<text locale="de">"$unit($unit) in $region($region): '$command' - Hier ist kein passendes Schloss."</text> <text locale="de">"$unit($unit) in $region($region): '$command' - Hier ist kein passendes Schloss."</text>
<text locale="en">"$unit($unit) in $region($region): '$command' - No fitting lock can be found here."</text> <text locale="en">"$unit($unit) in $region($region): '$command' - No fitting lock can be found here."</text>
</message> </message>
<message name="curseinfo::fogtrap">
<type>
<arg name="id" type="int"></arg>
</type>
<text locale="de">"Dichte Nebel bedecken diese Woche die Region. Keine Einheit schafft es, diese Nebel zu durchdringen und die Region zu verlassen. ($int36($id))"</text>
<text locale="en">"heavy fog makes it impossible to leave the region. ($int36($id))"</text>
</message>
<message name="curseinfo::nocostbuilding">
<type>
<arg name="id" type="int"></arg>
</type>
<text locale="de">"Der Zahn der Zeit kann diesen Mauern nichts anhaben. ($int36($id))"</text>
<text locale="en">""</text>
</message>
<message name="curseinfo::holyground">
<type>
<arg name="id" type="int"></arg>
</type>
<text locale="de">"Untote schrecken vor dieser Region zurück. ($int36($id))"</text>
<text locale="en">""</text>
</message>
<message name="curseinfo::blessedharvest">
<type>
<arg name="id" type="int"></arg>
</type>
<text locale="de">"In dieser Gegend steht das Korn besonders gut im Feld. ($int36($id))"</text>
<text locale="en">""</text>
</message>
<message name="curseinfo::drought">
<type>
<arg name="id" type="int"></arg>
</type>
<text locale="de">"In dieser Gegend herrscht eine Dürre. ($int36($id))"</text>
<text locale="en">""</text>
</message>
<message name="curseinfo::badlearn">
<type>
<arg name="id" type="int"></arg>
</type>
<text locale="de">"Alle Leute in der Region haben Schlafstörungen. ($int36($id))"</text>
<text locale="en">""</text>
</message>
<message name="curseinfo::depression">
<type>
<arg name="id" type="int"></arg>
</type>
<text locale="de">"Die Bauern sind unzufrieden. ($int36($id))"</text>
<text locale="en">""</text>
</message>
<message name="curseinfo::generous">
<type>
<arg name="id" type="int"></arg>
</type>
<text locale="de">"Es herrscht eine fröhliche und ausgelassene Stimmung. ($int36($id))"</text>
<text locale="en">""</text>
</message>
<message name="curseinfo::astralblock">
<type>
<arg name="id" type="int"></arg>
</type>
<text locale="de">"Etwas verhindert den Kontakt zur Realität. ($int36($id))"</text>
<text locale="en">""</text>
</message>
<message name="curseinfo::peacezone">
<type>
<arg name="id" type="int"></arg>
</type>
<text locale="de">"Die ganze Region ist von einer friedlichen Stimmung erfasst. ($int36($id))"</text>
<text locale="en">""</text>
</message>
<message name="curseinfo::disorientationzone">
<type>
<arg name="id" type="int"></arg>
</type>
<text locale="de">"Ein Schleier der Verwirrung liegt über der Region. ($int36($id))"</text>
<text locale="en">""</text>
</message>
</messages> </messages>