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

Function check_autopickup_exceptions

src/pickup.c:912–927  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

910}
911
912struct autopickup_exception *
913check_autopickup_exceptions(struct obj *obj)
914{
915 /*
916 * Does the text description of this match an exception?
917 */
918 struct autopickup_exception *ape = ga.apelist;
919
920 if (ape) {
921 char *objdesc = makesingular(doname(obj));
922
923 while (ape && !regex_match(objdesc, ape->regex))
924 ape = ape->next;
925 }
926 return ape;
927}
928
929boolean
930autopick_testobj(struct obj *otmp, boolean calc_costly)

Callers 1

autopick_testobjFunction · 0.85

Calls 3

makesingularFunction · 0.85
donameFunction · 0.85
regex_matchFunction · 0.50

Tested by

no test coverage detected