mirror of
https://github.com/evennia/evennia.git
synced 2026-04-01 21:47:17 +02:00
Updated HTML docs.
This commit is contained in:
parent
de11a56e4e
commit
fa36edcea4
41 changed files with 157 additions and 115 deletions
|
|
@ -139,8 +139,8 @@ it to every other subscriber.</p>
|
|||
<li><p>Private guild channels for planning and organization (IC/OOC depending on game)</p></li>
|
||||
<li><p>Cyberpunk-style retro chat rooms (IC)</p></li>
|
||||
<li><p>In-game radio channels (IC)</p></li>
|
||||
<li><p>Group telephathy (IC)</p></li>
|
||||
<li><p>Walkie talkies (IC)</p></li>
|
||||
<li><p>Group telepathy (IC)</p></li>
|
||||
<li><p>Walkie-talkies (IC)</p></li>
|
||||
</ul>
|
||||
<div class="versionchanged">
|
||||
<p><span class="versionmodified changed">Changed in version 1.0: </span>Channel system changed to use a central ‘channel’ command and nicks instead of
|
||||
|
|
@ -265,7 +265,7 @@ channel/destroy channelname
|
|||
<p>Aliases are optional but can be good for obvious shortcuts everyone may want to
|
||||
use. The description is used in channel-listings. You will automatically join a
|
||||
channel you created and will be controlling it. You can also use <code class="docutils literal notranslate"><span class="pre">channel/desc</span></code> to
|
||||
change the description on a channel you wnn later.</p>
|
||||
change the description on a channel you own later.</p>
|
||||
<p>If you control a channel you can also kick people off it:</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>channel/boot mychannel = annoyinguser123 : stop spamming!
|
||||
</pre></div>
|
||||
|
|
@ -331,7 +331,7 @@ channels you could override the <code class="docutils literal notranslate"><span
|
|||
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Add this custom command to your default cmdset and regular users wil now get an
|
||||
<p>Add this custom command to your default cmdset and regular users will now get an
|
||||
access-denied error when trying to use use these switches.</p>
|
||||
</section>
|
||||
</section>
|
||||
|
|
@ -373,7 +373,7 @@ recipient is skipped.</p></li>
|
|||
<li><p><code class="docutils literal notranslate"><span class="pre">channel.at_post_channel_msg(message,</span> <span class="pre">**kwargs)</span></code></p></li>
|
||||
</ol>
|
||||
<p>Note that <code class="docutils literal notranslate"><span class="pre">Accounts</span></code> and <code class="docutils literal notranslate"><span class="pre">Objects</span></code> both have their have separate sets of hooks.
|
||||
So make sure you modify the set actually used by your subcribers (or both).
|
||||
So make sure you modify the set actually used by your subscribers (or both).
|
||||
Default channels all use <code class="docutils literal notranslate"><span class="pre">Account</span></code> subscribers.</p>
|
||||
</section>
|
||||
<section id="channel-class">
|
||||
|
|
@ -480,7 +480,7 @@ what maps e.g. <code class="docutils literal notranslate"><span class="pre">alia
|
|||
a class-method that will happily remove found channel-aliases from the user linked to <em>any</em>
|
||||
channel, not only from the channel the method is called on.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">pre_join_channel(subscriber)</span></code> - if this returns <code class="docutils literal notranslate"><span class="pre">False</span></code>, connection will be refused.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">post_join_channel(subscriber)</span></code> - by default this sets up a users’s channel-nicks/aliases.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">post_join_channel(subscriber)</span></code> - by default this sets up a users’ channel-nicks/aliases.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">pre_leave_channel(subscriber)</span></code> - if this returns <code class="docutils literal notranslate"><span class="pre">False</span></code>, the user is not allowed to leave.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">post_leave_channel(subscriber)</span></code> - this will clean up any channel aliases/nicks of the user.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">delete</span></code> the standard typeclass-delete mechanism will also automatically un-subscribe all
|
||||
|
|
|
|||
|
|
@ -142,6 +142,7 @@
|
|||
<li class="toctree-l1"><a class="reference internal" href="Rooms.html">Rooms</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Exits.html">Exits</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Exits.html#exit-details">Exit details</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="Exits.html#creating-exits-in-code">Creating Exits in code</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="Scripts.html">Scripts</a><ul>
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@
|
|||
<ul>
|
||||
<li><a class="reference internal" href="#">Exits</a><ul>
|
||||
<li><a class="reference internal" href="#exit-details">Exit details</a></li>
|
||||
<li><a class="reference internal" href="#creating-exits-in-code">Creating Exits in code</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -123,6 +124,9 @@
|
|||
</pre></div>
|
||||
</div>
|
||||
<p><em>Exits</em> are in-game <a class="reference internal" href="Objects.html"><span class="doc std std-doc">Objects</span></a> connecting other objects (usually <a class="reference internal" href="Rooms.html"><span class="doc std std-doc">Rooms</span></a>) together.</p>
|
||||
<blockquote>
|
||||
<div><p>Note that Exits are one-way objects, so in order for two Rooms to be linked bi-directionally, there will need to be two exits.</p>
|
||||
</div></blockquote>
|
||||
<p>An object named <code class="docutils literal notranslate"><span class="pre">north</span></code> or <code class="docutils literal notranslate"><span class="pre">in</span></code> might be exits, as well as <code class="docutils literal notranslate"><span class="pre">door</span></code>, <code class="docutils literal notranslate"><span class="pre">portal</span></code> or <code class="docutils literal notranslate"><span class="pre">jump</span> <span class="pre">out</span> <span class="pre">the</span> <span class="pre">window</span></code>.</p>
|
||||
<p>An exit has two things that separate them from other objects.</p>
|
||||
<ol class="simple">
|
||||
|
|
@ -131,7 +135,7 @@
|
|||
</ol>
|
||||
<p>The default exit functionality is all defined on the <a class="reference internal" href="../api/evennia.objects.objects.html#evennia.objects.objects.DefaultExit" title="evennia.objects.objects.DefaultExit"><span class="xref myst py py-class">DefaultExit</span></a> typeclass. You could in principle completely change how exits work in your game by overriding this - it’s not recommended though, unless you really know what you are doing).</p>
|
||||
<p>Exits are <a class="reference internal" href="Locks.html"><span class="doc std std-doc">locked</span></a> using an <code class="docutils literal notranslate"><span class="pre">access_type</span></code> called <em>traverse</em> and also make use of a few hook methods for giving feedback if the traversal fails. See <code class="docutils literal notranslate"><span class="pre">evennia.DefaultExit</span></code> for more info.</p>
|
||||
<p>Exits are normally overridden on a case-by-case basis, but if you want to change the default exit createad by rooms like <code class="docutils literal notranslate"><span class="pre">dig</span></code> , <code class="docutils literal notranslate"><span class="pre">tunnel</span></code> or <code class="docutils literal notranslate"><span class="pre">open</span></code> you can change it in settings:</p>
|
||||
<p>Exits are normally overridden on a case-by-case basis, but if you want to change the default exit created by rooms like <code class="docutils literal notranslate"><span class="pre">dig</span></code>, <code class="docutils literal notranslate"><span class="pre">tunnel</span></code> or <code class="docutils literal notranslate"><span class="pre">open</span></code> you can change it in settings:</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>BASE_EXIT_TYPECLASS = "typeclasses.exits.Exit"
|
||||
</pre></div>
|
||||
</div>
|
||||
|
|
@ -158,6 +162,10 @@
|
|||
</ol>
|
||||
<p>If the move fails for whatever reason, the Exit will look for an Attribute <code class="docutils literal notranslate"><span class="pre">err_traverse</span></code> on itself and display this as an error message. If this is not found, the Exit will instead call <code class="docutils literal notranslate"><span class="pre">at_failed_traverse(obj)</span></code> on itself.</p>
|
||||
</section>
|
||||
<section id="creating-exits-in-code">
|
||||
<h2>Creating Exits in code<a class="headerlink" href="#creating-exits-in-code" title="Permalink to this headline">¶</a></h2>
|
||||
<p>For an example of how to create Exits programatically please see <a class="reference internal" href="../Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Creating-Things.html#linking-exits-and-rooms-in-code"><span class="std std-doc">this guide</span></a>.</p>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ not be able to look at it. See <code class="docutils literal notranslate"><span
|
|||
<li><p><code class="docutils literal notranslate"><span class="pre">search</span></code> - this controls if the object can be found with the
|
||||
<code class="docutils literal notranslate"><span class="pre">DefaultObject.search</span></code> method (usually referred to with <code class="docutils literal notranslate"><span class="pre">caller.search</span></code>
|
||||
in Commands). This is how to create entirely ‘undetectable’ in-game objects.
|
||||
If not setting this lock excplicitly, all objects are assumed searchable.
|
||||
If not setting this lock explicitly, all objects are assumed searchable.
|
||||
Note that if you are aiming to make some _permanently invisible game system,
|
||||
using a <a class="reference internal" href="Scripts.html"><span class="doc std std-doc">Script</span></a> is a better bet.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">get</span></code>- who may pick up the object and carry it around.</p></li>
|
||||
|
|
@ -438,7 +438,7 @@ error message. Sounds good! Let’s start by setting that on the box:</p>
|
|||
<p>Next we need to craft a Lock of type <em>get</em> on our box. We want it to only be passed if the accessing
|
||||
object has the attribute <em>strength</em> of the right value. For this we would need to create a lock
|
||||
function that checks if attributes have a value greater than a given value. Luckily there is already
|
||||
such a one included in evennia (see <code class="docutils literal notranslate"><span class="pre">evennia/locks/lockfuncs.py</span></code>), called <code class="docutils literal notranslate"><span class="pre">attr_gt</span></code>.</p>
|
||||
such a one included in Evennia (see <code class="docutils literal notranslate"><span class="pre">evennia/locks/lockfuncs.py</span></code>), called <code class="docutils literal notranslate"><span class="pre">attr_gt</span></code>.</p>
|
||||
<p>So the lock string will look like this: <code class="docutils literal notranslate"><span class="pre">get:attr_gt(strength,</span> <span class="pre">50)</span></code>. We put this on the box now:</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span> lock box = get:attr_gt(strength, 50)
|
||||
</pre></div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue