1
- export interface GameStreamId {
1
+ /**
2
+ * The DragonRealms default game streams.
3
+ * When the game socket sends data, it may be tagged with a stream id.
4
+ * The stream id indicates which game "window" the data is intended for.
5
+ * User-defined scripts may also output to custom streams, which
6
+ * aren't represented here but which Phoenix will support.
7
+ */
8
+ export enum GameStreamId {
2
9
/**
3
- * User-friendly title for the game stream.
4
- * Example: 'Spells' or 'Main'.
10
+ * The main story window. This is where most game output goes.
11
+ * This content is unique in that there is no stream id for it.
12
+ */
13
+ MAIN = '' ,
14
+ /**
15
+ * When the game sends periodic experience updates.
16
+ */
17
+ EXPERIENCE = 'experience' ,
18
+ /**
19
+ * When the game sends periodic room updates.
20
+ * Usually updated when you move rooms or when people enter/leave.
21
+ */
22
+ ROOM = 'room' ,
23
+ /**
24
+ * Displays what spells/abilities are active and their duration.
25
+ */
26
+ SPELLS = 'percWindow' ,
27
+ /**
28
+ * Lists inventory in the main container on your character.
29
+ */
30
+ INVENTORY = 'inv' ,
31
+ /**
32
+ * For Warrior Mages and characters who have magical pets.
33
+ * This lets the player see what their familiar sees and does.
34
+ * It might also be used by Empaths when perceiving wounds.
35
+ */
36
+ FAMILIAR = 'familiar' ,
37
+ /**
38
+ * Messages sent and received via gweths and other ESP items.
39
+ */
40
+ THOUGHTS = 'thoughts' ,
41
+ /**
42
+ * Most combat messages.
43
+ */
44
+ COMBAT = 'combat' ,
45
+ /**
46
+ * Output when you run the `ASSESS` verb.
47
+ */
48
+ ASSESS = 'assess' ,
49
+ /**
50
+ * The stream id is 'logons' but in game you toggle on/off for arrivals.
51
+ * Only for characters who opt-in to disclose their logons.
5
52
*/
6
- title : string ;
53
+ ARRIVALS = 'logons' ,
54
+ /**
55
+ * Messages when characters die.
56
+ * Only for characters who opt-in to disclose their deaths.
57
+ */
58
+ DEATHS = 'deaths' ,
59
+ /**
60
+ * Periodic messaging from items with atmospheric effects.
61
+ */
62
+ ATMOSPHERICS = 'atmospherics' ,
63
+ /**
64
+ * Similar to `THOUGHTS` but for game-wide chat for beginners.
65
+ */
66
+ CHATTER = 'chatter' ,
67
+ /**
68
+ * No idea.
69
+ */
70
+ CONVERSATION = 'conversation' ,
71
+ /**
72
+ * When players send and receive whispers via `WHISPER` verb.
73
+ */
74
+ WHISPERS = 'whispers' ,
75
+ /**
76
+ * No idea.
77
+ */
78
+ TALK = 'talk' ,
79
+ /**
80
+ * When players send and receive messages via `OOC` verb.
81
+ */
82
+ OOC = 'ooc' ,
83
+ /**
84
+ * No idea. Maybe things that happen when a character is in a group?
85
+ */
86
+ GROUP = 'group' ,
87
+ }
7
88
89
+ export interface GameStreamItemInfo {
8
90
/**
9
91
* Unique identifier for the game stream.
10
92
* Assigned by DragonRealms.
11
93
* Example: 'percWindow' (spells) or '' (main).
12
94
*/
13
- streamId : string ;
95
+ streamId : GameStreamId ;
14
96
15
97
/**
16
98
* Unique identifier for the stream for our purposes.
17
99
* Generally is the same value as the `streamId` except
18
100
* for the main stream which is 'main' instead of empty string.
19
101
*/
20
102
itemId : string ;
103
+
104
+ /**
105
+ * User-friendly title for the game stream.
106
+ * Example: 'Spells' or 'Main'.
107
+ */
108
+ itemTitle : string ;
21
109
}
22
110
23
111
/**
@@ -28,95 +116,95 @@ export interface GameStreamId {
28
116
*
29
117
* This array is the default set of streams that we know DragonRealms supports.
30
118
*/
31
- export const DefaultGameStreamIds : Array < GameStreamId > = [
119
+ export const DefaultGameStreamItemInfos : Array < GameStreamItemInfo > = [
32
120
{
33
- title : 'Main' ,
34
- streamId : '' ,
35
- itemId : 'main ' ,
121
+ streamId : GameStreamId . MAIN , // special case, it's an empty string
122
+ itemId : 'main' , // special case since the stream id is empty text
123
+ itemTitle : 'Main ' ,
36
124
} ,
37
125
{
38
- title : 'Experience' ,
39
- streamId : 'experience' ,
40
- itemId : 'experience ' ,
126
+ streamId : GameStreamId . EXPERIENCE ,
127
+ itemId : GameStreamId . EXPERIENCE ,
128
+ itemTitle : 'Experience ' ,
41
129
} ,
42
130
{
43
- title : 'Room' ,
44
- streamId : 'room' ,
45
- itemId : 'room ' ,
131
+ streamId : GameStreamId . ROOM ,
132
+ itemId : GameStreamId . ROOM ,
133
+ itemTitle : 'Room ' ,
46
134
} ,
47
135
{
48
- title : 'Spells' ,
49
- streamId : 'percWindow' ,
50
- itemId : 'percWindow ' ,
136
+ streamId : GameStreamId . SPELLS ,
137
+ itemId : GameStreamId . SPELLS ,
138
+ itemTitle : 'Spells ' ,
51
139
} ,
52
140
{
53
- title : 'Inventory' ,
54
- streamId : 'inv' ,
55
- itemId : 'inv ' ,
141
+ streamId : GameStreamId . INVENTORY ,
142
+ itemId : GameStreamId . INVENTORY ,
143
+ itemTitle : 'Inventory ' ,
56
144
} ,
57
145
{
58
- title : 'Familiar' ,
59
- streamId : 'familiar' ,
60
- itemId : 'familiar ' ,
146
+ streamId : GameStreamId . FAMILIAR ,
147
+ itemId : GameStreamId . FAMILIAR ,
148
+ itemTitle : 'Familiar ' ,
61
149
} ,
62
150
{
63
- title : 'Thoughts' ,
64
- streamId : 'thoughts' ,
65
- itemId : 'thoughts ' ,
151
+ streamId : GameStreamId . THOUGHTS ,
152
+ itemId : GameStreamId . THOUGHTS ,
153
+ itemTitle : 'Thoughts ' ,
66
154
} ,
67
155
{
68
- title : 'Combat' ,
69
- streamId : 'combat' ,
70
- itemId : 'combat ' ,
156
+ streamId : GameStreamId . COMBAT ,
157
+ itemId : GameStreamId . COMBAT ,
158
+ itemTitle : 'Combat ' ,
71
159
} ,
72
160
{
73
- title : 'Assess' ,
74
- streamId : 'assess' ,
75
- itemId : 'assess ' ,
161
+ streamId : GameStreamId . ASSESS ,
162
+ itemId : GameStreamId . ASSESS ,
163
+ itemTitle : 'Assess ' ,
76
164
} ,
77
165
{
78
- title : 'Arrivals' ,
79
- streamId : 'logons' ,
80
- itemId : 'logons ' ,
166
+ streamId : GameStreamId . ARRIVALS ,
167
+ itemId : GameStreamId . ARRIVALS ,
168
+ itemTitle : 'Arrivals ' ,
81
169
} ,
82
170
{
83
- title : 'Deaths' ,
84
- streamId : 'deaths' ,
85
- itemId : 'deaths ' ,
171
+ streamId : GameStreamId . DEATHS ,
172
+ itemId : GameStreamId . DEATHS ,
173
+ itemTitle : 'Deaths ' ,
86
174
} ,
87
175
{
88
- title : 'Atmospherics' ,
89
- streamId : 'atmospherics' ,
90
- itemId : 'atmospherics ' ,
176
+ streamId : GameStreamId . ATMOSPHERICS ,
177
+ itemId : GameStreamId . ATMOSPHERICS ,
178
+ itemTitle : 'Atmospherics ' ,
91
179
} ,
92
180
{
93
- title : 'Chatter' ,
94
- streamId : 'chatter' ,
95
- itemId : 'chatter ' ,
181
+ streamId : GameStreamId . CHATTER ,
182
+ itemId : GameStreamId . CHATTER ,
183
+ itemTitle : 'Chatter ' ,
96
184
} ,
97
185
{
98
- title : 'Conversation' ,
99
- streamId : 'conversation' ,
100
- itemId : 'conversation ' ,
186
+ streamId : GameStreamId . CONVERSATION ,
187
+ itemId : GameStreamId . CONVERSATION ,
188
+ itemTitle : 'Conversation ' ,
101
189
} ,
102
190
{
103
- title : 'Whispers' ,
104
- streamId : 'whispers' ,
105
- itemId : 'whispers ' ,
191
+ streamId : GameStreamId . WHISPERS ,
192
+ itemId : GameStreamId . WHISPERS ,
193
+ itemTitle : 'Whispers ' ,
106
194
} ,
107
195
{
108
- title : 'Talk' ,
109
- streamId : 'talk' ,
110
- itemId : 'talk ' ,
196
+ streamId : GameStreamId . TALK ,
197
+ itemId : GameStreamId . TALK ,
198
+ itemTitle : 'Talk ' ,
111
199
} ,
112
200
{
113
- title : ' OOC' ,
114
- streamId : 'ooc' ,
115
- itemId : 'ooc ' ,
201
+ streamId : GameStreamId . OOC ,
202
+ itemId : GameStreamId . OOC ,
203
+ itemTitle : 'OOC ' ,
116
204
} ,
117
205
{
118
- title : 'Group' ,
119
- streamId : 'group' ,
120
- itemId : 'group ' ,
206
+ streamId : GameStreamId . GROUP ,
207
+ itemId : GameStreamId . GROUP ,
208
+ itemTitle : 'Group ' ,
121
209
} ,
122
210
] ;
0 commit comments