From: Michael Meyer Date: Thu, 23 Jun 2022 16:10:03 +0000 (-0400) Subject: wizmgender: include corpstat gender in object name X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1ee9e6ae3da06c3fc4db9bdc18805530d2cdb0e9;p=nethack 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. --- diff --git a/src/objnam.c b/src/objnam.c index ee223660a..96a6e04ef 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -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);