blob: 029f4452468a939922ae9dd93d7d69961a8cbfc5 [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001// MorgenGrauen MUDlib
2//
3// thing/description.h -- header
4//
5// $Id: description.h 9208 2015-05-10 20:54:06Z Zesstra $
6// MorgenGrauen MUDlib
7//
8// thing/description.h -- header
9//
10// $Id: description.h 9208 2015-05-10 20:54:06Z Zesstra $
11
12#ifndef __THING_DESCRIPTION_H__
13#define __THING_DESCRIPTION_H__
14
15// properties
16#define P_NAME "name" // name of the object
17#define P_NAME_ADJ "name_adj" // adjective of the name
18#define P_SHORT "short" // short desciption of the object
19#define P_LONG "long" // long description of the object
20#define P_IDS "ids" // identifier of the object
21#define P_ADJECTIVES "adjectives" // adjectives of the object
22#define P_SHOW_INV "show_inv" // Show in inventory of player
23#define P_CLASS "class" // class, like undead or explosive
24
25#define P_KILL_MSG "kill_msg"
26#define P_KILL_NAME "kill_name"
27
28#define P_HEAL "heal"
29#define P_COMBATCMDS "combatcmds"
30
31#define P_VALUE "value"
32#define P_NOBUY "nobuy"
33#define P_NOSELL "nosell"
34#define P_MAGIC "magic"
35#define P_NOMAGIC "nomagic"
36
37#define P_LOG_FILE "log_file" // bugs in anderes repfile umleiten
38
39#define P_LIGHT "light"
40#define P_TOTAL_LIGHT "total_light"
41
42#define P_CURSED "cursed"
43#define P_KEEP_ON_SELL "keep_on_sell"
44
45#define P_CLONER "cloner"
46#define P_CLONE_TIME "clone_time"
47
48/* read_msg ist auch fuer nicht fernwest-kundige lesbar */
49#define P_READ_MSG "read_msg"
50#define P_FW_ALWAYS_READABLE "fw_always_readable"
51#define P_DETAILS "details"
52#define P_SPECIAL_DETAILS "special_details"
53#define P_READ_DETAILS "read_details"
54#define P_SMELLS "smell_details"
55#define P_SOUNDS "sound_details"
56#define P_TOUCH_DETAILS "p_lib_touch_details"
57#ifndef P_INVIS
58#define P_INVIS "invis"
59#endif
60
61#define SENSE_DEFAULT "\ndefault"
62#define SENSE_VIEW 0
63#define SENSE_SMELL 1
64#define SENSE_SOUND 2
65#define SENSE_TOUCH 3
66#define SENSE_READ 4
67
68#endif // __THING_DESCRIPTION_H__
69
70#ifdef NEED_PROTOTYPES
71
72#ifndef __THING_DESCRIPTION_H_PROTO__
73#define __THING_DESCRIPTION_H_PROTO__
74
75// prototypes
76// check if the objects can by identified by str
77varargs int id(string str, int lvl);
78
79// check IDs vs. string*
80int match_ids(string *list);
81
82// add an id to the current object
83void AddId(string|string* str);
84
85// remove an id from the object
86void RemoveId(string|string* str);
87
88// add an adjective to describe the object
89void AddAdjective(string|string* str);
90
91// remove an adjective from the object
92void RemoveAdjective(string|string* str);
93
94// get the name with casus and demonstrative
95varargs string name(int casus, int demon);
96varargs string Name(int casus, int demon);
97
98// check if object is member of a class
99int is_class_member(string|string* str);
100
101// add object to a class
102void AddToClass(string str);
103
104// add a detail to object
105public void AddDetail( string|string* keys, string|string*|mapping|closure descr );
106public void AddReadDetail( string|string* keys, string|string*|mapping|closure descr );
107public void AddSmells( string|string* keys, string|string*|mapping|closure descr );
108public void AddSounds( string|string* keys, string|string*|mapping|closure descr );
109public void AddTouchDetail( string|string* keys, string|string*|mapping|closure descr );
110
111// remove a detail from object
112public varargs void RemoveDetail( string|string* keys );
113public varargs void RemoveSmells( string|string* keys );
114public varargs void RemoveSounds( string|string* keys );
115public varargs void RemoveReadDetail( string|string* keys );
116public varargs void RemoveTouchDetail( string|string* keys );
117
118// add a special detail to object
119void AddSpecialDetail(string|string* keys, string functionname );
120
121// remove a special detail to object
122void RemoveSpecialDetail( string|string* keys );
123
124static void GiveEP(int type, string key);
125
126#endif // __THING_DESCRIPTION_H_PROTO__
127
128#endif // NEED_PROTOYPES