forked from github/server
implementation of "EACH":
RESERVE EACH 1 sword RESERVIERE JE[DEM] 1 schwert
This commit is contained in:
parent
79134609a2
commit
99a5f4d525
|
@ -264,12 +264,18 @@ int
|
||||||
reserve_cmd(unit * u, struct order *ord)
|
reserve_cmd(unit * u, struct order *ord)
|
||||||
{
|
{
|
||||||
if (u->number > 0 && (urace(u)->ec_flags & GETITEM)) {
|
if (u->number > 0 && (urace(u)->ec_flags & GETITEM)) {
|
||||||
int use, count = geti();
|
int use, count;
|
||||||
const resource_type * rtype;
|
const resource_type * rtype;
|
||||||
|
const char * s;
|
||||||
|
|
||||||
init_tokens(ord);
|
init_tokens(ord);
|
||||||
skip_token();
|
skip_token();
|
||||||
count = geti();
|
s = getstrtoken();
|
||||||
|
count = atoip(s);
|
||||||
|
|
||||||
|
if (count == 0 && findparam(s, u->faction->locale)==P_EACH) {
|
||||||
|
count = u->number;
|
||||||
|
}
|
||||||
|
|
||||||
rtype = findresourcetype(getstrtoken(), u->faction->locale);
|
rtype = findresourcetype(getstrtoken(), u->faction->locale);
|
||||||
if (rtype == NULL) return 0;
|
if (rtype == NULL) return 0;
|
||||||
|
|
Loading…
Reference in New Issue