MCPcopy Create free account
hub / github.com/NetHack/NetHack / getobj_hands_txt

Function getobj_hands_txt

src/invent.c:1718–1736  ·  view source on GitHub ↗

return string describing your hands based on action. */

Source from the content-addressed store, hash-verified

1716
1717/* return string describing your hands based on action. */
1718staticfn char *
1719getobj_hands_txt(const char *action, char *qbuf)
1720{
1721 if (!strcmp(action, "grease")) {
1722 Sprintf(qbuf, "your %s", fingers_or_gloves(FALSE));
1723 } else if (!strcmp(action, "write with")) {
1724 Sprintf(qbuf, "your %s", body_part(FINGERTIP));
1725 } else if (!strcmp(action, "wield")) {
1726 Sprintf(qbuf, "your %s %s%s", uarmg ? "gloved" : "bare",
1727 makeplural(body_part(HAND)),
1728 !uwep ? " (wielded)" : "");
1729 } else if (!strcmp(action, "ready")) {
1730 Sprintf(qbuf, "empty quiver%s",
1731 !uquiver ? " (nothing readied)" : "");
1732 } else {
1733 Sprintf(qbuf, "your %s", makeplural(body_part(HAND)));
1734 }
1735 return qbuf;
1736}
1737
1738/*
1739 * getobj returns:

Callers 1

getobjFunction · 0.85

Calls 3

fingers_or_glovesFunction · 0.85
body_partFunction · 0.85
makepluralFunction · 0.85

Tested by

no test coverage detected