FACTION and PARTEI should both start orders.

This commit is contained in:
Enno Rehling 2017-01-23 09:22:29 +01:00
parent b2e6c48186
commit 1bd6ab11ea
2 changed files with 25 additions and 4 deletions

View File

@ -252,6 +252,26 @@ static faction *factionorders(void)
return f; return f;
} }
static param_t next_param(const char *s, const struct locale *lang) {
param_t p;
if (!s || s[0] == '@') {
return NOPARAM;
}
p = findparam(s, lang);
if (p==NOPARAM) {
const struct locale *loc;
for (loc=locales;loc;loc=nextlocale(loc)) {
if (loc!=lang) {
p = findparam(s, lang);
if (p==P_FACTION || p==P_GAMENAME) {
break;
}
}
}
}
return p;
}
int readorders(const char *filename) int readorders(const char *filename)
{ {
FILE *F = NULL; FILE *F = NULL;
@ -279,7 +299,7 @@ int readorders(const char *filename)
const char *s; const char *s;
init_tokens_str(b); init_tokens_str(b);
s = gettoken(token, sizeof(token)); s = gettoken(token, sizeof(token));
p = (s && s[0] != '@') ? findparam(s, lang) : NOPARAM; p = next_param(s, lang);
switch (p) { switch (p) {
case P_GAMENAME: case P_GAMENAME:
case P_FACTION: case P_FACTION:

View File

@ -1,4 +1,4 @@
ERESSEA 6rLo "6rLo" PARTEI 6rLo "6rLo"
EINHEIT 7Lgf EINHEIT 7Lgf
NACH NW NW NACH NW NW
NAECHSTER NAECHSTER
@ -6,7 +6,8 @@ ERESSEA w86y "w86y"
EINHEIT uc3u EINHEIT uc3u
STIRB "mrqa" STIRB "mrqa"
NAECHSTER NAECHSTER
ERESSEA ngij "ngij"
FACTION ngij "ngij"
EINHEIT iwbz EINHEIT iwbz
HELFE w86y ALLES HELFE w86y ALLES
EINHEIT j536 EINHEIT j536