… | |
… | |
668 | |
668 | |
669 | use_buf++; |
669 | use_buf++; |
670 | use_buf %= 5; |
670 | use_buf %= 5; |
671 | |
671 | |
672 | #ifdef NEW_MATERIAL_CODE |
672 | #ifdef NEW_MATERIAL_CODE |
673 | if ((IS_ARMOR (op) || IS_WEAPON (op)) && op->materialname) |
673 | if ((op->is_armor () || op->is_weapon ()) && op->materialname) |
674 | { |
674 | { |
675 | mt = name_to_material (op->materialname); |
675 | mt = name_to_material (op->materialname); |
676 | if (mt) |
676 | if (mt) |
677 | { |
677 | { |
678 | safe_strcat (buf[use_buf], mt->description, &len, HUGE_BUF); |
678 | safe_strcat (buf[use_buf], mt->description, &len, HUGE_BUF); |
… | |
… | |
775 | return "(null)"; |
775 | return "(null)"; |
776 | |
776 | |
777 | if (!op->nrof && !op->weight && !op->title && !is_magical (op)) |
777 | if (!op->nrof && !op->weight && !op->title && !is_magical (op)) |
778 | return op->name; /* To speed things up (or make things slower?) */ |
778 | return op->name; /* To speed things up (or make things slower?) */ |
779 | |
779 | |
780 | if ((IS_ARMOR (op) || IS_WEAPON (op)) && op->materialname) |
780 | if ((op->is_armor () || op->is_weapon ()) && op->materialname) |
781 | mt = name_to_material (op->materialname); |
781 | mt = name_to_material (op->materialname); |
782 | |
782 | |
783 | #ifdef NEW_MATERIAL_CODE |
783 | #ifdef NEW_MATERIAL_CODE |
784 | if ((IS_ARMOR (op) || IS_WEAPON (op)) && op->materialname && mt && |
784 | if ((op->is_armor () || op->is_weapon ()) && op->materialname && mt && |
785 | op->arch->clone.materialname != mt->name && !(op->material & M_SPECIAL)) |
785 | op->arch->clone.materialname != mt->name && !(op->material & M_SPECIAL)) |
786 | { |
786 | { |
787 | strcpy (buf, mt->description); |
787 | strcpy (buf, mt->description); |
788 | len = strlen (buf); |
788 | len = strlen (buf); |
789 | safe_strcat (buf, " ", &len, MAX_BUF); |
789 | safe_strcat (buf, " ", &len, MAX_BUF); |