ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/item.C
(Generate patch)

Comparing deliantra/server/common/item.C (file contents):
Revision 1.66 by root, Sun Nov 8 20:55:39 2009 UTC vs.
Revision 1.67 by root, Tue Nov 10 04:38:45 2009 UTC

203 {ITEM_TRANSFORMER, "item_transformer", "item_transformers", 0, 0}, 203 {ITEM_TRANSFORMER, "item_transformer", "item_transformers", 0, 0},
204}; 204};
205 205
206static const int item_types_size = sizeof (item_types) / sizeof (*item_types); 206static const int item_types_size = sizeof (item_types) / sizeof (*item_types);
207 207
208materialtype_t *materialt;
209
210/*
211materialtype material[NROFMATERIALS] = {
212 * P M F E C C A D W G P S P T F C D D C C G H B I *
213 * H A I L O O C R E H O L A U E A E E H O O O L N *
214 * Y G R E L N I A A O I O R R A N P A A U D L I T *
215 * S I E C D F D I P S S W A N R C L T O N Y N R *
216 * I C T U N O T O L E E H S T P D N *
217 {"paper", {15,10,17, 9, 5, 7,13, 0,20,15, 0,0,0,0,0,10,0,0,0,0,0,0,0,0}},
218 {"metal", { 2,12, 3,12, 2,10, 7, 0,20,15, 0,0,0,0,0,10,0,0,0,0,0,0,0,0}},
219 {"glass", {14,11, 8, 3,10, 5, 1, 0,20,15, 0,0,0,0,0, 0,0,0,0,0,0,0,0,0}},
220 {"leather", { 5,10,10, 3, 3,10,10, 0,20,15, 0,0,0,0,0,12,0,0,0,0,0,0,0,0}},
221 {"wood", {10,11,13, 2, 2,10, 9, 0,20,15, 0,0,0,0,0,12,0,0,0,0,0,0,0,0}},
222 {"organics", { 3,12, 9,11, 3,10, 9, 0,20,15, 0,0,0,0,0, 0,0,0,0,0,0,0,0,0}},
223 {"stone", { 2, 5, 2, 2, 2, 2, 1, 0,20,15, 0,0,0,0,0, 5,0,0,0,0,0,0,0,0}},
224 {"cloth", {14,11,13, 4, 4, 5,10, 0,20,15, 0,0,0,0,0, 5,0,0,0,0,0,0,0,0}},
225 {"adamant", { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0,0,0,0, 0,0,0,0,0,0,0,0,0}},
226 {"liquid", { 0, 8, 9, 6,17, 0,15, 0,20,15,12,0,0,0,0,11,0,0,0,0,0,0,0,0}},
227 {"soft metal",{ 6,12, 6,14, 2,10, 1, 0,20,15, 0,0,0,0,0,10,0,0,0,0,0,0,0,0}},
228 {"bone", {10, 9, 4, 5, 3,10,10, 0,20,15, 0,0,0,0,0, 2,0,0,0,0,0,0,0,0}},
229 {"ice", {14,11,16, 5, 0, 5, 6, 0,20,15, 0,0,0,0,0, 7,0,0,0,0,0,0,0,0}}
230};
231*/
232
233/* This curve may be too steep. But the point is that there should 208/* This curve may be too steep. But the point is that there should
234 * be tough choices - there is no real point to this if everyone can 209 * be tough choices - there is no real point to this if everyone can
235 * wear whatever they want with no worries. Perhaps having the steep 210 * wear whatever they want with no worries. Perhaps having the steep
236 * curve is good (maybe even steeper), but allowing players to 211 * curve is good (maybe even steeper), but allowing players to
237 * have 2 * level instead. Ideally, top level characters should only be 212 * have 2 * level instead. Ideally, top level characters should only be
600 use_buf %= 5; 575 use_buf %= 5;
601 576
602 dynbuf_text &buf = bufs [use_buf]; 577 dynbuf_text &buf = bufs [use_buf];
603 buf.clear (); 578 buf.clear ();
604 579
580#if 0
605 if ((op->is_armor () || op->is_weapon ()) && op->materialname) 581 if ((op->is_armor () || op->is_weapon ()) && op->material)
606 if (materialtype_t *mt = name_to_material (op->materialname))
607 buf << mt->description << ' '; 582 buf << op->material->description << ' ';
583#endif
608 584
609 buf << query_short_name (op); 585 buf << query_short_name (op);
610 586
611 if (QUERY_FLAG (op, FLAG_INV_LOCKED)) 587 if (QUERY_FLAG (op, FLAG_INV_LOCKED))
612 buf << " *"; 588 buf << " *";
722 if (!op->nrof && !op->weight && !op->title && !is_magical (op)) 698 if (!op->nrof && !op->weight && !op->title && !is_magical (op))
723 return op->name; /* To speed things up (or make things slower?) */ 699 return op->name; /* To speed things up (or make things slower?) */
724 700
725 static dynbuf_text buf; buf.clear (); 701 static dynbuf_text buf; buf.clear ();
726 702
703#if 0
727 if ((op->is_armor () || op->is_weapon ()) && op->materialname) 704 if ((op->is_armor () || op->is_weapon ()) && op->material)
728 if (materialtype_t *mt = name_to_material (op->materialname))
729 if (op->arch->materialname != mt->name) 705 if (op->arch->material != op->material)
730 buf << mt->description << ' '; 706 buf << op->material->description << ' ';
707#endif
731 708
732 buf << (plural ? op->name_pl : op->name); 709 buf << (plural ? op->name_pl : op->name);
733 710
734 if (op->title && QUERY_FLAG (op, FLAG_IDENTIFIED)) 711 if (op->title && QUERY_FLAG (op, FLAG_IDENTIFIED))
735 buf << ' ' << op->title; 712 buf << ' ' << op->title;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines