forked from github/server
Merge pull request #794 from ennorehling/master
BUG 2469 wrong default quantity for construction reqs
This commit is contained in:
commit
65768a52e9
|
@ -1529,6 +1529,7 @@ static void report_itemtype(FILE *F, faction *f, const item_type *itype) {
|
|||
fprintf(F, "\"%s\"\n", translate(ch, LOC(f->locale, ch)));
|
||||
m++;
|
||||
}
|
||||
assert(!m->rtype);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1252,7 +1252,6 @@ static void create_potion(unit * u, const item_type * itype, int want)
|
|||
/* something missing from the list of materials */
|
||||
ADDMSG(&u->faction->msgs, msg_materials_required(u, u->thisorder,
|
||||
itype->construction, want));
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
i_change(&u->items, itype, built);
|
||||
|
|
|
@ -625,6 +625,7 @@ static void handle_requirement(parseinfo *pi, const XML_Char *el, const XML_Char
|
|||
|
||||
assert(nreqs < MAX_REQUIREMENTS);
|
||||
req = reqs + nreqs;
|
||||
req->number = 1;
|
||||
for (i = 0; attr[i]; i += 2) {
|
||||
if (xml_strcmp(attr[i], "type") == 0) {
|
||||
req->rtype = rt_get_or_create(attr[i + 1]);
|
||||
|
|
|
@ -2212,6 +2212,7 @@ report_plaintext(const char *filename, report_context * ctx,
|
|||
if (wrptr(&bufp, &size, bytes) != 0)
|
||||
WARN_STATIC_BUFFER();
|
||||
}
|
||||
assert(!rm->rtype);
|
||||
}
|
||||
*bufp = 0;
|
||||
centre(out, buf, true);
|
||||
|
|
Loading…
Reference in New Issue