1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992 Frank Tore Johansen |
6 | * Copyright (©) 1992 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
9 | * the terms of the Affero GNU General Public License as published by the |
9 | * the terms of the Affero GNU General Public License as published by the |
… | |
… | |
146 | {INORGANIC, "inorganic", "inorganics", SK_ALCHEMY, 0}, |
146 | {INORGANIC, "inorganic", "inorganics", SK_ALCHEMY, 0}, |
147 | {SKILL_TOOL, "skill tool", "skill tools", 0, 0}, |
147 | {SKILL_TOOL, "skill tool", "skill tools", 0, 0}, |
148 | {LIGHTER, "lighter", "lighters", 0, 0}, |
148 | {LIGHTER, "lighter", "lighters", 0, 0}, |
149 | {BUILDABLE_WALL, "buildable wall", "buildable walls", 0, 0}, |
149 | {BUILDABLE_WALL, "buildable wall", "buildable walls", 0, 0}, |
150 | {MISC_OBJECT, "bric-a-brac", "bric-a-brac", 0, 0}, |
150 | {MISC_OBJECT, "bric-a-brac", "bric-a-brac", 0, 0}, |
|
|
151 | {TORCH, "torch", "torches", 0, 0}, |
151 | {LAMP, "lamp", "lamps", 0, 0}, |
152 | {LAMP, "lamp", "lamps", 0, 0}, |
152 | {DUPLICATOR, "duplicator", "duplicators", 0, 0}, |
153 | {DUPLICATOR, "duplicator", "duplicators", 0, 0}, |
153 | {SPELLBOOK, "spellbook", "spellbooks", SK_LITERACY, 0}, |
154 | {SPELLBOOK, "spellbook", "spellbooks", SK_LITERACY, 0}, |
154 | {CLOAK, "cloak", "cloaks", SK_SMITHERY, 0}, |
155 | {CLOAK, "cloak", "cloaks", SK_SMITHERY, 0}, |
155 | {SPINNER, "spinner", "spinners", 0, 0}, |
156 | {SPINNER, "spinner", "spinners", 0, 0}, |
… | |
… | |
475 | */ |
476 | */ |
476 | static const char * |
477 | static const char * |
477 | ring_desc (const object *op) |
478 | ring_desc (const object *op) |
478 | { |
479 | { |
479 | static dynbuf_text buf; buf.clear (); |
480 | static dynbuf_text buf; buf.clear (); |
480 | int attr, val, len; |
481 | int attr, val; |
481 | |
482 | |
482 | if (op->flag [FLAG_IDENTIFIED]) |
483 | if (op->flag [FLAG_IDENTIFIED]) |
483 | { |
484 | { |
484 | for (attr = 0; attr < NUM_STATS; attr++) |
485 | for (attr = 0; attr < NUM_STATS; attr++) |
485 | if ((val = op->stats.stat (attr))) |
486 | if ((val = op->stats.stat (attr))) |
… | |
… | |
619 | * It is also used by examine/ex and similar functions. |
620 | * It is also used by examine/ex and similar functions. |
620 | */ |
621 | */ |
621 | const char * |
622 | const char * |
622 | query_name (const object *op) |
623 | query_name (const object *op) |
623 | { |
624 | { |
624 | int len = 0; |
|
|
625 | static dynbuf_text bufs[5]; |
625 | static dynbuf_text bufs[5]; |
626 | static int use_buf = 0; |
626 | static int use_buf = 0; |
627 | |
627 | |
628 | use_buf++; |
628 | use_buf++; |
629 | use_buf %= 5; |
629 | use_buf %= 5; |