mirror of
https://github.com/evennia/evennia.git
synced 2026-03-18 22:06:30 +01:00
477 lines
No EOL
28 KiB
HTML
477 lines
No EOL
28 KiB
HTML
|
||
<!DOCTYPE html>
|
||
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||
|
||
<title>evennia.scripts.models — Evennia latest documentation</title>
|
||
<link rel="stylesheet" href="../_static/nature.css" type="text/css" />
|
||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
||
<script src="../_static/jquery.js"></script>
|
||
<script src="../_static/underscore.js"></script>
|
||
<script src="../_static/doctools.js"></script>
|
||
<script src="../_static/language_data.js"></script>
|
||
<link rel="shortcut icon" href="../_static/favicon.ico"/>
|
||
<link rel="index" title="Index" href="../genindex.html" />
|
||
<link rel="search" title="Search" href="../search.html" />
|
||
<link rel="next" title="evennia.scripts.monitorhandler" href="evennia.scripts.monitorhandler.html" />
|
||
<link rel="prev" title="evennia.scripts.manager" href="evennia.scripts.manager.html" />
|
||
</head><body>
|
||
|
||
|
||
|
||
|
||
<div class="related" role="navigation" aria-label="related navigation">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="../genindex.html" title="General Index"
|
||
accesskey="I">index</a></li>
|
||
<li class="right" >
|
||
<a href="../py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="evennia.scripts.monitorhandler.html" title="evennia.scripts.monitorhandler"
|
||
accesskey="N">next</a> |</li>
|
||
<li class="right" >
|
||
<a href="evennia.scripts.manager.html" title="evennia.scripts.manager"
|
||
accesskey="P">previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="../index.html">Evennia latest</a> »</li>
|
||
<li class="nav-item nav-item-1"><a href="../Evennia-API.html" >API Summary</a> »</li>
|
||
<li class="nav-item nav-item-2"><a href="evennia-api.html" >evennia</a> »</li>
|
||
<li class="nav-item nav-item-3"><a href="evennia.html" >evennia</a> »</li>
|
||
<li class="nav-item nav-item-4"><a href="evennia.scripts.html" accesskey="U">evennia.scripts</a> »</li>
|
||
<li class="nav-item nav-item-this"><a href="">evennia.scripts.models</a></li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="document">
|
||
|
||
<div class="documentwrapper">
|
||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
||
<div class="sphinxsidebarwrapper">
|
||
<p class="logo"><a href="../index.html">
|
||
<img class="logo" src="../_static/evennia_logo.png" alt="Logo"/>
|
||
</a></p>
|
||
<div id="searchbox" style="display: none" role="search">
|
||
<h3 id="searchlabel">Quick search</h3>
|
||
<div class="searchformwrapper">
|
||
<form class="search" action="../search.html" method="get">
|
||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
||
<input type="submit" value="Go" />
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<script>$('#searchbox').show(0);</script>
|
||
<h4>Previous topic</h4>
|
||
<p class="topless"><a href="evennia.scripts.manager.html"
|
||
title="previous chapter">evennia.scripts.manager</a></p>
|
||
<h4>Next topic</h4>
|
||
<p class="topless"><a href="evennia.scripts.monitorhandler.html"
|
||
title="next chapter">evennia.scripts.monitorhandler</a></p>
|
||
<div role="note" aria-label="source link">
|
||
<!--h3>This Page</h3-->
|
||
<ul class="this-page-menu">
|
||
<li><a href="../_sources/api/evennia.scripts.models.md.txt"
|
||
rel="nofollow">Show Page Source</a></li>
|
||
</ul>
|
||
</div><h3>Links</h3>
|
||
<ul>
|
||
<li><a href="https://www.evennia.com/docs/latest/index.html">Documentation Top</a> </li>
|
||
<li><a href="https://www.evennia.com">Evennia Home</a> </li>
|
||
<li><a href="https://github.com/evennia/evennia">Github</a> </li>
|
||
<li><a href="http://games.evennia.com">Game Index</a> </li>
|
||
<li>
|
||
<a href="https://discord.gg/AJJpcRUhtF">Discord</a> -
|
||
<a href="https://github.com/evennia/evennia/discussions">Discussions</a> -
|
||
<a href="https://evennia.blogspot.com/">Blog</a>
|
||
</li>
|
||
</ul>
|
||
<h3>Doc Versions</h3>
|
||
<ul>
|
||
|
||
<li><a href="evennia.scripts.models.html">latest (main branch)</a></li>
|
||
|
||
<li><a href="../../3.x/index.html">v3.0.0 branch (outdated)</a></li>
|
||
|
||
<li><a href="../../2.x/index.html">v2.0.0 branch (outdated)</a></li>
|
||
|
||
<li><a href="../../1.x/index.html">v1.0.0 branch (outdated)</a></li>
|
||
|
||
<li><a href="../../0.x/index.html">v0.9.5 branch (outdated)</a></li>
|
||
|
||
|
||
</ul>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="bodywrapper">
|
||
<div class="body" role="main">
|
||
|
||
<section id="module-evennia.scripts.models">
|
||
<span id="evennia-scripts-models"></span><h1>evennia.scripts.models<a class="headerlink" href="#module-evennia.scripts.models" title="Permalink to this headline">¶</a></h1>
|
||
<p>Scripts are entities that perform some sort of action, either only
|
||
once or repeatedly. They can be directly linked to a particular
|
||
Evennia Object or be stand-alonw (in the latter case it is considered
|
||
a ‘global’ script). Scripts can indicate both actions related to the
|
||
game world as well as pure behind-the-scenes events and effects.
|
||
Everything that has a time component in the game (i.e. is not
|
||
hard-coded at startup or directly created/controlled by players) is
|
||
handled by Scripts.</p>
|
||
<p>Scripts have to check for themselves that they should be applied at a
|
||
particular moment of time; this is handled by the is_valid() hook.
|
||
Scripts can also implement at_start and at_end hooks for preparing and
|
||
cleaning whatever effect they have had on the game object.</p>
|
||
<p>Common examples of uses of Scripts:</p>
|
||
<ul class="simple">
|
||
<li><p>Load the default cmdset to the account object’s cmdhandler
|
||
when logging in.</p></li>
|
||
<li><p>Switch to a different state, such as entering a text editor,
|
||
start combat or enter a dark room.</p></li>
|
||
<li><p>Merge a new cmdset with the default one for changing which
|
||
commands are available at a particular time</p></li>
|
||
<li><p>Give the account/object a time-limited bonus/effect</p></li>
|
||
</ul>
|
||
<dl class="py class">
|
||
<dt id="evennia.scripts.models.ScriptDB">
|
||
<em class="property">class </em><code class="sig-prename descclassname">evennia.scripts.models.</code><code class="sig-name descname">ScriptDB</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">*</span><span class="n">args</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/scripts/models.html#ScriptDB"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.scripts.models.ScriptDB" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="evennia.typeclasses.models.html#evennia.typeclasses.models.TypedObject" title="evennia.typeclasses.models.TypedObject"><code class="xref py py-class docutils literal notranslate"><span class="pre">evennia.typeclasses.models.TypedObject</span></code></a></p>
|
||
<p>The Script database representation.</p>
|
||
<dl class="simple">
|
||
<dt>The TypedObject supplies the following (inherited) properties:</dt><dd><p>key - main name
|
||
name - alias for key
|
||
typeclass_path - the path to the decorating typeclass
|
||
typeclass - auto-linked typeclass
|
||
date_created - time stamp of object creation
|
||
permissions - perm strings
|
||
dbref - #id of object
|
||
db - persistent attribute storage
|
||
ndb - non-persistent attribute storage</p>
|
||
</dd>
|
||
<dt>The ScriptDB adds the following properties:</dt><dd><p>desc - optional description of script
|
||
obj - the object the script is linked to, if any
|
||
account - the account the script is linked to (exclusive with obj)
|
||
interval - how often script should run
|
||
start_delay - if the script should start repeating right away
|
||
repeats - how many times the script should repeat
|
||
persistent - if script should survive a server reboot
|
||
is_active - bool if script is currently running</p>
|
||
</dd>
|
||
</dl>
|
||
<dl class="py attribute">
|
||
<dt id="evennia.scripts.models.ScriptDB.db_desc">
|
||
<code class="sig-name descname">db_desc</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.db_desc" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
|
||
object the first time, the query is executed.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.scripts.models.ScriptDB.db_obj">
|
||
<code class="sig-name descname">db_obj</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.db_obj" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Accessor to the related object on the forward side of a many-to-one or
|
||
one-to-one (via ForwardOneToOneDescriptor subclass) relation.</p>
|
||
<p>In the example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">Child</span><span class="p">(</span><span class="n">Model</span><span class="p">):</span>
|
||
<span class="n">parent</span> <span class="o">=</span> <span class="n">ForeignKey</span><span class="p">(</span><span class="n">Parent</span><span class="p">,</span> <span class="n">related_name</span><span class="o">=</span><span class="s1">'children'</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
<p><strong>**Child.parent**</strong> is a <strong>**ForwardManyToOneDescriptor**</strong> instance.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.scripts.models.ScriptDB.db_account">
|
||
<code class="sig-name descname">db_account</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.db_account" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Accessor to the related object on the forward side of a many-to-one or
|
||
one-to-one (via ForwardOneToOneDescriptor subclass) relation.</p>
|
||
<p>In the example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">Child</span><span class="p">(</span><span class="n">Model</span><span class="p">):</span>
|
||
<span class="n">parent</span> <span class="o">=</span> <span class="n">ForeignKey</span><span class="p">(</span><span class="n">Parent</span><span class="p">,</span> <span class="n">related_name</span><span class="o">=</span><span class="s1">'children'</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
<p><strong>**Child.parent**</strong> is a <strong>**ForwardManyToOneDescriptor**</strong> instance.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.scripts.models.ScriptDB.db_interval">
|
||
<code class="sig-name descname">db_interval</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.db_interval" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
|
||
object the first time, the query is executed.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.scripts.models.ScriptDB.db_start_delay">
|
||
<code class="sig-name descname">db_start_delay</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.db_start_delay" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
|
||
object the first time, the query is executed.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.scripts.models.ScriptDB.db_repeats">
|
||
<code class="sig-name descname">db_repeats</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.db_repeats" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
|
||
object the first time, the query is executed.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.scripts.models.ScriptDB.db_persistent">
|
||
<code class="sig-name descname">db_persistent</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.db_persistent" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
|
||
object the first time, the query is executed.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.scripts.models.ScriptDB.db_is_active">
|
||
<code class="sig-name descname">db_is_active</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.db_is_active" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
|
||
object the first time, the query is executed.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.scripts.models.ScriptDB.objects">
|
||
<code class="sig-name descname">objects</code><em class="property"> = <evennia.scripts.manager.ScriptDBManager object></em><a class="headerlink" href="#evennia.scripts.models.ScriptDB.objects" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.scripts.models.ScriptDB.obj">
|
||
<em class="property">property </em><code class="sig-name descname">obj</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.obj" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Property wrapper that homogenizes access to either the
|
||
db_account or db_obj field, using the same object property
|
||
name.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.scripts.models.ScriptDB.object">
|
||
<em class="property">property </em><code class="sig-name descname">object</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.object" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Property wrapper that homogenizes access to either the
|
||
db_account or db_obj field, using the same object property
|
||
name.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py exception">
|
||
<dt id="evennia.scripts.models.ScriptDB.DoesNotExist">
|
||
<em class="property">exception </em><code class="sig-name descname">DoesNotExist</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.DoesNotExist" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.core.exceptions.ObjectDoesNotExist</span></code></p>
|
||
</dd></dl>
|
||
|
||
<dl class="py exception">
|
||
<dt id="evennia.scripts.models.ScriptDB.MultipleObjectsReturned">
|
||
<em class="property">exception </em><code class="sig-name descname">MultipleObjectsReturned</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.MultipleObjectsReturned" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">django.core.exceptions.MultipleObjectsReturned</span></code></p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.scripts.models.ScriptDB.account">
|
||
<em class="property">property </em><code class="sig-name descname">account</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.account" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A wrapper for getting database field <strong>db_account</strong>.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.scripts.models.ScriptDB.db_account_id">
|
||
<code class="sig-name descname">db_account_id</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.db_account_id" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.scripts.models.ScriptDB.db_attributes">
|
||
<code class="sig-name descname">db_attributes</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.db_attributes" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Accessor to the related objects manager on the forward and reverse sides of
|
||
a many-to-many relation.</p>
|
||
<p>In the example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">Pizza</span><span class="p">(</span><span class="n">Model</span><span class="p">):</span>
|
||
<span class="n">toppings</span> <span class="o">=</span> <span class="n">ManyToManyField</span><span class="p">(</span><span class="n">Topping</span><span class="p">,</span> <span class="n">related_name</span><span class="o">=</span><span class="s1">'pizzas'</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
<p><strong>**Pizza.toppings**</strong> and <strong>**Topping.pizzas**</strong> are <strong>**ManyToManyDescriptor**</strong>
|
||
instances.</p>
|
||
<p>Most of the implementation is delegated to a dynamically defined manager
|
||
class built by <strong>**create_forward_many_to_many_manager()**</strong> defined below.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.scripts.models.ScriptDB.db_date_created">
|
||
<code class="sig-name descname">db_date_created</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.db_date_created" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
|
||
object the first time, the query is executed.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.scripts.models.ScriptDB.db_key">
|
||
<code class="sig-name descname">db_key</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.db_key" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
|
||
object the first time, the query is executed.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.scripts.models.ScriptDB.db_lock_storage">
|
||
<code class="sig-name descname">db_lock_storage</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.db_lock_storage" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
|
||
object the first time, the query is executed.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.scripts.models.ScriptDB.db_obj_id">
|
||
<code class="sig-name descname">db_obj_id</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.db_obj_id" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.scripts.models.ScriptDB.db_tags">
|
||
<code class="sig-name descname">db_tags</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.db_tags" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Accessor to the related objects manager on the forward and reverse sides of
|
||
a many-to-many relation.</p>
|
||
<p>In the example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">Pizza</span><span class="p">(</span><span class="n">Model</span><span class="p">):</span>
|
||
<span class="n">toppings</span> <span class="o">=</span> <span class="n">ManyToManyField</span><span class="p">(</span><span class="n">Topping</span><span class="p">,</span> <span class="n">related_name</span><span class="o">=</span><span class="s1">'pizzas'</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
<p><strong>**Pizza.toppings**</strong> and <strong>**Topping.pizzas**</strong> are <strong>**ManyToManyDescriptor**</strong>
|
||
instances.</p>
|
||
<p>Most of the implementation is delegated to a dynamically defined manager
|
||
class built by <strong>**create_forward_many_to_many_manager()**</strong> defined below.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.scripts.models.ScriptDB.db_typeclass_path">
|
||
<code class="sig-name descname">db_typeclass_path</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.db_typeclass_path" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
|
||
object the first time, the query is executed.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.scripts.models.ScriptDB.desc">
|
||
<em class="property">property </em><code class="sig-name descname">desc</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.desc" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A wrapper for getting database field <strong>db_desc</strong>.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.scripts.models.ScriptDB.get_next_by_db_date_created">
|
||
<code class="sig-name descname">get_next_by_db_date_created</code><span class="sig-paren">(</span><em class="sig-param">*</em>, <em class="sig-param">field=<django.db.models.fields.DateTimeField: db_date_created></em>, <em class="sig-param">is_next=True</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#evennia.scripts.models.ScriptDB.get_next_by_db_date_created" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.scripts.models.ScriptDB.get_previous_by_db_date_created">
|
||
<code class="sig-name descname">get_previous_by_db_date_created</code><span class="sig-paren">(</span><em class="sig-param">*</em>, <em class="sig-param">field=<django.db.models.fields.DateTimeField: db_date_created></em>, <em class="sig-param">is_next=False</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#evennia.scripts.models.ScriptDB.get_previous_by_db_date_created" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.scripts.models.ScriptDB.id">
|
||
<code class="sig-name descname">id</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.id" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A wrapper for a deferred-loading field. When the value is read from this
|
||
object the first time, the query is executed.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.scripts.models.ScriptDB.interval">
|
||
<em class="property">property </em><code class="sig-name descname">interval</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.interval" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A wrapper for getting database field <strong>db_interval</strong>.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.scripts.models.ScriptDB.is_active">
|
||
<em class="property">property </em><code class="sig-name descname">is_active</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.is_active" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A wrapper for getting database field <strong>db_is_active</strong>.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.scripts.models.ScriptDB.path">
|
||
<code class="sig-name descname">path</code><em class="property"> = 'evennia.scripts.models.ScriptDB'</em><a class="headerlink" href="#evennia.scripts.models.ScriptDB.path" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.scripts.models.ScriptDB.persistent">
|
||
<em class="property">property </em><code class="sig-name descname">persistent</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.persistent" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A wrapper for getting database field <strong>db_persistent</strong>.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.scripts.models.ScriptDB.receiver_script_set">
|
||
<code class="sig-name descname">receiver_script_set</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.receiver_script_set" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Accessor to the related objects manager on the forward and reverse sides of
|
||
a many-to-many relation.</p>
|
||
<p>In the example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">Pizza</span><span class="p">(</span><span class="n">Model</span><span class="p">):</span>
|
||
<span class="n">toppings</span> <span class="o">=</span> <span class="n">ManyToManyField</span><span class="p">(</span><span class="n">Topping</span><span class="p">,</span> <span class="n">related_name</span><span class="o">=</span><span class="s1">'pizzas'</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
<p><strong>**Pizza.toppings**</strong> and <strong>**Topping.pizzas**</strong> are <strong>**ManyToManyDescriptor**</strong>
|
||
instances.</p>
|
||
<p>Most of the implementation is delegated to a dynamically defined manager
|
||
class built by <strong>**create_forward_many_to_many_manager()**</strong> defined below.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.scripts.models.ScriptDB.repeats">
|
||
<em class="property">property </em><code class="sig-name descname">repeats</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.repeats" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A wrapper for getting database field <strong>db_repeats</strong>.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.scripts.models.ScriptDB.sender_script_set">
|
||
<code class="sig-name descname">sender_script_set</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.sender_script_set" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Accessor to the related objects manager on the forward and reverse sides of
|
||
a many-to-many relation.</p>
|
||
<p>In the example:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">Pizza</span><span class="p">(</span><span class="n">Model</span><span class="p">):</span>
|
||
<span class="n">toppings</span> <span class="o">=</span> <span class="n">ManyToManyField</span><span class="p">(</span><span class="n">Topping</span><span class="p">,</span> <span class="n">related_name</span><span class="o">=</span><span class="s1">'pizzas'</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
<p><strong>**Pizza.toppings**</strong> and <strong>**Topping.pizzas**</strong> are <strong>**ManyToManyDescriptor**</strong>
|
||
instances.</p>
|
||
<p>Most of the implementation is delegated to a dynamically defined manager
|
||
class built by <strong>**create_forward_many_to_many_manager()**</strong> defined below.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt id="evennia.scripts.models.ScriptDB.start_delay">
|
||
<em class="property">property </em><code class="sig-name descname">start_delay</code><a class="headerlink" href="#evennia.scripts.models.ScriptDB.start_delay" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A wrapper for getting database field <strong>db_start_delay</strong>.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt id="evennia.scripts.models.ScriptDB.typename">
|
||
<code class="sig-name descname">typename</code><em class="property"> = 'SharedMemoryModelBase'</em><a class="headerlink" href="#evennia.scripts.models.ScriptDB.typename" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
</section>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="related" role="navigation" aria-label="related navigation">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="../genindex.html" title="General Index"
|
||
>index</a></li>
|
||
<li class="right" >
|
||
<a href="../py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="evennia.scripts.monitorhandler.html" title="evennia.scripts.monitorhandler"
|
||
>next</a> |</li>
|
||
<li class="right" >
|
||
<a href="evennia.scripts.manager.html" title="evennia.scripts.manager"
|
||
>previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="../index.html">Evennia latest</a> »</li>
|
||
<li class="nav-item nav-item-1"><a href="../Evennia-API.html" >API Summary</a> »</li>
|
||
<li class="nav-item nav-item-2"><a href="evennia-api.html" >evennia</a> »</li>
|
||
<li class="nav-item nav-item-3"><a href="evennia.html" >evennia</a> »</li>
|
||
<li class="nav-item nav-item-4"><a href="evennia.scripts.html" >evennia.scripts</a> »</li>
|
||
<li class="nav-item nav-item-this"><a href="">evennia.scripts.models</a></li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
|
||
<div class="footer" role="contentinfo">
|
||
© Copyright 2023, The Evennia developer community.
|
||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
|
||
</div>
|
||
</body>
|
||
</html> |