~jadedctrl/gem-xwx-moe

~jadedctrl/gem-xwx-moe/gemujo_ludo/mods.niaj/fasado/subtitles/doc/modules/Agent.html
 ..
0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
1 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html>
3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
4 <head>
5 <title>Subtitles API Reference</title>
6 <link rel="stylesheet" href="../ldoc.css" type="text/css" />
7 </head>
8 <body>
9
10 <div id="container">
11
12 <div id="product">
13 <div id="product_logo"></div>
14 <div id="product_name"><big><b></b></big></div>
15 <div id="product_description"></div>
16 </div> <!-- id="product" -->
17
18
19 <div id="main">
20
21
22 <!-- Menu -->
23
24 <div id="navigation">
25 <br/>
26 <h1>ldoc</h1>
27
28 <ul>
29 <li><a href="../index.html">Index</a></li>
30 </ul>
31
32 <h2>Contents</h2>
33 <ul>
34 <li><a href="#Class_Agent">Class Agent </a></li>
35 </ul>
36
37
38 <h2>Modules</h2>
39 <ul class="nowrap">
40 <li><strong>Agent</strong></li>
41 <li><a href="../modules/BaseTextSubtitleDisplay.html">BaseTextSubtitleDisplay</a></li>
42 <li><a href="../modules/ChatSubtitleDisplay.html">ChatSubtitleDisplay</a></li>
43 <li><a href="../modules/ClassicSubtitleDisplay.html">ClassicSubtitleDisplay</a></li>
44 <li><a href="../modules/CornerSubtitleDisplay.html">CornerSubtitleDisplay</a></li>
45 <li><a href="../modules/Sound.html">Sound</a></li>
46 <li><a href="../modules/SubtitleDisplay.html">SubtitleDisplay</a></li>
47 <li><a href="../modules/WaypointSubtitleDisplay.html">WaypointSubtitleDisplay</a></li>
48 <li><a href="../modules/api.html">api</a></li>
49 <li><a href="../modules/chatcommands.html">chatcommands</a></li>
50 <li><a href="../modules/descriptions.html">descriptions</a></li>
51 <li><a href="../modules/init.html">init</a></li>
52 <li><a href="../modules/listeners.html">listeners</a></li>
53 <li><a href="../modules/menu.html">menu</a></li>
54 <li><a href="../modules/util.html">util</a></li>
55 </ul>
56
57 </div>
58
59 <div id="content">
60
61 <h1>Module <code>Agent</code></h1>
62 <p>Provides the Agent class, which represents a player.</p>
63 <p></p>
64
65
66 <h2><a href="#Class_Agent">Class Agent </a></h2>
67 <table class="function_list">
68 <tr>
69 <td class="name" nowrap><a href="#subtitles.Agent:new">subtitles.Agent:new (username)</a></td>
70 <td class="summary">Constructor.</td>
71 </tr>
72 <tr>
73 <td class="name" nowrap><a href="#subtitles.Agent:load_settings">subtitles.Agent:load_settings ()</a></td>
74 <td class="summary">Loads settings from the player's metadata.</td>
75 </tr>
76 <tr>
77 <td class="name" nowrap><a href="#subtitles.Agent:get_player">subtitles.Agent:get_player ()</a></td>
78 <td class="summary">Returns the player's ObjectRef, or nil if the player has disconnected.</td>
79 </tr>
80 <tr>
81 <td class="name" nowrap><a href="#subtitles.Agent:get_display">subtitles.Agent:get_display ()</a></td>
82 <td class="summary">Returns the user's currently active display object.</td>
83 </tr>
84 <tr>
85 <td class="name" nowrap><a href="#subtitles.Agent:create_display">subtitles.Agent:create_display ()</a></td>
86 <td class="summary">Creates a display object according to the user's current preferences.</td>
87 </tr>
88 <tr>
89 <td class="name" nowrap><a href="#subtitles.Agent:get_enabled">subtitles.Agent:get_enabled ()</a></td>
90 <td class="summary">Checks if the player has subtitles enabled.</td>
91 </tr>
92 <tr>
93 <td class="name" nowrap><a href="#subtitles.Agent:set_enabled">subtitles.Agent:set_enabled (enabled)</a></td>
94 <td class="summary">Enables or disables subtitles for the player.</td>
95 </tr>
96 <tr>
97 <td class="name" nowrap><a href="#subtitles.Agent:toggle_enabled">subtitles.Agent:toggle_enabled ()</a></td>
98 <td class="summary">Toggles subtitles on/off.</td>
99 </tr>
100 <tr>
101 <td class="name" nowrap><a href="#subtitles.Agent:get_footsteps_enabled">subtitles.Agent:get_footsteps_enabled ()</a></td>
102 <td class="summary">Checks if footsteps are enabled for this player.</td>
103 </tr>
104 <tr>
105 <td class="name" nowrap><a href="#subtitles.Agent:set_footsteps_enabled">subtitles.Agent:set_footsteps_enabled (enabled)</a></td>
106 <td class="summary">Enables or disables footsteps for the player.</td>
107 </tr>
108 <tr>
109 <td class="name" nowrap><a href="#subtitles.Agent:toggle_footsteps_enabled">subtitles.Agent:toggle_footsteps_enabled ()</a></td>
110 <td class="summary">Toggles the footsteps enabled state on/off.</td>
111 </tr>
112 <tr>
113 <td class="name" nowrap><a href="#subtitles.Agent:get_display_name">subtitles.Agent:get_display_name ()</a></td>
114 <td class="summary">Returns the player's selected display name.</td>
115 </tr>
116 <tr>
117 <td class="name" nowrap><a href="#subtitles.Agent:set_display_name">subtitles.Agent:set_display_name (name)</a></td>
118 <td class="summary">Sets the player's display type.</td>
119 </tr>
120 <tr>
121 <td class="name" nowrap><a href="#subtitles.Agent:handle_footsteps">subtitles.Agent:handle_footsteps ()</a></td>
122 <td class="summary">Detects footsteps around the player and simulates sound effects.</td>
123 </tr>
124 <tr>
125 <td class="name" nowrap><a href="#subtitles.Agent:step">subtitles.Agent:step (dtime)</a></td>
126 <td class="summary">Called every game tick.</td>
127 </tr>
128 <tr>
129 <td class="name" nowrap><a href="#subtitles.Agent:show_intro">subtitles.Agent:show_intro ()</a></td>
130 <td class="summary">Shows an introduction message to the player.</td>
131 </tr>
132 <tr>
133 <td class="name" nowrap><a href="#subtitles.Agent:on_first_join">subtitles.Agent:on_first_join ()</a></td>
134 <td class="summary">Called when the player first joins.</td>
135 </tr>
136 <tr>
137 <td class="name" nowrap><a href="#subtitles.Agent:on_leave">subtitles.Agent:on_leave ()</a></td>
138 <td class="summary">Called when the player leaves the game.</td>
139 </tr>
140 </table>
141
142 <br/>
143 <br/>
144
145
146 <h2 class="section-header has-description"><a name="Class_Agent"></a>Class Agent </h2>
147
148 <div class="section-description">
149 Represents a player.
150 Each player gets one Agent object.
151 </div>
152 <dl class="function">
153 <dt>
154 <a name = "subtitles.Agent:new"></a>
155 <strong>subtitles.Agent:new (username)</strong>
156 </dt>
157 <dd>
158 Constructor.
159
160
161 <h3>Parameters:</h3>
162 <ul>
163 <li><span class="parameter">username</span>
164 The name of the player.
165 </li>
166 </ul>
167
168
169
170
171
172 </dd>
173 <dt>
174 <a name = "subtitles.Agent:load_settings"></a>
175 <strong>subtitles.Agent:load_settings ()</strong>
176 </dt>
177 <dd>
178 Loads settings from the player's metadata.
179
180
181
182
183
184
185
186 </dd>
187 <dt>
188 <a name = "subtitles.Agent:get_player"></a>
189 <strong>subtitles.Agent:get_player ()</strong>
190 </dt>
191 <dd>
192 Returns the player's ObjectRef, or nil if the player has disconnected.
193
194
195
196 <h3>Returns:</h3>
197 <ol>
198
199 An ObjectRef or nil.
200 </ol>
201
202
203
204
205 </dd>
206 <dt>
207 <a name = "subtitles.Agent:get_display"></a>
208 <strong>subtitles.Agent:get_display ()</strong>
209 </dt>
210 <dd>
211 Returns the user's currently active display object.
212 This creates the display if necessary.
213
214
215
216 <h3>Returns:</h3>
217 <ol>
218
219 A SubtitleDisplay object.
220 </ol>
221
222
223
224
225 </dd>
226 <dt>
227 <a name = "subtitles.Agent:create_display"></a>
228 <strong>subtitles.Agent:create_display ()</strong>
229 </dt>
230 <dd>
231 Creates a display object according to the user's current preferences.
232
233
234
235 <h3>Returns:</h3>
236 <ol>
237
238 A SubtitleDisplay object.
239 </ol>
240
241
242
243
244 </dd>
245 <dt>
246 <a name = "subtitles.Agent:get_enabled"></a>
247 <strong>subtitles.Agent:get_enabled ()</strong>
248 </dt>
249 <dd>
250 Checks if the player has subtitles enabled.
251
252
253
254 <h3>Returns:</h3>
255 <ol>
256
257 true if subtitles are enabled.
258 </ol>
259
260
261
262
263 </dd>
264 <dt>
265 <a name = "subtitles.Agent:set_enabled"></a>
266 <strong>subtitles.Agent:set_enabled (enabled)</strong>
267 </dt>
268 <dd>
269 Enables or disables subtitles for the player.
270
271
272 <h3>Parameters:</h3>
273 <ul>
274 <li><span class="parameter">enabled</span>
275 true to enable, or false to disable.
276 </li>
277 </ul>
278
279
280
281
282
283 </dd>
284 <dt>
285 <a name = "subtitles.Agent:toggle_enabled"></a>
286 <strong>subtitles.Agent:toggle_enabled ()</strong>
287 </dt>
288 <dd>
289 Toggles subtitles on/off.
290
291
292
293
294
295
296
297 </dd>
298 <dt>
299 <a name = "subtitles.Agent:get_footsteps_enabled"></a>
300 <strong>subtitles.Agent:get_footsteps_enabled ()</strong>
301 </dt>
302 <dd>
303 Checks if footsteps are enabled for this player.
304
305
306
307 <h3>Returns:</h3>
308 <ol>
309
310 true if footsteps are enabled.
311 </ol>
312
313
314
315
316 </dd>
317 <dt>
318 <a name = "subtitles.Agent:set_footsteps_enabled"></a>
319 <strong>subtitles.Agent:set_footsteps_enabled (enabled)</strong>
320 </dt>
321 <dd>
322 Enables or disables footsteps for the player.
323
324
325 <h3>Parameters:</h3>
326 <ul>
327 <li><span class="parameter">enabled</span>
328 true to enable, or false to disable.
329 </li>
330 </ul>
331
332
333
334
335
336 </dd>
337 <dt>
338 <a name = "subtitles.Agent:toggle_footsteps_enabled"></a>
339 <strong>subtitles.Agent:toggle_footsteps_enabled ()</strong>
340 </dt>
341 <dd>
342 Toggles the footsteps enabled state on/off.
343
344
345
346
347
348
349
350 </dd>
351 <dt>
352 <a name = "subtitles.Agent:get_display_name"></a>
353 <strong>subtitles.Agent:get_display_name ()</strong>
354 </dt>
355 <dd>
356 Returns the player's selected display name.
357
358
359
360 <h3>Returns:</h3>
361 <ol>
362
363 A display name string.
364 </ol>
365
366
367
368
369 </dd>
370 <dt>
371 <a name = "subtitles.Agent:set_display_name"></a>
372 <strong>subtitles.Agent:set_display_name (name)</strong>
373 </dt>
374 <dd>
375 Sets the player's display type.
376 This recreates the display if necessary.
377
378
379 <h3>Parameters:</h3>
380 <ul>
381 <li><span class="parameter">name</span>
382 A display name string.
383 </li>
384 </ul>
385
386
387
388
389
390 </dd>
391 <dt>
392 <a name = "subtitles.Agent:handle_footsteps"></a>
393 <strong>subtitles.Agent:handle_footsteps ()</strong>
394 </dt>
395 <dd>
396 Detects footsteps around the player and simulates sound effects.
397
398
399
400
401
402
403
404 </dd>
405 <dt>
406 <a name = "subtitles.Agent:step"></a>
407 <strong>subtitles.Agent:step (dtime)</strong>
408 </dt>
409 <dd>
410 Called every game tick.
411
412
413 <h3>Parameters:</h3>
414 <ul>
415 <li><span class="parameter">dtime</span>
416 Seconds since this method was last called.
417 </li>
418 </ul>
419
420
421
422
423
424 </dd>
425 <dt>
426 <a name = "subtitles.Agent:show_intro"></a>
427 <strong>subtitles.Agent:show_intro ()</strong>
428 </dt>
429 <dd>
430 Shows an introduction message to the player.
431
432
433
434
435
436
437
438 </dd>
439 <dt>
440 <a name = "subtitles.Agent:on_first_join"></a>
441 <strong>subtitles.Agent:on_first_join ()</strong>
442 </dt>
443 <dd>
444 Called when the player first joins.
445
446
447
448
449
450
451
452 </dd>
453 <dt>
454 <a name = "subtitles.Agent:on_leave"></a>
455 <strong>subtitles.Agent:on_leave ()</strong>
456 </dt>
457 <dd>
458 Called when the player leaves the game.
459
460
461
462
463
464
465
466 </dd>
467 </dl>
468
469
470 </div> <!-- id="content" -->
471 </div> <!-- id="main" -->
472 <div id="about">
473 <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
474 <i style="float:right;">Last updated 2023-01-14 06:51:17 </i>
475 </div> <!-- id="about" -->
476 </div> <!-- id="container" -->
477 </body>
478 </html>