implementation of "EACH":

RESERVE EACH 1 sword
  RESERVIERE JE[DEM] 1 schwert
This commit is contained in:
Enno Rehling 2006-10-03 13:31:48 +00:00
parent 79134609a2
commit 99a5f4d525
1 changed files with 8 additions and 2 deletions

View File

@ -264,12 +264,18 @@ int
reserve_cmd(unit * u, struct order *ord)
{
if (u->number > 0 && (urace(u)->ec_flags & GETITEM)) {
int use, count = geti();
int use, count;
const resource_type * rtype;
const char * s;
init_tokens(ord);
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);
if (rtype == NULL) return 0;