welcome text wird spielabhängig gelesen

This commit is contained in:
Enno Rehling 2001-12-15 14:44:18 +00:00
parent 98334d883a
commit 788826049b
10 changed files with 17 additions and 7 deletions

View File

@ -2786,7 +2786,7 @@ reports(void)
if(f->age == 1) {
fprintf(BAT, "ls %s.nr %s.cr | zip -m -j -9 -@ %s.zip\n",
factionid(f), factionid(f), factionid(f));
fprintf(BAT, "zip -j -9 %s.zip ../readme.txt\n", factionid(f));
fprintf(BAT, "zip -j -9 %s.zip res/%s/%s/welcome.txt\n", factionid(f), global.welcomepath, locale_name(f->locale));
} else {
fprintf(BAT, "ls %s.nr %s.cr | zip -m -j -9 -@ %s.zip\n",
factionid(f), factionid(f), factionid(f));
@ -2799,7 +2799,7 @@ reports(void)
if (f->age == 1) {
fprintf(shfp,
" \\\n\t\"text/plain\" \"Willkommen\" ../readme.txt");
" \\\n\t\"text/plain\" \"Willkommen\" res/%s/%s/welcome.txt\n", global.welcomepath, locale_name(f->locale));
}
fprintf(BAT, "bzip2 -9v `ls %s.nr %s.cr`\n",
@ -2828,7 +2828,7 @@ reports(void)
if (f->age == 1) {
fprintf(shfp,
" \\\n\t\"text/plain\" \"Willkommen\" ../readme.txt");
" \\\n\t\"text/plain\" \"Willkommen\" res/%s/%s/welcome.txt\n", global.welcomepath, locale_name(f->locale));
}
if (!nonr && f->options & wants_report)

View File

@ -136,4 +136,6 @@ init_mallornseed(void)
}
}
#else
int __xx_nonempty=0; /* to prevent this from being an empty translation unit */
#endif

View File

@ -2097,8 +2097,12 @@ parse_tagbegin(struct xml_stack *stack, void *data)
return XML_USERERROR;
}
} else if (strcmp(tag->name, "game")==0) {
const char * welcome = xml_value(tag, "welcome");
const char * name = xml_value(tag, "name");
int maxunits = xml_ivalue(tag, "units");
if (welcome!=NULL) {
global.welcomepath = strdup(welcome);
}
if (name!=NULL) {
global.gamename = strdup(name);
}

View File

@ -1168,6 +1168,7 @@ extern const struct race * new_race[];
/* globale settings des Spieles */
typedef struct settings {
const char *gamename;
const char *welcomepath;
unsigned int maxunits;
struct attrib *attribs;
unsigned int data_version;

View File

@ -120,6 +120,7 @@ static boolean g_killeiswald = false;
struct settings global = {
"Eressea", /* gamename */
"eressea", /* resourcepath */
1000, /* maxunits */
};

View File

@ -10,7 +10,7 @@
<include file="races.xml"></include>
<include file="items.xml"></include>
<game name="Eressea">
<game name="Eressea" welcome="eressea">
<comment>Game specific</comment>
<order name="MEINUNG" disable></order>
<order name="MAGIEGEBIET" disable></order>

View File

@ -7,7 +7,7 @@ Probleme haben, weil dir vielleicht die Regeln noch unklar sind, so gibt es
mehrere Informationsquellen, die dir hoffentlich helfen können.
Die wichtigste Hilfe für das Spiel ist nach wie vor die Anleitung, im Netz zu
finden unter http://eressea.faroul.de/.
finden unter http://eressea.upb.de/rules/.
Eine Gruppe engagierter Mitspieler hat sich zum Ziel gesetzt, Neulingen zu
helfen. Diese Spieler können per EMail unter eressea-help@eressea.kn-bremen.de

View File

@ -10,7 +10,7 @@
<include file="races.xml"></include>
<include file="items.xml"></include>
<game name="Vinyambar I" units="250">
<game name="Vinyambar I" units="250" welcome="vinyambar">
<comment>Game specific</comment>
<order name="MEINUNG" disable></order>
<order name="MAGIEGEBIET" disable></order>

View File

@ -10,7 +10,7 @@
<include file="races.xml"></include>
<include file="items.xml"></include>
<game name="Vinyambar II" units="250">
<game name="Vinyambar II" units="250" welcome="vinyambar">
<comment>Game specific</comment>
<order name="ARBEITEN" disable></order>
<order name="MEINUNG" disable></order>

View File

@ -73,6 +73,7 @@ static struct attrib_type at_age = {
} \
}
#if NEW_RESOURCEGROWTH
static void
convert_resources(void)
{
@ -210,6 +211,7 @@ convert_resources(void)
log_close();
fclose(fixes);
}
#endif
static void
fix_age(void)