From 6bec8beb75f12b458d1c0dcd35db0ff53fdd207e Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 3 Jul 2004 08:55:41 +0000 Subject: [PATCH] - http://eressea.upb.de/mantis/bug_view_page.php?bug_id=0000160 RESERVIERE PERSONEN geht nicht mehr Magiegebiete haben englische NAmen (gleicher Name, bis auf "Kein Gebiet") --- src/common/gamecode/report.c | 3 ++- src/common/kernel/give.c | 12 +++++++++++- src/common/kernel/item.c | 7 ------- src/common/kernel/item.h | 2 -- src/common/kernel/pool.c | 2 -- src/common/kernel/reports.c | 12 ++++++------ src/common/kernel/reports.h | 3 +-- src/common/modules/arena.c | 23 +++++++++++++---------- src/eressea/main.c | 28 ---------------------------- src/res/de/strings.xml | 35 +++++++++++++++++++++++++++++++---- src/res/messages.xml | 14 ++++++++++++-- 11 files changed, 76 insertions(+), 65 deletions(-) diff --git a/src/common/gamecode/report.c b/src/common/gamecode/report.c index 12b3f49da..532b375ae 100644 --- a/src/common/gamecode/report.c +++ b/src/common/gamecode/report.c @@ -1990,7 +1990,8 @@ report(FILE *F, faction * f, const faction_list * addresses, centre(F, gamedate_season(f->locale), true); rnl(F); sprintf(buf, "%s, %s/%s (%s)", factionname(f), - LOC(f->locale, rc_name(f->race, 1)), neue_gebiete[f->magiegebiet], + LOC(f->locale, rc_name(f->race, 1)), + LOC(f->locale, mkname("school", neue_gebiete[f->magiegebiet])), f->email); centre(F, buf, true); if (f->alliance!=NULL) { diff --git a/src/common/kernel/give.c b/src/common/kernel/give.c index e8aa1b738..8c06948d1 100644 --- a/src/common/kernel/give.c +++ b/src/common/kernel/give.c @@ -254,7 +254,17 @@ givemen(int n, unit * u, unit * u2, struct order * ord) } } } - addgive(u, u2, n, R_PERSON, ord, error); + if (error) { + cmistake(u, ord, error, MSG_COMMERCE); + } + else if (!u2 || u2->faction!=u->faction) { + ADDMSG(&u->faction->msgs, msg_message("give_person", "unit target amount", + u, u2?ucansee(u->faction, u2, u_unknown()):u_peasants(), n)); + if (u2) { + ADDMSG(&u2->faction->msgs, msg_message("give_person", "unit target amount", + ucansee(u2->faction, u, u_unknown()), u2, n)); + } + } } void diff --git a/src/common/kernel/item.c b/src/common/kernel/item.c index b0418411d..525897bbb 100644 --- a/src/common/kernel/item.c +++ b/src/common/kernel/item.c @@ -2149,7 +2149,6 @@ resource_type * r_permaura; resource_type * r_peasants; resource_type * r_unit; resource_type * r_hp; -resource_type * r_person; resource_type * r_silver; item_type * i_silver; @@ -2175,9 +2174,6 @@ init_resources(void) i_silver = new_itemtype(r_silver, ITF_NONE, 1/*weight*/, 0); r_silver->uchange = res_changeitem; - r_person = new_resourcetype(&names[2], NULL, RTF_NONE); - r_person->uchange = res_changeperson; - r_permaura = new_resourcetype(&names[4], NULL, RTF_NONE); r_permaura->uchange = res_changepermaura; @@ -2198,7 +2194,6 @@ init_resources(void) oldresourcetype[R_PERMAURA] = r_permaura; oldresourcetype[R_HITPOINTS] = r_hp; oldresourcetype[R_PEASANTS] = r_peasants; - oldresourcetype[R_PERSON] = r_person; oldresourcetype[R_UNIT] = r_unit; /* alte typen registrieren: */ @@ -2372,8 +2367,6 @@ resname(resource_t res, int index) return index==1?"peasant":"peasant_p"; } else if (res == R_UNIT) { return index==1?"unit":"unit_p"; - } else if (res == R_PERSON) { - return index==1?"person":"person_p"; } else if (res == R_HITPOINTS) { return index==1?"hp":"hp_p"; } diff --git a/src/common/kernel/item.h b/src/common/kernel/item.h index ba2eb69ff..ce3a130cc 100644 --- a/src/common/kernel/item.h +++ b/src/common/kernel/item.h @@ -264,7 +264,6 @@ extern resource_type * r_permaura; extern resource_type * r_peasants; extern resource_type * r_unit; extern resource_type * r_hp; -extern resource_type * r_person; typedef struct t_item { const char *name[4]; @@ -519,7 +518,6 @@ enum { R_UNIT, /* Einheit (gib x einheit) */ - R_PERSON, MAX_RESOURCES, /* do not use outside item.c ! */ NORESOURCE = (resource_t) - 1 diff --git a/src/common/kernel/pool.c b/src/common/kernel/pool.c index 09796c029..78a6f042a 100644 --- a/src/common/kernel/pool.c +++ b/src/common/kernel/pool.c @@ -71,8 +71,6 @@ new_get_resource(const unit * u, const resource_type * rtype) return u->hp; if (rtype == oldresourcetype[R_PEASANTS]) return rpeasants(u->region); - if (rtype == oldresourcetype[R_PERSON]) - return u->number; assert(!"unbekannte ressource entdeckt"); return 0; } diff --git a/src/common/kernel/reports.c b/src/common/kernel/reports.c index 353202683..5ea1c7a4c 100644 --- a/src/common/kernel/reports.c +++ b/src/common/kernel/reports.c @@ -59,12 +59,12 @@ const char * g_reportdir; const char *neue_gebiete[] = { - "Kein Magiegebiet", - "Illaun", - "Tybied", - "Cerddor", - "Gwyrrd", - "Draig" + "none", + "illaun", + "tybied", + "cerddor", + "gwyrrd", + "draig" }; const char *coasts[MAXDIRECTIONS] = diff --git a/src/common/kernel/reports.h b/src/common/kernel/reports.h index fa78323fb..ecb0d8b58 100644 --- a/src/common/kernel/reports.h +++ b/src/common/kernel/reports.h @@ -32,6 +32,7 @@ extern "C" { extern const char *directions[]; extern const char *neue_gebiete[]; +extern const char *coasts[]; /* kann_finden speedups */ extern boolean kann_finden(struct faction * f1, struct faction * f2); @@ -104,8 +105,6 @@ extern int bufunit(const struct faction * f, const struct unit * u, int indent, extern int bufunit_ugroupleader(const struct faction * f, const struct unit * u, int indent, int mode); #endif -extern const char *neue_gebiete[]; -extern const char *coasts[]; extern const char * reportpath(void); extern struct faction * visible_faction(const struct faction *f, const struct unit * u); extern struct faction_list * get_addresses(struct faction * f); diff --git a/src/common/modules/arena.c b/src/common/modules/arena.c index 2e30afafd..da7dd211d 100644 --- a/src/common/modules/arena.c +++ b/src/common/modules/arena.c @@ -308,17 +308,20 @@ tower_init(void) int i, first = newarena; for (i=0;i!=6;++i) { region * r = tower_region[i] = findregion(arena_center->x+delta_x[i]*3, arena_center->y+delta_y[i]*3); - if (r) { - start_region[i] = findregion(arena_center->x+delta_x[i]*2, arena_center->y+delta_y[i]*2); - if (r->terrain!=T_DESERT) terraform(r, T_DESERT); - if (!r->buildings) { + if (r) { + start_region[i] = findregion(arena_center->x+delta_x[i]*2, arena_center->y+delta_y[i]*2); + if (r->terrain!=T_DESERT) terraform(r, T_DESERT); + if (!r->buildings) { building * b = new_building(bt_find("castle"), r, NULL); - b->size = 10; - if (i!=0) sprintf(buf, "Turm des %s", neue_gebiete[i]); - else sprintf(buf, "Turm der Ahnungslosen"); - set_string(&b->name, buf); - } - } + b->size = 10; + if (i!=0) { + sprintf(buf, "Turm des %s", + LOC(default_locale, mkname("school", neue_gebiete[i]))); + } + else sprintf(buf, "Turm der Ahnungslosen"); + set_string(&b->name, buf); + } + } } if (first && !arena_center->buildings) { building * b = new_building(bt_find("castle"), arena_center, NULL); diff --git a/src/eressea/main.c b/src/eressea/main.c index 9cad79b06..05762582c 100644 --- a/src/eressea/main.c +++ b/src/eressea/main.c @@ -239,34 +239,6 @@ getgarbage(void) #endif } -#if 0 -static void -writefactiondata(void) -{ - FILE *F; - char zText[128]; - - sprintf(zText, "%s/faction-data.xml", basepath()); - F = cfopen(zText, "w"); - if(F) { - faction *f; - for(f = factions; f; f=f->next) { - fprintf(F,"\n"); - fprintf(F,"\t%s\n",itoa36(f->no)); - fprintf(F,"\t%s\n",f->name); - fprintf(F,"\t%s\n",f->email); - fprintf(F,"\t%s\n",f->passw); - fprintf(F,"\t%s\n",rc_name(f->race,1)); - fprintf(F,"\t%s\n",neue_gebiete[f->magiegebiet]); - fprintf(F,"\t%d\n",turn-f->lastorders); - fprintf(F,"\t%d\n",f->score); - fprintf(F,"\n"); - } - } - fclose(F); -} -#endif - #ifdef SHORTPWDS static void readshortpwds() diff --git a/src/res/de/strings.xml b/src/res/de/strings.xml index e0afd5d82..81ccd59a2 100644 --- a/src/res/de/strings.xml +++ b/src/res/de/strings.xml @@ -7,6 +7,33 @@ _a: including article (ein Troll, a troll) --> + + + Kein Magiegebiet + no magic school + + + Illaun + Illaun + + + Tybied + Tybied + + + Cerddor + Cerddor + + + Gwyrrd + Gwyrrd + + + Draig + Draig + + + Tresen counter @@ -4153,10 +4180,10 @@ und sein überlegtes Verhalten wird ihm manch Vorteil in der Verteidigung geben. This ancient battle chant lifts the - spirit of your troops and helps them withstand even the - fear-inspiring aura of demonic and undead beings. A - fighter thus fortified against evil will not flee even - in the face of terror, and his defenses will be strengthened. + spirit of your troops and helps them withstand even the + fear-inspiring aura of demonic and undead beings. A + fighter thus fortified against evil will not flee even + in the face of terror, and his defenses will be strengthened. Mit Hilfe dieses Zaubers kann der diff --git a/src/res/messages.xml b/src/res/messages.xml index 27a162496..3b12aef16 100644 --- a/src/res/messages.xml +++ b/src/res/messages.xml @@ -5509,6 +5509,16 @@ "$string" + + + + + + + "$unit($unit) übergibt $int($amount) Person$if($eq($amount,1),"","en") an $unit($target)." + "$unit($unit) transfers $int($amount) person$if($eq($amount,1),"","s") to $unit($target)." + "$unit($unit) transfers $int($amount) person$if($eq($amount,1),"","s") to $unit($target)." + @@ -5517,8 +5527,8 @@ "$unit($unit) übergibt $int($amount) $resource($resource,$amount) an $unit($target)." - "$unit($unit) gave $int($amount) $resource($resource,$amount) to $unit($target)." - "$unit($unit) gave $int($amount) $resource($resource,$amount) to $unit($target)." + "$unit($unit) gives $int($amount) $resource($resource,$amount) to $unit($target)." + "$unit($unit) gives $int($amount) $resource($resource,$amount) to $unit($target)."