version 1.155 | | version 1.156 |
---|
| | |
/* | | /* |
* static char *rcsid_player_c = | | * static char *rcsid_player_c = |
* "$Id: player.c,v 1.155 2005/01/12 08:04:01 mwedel Exp $"; | | * "$Id: player.c,v 1.156 2005/01/24 07:29:26 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
continue; | | continue; |
} | | } |
| | |
/* high bit set? We're using the new autopickup model */ | | /* high not bit set? We're using the old autopickup model */ |
if(!(op->contr->mode & PU_NEWMODE)) | | if(!(op->contr->mode & PU_NEWMODE)) { |
{ | | |
switch (op->contr->mode) { | | switch (op->contr->mode) { |
case 0: return 1; /* don't pick up */ | | case 0: return 1; /* don't pick up */ |
case 1: pick_up (op, tmp); | | case 1: pick_up (op, tmp); |
| | |
>= op->contr->mode) | | >= op->contr->mode) |
pick_up(op,tmp); | | pick_up(op,tmp); |
} | | } |
} /* old model */ | | } |
else | | else { /* old model */ |
{ | | |
/* NEW pickup handling */ | | /* NEW pickup handling */ |
if(op->contr->mode & PU_DEBUG) | | if(op->contr->mode & PU_DEBUG) |
{ | | { |
| | |
* meaning if any test passes, the item gets picked up. */ | | * meaning if any test passes, the item gets picked up. */ |
| | |
/* if mode is set to pick nothing up, return */ | | /* if mode is set to pick nothing up, return */ |
| | |
if(op->contr->mode & PU_NOTHING) return 1; | | if(op->contr->mode & PU_NOTHING) return 1; |
| | |
/* if mode is set to stop when encountering objects, return */ | | /* if mode is set to stop when encountering objects, return */ |
/* take STOP before INHIBIT since it doesn't actually pick | | /* take STOP before INHIBIT since it doesn't actually pick |
* anything up */ | | * anything up */ |
| | |
if(op->contr->mode & PU_STOP) return 0; | | if(op->contr->mode & PU_STOP) return 0; |
| | |
/* useful for going into stores and not losing your settings... */ | | /* useful for going into stores and not losing your settings... */ |
/* and for battles wher you don't want to get loaded down while | | /* and for battles wher you don't want to get loaded down while |
* fighting */ | | * fighting */ |
| | |
if (tmp->type == FOOD) | | if (tmp->type == FOOD) |
{ pick_up(op, tmp); if(0)fprintf(stderr,"FOOD\n"); continue; } | | { pick_up(op, tmp); if(0)fprintf(stderr,"FOOD\n"); continue; } |
if(op->contr->mode & PU_DRINK) | | if(op->contr->mode & PU_DRINK) |
if (tmp->type == DRINK) | | if (tmp->type == DRINK || (tmp->type == POISON && !QUERY_FLAG(tmp, FLAG_KNOWN_CURSED))) |
{ pick_up(op, tmp); if(0)fprintf(stderr,"DRINK\n"); continue; } | | { pick_up(op, tmp); if(0)fprintf(stderr,"DRINK\n"); continue; } |
| | |
if(op->contr->mode & PU_POTION) | | if(op->contr->mode & PU_POTION) |
if (tmp->type == POTION) | | if (tmp->type == POTION) |
{ pick_up(op, tmp); if(0)fprintf(stderr,"POTION\n"); continue; } | | { pick_up(op, tmp); if(0)fprintf(stderr,"POTION\n"); continue; } |