version 1.61 | | version 1.62 |
---|
| | |
/* | | /* |
* static char *rcsid_item_c = | | * static char *rcsid_item_c = |
* "$Id: item.c,v 1.61 2006/05/05 09:47:40 ryo_saeba Exp $"; | | * "$Id: item.c,v 1.62 2006/05/21 12:27:46 akirschbaum Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
const char *query_base_name(const object *op, int plural) { | | const char *query_base_name(const object *op, int plural) { |
static char buf[MAX_BUF], buf2[MAX_BUF]; | | static char buf[MAX_BUF], buf2[MAX_BUF]; |
int len; | | int len; |
| | #ifdef NEW_MATERIAL_CODE |
materialtype_t *mt; | | materialtype_t *mt; |
| | #endif |
| | |
if((!plural && !op->name) || (plural && !op->name_pl)) | | if((!plural && !op->name) || (plural && !op->name_pl)) |
return "(null)"; | | return "(null)"; |
| | |
if(!op->nrof && !op->weight && !op->title && !is_magical(op)) | | if(!op->nrof && !op->weight && !op->title && !is_magical(op)) |
return op->name; /* To speed things up (or make things slower?) */ | | return op->name; /* To speed things up (or make things slower?) */ |
| | |
| | #ifdef NEW_MATERIAL_CODE |
if ((IS_ARMOR(op) || IS_WEAPON(op)) && op->materialname) | | if ((IS_ARMOR(op) || IS_WEAPON(op)) && op->materialname) |
mt = name_to_material(op->materialname); | | mt = name_to_material(op->materialname); |
| | else |
| | mt = NULL; |
| | |
#ifdef NEW_MATERIAL_CODE | | if (mt && |
if ((IS_ARMOR(op) || IS_WEAPON(op)) && op->materialname && mt && | | |
op->arch->clone.materialname != mt->name && | | op->arch->clone.materialname != mt->name && |
!(op->material & M_SPECIAL)) { | | !(op->material & M_SPECIAL)) { |
strcpy(buf, mt->description); | | strcpy(buf, mt->description); |