blob: 79a12832fd74ee0295efe1007e4e7edf21bf96ca [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001// MorgenGrauen MUDlib
2//
3// living/comm.h -- communication module properties for Livings
4//
5// $Id: comm.h,v 3.3 2000/02/09 15:56:25 Padreic Exp $
6
7#ifndef __LIVING_COMM_H__
8#define __LIVING_COMM_H__
9
10#include <break_string.h>
11
12// Flags fuer ReceiveMsg().
13// The BS-Flags MUST always be equal to the one defined for break_string!
14#define MSG_BS_LEAVE_LFS BS_LEAVE_MY_LFS //1
15#define MSG_BS_SINGLE_SPACE BS_SINGLE_SPACE //2
16#define MSG_BS_BLOCK BS_BLOCK //4
17#define MSG_BS_NO_PARINDENT BS_NO_PARINDENT //8
18#define MSG_BS_INDENT_ONCE BS_INDENT_ONCE //16
19#define MSG_BS_PREP_INDENT BS_PREPEND_INDENT //32
20// Flags < 1024 (2^10) reserviert fuer BS
21#define MSG_DONT_BUFFER 1024
22#define MSG_DONT_STORE 2048
23#define MSG_DONT_WRAP 4096
24#define MSG_DONT_IGNORE 8192
Bugfix427a5812022-01-07 15:41:24 +010025#define MSG_ALL_SENSES 16384 // all relevant senses, not one of them
Bugfix3afcb792022-01-21 22:32:42 +010026#define MSG_ALERT 0x8000 // signal an alert to client (e.g. audio)
MG Mud User88f12472016-06-24 23:31:02 +020027// Flags < 1048576 (2^20) reserviert fuer Flags
28#define MSG_ALL_BS_FLAGS (BS_LEAVE_MY_LFS | BS_SINGLE_SPACE | BS_BLOCK\
29 | BS_NO_PARINDENT | BS_INDENT_ONCE\
30 |BS_PREPEND_INDENT)
31#define MSG_ALL_FLAGS (MSG_DONT_BUFFER | MSG_DONT_STORE | MSG_DONT_WRAP\
Bugfix3afcb792022-01-21 22:32:42 +010032 | MSG_DONT_IGNORE | MSG_ALL_SENSES | MSG_ALERT\
33 | MSG_ALL_BS_FLAGS)
MG Mud User88f12472016-06-24 23:31:02 +020034
35// Nachrichtentypen, Werte ab 2^20
36#define MT_UNKNOWN 0
37#define MT_LOOK 1048576
38#define MT_LISTEN 2097152
39#define MT_FEEL 4194304
40#define MT_TASTE 8388608
41#define MT_SMELL 16777216
42#define MT_MAGIC 33554432
43#define MT_NOTIFICATION 67108864
44#define MT_COMM 134217728
45#define MT_FAR 268435456
46#define MT_DEBUG 536870912
47#define MT_NEWS 1073741824
48
49// Aktionen
50// Bei MA_UNKNOWN wird die Aktion aus query_verb() geraten. Wenn das nicht
51// existiert, bleibt die Aktion MA_UNKNOWN.
52#define MA_UNKNOWN 0
53#define MA_PUT "wirf"
54#define MA_TAKE "nimm"
Bugfix1450fbd2022-10-05 23:03:44 +020055#define MA_GIVE "gib"
MG Mud User88f12472016-06-24 23:31:02 +020056#define MA_MOVE_IN "move_in"
57#define MA_MOVE_OUT "move_out"
58#define MA_MOVE "move"
59#define MA_FIGHT "toete"
60#define MA_WIELD "zuecke"
61#define MA_UNWIELD "stecke"
62#define MA_WEAR "trage"
63#define MA_UNWEAR "ziehe"
64#define MA_EAT "iss"
65#define MA_DRINK "trinke"
66#define MA_SPELL "zaubere"
67#define MA_LOOK "untersuche"
68#define MA_LISTEN "lausche"
69#define MA_FEEL "taste"
70#define MA_SMELL "rieche"
71#define MA_SENSE "erspueren"
72#define MA_READ "lies"
73#define MA_USE "benutze"
74#define MA_SAY "sage"
75#define MA_REMOVE "remove"
76#define MA_CHANNEL "ebenen"
77#define MA_EMOTE "emote"
78#define MA_SHOUT "rufe"
79#define MA_SHOUT_SEFUN "shout"
Zesstra9b7a9dc2022-02-10 12:59:07 +010080#define MA_TEAMRUF "teamruf"
MG Mud User88f12472016-06-24 23:31:02 +020081#define MA_TELL "teilemit"
82
83// Rueckgabewerte von ReceiveMsg()
84#define MSG_DELIVERED 1
85#define MSG_BUFFERED 2
86#define MSG_FAILED -1
87#define MSG_IGNORED -2
88#define MSG_VERB_IGN -3
89#define MSG_MUD_IGN -4
90#define MSG_SENSE_BLOCK -5
91#define MSG_BUFFER_FULL -6
92
93#endif // __LIVING_COMM_H__
94
95#ifdef NEED_PROTOTYPES
96
97#ifndef __LIVING_COMM_H_PROTO__
98#define __LIVING_COMM_H_PROTO__
99
Zesstra09bcf042023-12-30 20:07:19 +0100100protected string comm_guess_action();
101public varargs int ReceiveMsg(string msg, int msg_type = 0,
102 string msg_action = comm_guess_action(), string msg_prefix = 0,
103 object origin = previous_object());
Zesstra71ae7422023-12-30 20:13:12 +0100104public int ReceiveWave(struct wave_s wave,
105 string msg_action = comm_guess_action(), object origin = previous_object());
106public int ReceiveDynWave(struct wave_s wave,
107 string msg_action = comm_guess_action(), object origin = previous_object());
108
Zesstra09bcf042023-12-30 20:07:19 +0100109public int ReceiveNotify(string msg, string action = comm_guess_action());
MG Mud User88f12472016-06-24 23:31:02 +0200110
111#endif // __LIVING_COMM_H_PROTO__
112
113#endif // NEED_PROTOYPES
114