another 'nethack --dumpweights' tweak
Don't suppress slime mold.
This commit is contained in:
@@ -4332,10 +4332,12 @@ dump_weights(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (i = 0; i < ocount; ++i) {
|
for (i = 0; i < ocount; ++i) {
|
||||||
|
const char *oc_name = (i == SLIME_MOLD) ? "slime mold"
|
||||||
|
: obj_descr[i].oc_name;
|
||||||
int wt = (int) objects[i].oc_weight,
|
int wt = (int) objects[i].oc_weight,
|
||||||
ocls = objects[i].oc_class;
|
ocls = objects[i].oc_class;
|
||||||
|
|
||||||
if (wt && i != SLIME_MOLD && obj_descr[i].oc_name) {
|
if (wt && oc_name) {
|
||||||
weightlist[cnt].idx = i;
|
weightlist[cnt].idx = i;
|
||||||
weightlist[cnt].wt = wt;
|
weightlist[cnt].wt = wt;
|
||||||
weightlist[cnt].wtyp = 2;
|
weightlist[cnt].wtyp = 2;
|
||||||
@@ -4350,9 +4352,8 @@ dump_weights(void)
|
|||||||
&& objects[i].oc_name_idx != SPE_NOVEL)
|
&& objects[i].oc_name_idx != SPE_NOVEL)
|
||||||
? "spellbook of "
|
? "spellbook of "
|
||||||
: "",
|
: "",
|
||||||
obj_descr[i].oc_name);
|
oc_name);
|
||||||
Snprintf(nmbuf, sizeof nmbuf, "%07u", wt);
|
Snprintf(nmbuf, sizeof nmbuf, "%07u%s", wt,
|
||||||
Snprintf(&nmbuf[7], sizeof nmbuf - 7, "%s",
|
|
||||||
(weightlist[cnt].unique) ? the(nmbufbase)
|
(weightlist[cnt].unique) ? the(nmbufbase)
|
||||||
: an(nmbufbase));
|
: an(nmbufbase));
|
||||||
weightlist[cnt].nm = dupstr(nmbuf);
|
weightlist[cnt].nm = dupstr(nmbuf);
|
||||||
|
|||||||
Reference in New Issue
Block a user