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;
|
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:
|
||||||
|
@ -308,7 +328,7 @@ int readorders(const char *filename)
|
||||||
p = (s && s[0] != '@') ? findparam(s, lang) : NOPARAM;
|
p = (s && s[0] != '@') ? findparam(s, lang) : NOPARAM;
|
||||||
} while ((p != P_UNIT || !f) && p != P_FACTION && p != P_NEXT
|
} while ((p != P_UNIT || !f) && p != P_FACTION && p != P_NEXT
|
||||||
&& p != P_GAMENAME);
|
&& p != P_GAMENAME);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Falls in unitorders() abgebrochen wird, steht dort entweder eine neue
|
/* Falls in unitorders() abgebrochen wird, steht dort entweder eine neue
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue