FACTION and PARTEI should both start orders.

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

View File

@ -252,6 +252,26 @@ static faction *factionorders(void)
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)
{
FILE *F = NULL;
@ -279,7 +299,7 @@ int readorders(const char *filename)
const char *s;
init_tokens_str(b);
s = gettoken(token, sizeof(token));
p = (s && s[0] != '@') ? findparam(s, lang) : NOPARAM;
p = next_param(s, lang);
switch (p) {
case P_GAMENAME:
case P_FACTION:
@ -308,7 +328,7 @@ int readorders(const char *filename)
p = (s && s[0] != '@') ? findparam(s, lang) : NOPARAM;
} while ((p != P_UNIT || !f) && p != P_FACTION && p != P_NEXT
&& p != P_GAMENAME);
}
}
break;
/* Falls in unitorders() abgebrochen wird, steht dort entweder eine neue

View File

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