autopickup_exceptions enhancement

An enhancement to the original to allow
two types of exceptions:
      always pickup
      never pickup

To specify "never pickup", begin the pattern string with '>'
which is NetHack's down direction symbol (for "leave it down")

To specify "always pickup", begin the pattern string with '<'
which is NetHack's up direction symbol.

For example, to pick up all arrows, regardless of the pickup_
types setting:
autopickup_exception = "<*arrows"
This commit is contained in:
nethack.allison
2003-11-15 02:49:07 +00:00
parent a89c7cfa60
commit e9afb34423
4 changed files with 39 additions and 17 deletions

View File

@@ -372,10 +372,11 @@ E char *fqn_prefix_names[PREFIX_COUNT];
#ifdef AUTOPICKUP_EXCEPTIONS
struct autopickup_exception {
char *pattern;
boolean grab;
struct autopickup_exception *next;
};
#endif /* AUTOPICKUP_EXCEPTIONS */
#undef E
#endif /* DECL_H */

View File

@@ -1513,6 +1513,7 @@ E int FDECL(loot_mon, (struct monst *,int *,boolean *));
E int NDECL(dotip);
E const char *FDECL(safe_qbuf, (const char *,unsigned,
const char *,const char *,const char *));
E boolean FDECL(is_autopickup_exception, (struct obj *, BOOLEAN_P));
/* ### pline.c ### */