Merge pull request #794 from ennorehling/master

BUG 2469 wrong default quantity for construction reqs
This commit is contained in:
Enno Rehling 2018-07-31 10:33:13 +02:00 committed by GitHub
commit 65768a52e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 1 deletions

View File

@ -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);
}
}

View File

@ -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);

View File

@ -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]);

View File

@ -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);