forked from github/server
Merge pull request #635 from ennorehling/develop
FACTION and PARTEI should both start orders.
This commit is contained in:
commit
ed3667130e
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue