wizmgender: include corpstat gender in object name

Add another use to wizmgender: when it is enabled, include the gender
specified in corpstat flags in the name of a statue, corpse, or
figurine, since it can influence various things but otherwise remains
invisible (for monsters without gendered names).  A little while ago
lichen corpses weren't stacking because, despite being a neuter monster,
the corpses they produced were being flagged as female or male; this
could be useful for debugging issues along those lines.
This commit is contained in:
Michael Meyer
2022-06-23 12:10:03 -04:00
committed by PatR
parent 406faad879
commit 1ee9e6ae3d

View File

@@ -1339,6 +1339,17 @@ doname_base(
break;
}
if ((obj->otyp == STATUE || obj->otyp == CORPSE || obj->otyp == FIGURINE)
&& iflags.wizmgender) {
int cgend = (obj->spe & CORPSTAT_GENDER),
mgend = ((cgend == CORPSTAT_MALE) ? MALE
: (cgend == CORPSTAT_FEMALE) ? FEMALE
: NEUTRAL);
Sprintf(eos(bp), " (%s)",
cgend != CORPSTAT_RANDOM ? genders[mgend].adj
: "unspecified gender");
}
if ((obj->owornmask & W_WEP) && !g.mrg_to_wielded) {
boolean twoweap_primary = (obj == uwep && u.twoweap),
tethered = (obj->otyp == AKLYS);