diff --git a/docs/1.0/.buildinfo b/docs/1.0/.buildinfo index ed8dc1fa71..91f59db8cb 100644 --- a/docs/1.0/.buildinfo +++ b/docs/1.0/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 34d539deb339f7d5f0e8dd55a49ee609 +config: 33d5d7a4e00ef6fc06519ed04fef2c78 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/1.0/Coding/Continuous-Integration-TeamCity.html b/docs/1.0/Coding/Continuous-Integration-TeamCity.html index 31b9223be8..26b8df8c60 100644 --- a/docs/1.0/Coding/Continuous-Integration-TeamCity.html +++ b/docs/1.0/Coding/Continuous-Integration-TeamCity.html @@ -151,34 +151,34 @@ environment unique from your development environment.
CONFIG="%system.teamcity.build.checkoutDir%/server/conf/settings.py" MYCONF="%system.teamcity.build.checkoutDir%/server/conf/my.cnf" -sed -e 's/TELNET_PORTS = [4000]/TELNET_PORTS = [%game.ports%]/g' "$CONFIG" > "$CONFIG".tmp && mv -"$CONFIG".tmp "$CONFIG" -sed -e 's/WEBSERVER_PORTS = [(4001, 4002)]/WEBSERVER_PORTS = [%game.webports%]/g' "$CONFIG" > -"$CONFIG".tmp && mv "$CONFIG".tmp "$CONFIG" +sed -e 's/TELNET_PORTS = [4000]/TELNET_PORTS = [%game.ports%]/g' "$CONFIG" > "$CONFIG".tmp && mv +"$CONFIG".tmp "$CONFIG" +sed -e 's/WEBSERVER_PORTS = [(4001, 4002)]/WEBSERVER_PORTS = [%game.webports%]/g' "$CONFIG" > +"$CONFIG".tmp && mv "$CONFIG".tmp "$CONFIG"# settings.py MySQL DB configuration
-echo Configuring Game Database...
-echo "" >> "$CONFIG"
-echo "######################################################################" >> "$CONFIG"
-echo "# MySQL Database Configuration" >> "$CONFIG"
-echo "######################################################################" >> "$CONFIG"
+echo Configuring Game Database...
+echo "" >> "$CONFIG"
+echo "######################################################################" >> "$CONFIG"
+echo "# MySQL Database Configuration" >> "$CONFIG"
+echo "######################################################################" >> "$CONFIG"
-echo "DATABASES = {" >> "$CONFIG"
-echo " 'default': {" >> "$CONFIG"
-echo " 'ENGINE': 'django.db.backends.mysql'," >> "$CONFIG"
-echo " 'OPTIONS': {" >> "$CONFIG"
-echo " 'read_default_file': 'server/conf/my.cnf'," >> "$CONFIG"
-echo " }," >> "$CONFIG"
-echo " }" >> "$CONFIG"
-echo "}" >> "$CONFIG"
+echo "DATABASES = {" >> "$CONFIG"
+echo " 'default': {" >> "$CONFIG"
+echo " 'ENGINE': 'django.db.backends.mysql'," >> "$CONFIG"
+echo " 'OPTIONS': {" >> "$CONFIG"
+echo " 'read_default_file': 'server/conf/my.cnf'," >> "$CONFIG"
+echo " }," >> "$CONFIG"
+echo " }" >> "$CONFIG"
+echo "}" >> "$CONFIG"
# Create the My.CNF file.
-echo "[client]" >> "$MYCONF"
-echo "database = %mysql.db%" >> "$MYCONF"
-echo "user = %mysql.user%" >> "$MYCONF"
-echo "password = %mysql.pass%" >> "$MYCONF"
-echo "default-character-set = utf8" >> "$MYCONF"
+echo "[client]" >> "$MYCONF"
+echo "database = %mysql.db%" >> "$MYCONF"
+echo "user = %mysql.user%" >> "$MYCONF"
+echo "password = %mysql.pass%" >> "$MYCONF"
+echo "default-character-set = utf8" >> "$MYCONF"
If you look at the parameters side of the page after saving this script, you’ll notice that some new @@ -193,15 +193,15 @@ step to your game dir.
LOGDIR="server/logs" -. %evenv.dir%/bin/activate +. %evenv.dir%/bin/activate # Check that the logs directory exists. -if [ ! -d "$LOGDIR" ]; then - # Control will enter here if $LOGDIR doesn't exist. - mkdir "$LOGDIR" +if [ ! -d "$LOGDIR" ]; then + # Control will enter here if $LOGDIR doesn't exist. + mkdir "$LOGDIR" fi -evennia makemigrations +evennia makemigrationsCreate yet another build step, this time named: “Execute Database Migration”: @@ -209,18 +209,18 @@ If you’re using Sqlite3 for your game (default database), it’s prudent to ch step to your game dir.
#!/bin/bash
# Apply the database migration.
-
+
LOGDIR="server/logs"
-
-. %evenv.dir%/bin/activate
-
+
+. %evenv.dir%/bin/activate
+
# Check that the logs directory exists.
-if [ ! -d "$LOGDIR" ]; then
- # Control will enter here if $LOGDIR doesn't exist.
- mkdir "$LOGDIR"
+if [ ! -d "$LOGDIR" ]; then
+ # Control will enter here if $LOGDIR doesn't exist.
+ mkdir "$LOGDIR"
fi
-
-evennia migrate
+
+evennia migrate
Our next build step is where we actually publish our build. Up until now, all work on game has been @@ -230,18 +230,18 @@ to where our game actually exists on the local server.
the Database Migration steps. The build order will matter!#!/bin/bash
# Publishes the build to the proper build directory.
-
+
DIRECTORY="<game_dir>"
-
-if [ ! -d "$DIRECTORY" ]; then
- # Control will enter here if $DIRECTORY doesn't exist.
- mkdir "$DIRECTORY"
+
+if [ ! -d "$DIRECTORY" ]; then
+ # Control will enter here if $DIRECTORY doesn't exist.
+ mkdir "$DIRECTORY"
fi
-
+
# Copy all the files.
-cp -ruv %teamcity.build.checkoutDir%/* "$DIRECTORY"
-chmod -R 775 "$DIRECTORY"
-
+cp -ruv %teamcity.build.checkoutDir%/* "$DIRECTORY"
+chmod -R 775 "$DIRECTORY"
+
Finally the last script will reload our game for us.
@@ -253,18 +253,18 @@ The working directory on this build step will be:LOGDIR="server/logs"
PIDDIR="server/server.pid"
-. %evenv.dir%/bin/activate
+. %evenv.dir%/bin/activate
# Check that the logs directory exists.
-if [ ! -d "$LOGDIR" ]; then
- # Control will enter here if $LOGDIR doesn't exist.
- mkdir "$LOGDIR"
+if [ ! -d "$LOGDIR" ]; then
+ # Control will enter here if $LOGDIR doesn't exist.
+ mkdir "$LOGDIR"
fi
# Check that the server is running.
-if [ -d "$PIDDIR" ]; then
- # Control will enter here if the game is running.
- evennia reload
+if [ -d "$PIDDIR" ]; then
+ # Control will enter here if the game is running.
+ evennia reload
fi
diff --git a/docs/1.0/Coding/Continuous-Integration-Travis.html b/docs/1.0/Coding/Continuous-Integration-Travis.html
index 79d18c3068..eaf46705fe 100644
--- a/docs/1.0/Coding/Continuous-Integration-Travis.html
+++ b/docs/1.0/Coding/Continuous-Integration-Travis.html
@@ -108,17 +108,17 @@ need to set up yourself is a Travis config file named language: python
-python:
- - "3.10"
-install:
- - git clone https://github.com/evennia/evennia.git
- - cd evennia
- - pip install -e .
- - cd $TRAVIS_BUILD_DIR
-script:
- - evennia migrate
- - evennia test --settings settings.py .
+language: python
+python:
+ - "3.10"
+install:
+ - git clone https://github.com/evennia/evennia.git
+ - cd evennia
+ - pip install -e .
+ - cd $TRAVIS_BUILD_DIR
+script:
+ - evennia migrate
+ - evennia test --settings settings.py .
This will tell travis how to download Evennia, install it, set up a database and then run
diff --git a/docs/1.0/Coding/Debugging.html b/docs/1.0/Coding/Debugging.html
index 2e01b7490b..af8a65d41b 100644
--- a/docs/1.0/Coding/Debugging.html
+++ b/docs/1.0/Coding/Debugging.html
@@ -151,7 +151,7 @@ default cmdset. Then restart Evennia in interactive mode with class CmdTest(Command):
- """
+ """
A test command just to test pdb.
Usage:
diff --git a/docs/1.0/Coding/Evennia-Code-Style.html b/docs/1.0/Coding/Evennia-Code-Style.html
index 5b51de522b..9a3028c0c1 100644
--- a/docs/1.0/Coding/Evennia-Code-Style.html
+++ b/docs/1.0/Coding/Evennia-Code-Style.html
@@ -189,7 +189,7 @@ important methods, this tends to be hard to keep updated as the API
develops. Don’t use section markers (#, ## etc).
Example of class docstring:
class MyClass(object):
- """
+ """
This class describes the creation of `Objects`. It is useful
in many situations, such as ...
@@ -202,7 +202,7 @@ develops. Don’t use section markers (
def funcname(a, b, c, d=False, **kwargs):
- """
+ """
This is a brief introduction to the function/class/method
Args:
@@ -237,7 +237,7 @@ an indent. When you need to break a line you should start the next line
with another indent. For consistency with the code we recommend all
indents to be 4 spaces wide (no tabs!).
Here are all the supported block headers:
- """
+ """
Args
argname (freeform type): Description endind with period.
Keyword Args:
@@ -290,7 +290,7 @@ docstrings to represent the in-game help entry for that command.
formatted on a similar form. For contribs, this is loosened, but if there is
no particular reason to use a different form, one should aim to use the same
style for contrib-command docstrings as well.
- """
+ """
Short header
Usage:
@@ -317,7 +317,7 @@ will come out as a single The Switches and Examples blocks are optional and based on the Command.
Here is the nick command as an example:
- """
+ """
Define a personal alias/nick
Usage:
diff --git a/docs/1.0/Coding/Soft-Code.html b/docs/1.0/Coding/Soft-Code.html
index c57d5aa6d1..810ac44053 100644
--- a/docs/1.0/Coding/Soft-Code.html
+++ b/docs/1.0/Coding/Soft-Code.html
@@ -117,19 +117,19 @@ or more which is obviously not very readable nor (easily) maintainable over time
Examples of Softcode¶
Here is a simple ‘Hello World!’ command:
- @set me=HELLO_WORLD.C:$hello:@pemit %#=Hello World!
+ @set me=HELLO_WORLD.C:$hello:@pemit %#=Hello World!
Pasting this into a MUX/MUSH and typing ‘hello’ will theoretically yield ‘Hello World!’, assuming
certain flags are not set on your account object.
Setting attributes is done via @set. Softcode also allows the use of the ampersand (&) symbol.
This shorter version looks like this:
- &HELLO_WORLD.C me=$hello:@pemit %#=Hello World!
+ &HELLO_WORLD.C me=$hello:@pemit %#=Hello World!
Perhaps I want to break the Hello World into an attribute which is retrieved when emitting:
- &HELLO_VALUE.D me=Hello World
- &HELLO_WORLD.C me=$hello:@pemit %#=[v(HELLO_VALUE.D)]
+ &HELLO_VALUE.D me=Hello World
+ &HELLO_WORLD.C me=$hello:@pemit %#=[v(HELLO_VALUE.D)]
The v() function returns the HELLO_VALUE.D attribute on the object that the command resides
diff --git a/docs/1.0/Coding/Unit-Testing.html b/docs/1.0/Coding/Unit-Testing.html
index 2d7bf15d64..9d29322934 100644
--- a/docs/1.0/Coding/Unit-Testing.html
+++ b/docs/1.0/Coding/Unit-Testing.html
@@ -184,21 +184,21 @@ and want to test a function in "This tests a function myfunc."
def setUp(self):
- """done before every of the test_ * methods below"""
+ """done before every of the test_ * methods below"""
self.obj = create_object("mytestobject")
def tearDown(self):
- """done after every test_* method below """
+ """done after every test_* method below """
self.obj.delete()
def test_return_value(self):
- """test method. Makes sure return value is as expected."""
+ """test method. Makes sure return value is as expected."""
actual_return = myfunc(self.obj)
expected_return = "This is the good object 'mytestobject'."
# test
self.assertEqual(expected_return, actual_return)
def test_alternative_call(self):
- """test method. Calls with a keyword argument."""
+ """test method. Calls with a keyword argument."""
actual_return = myfunc(self.obj, bad=True)
expected_return = "This is the baaad object 'mytestobject'."
# test
@@ -265,13 +265,13 @@ just there for naming symmetry with <
from evennia.utils.test_resources import EvenniaTest
class TestObject(EvenniaTest):
- """Remember that the testing class creates char1 and char2 inside room1 ..."""
+ """Remember that the testing class creates char1 and char2 inside room1 ..."""
def test_object_search_character(self):
- """Check that char1 can search for char2 by name"""
+ """Check that char1 can search for char2 by name"""
self.assertEqual(self.char1.search(self.char2.key), self.char2)
def test_location_search(self):
- """Check so that char1 can find the current location by name"""
+ """Check so that char1 can find the current location by name"""
self.assertEqual(self.char1.search(self.char1.location.key), self.char1.location)
# ...
diff --git a/docs/1.0/Coding/Version-Control.html b/docs/1.0/Coding/Version-Control.html
index aba0aa5902..21c7f294d5 100644
--- a/docs/1.0/Coding/Version-Control.html
+++ b/docs/1.0/Coding/Version-Control.html
@@ -449,9 +449,9 @@ This is a formal request for upstream Evennia to adopt and pull your code into t
Getting 403: Forbidden access¶
Some users have experienced this on git push to their remote repository. They are not asked for username/password (and don’t have a ssh key set up).
Some users have reported that the workaround is to create a file .netrc under your home directory and add your github credentials there:
-machine github.com
-login <my_github_username>
-password <my_github_password>
+machine github.com
+login <my_github_username>
+password <my_github_password>
diff --git a/docs/1.0/Components/Attributes.html b/docs/1.0/Components/Attributes.html
index fe166280e1..e730fad3b1 100644
--- a/docs/1.0/Components/Attributes.html
+++ b/docs/1.0/Components/Attributes.html
@@ -497,12 +497,12 @@ serialize the db-objects you want to store.
self.mydbobj = mydbobj
def __serialize_dbobjs__(self):
- """This is called before serialization and allows
+ """This is called before serialization and allows
us to custom-handle those 'hidden' dbobjs"""
self.mydbobj = dbserialize.dbserialize(self.mydbobj
def __deserialize_dbobjs__(self):
- """This is called after deserialization and allows you to
+ """This is called after deserialization and allows you to
restore the 'hidden' dbobjs you serialized before"""
if isinstance(self.mydbobj, bytes):
# make sure to check if it's bytes before trying dbunserialize
diff --git a/docs/1.0/Components/Batch-Command-Processor.html b/docs/1.0/Components/Batch-Command-Processor.html
index 3c88716aad..313b4bda82 100644
--- a/docs/1.0/Components/Batch-Command-Processor.html
+++ b/docs/1.0/Components/Batch-Command-Processor.html
@@ -143,46 +143,46 @@ them in-game, except you have more freedom with line breaks.
You cannot nest another batchcommand statement into your batch file. If you want to link many batch-files together, use the #INSERT batch instruction instead. You also cannot launch the batchcode command from your batch file, the two batch processors are not compatible.
Below is a version of the example file found in evennia/contrib/tutorial_examples/batch_cmds.ev.
- #
- # This is an example batch build file for Evennia.
- #
-
- # This creates a red button
- @create button:tutorial_examples.red_button.RedButton
- # (This comment ends input for @create)
- # Next command. Let's create something.
- @set button/desc =
- This is a large red button. Now and then
- it flashes in an evil, yet strangely tantalizing way.
-
- A big sign sits next to it. It says:
+ #
+ # This is an example batch build file for Evennia.
+ #
+
+ # This creates a red button
+ @create button:tutorial_examples.red_button.RedButton
+ # (This comment ends input for @create)
+ # Next command. Let's create something.
+ @set button/desc =
+ This is a large red button. Now and then
+ it flashes in an evil, yet strangely tantalizing way.
+
+ A big sign sits next to it. It says:
-
- -----------
-
- Press me!
-
- -----------
+
+ -----------
+
+ Press me!
+
+ -----------
-
- ... It really begs to be pressed! You
- know you want to!
-
- # This inserts the commands from another batch-cmd file named
- # batch_insert_file.ev.
- #INSERT examples.batch_insert_file
-
-
- # (This ends the @set command). Note that single line breaks
- # and extra whitespace in the argument are ignored. Empty lines
- # translate into line breaks in the output.
- # Now let's place the button where it belongs (let's say limbo #2 is
- # the evil lair in our example)
- @teleport #2
- # (This comments ends the @teleport command.)
- # Now we drop it so others can see it.
- # The very last command in the file needs not be ended with #.
- drop button
+
+ ... It really begs to be pressed! You
+ know you want to!
+
+ # This inserts the commands from another batch-cmd file named
+ # batch_insert_file.ev.
+ #INSERT examples.batch_insert_file
+
+
+ # (This ends the @set command). Note that single line breaks
+ # and extra whitespace in the argument are ignored. Empty lines
+ # translate into line breaks in the output.
+ # Now let's place the button where it belongs (let's say limbo #2 is
+ # the evil lair in our example)
+ @teleport #2
+ # (This comments ends the @teleport command.)
+ # Now we drop it so others can see it.
+ # The very last command in the file needs not be ended with #.
+ drop button
To test this, run @batchcommand on the file:
diff --git a/docs/1.0/Components/Command-Sets.html b/docs/1.0/Components/Command-Sets.html
index 3ba911e77b..a524157905 100644
--- a/docs/1.0/Components/Command-Sets.html
+++ b/docs/1.0/Components/Command-Sets.html
@@ -152,7 +152,7 @@ Sets#merge-rules) section).
class MyCmdSet(CmdSet):
def at_cmdset_creation(self):
- """
+ """
The only thing this method should need
to do is to add commands to the set.
"""
@@ -450,7 +450,7 @@ it appropriately.
key_mergetypes = {'MyOtherCmdSet':'Union'}
def at_cmdset_creation(self):
- """
+ """
The only thing this method should need
to do is to add commands to the set.
"""
diff --git a/docs/1.0/Components/Commands.html b/docs/1.0/Components/Commands.html
index 7941e975e9..7f8505d03e 100644
--- a/docs/1.0/Components/Commands.html
+++ b/docs/1.0/Components/Commands.html
@@ -148,7 +148,7 @@ specifics and use the base from evennia import Command
class MyCmd(Command):
- """
+ """
This is the help-text for the command
"""
key = "mycommand"
@@ -270,7 +270,7 @@ truthfully report this value - that case the from evennia import Command
class CmdSmile(Command):
- """
+ """
A smile command
Usage:
@@ -371,7 +371,7 @@ the current execution of your command and wait for more before processing.
from evennia import Command
class CmdWait(Command):
- """
+ """
A dummy command to show how to wait
Usage:
@@ -384,7 +384,7 @@ the current execution of your command and wait for more before processing.
help_category = "General"
def func(self):
- """Command execution."""
+ """Command execution."""
self.msg("Beginner-Tutorial to wait ...")
yield 5
self.msg("... This shows after 5 seconds. Waiting ...")
@@ -408,7 +408,7 @@ the current execution of your command and wait for more before processing.
Here’s a very simple example:
class CmdConfirm(Command):
- """
+ """
A dummy command to show confirmation.
Usage:
diff --git a/docs/1.0/Components/EvEditor.html b/docs/1.0/Components/EvEditor.html
index b65f7eadea..778675bc5c 100644
--- a/docs/1.0/Components/EvEditor.html
+++ b/docs/1.0/Components/EvEditor.html
@@ -145,7 +145,7 @@ It has no other mechanical function.
from evennia.utils import eveditor
class CmdSetTestAttr(Command):
- """
+ """
Set the "test" Attribute using
the line editor.
@@ -194,7 +194,7 @@ functions will be stored, Python will need to find them.
caller.msg("Editor exited")
class CmdSetTestAttr(Command):
- """
+ """
Set the "test" Attribute using
the line editor.
diff --git a/docs/1.0/Components/EvMenu.html b/docs/1.0/Components/EvMenu.html
index b143246b06..9959e1a5af 100644
--- a/docs/1.0/Components/EvMenu.html
+++ b/docs/1.0/Components/EvMenu.html
@@ -145,16 +145,16 @@
EvMenu¶
-Is your answer yes or no?
+Is your answer yes or no?
_________________________________________
-[Y]es! - Answer yes.
-[N]o! - Answer no.
-[A]bort - Answer neither, and abort.
+[Y]es! - Answer yes.
+[N]o! - Answer no.
+[A]bort - Answer neither, and abort.
-> Y
-You chose yes!
+> Y
+You chose yes!
-Thanks for your answer. Goodbye!
+Thanks for your answer. Goodbye!
EvMenu is used for generate branching multi-choice menus. Each menu ‘node’ can
@@ -575,7 +575,7 @@ needed. Here is an example:
class MyEvMenu(EvMenu):
def nodetext_formatter(self, nodetext):
- """
+ """
Format the node text itself.
Args:
@@ -587,7 +587,7 @@ needed. Here is an example:
"""
def helptext_formatter(self, helptext):
- """
+ """
Format the node's help text
Args:
@@ -599,7 +599,7 @@ needed. Here is an example:
"""
def options_formatter(self, optionlist):
- """
+ """
Formats the option block.
Args:
@@ -613,7 +613,7 @@ needed. Here is an example:
"""
def node_formatter(self, nodetext, optionstext):
- """
+ """
Formats the entirety of the node.
Args:
@@ -835,7 +835,7 @@ enter will be sent into the callback for whatever processing you want.
from evennia.utils.evmenu import get_input
def callback(caller, prompt, user_input):
- """
+ """
This is a callback you define yourself.
Args:
@@ -965,7 +965,7 @@ helper function accessed as def define_character(caller):
text = \
- """
+ """
What aspect of your character do you want
to change next?
"""
diff --git a/docs/1.0/Components/FuncParser.html b/docs/1.0/Components/FuncParser.html
index f9d5681041..0ef2da1362 100644
--- a/docs/1.0/Components/FuncParser.html
+++ b/docs/1.0/Components/FuncParser.html
@@ -121,7 +121,7 @@
from evennia.utils.funcparser import FuncParser
def _power_callable(*args, **kwargs):
- """This will be callable as $pow(number, power=<num>) in string"""
+ """This will be callable as $pow(number, power=<num>) in string"""
pow = int(kwargs.get('power', 2))
return float(args[0]) ** pow
@@ -322,7 +322,7 @@ representation.
from evennia.utils.utils import safe_convert_to_types
def _process_callable(*args, **kwargs):
- """
+ """
$process(expression, local, extra1=34, extra2=foo)
"""
diff --git a/docs/1.0/Components/Help-System.html b/docs/1.0/Components/Help-System.html
index 84336939fd..bafe37f17a 100644
--- a/docs/1.0/Components/Help-System.html
+++ b/docs/1.0/Components/Help-System.html
@@ -120,33 +120,33 @@
Help System¶
-> help theatre
+> help theatre
------------------------------------------------------------------------------
-Help for The theatre (aliases: the hub, curtains)
+Help for The theatre (aliases: the hub, curtains)
-The theatre is at the centre of the city, both literally and figuratively ...
-(A lot more text about it follows ...)
+The theatre is at the centre of the city, both literally and figuratively ...
+(A lot more text about it follows ...)
Subtopics:
- theatre/lore
- theatre/layout
- theatre/dramatis personae
+ theatre/lore
+ theatre/layout
+ theatre/dramatis personae
------------------------------------------------------------------------------
-> help evennia
+> help evennia
------------------------------------------------------------------------------
-No help found
+No help found
-There is no help topic matching 'evennia'.
-... But matches where found within the help texts of the suggestions below.
+There is no help topic matching 'evennia'.
+... But matches where found within the help texts of the suggestions below.
Suggestions:
- grapevine2chan, about, irc2chan
+ grapevine2chan, about, irc2chan
-----------------------------------------------------------------------------
@@ -250,7 +250,7 @@ server and the file-based help entries will be available to view.
from evennia import Command
class MyCommand(Command):
- """
+ """
This command is great!
Usage:
@@ -290,7 +290,7 @@ everyone can read the help entry.
For Commands you set the help-related locks the same way you would any lock:
class MyCommand(Command):
- """
+ """
<docstring for command>
"""
key = "mycommand"
diff --git a/docs/1.0/Components/Objects.html b/docs/1.0/Components/Objects.html
index 1d9aa5ecaa..9eb9243b17 100644
--- a/docs/1.0/Components/Objects.html
+++ b/docs/1.0/Components/Objects.html
@@ -169,7 +169,7 @@ spend most time working with. Objects are from typeclasses.objects import Object
class Rose(Object):
- """
+ """
This creates a simple rose object
"""
def at_object_creation(self):
diff --git a/docs/1.0/Components/Prototypes.html b/docs/1.0/Components/Prototypes.html
index cde98c46bf..9d7ea6cce7 100644
--- a/docs/1.0/Components/Prototypes.html
+++ b/docs/1.0/Components/Prototypes.html
@@ -123,9 +123,9 @@
Spawner and Prototypes¶
-> spawn goblin
+> spawn goblin
-Spawned Goblin Grunt(#45)
+Spawned Goblin Grunt(#45)
The spawner is a system for defining and creating individual objects from a base template called a prototype. It is only designed for use with in-game Objects, not any other type of entity.
@@ -235,7 +235,7 @@ may use the prototype to create new objects.
Here is how a protfunc is defined (same as other funcparser functions).
# this is a silly example, you can just color the text red with |r directly!
def red(*args, **kwargs):
- """
+ """
Usage: $red(<text>)
Returns the same text you entered, but red.
"""
diff --git a/docs/1.0/Components/Scripts.html b/docs/1.0/Components/Scripts.html
index c382a39fcc..f59d064bbb 100644
--- a/docs/1.0/Components/Scripts.html
+++ b/docs/1.0/Components/Scripts.html
@@ -212,7 +212,7 @@ can use this as a base for your own scripts.
class MyScript(Script):
def at_script_creation(self):
- """Called once, when script is first created"""
+ """Called once, when script is first created"""
self.key = "myscript"
self.db.foo = "bar"
@@ -315,7 +315,7 @@ If so, the ‘parent object’ will be available to the script as either import random
class Weather(Script):
- """
+ """
A timer script that displays weather info. Meant to
be attached to a room.
diff --git a/docs/1.0/Components/Website.html b/docs/1.0/Components/Website.html
index 3b8431fb6f..554b4d1a2e 100644
--- a/docs/1.0/Components/Website.html
+++ b/docs/1.0/Components/Website.html
@@ -282,13 +282,13 @@ around it!
browser without cache (Ctrl-F5 in Firefox, for example).
As an example, add/copy custom.css to mygame/web/static/website/css/ and add the following:
-.navbar {
- background-color: #7a3d54;
-}
+.navbar {
+ background-color: #7a3d54;
+}
-.footer {
- background-color: #7a3d54;
-}
+.footer {
+ background-color: #7a3d54;
+}
Reload and your website now has a red theme!
diff --git a/docs/1.0/Concepts/Connection-Styles.html b/docs/1.0/Concepts/Connection-Styles.html
index 8441763b33..081fdabd1e 100644
--- a/docs/1.0/Concepts/Connection-Styles.html
+++ b/docs/1.0/Concepts/Connection-Styles.html
@@ -108,7 +108,7 @@
Character connection styles¶
-> login Foobar password123
+> login Foobar password123
Evennia supports multiple ways for players to connect to the game. This allows Evennia to mimic the behavior of various other servers, or open things up for a custom solution.
diff --git a/docs/1.0/Concepts/Messagepath.html b/docs/1.0/Concepts/Messagepath.html
index 898ecf3991..18a688aa9f 100644
--- a/docs/1.0/Concepts/Messagepath.html
+++ b/docs/1.0/Concepts/Messagepath.html
@@ -119,14 +119,14 @@
The Message path¶
-> look
+> look
-A Meadow
+A Meadow
-This is a beautiful meadow. It is full of flowers.
+This is a beautiful meadow. It is full of flowers.
-You see: a flower
-Exits: north, east
+You see: a flower
+Exits: north, east
When you send a command like look into Evennia - what actually happens? How does that look string end up being handled by the CmdLook class? What happens when we use e.g. caller.msg() to send the message back
diff --git a/docs/1.0/Concepts/Protocols.html b/docs/1.0/Concepts/Protocols.html
index 29dae04a9a..9347e3e7a5 100644
--- a/docs/1.0/Concepts/Protocols.html
+++ b/docs/1.0/Concepts/Protocols.html
@@ -225,7 +225,7 @@ Evennia-specific inputs.
# the Evennia internals.
def disconnect(self, reason=None):
- """
+ """
Called when connection closes.
This can also be called directly by Evennia when manually closing the connection.
Do any cleanups here.
@@ -233,12 +233,12 @@ Evennia-specific inputs.
self.sessionhandler.disconnect(self)
def at_login(self):
- """
+ """
Called when this session authenticates by the server (if applicable)
"""
def data_in(self, **kwargs):
- """
+ """
Data going into the server should go through this method. It
should pass data into `sessionhandler.data_in`. THis will be called
by the sessionhandler with the data it gets from the approrpriate
@@ -247,7 +247,7 @@ Evennia-specific inputs.
self.sessionhandler.data_in(self, text=kwargs['data'])
def data_out(self, **kwargs):
- """
+ """
Data going out from the server should go through this method. It should
hand off to the protocol's send method, whatever it's called.
"""
@@ -258,14 +258,14 @@ Evennia-specific inputs.
# with `msg(outfunc_name=<data>)`.
def send_text(self, txt, *args, **kwargs):
- """
+ """
Send text, used with e.g. `session.msg(text="foo")`
"""
# we make use of the
self.data_out(text=txt)
def send_default(self, cmdname, *args, **kwargs):
- """
+ """
Handles all outputfuncs without an explicit `send_*` method to handle them.
"""
self.data_out(**{cmdname: str(args)})
diff --git a/docs/1.0/Contribs/Contrib-Building-Menu.html b/docs/1.0/Contribs/Contrib-Building-Menu.html
index 42ff4551f0..2adb7f6eab 100644
--- a/docs/1.0/Contribs/Contrib-Building-Menu.html
+++ b/docs/1.0/Contribs/Contrib-Building-Menu.html
@@ -259,7 +259,7 @@ here, feel free to organize the code differently):
class EditCmd(Command):
- """
+ """
Editing command.
Usage:
@@ -336,7 +336,7 @@ at the top of the file:
And in the class below (CharacterCmdSet), add the last line of this code:
class CharacterCmdSet(default_cmds.CharacterCmdSet):
- """
+ """
The `CharacterCmdSet` contains general in-game commands like `look`,
`get`, etc available on in-game Character objects. It is merged with
the `AccountCmdSet` when an Account puppets a Character.
@@ -344,7 +344,7 @@ at the top of the file:
key = "DefaultCharacter"
def at_cmdset_creation(self):
- """
+ """
Populates the cmdset
"""
super().at_cmdset_creation()
@@ -364,7 +364,7 @@ the RoomBuildingMen
class RoomBuildingMenu(BuildingMenu):
- """
+ """
Building menu to edit a room.
For the time being, we have only one choice: key, to edit the room key.
@@ -456,7 +456,7 @@ class, with a method and a single line of code within, we’ve added a menu with
Let’s examine our code again:
class RoomBuildingMenu(BuildingMenu):
- """
+ """
Building menu to edit a room.
For the time being, we have only one choice: key, to edit the room key.
@@ -523,7 +523,7 @@ can specify the title and key of this menu. You can also call a function when t
commands/building.py to see it):
class RoomBuildingMenu(BuildingMenu):
- """
+ """
Building menu to edit a room.
"""
@@ -626,7 +626,7 @@ example using some of these arguments (again, replace the commands/building.py with the following code to see it working):
class RoomBuildingMenu(BuildingMenu):
- """
+ """
Building menu to edit a room.
For the time being, we have only one choice: key, to edit the room key.
@@ -720,7 +720,7 @@ great. Perhaps even add new exits?
it’s explained below:
class RoomBuildingMenu(BuildingMenu):
- """
+ """
Building menu to edit a room.
"""
@@ -741,7 +741,7 @@ it’s explained below:
# Menu functions
def glance_exits(room):
- """Show the room exits."""
+ """Show the room exits."""
if room.exits:
glance = ""
for exit in room.exits:
@@ -813,7 +813,7 @@ callback. To see it in action, as usual, replace the class and functions in class RoomBuildingMenu(BuildingMenu):
- """
+ """
Building menu to edit a room.
"""
@@ -834,7 +834,7 @@ callback. To see it in action, as usual, replace the class and functions in # Menu functions
def glance_exits(room):
- """Show the room exits."""
+ """Show the room exits."""
if room.exits:
glance = ""
for exit in room.exits:
@@ -845,7 +845,7 @@ callback. To see it in action, as usual, replace the class and functions in return "\n |gNo exit yet|n"
def text_exits(caller, room):
- """Show the room exits in the choice itself."""
+ """Show the room exits in the choice itself."""
text = "-" * 79
text += "\n\nRoom exits:"
text += "\n Use |y@c|n to create a new exit."
@@ -1014,7 +1014,7 @@ explanations next!
class RoomBuildingMenu(BuildingMenu):
- """
+ """
Building menu to edit a room.
For the time being, we have only one choice: key, to edit the room key.
@@ -1040,7 +1040,7 @@ explanations next!
# Menu functions
def glance_exits(room):
- """Show the room exits."""
+ """Show the room exits."""
if room.exits:
glance = ""
for exit in room.exits:
@@ -1051,7 +1051,7 @@ explanations next!
return "\n |gNo exit yet|n"
def text_exits(caller, room):
- """Show the room exits in the choice itself."""
+ """Show the room exits in the choice itself."""
text = "-" * 79
text += "\n\nRoom exits:"
text += "\n Use |y@c|n to create a new exit."
@@ -1071,7 +1071,7 @@ explanations next!
return text
def nomatch_exits(menu, caller, room, string):
- """
+ """
The user typed something in the list of exits. Maybe an exit name?
"""
string = string[3:]
@@ -1086,7 +1086,7 @@ explanations next!
# Exit sub-menu
def text_single_exit(menu, caller):
- """Show the text to edit single exits."""
+ """Show the text to edit single exits."""
exit = menu.keys[1]
if exit is None:
return ""
@@ -1100,7 +1100,7 @@ explanations next!
"""
def nomatch_single_exit(menu, caller, room, string):
- """The user entered something in the exit sub-menu. Replace the exit key."""
+ """The user entered something in the exit sub-menu. Replace the exit key."""
# exit is the second key element: keys should contain ['e', <Exit object>]
exit = menu.keys[1]
if exit is None:
@@ -1163,7 +1163,7 @@ depending on what you want to achieve. So let’s build two menus:
class RoomBuildingMenu(BuildingMenu):
- """
+ """
Building menu to edit a room.
"""
@@ -1184,7 +1184,7 @@ depending on what you want to achieve. So let’s build two menus:
# Menu functions
def glance_exits(room):
- """Show the room exits."""
+ """Show the room exits."""
if room.exits:
glance = ""
for exit in room.exits:
@@ -1195,7 +1195,7 @@ depending on what you want to achieve. So let’s build two menus:
return "\n |gNo exit yet|n"
def text_exits(caller, room):
- """Show the room exits in the choice itself."""
+ """Show the room exits in the choice itself."""
text = "-" * 79
text += "\n\nRoom exits:"
text += "\n Use |y@c|n to create a new exit."
@@ -1215,7 +1215,7 @@ depending on what you want to achieve. So let’s build two menus:
return text
def nomatch_exits(menu, caller, room, string):
- """
+ """
The user typed something in the list of exits. Maybe an exit name?
"""
string = string[3:]
@@ -1230,7 +1230,7 @@ depending on what you want to achieve. So let’s build two menus:
class ExitBuildingMenu(BuildingMenu):
- """
+ """
Building menu to edit an exit.
"""
diff --git a/docs/1.0/Contribs/Contrib-Crafting.html b/docs/1.0/Contribs/Contrib-Crafting.html
index b7c5087631..784ab148af 100644
--- a/docs/1.0/Contribs/Contrib-Crafting.html
+++ b/docs/1.0/Contribs/Contrib-Crafting.html
@@ -185,7 +185,7 @@ there:
class RecipeBread(CraftingRecipe):
- """
+ """
Bread is good for making sandwitches!
"""
@@ -239,7 +239,7 @@ example setting:
from evennia.contrib.game_systems.crafting import CraftingRecipe
class WoodenPuppetRecipe(CraftingRecipe):
- """A puppet""""
+ """A puppet""""
name = "wooden puppet" # name to refer to this recipe as
tool_tags = ["knife"]
consumable_tags = ["wood"]
@@ -283,7 +283,7 @@ know ingredients.
recipe’s requirements. This is great for testing.
Assuming these objects were put in our inventory, we could now craft using the
in-game command:
-> craft wooden puppet from wood using hobby knife
+> craft wooden puppet from wood using hobby knife
In code we would do
@@ -343,12 +343,12 @@ parent class and have your recipes inherit from this.
from evennia.contrib.game_systems.crafting import CraftingRecipe
class SkillRecipe(CraftingRecipe):
- """A recipe that considers skill"""
+ """A recipe that considers skill"""
difficulty = 20
def craft(self, **kwargs):
- """The input is ok. Determine if crafting succeeds"""
+ """The input is ok. Determine if crafting succeeds"""
# this is set at initialization
crafter = self.crafte
diff --git a/docs/1.0/Contribs/Contrib-Ingame-Python.html b/docs/1.0/Contribs/Contrib-Ingame-Python.html
index c4f49626af..a820071661 100644
--- a/docs/1.0/Contribs/Contrib-Ingame-Python.html
+++ b/docs/1.0/Contribs/Contrib-Ingame-Python.html
@@ -340,7 +340,7 @@ this:
from evennia.contrib.base_systems.ingame_python.commands import CmdCallback
class CharacterCmdSet(default_cmds.CharacterCmdSet):
- """
+ """
The `CharacterCmdSet` contains general in-game commands like `look`,
`get`, etc available on in-game Character objects. It is merged with
the `PlayerCmdSet` when a Player puppets a Character.
@@ -348,7 +348,7 @@ this:
key = "DefaultCharacter"
def at_cmdset_creation(self):
- """
+ """
Populates the cmdset
"""
super().at_cmdset_creation()
@@ -830,7 +830,7 @@ write something like:
@register_events
class Object(EventObject):
- """
+ """
Class representing objects.
"""
@@ -881,7 +881,7 @@ of an object. If this object is valid, it will call its “push” event.
class CmdPush(Command):
- """
+ """
Push something.
Usage:
@@ -894,7 +894,7 @@ of an object. If this object is valid, it will call its “push” event.
key = "push"
def func(self):
- """Called when pushing something."""
+ """Called when pushing something."""
if not self.args.strip():
self.msg("Usage: push <something>")
return
diff --git a/docs/1.0/Contribs/Contrib-Mapbuilder-Tutorial.html b/docs/1.0/Contribs/Contrib-Mapbuilder-Tutorial.html
index ff59827e70..79f915768a 100644
--- a/docs/1.0/Contribs/Contrib-Mapbuilder-Tutorial.html
+++ b/docs/1.0/Contribs/Contrib-Mapbuilder-Tutorial.html
@@ -354,7 +354,7 @@ of characters allowing us to pick out the characters we need.
world_map = world_map.split('\n')
def return_map():
- """
+ """
This function returns the whole map
"""
map = ""
@@ -367,7 +367,7 @@ of characters allowing us to pick out the characters we need.
return map
def return_minimap(x, y, radius = 2):
- """
+ """
This function returns only part of the map.
Returning all chars in a 2 char radius from (x,y)
"""
diff --git a/docs/1.0/Contribs/Contrib-Mapbuilder.html b/docs/1.0/Contribs/Contrib-Mapbuilder.html
index a895779f22..71d80d30a3 100644
--- a/docs/1.0/Contribs/Contrib-Mapbuilder.html
+++ b/docs/1.0/Contribs/Contrib-Mapbuilder.html
@@ -222,7 +222,7 @@ convenience The below example code should be in '''
def example1_build_forest(x, y, **kwargs):
- '''A basic example of build instructions. Make sure to include **kwargs
+ '''A basic example of build instructions. Make sure to include **kwargs
in the arguments and return an instance of the room for exit generation.'''
# Create a room and provide a basic description.
@@ -237,7 +237,7 @@ convenience The below example code should be in def example1_build_mountains(x, y, **kwargs):
- '''A room that is a little more advanced'''
+ '''A room that is a little more advanced'''
# Create the room.
room = create_object(rooms.Room, key="mountains" + str(x) + str(y))
@@ -263,7 +263,7 @@ convenience The below example code should be in def example1_build_temple(x, y, **kwargs):
- '''A unique room that does not need to be as general'''
+ '''A unique room that does not need to be as general'''
# Create the room.
room = create_object(rooms.Room, key="temple" + str(x) + str(y))
@@ -325,7 +325,7 @@ convenience The below example code should be in '''
def example2_build_forest(x, y, **kwargs):
- '''A basic room'''
+ '''A basic room'''
# If on anything other than the first iteration - Do nothing.
if kwargs["iteration"] > 0:
return None
@@ -338,7 +338,7 @@ convenience The below example code should be in return room
def example2_build_verticle_exit(x, y, **kwargs):
- '''Creates two exits to and from the two rooms north and south.'''
+ '''Creates two exits to and from the two rooms north and south.'''
# If on the first iteration - Do nothing.
if kwargs["iteration"] == 0:
return
@@ -359,7 +359,7 @@ convenience The below example code should be in def example2_build_horizontal_exit(x, y, **kwargs):
- '''Creates two exits to and from the two rooms east and west.'''
+ '''Creates two exits to and from the two rooms east and west.'''
# If on the first iteration - Do nothing.
if kwargs["iteration"] == 0:
return
diff --git a/docs/1.0/Contribs/Contrib-Unixcommand.html b/docs/1.0/Contribs/Contrib-Unixcommand.html
index abbdd6268c..e20e76626e 100644
--- a/docs/1.0/Contribs/Contrib-Unixcommand.html
+++ b/docs/1.0/Contribs/Contrib-Unixcommand.html
@@ -128,7 +128,7 @@ should normally not override the normal class CmdPlant(UnixCommand):
- '''
+ '''
Plant a tree or plant.
This command is used to plant something in the room you are in.
diff --git a/docs/1.0/Contribs/Contrib-XYZGrid.html b/docs/1.0/Contribs/Contrib-XYZGrid.html
index 47eec06b5b..37ab8f077b 100644
--- a/docs/1.0/Contribs/Contrib-XYZGrid.html
+++ b/docs/1.0/Contribs/Contrib-XYZGrid.html
@@ -1073,11 +1073,11 @@ added, with different map-legend symbols:
"""
class TransitionToMapA(xymap_legend.MapTransitionNode):
- """Transition to MapA"""
+ """Transition to MapA"""
target_map_xyz = (1, 4, "mapA")
class TransitionToMapC(xymap_legend.MapTransitionNode):
- """Transition to MapB"""
+ """Transition to MapB"""
target_map_xyz = (12, 14, "mapC")
LEGEND = {
diff --git a/docs/1.0/Contributing-Docs.html b/docs/1.0/Contributing-Docs.html
index 3c86a0c76a..f1eefb9497 100644
--- a/docs/1.0/Contributing-Docs.html
+++ b/docs/1.0/Contributing-Docs.html
@@ -406,7 +406,7 @@ class CmdEcho(Command):
from evennia import Command
class CmdEcho(Command):
- """
+ """
Usage: echo <arg>
"""
key = "echo"
@@ -434,9 +434,9 @@ Indent returns from the game.
```
-> look at flower
- Red Flower(#34)
- A flower with red petals.
+> look at flower
+ Red Flower(#34)
+ A flower with red petals.
For actual shell prompts you can either use bash language type or just indent the line.
@@ -449,8 +449,8 @@ evennia/ mygame/
evennia start --log
-$ ls
-evennia/ mygame/
+$ ls
+evennia/ mygame/
evennia start --log
@@ -604,7 +604,7 @@ class CmdEcho(Command):
7
8
from evennia import Command
class CmdEcho(Command):
- """
+ """
Usage: echo <arg>
"""
key = "echo"
diff --git a/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Adding-Commands.html b/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Adding-Commands.html
index 874048a917..b4feeb7093 100644
--- a/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Adding-Commands.html
+++ b/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Adding-Commands.html
@@ -137,7 +137,7 @@ database. They are “just” normal Python classes.
# from evennia import default_cmds
class Command(BaseCommand):
- """
+ """
(class docstring)
"""
pass
@@ -234,7 +234,7 @@ current cmdset (self.cmdset): ChannelCmdSet
# ...
class CmdEcho(Command):
- """
+ """
A simple echo command
Usage:
@@ -276,7 +276,7 @@ Echo: 'Woo Tang!'
# ...
class CmdEcho(Command):
- """
+ """
A simple echo command
Usage:
@@ -356,7 +356,7 @@ You hit <target> with full force!
23
# ...
class CmdHit(Command):
- """
+ """
Hit a target.
Usage:
diff --git a/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Evennia-Library-Overview.html b/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Evennia-Library-Overview.html
index f1dee65b0f..4aa9d31e88 100644
--- a/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Evennia-Library-Overview.html
+++ b/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Evennia-Library-Overview.html
@@ -194,7 +194,7 @@ from here to mygame
from evennia import DefaultObject
class Object(DefaultObject):
- """
+ """
class docstring
"""
pass
diff --git a/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Learning-Typeclasses.html b/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Learning-Typeclasses.html
index 0ec22adcb2..ac405a265b 100644
--- a/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Learning-Typeclasses.html
+++ b/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Learning-Typeclasses.html
@@ -132,7 +132,7 @@ and Smaug and made them fly and breathe fire. So far our dragons are short-lived
This is what you should have in mygame/typeclasses/monsters.py so far:
class Monster:
- """
+ """
This is a base class for Monsters.
"""
@@ -144,7 +144,7 @@ and Smaug and made them fly and breathe fire. So far our dragons are short-lived
class Dragon(Monster):
- """
+ """
This is a dragon-specific monster.
"""
@@ -153,7 +153,7 @@ and Smaug and made them fly and breathe fire. So far our dragons are short-lived
print("The world trembles.")
def firebreath(self):
- """
+ """
Let our dragon breathe fire.
"""
print(f"{self.key} breathes fire!")
@@ -170,13 +170,13 @@ open it:
from evennia import DefaultObject
class ObjectParent:
- """
+ """
class docstring
"""
pass
class Object(ObjectParent, DefaultObject):
- """
+ """
class docstring
"""
pass
@@ -191,7 +191,7 @@ of your Objectsfrom typeclasses.objects import Object
class Monster(Object):
- """
+ """
This is a base class for Monsters.
"""
def move_around(self):
@@ -199,7 +199,7 @@ of your Objectsclass Dragon(Monster):
- """
+ """
This is a dragon-specific Monster.
"""
@@ -208,7 +208,7 @@ of your Objectsprint("The world trembles.")
def firebreath(self):
- """
+ """
Let our dragon breathe fire.
"""
print(f"{self.key} breathes fire!")
@@ -435,7 +435,7 @@ add your own BASE_O
from evennia import DefaultCharacter
class Character(DefaultCharacter):
- """
+ """
(class docstring)
"""
pass
@@ -483,7 +483,7 @@ commands available to you at a given moment.
Let’s try something simple first. Back in mygame/typeclasses/characters.py:
class Character(DefaultCharacter):
- """
+ """
(class docstring)
"""
@@ -492,7 +492,7 @@ commands available to you at a given moment.
intelligence = 15
def get_stats(self):
- """
+ """
Get the main stats of this character
"""
return self.strength, self.dexterity, self.intelligence
@@ -545,12 +545,12 @@ Strength is 10.
mygame/typeclasses/characters.py like this:
class Character(DefaultCharacter):
- """
+ """
(class docstring)
"""
def get_stats(self):
- """
+ """
Get the main stats of this character
"""
return self.db.strength, self.db.dexterity, self.db.intelligence
@@ -602,7 +602,7 @@ AttributeError: 'Character' object has no attribute 'strength'
import random
class Character(DefaultCharacter):
- """
+ """
(class docstring)
"""
@@ -612,7 +612,7 @@ AttributeError: 'Character' object has no attribute 'strength'
self.db.intelligence = random.randint(3, 18)
def get_stats(self):
- """
+ """
Get the main stats of this character
"""
return self.db.strength, self.db.dexterity, self.db.intelligence
diff --git a/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Making-A-Sittable-Object.html b/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Making-A-Sittable-Object.html
index 940034f0bd..160a1d17fd 100644
--- a/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Making-A-Sittable-Object.html
+++ b/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Making-A-Sittable-Object.html
@@ -140,7 +140,7 @@ This requires a change to our Character typeclass. Open # ...
def at_pre_move(self, destination):
- """
+ """
Called by self.move_to when trying to move somewhere. If this returns
False, the move is immediately cancelled.
"""
@@ -189,7 +189,7 @@ will call character
class Sittable(Object):
def do_sit(self, sitter):
- """
+ """
Called when trying to sit on/in this object.
Args:
@@ -239,7 +239,7 @@ will call character
17
# add this right after the `do_sit method` in the same class
def do_stand(self, stander):
- """
+ """
Called when trying to stand from this object.
Args:
@@ -323,7 +323,7 @@ will call character
class Sittable(DefaultObject):
def do_sit(self, sitter):
- """
+ """
Called when trying to sit on/in this object.
Args:
@@ -345,7 +345,7 @@ will call character
sitter.msg(f"You sit {adjective} {self.key}")
def do_stand(self, stander):
- """
+ """
Called when trying to stand from this object.
Args:
@@ -459,7 +459,7 @@ As you sit down in armchair, life feels easier.
from evennia import Command, CmdSet
class CmdSit(Command):
- """
+ """
Sit down.
"""
key = "sit"
@@ -467,7 +467,7 @@ As you sit down in armchair, life feels easier.
self.obj.do_sit(self.caller)
class CmdStand(Command):
- """
+ """
Stand up.
"""
key = "stand"
@@ -505,7 +505,7 @@ As you sit down in armchair, life feels easier.
from commands.sittables import CmdSetSit
class Sittable(DefaultObject):
- """
+ """
(docstring)
"""
def at_object_creation(self):
@@ -564,7 +564,7 @@ of mygame/commands/
# ...
class CmdNoSitStand(Command):
- """
+ """
Sit down or Stand up
"""
key = "sit"
@@ -588,7 +588,7 @@ of mygame/commands/
from commands import sittables
class CharacterCmdSet(CmdSet):
- """
+ """
(docstring)
"""
def at_cmdset_creation(self):
@@ -648,7 +648,7 @@ More than one match for 'stand' (please narrow target):
# ...
class CmdStand(Command):
- """
+ """
Stand up.
"""
key = "stand"
@@ -672,7 +672,7 @@ What will be checked is the # ...
def sitsonthis(accessing_obj, accessed_obj, *args, **kwargs):
- """
+ """
True if accessing_obj is sitting on/in the accessed_obj.
"""
return accessed_obj.db.sitting == accessing_obj
@@ -775,7 +775,7 @@ You stand up from chair.
# new from here
class CmdSit2(Command):
- """
+ """
Sit down.
Usage:
@@ -836,7 +836,7 @@ You stand up from chair.
21
# end of mygame/commands/sittables.py
class CmdStand2(Command):
- """
+ """
Stand up.
Usage:
@@ -867,7 +867,7 @@ You stand up from chair.
from commands import sittables
class CharacterCmdSet(CmdSet):
- """
+ """
(docstring)
"""
def at_cmdset_creation(self):
diff --git a/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-More-on-Commands.html b/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-More-on-Commands.html
index c7e0e40c01..f827553e53 100644
--- a/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-More-on-Commands.html
+++ b/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-More-on-Commands.html
@@ -180,7 +180,7 @@ you are in a hurry. Time to modify 43
#...
class CmdHit(Command):
- """
+ """
Hit a target.
Usage:
diff --git a/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Python-classes-and-objects.html b/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Python-classes-and-objects.html
index 12a3061855..e3ff36bd17 100644
--- a/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Python-classes-and-objects.html
+++ b/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Python-classes-and-objects.html
@@ -232,13 +232,13 @@ imports at the top, resources that are then used by all code in that module.
from evennia import DefaultObject
class ObjectParent:
- """
+ """
class docstring
"""
pass
class Object(DefaultObject):
- """
+ """
class docstring
"""
pass
@@ -389,7 +389,7 @@ objects in turn. Some examples:
Let’s expand mygame/typeclasses/monsters.py with another class:
class Monster:
- """
+ """
This is a base class for Monster.
"""
@@ -401,7 +401,7 @@ objects in turn. Some examples:
class Dragon(Monster):
- """
+ """
This is a dragon monster.
"""
@@ -409,7 +409,7 @@ objects in turn. Some examples:
print(f"{self.key} flies through the air high above!")
def firebreath(self):
- """
+ """
Let our dragon breathe fire.
"""
print(f"{self.key} breathes fire!")
diff --git a/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Searching-Things.html b/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Searching-Things.html
index e8930a6000..1505f77bdb 100644
--- a/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Searching-Things.html
+++ b/docs/1.0/Howtos/Beginner-Tutorial/Part1/Beginner-Tutorial-Searching-Things.html
@@ -171,7 +171,7 @@ What is returned from the main search functions is actually a `queryset`. They c
from evennia import Command
class CmdQuickFind(Command):
- """
+ """
Find an item in your current location.
Usage:
diff --git a/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Characters.html b/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Characters.html
index 2e332a4339..a844bcff1e 100644
--- a/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Characters.html
+++ b/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Characters.html
@@ -212,7 +212,7 @@ since it can also get confusing to follow the code.
is_pc = False
def heal(self, hp):
- """
+ """
Heal hp amount of health, not allowing to exceed our max hp
"""
@@ -223,30 +223,30 @@ since it can also get confusing to follow the code.
self.msg(f"You heal for {healed} HP.")
def at_pay(self, amount):
- """When paying coins, make sure to never detract more than we have"""
+ """When paying coins, make sure to never detract more than we have"""
amount = min(amount, self.coins)
self.coins -= amount
return amount
def at_damage(self, damage, attacker=None):
- """Called when attacked and taking damage."""
+ """Called when attacked and taking damage."""
self.hp -= damage
def at_defeat(self):
- """Called when defeated. By default this means death."""
+ """Called when defeated. By default this means death."""
self.at_death()
def at_death(self):
- """Called when this thing dies."""
+ """Called when this thing dies."""
# this will mean different things for different living things
pass
def at_do_loot(self, looted):
- """Called when looting another entity"""
+ """Called when looting another entity"""
looted.at_looted(self)
def at_looted(self, looter):
- """Called when looted by another entity"""
+ """Called when looted by another entity"""
# default to stealing some coins
max_steal = dice.roll("1d10")
@@ -271,7 +271,7 @@ in the mixin means we can expect these methods to be available for all living th
class EvAdventureCharacter(LivingMixin, DefaultCharacter):
- """
+ """
A character to use for EvAdventure.
"""
is_pc = True
@@ -291,7 +291,7 @@ in the mixin means we can expect these methods to be available for all living th
coins = AttributeProperty(0)
def at_defeat(self):
- """Characters roll on the death table"""
+ """Characters roll on the death table"""
if self.location.allow_death:
# this allow rooms to have non-lethal battles
dice.roll_death(self)
@@ -302,7 +302,7 @@ in the mixin means we can expect these methods to be available for all living th
self.heal(self.hp_max)
def at_death(self):
- """We rolled 'dead' on the death table."""
+ """We rolled 'dead' on the death table."""
self.location.msg_contents(
"$You() collapse in a heap, embraced by death.",
from_obj=self)
diff --git a/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Chargen.html b/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Chargen.html
index 5e1ed4e09d..9611402dbc 100644
--- a/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Chargen.html
+++ b/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Chargen.html
@@ -321,19 +321,19 @@ Abilities once. We will use this to know if it has been done or not.# in mygame/evadventure/chargen.py
_TEMP_SHEET = """
-{name}
+{name}
-STR +{strength}
-DEX +{dexterity}
-CON +{constitution}
-INT +{intelligence}
-WIS +{wisdom}
-CHA +{charisma}
+STR +{strength}
+DEX +{dexterity}
+CON +{constitution}
+INT +{intelligence}
+WIS +{wisdom}
+CHA +{charisma}
-{description}
+{description}
Your belongings:
-{equipment}
+{equipment}
"""
class TemporaryCharacterSheet:
@@ -451,7 +451,7 @@ created in the # this goes to the bottom of the module
def start_chargen(caller, session=None):
- """
+ """
This is a start point for spinning up the chargen from a command later.
"""
@@ -558,7 +558,7 @@ know this, we check the # after previous node
def _update_name(caller, raw_string, **kwargs):
- """
+ """
Used by node_change_name below to check what user
entered and update the name if appropriate.
@@ -571,7 +571,7 @@ know this, we check the def node_change_name(caller, raw_string, **kwargs):
- """
+ """
Change the random name of the character.
"""
@@ -632,7 +632,7 @@ were at.
def _swap_abilities(caller, raw_string, **kwargs):
- """
+ """
Used by node_swap_abilities to parse the user's input and swap ability
values.
@@ -664,7 +664,7 @@ were at.
def node_swap_abilities(caller, raw_string, **kwargs):
- """
+ """
One is allowed to swap the values of two abilities around, once.
"""
@@ -673,12 +673,12 @@ were at.
text = f"""
Your current abilities:
-STR +{tmp_character.strength}
-DEX +{tmp_character.dexterity}
-CON +{tmp_character.constitution}
-INT +{tmp_character.intelligence}
-WIS +{tmp_character.wisdom}
-CHA +{tmp_character.charisma}
+STR +{tmp_character.strength}
+DEX +{tmp_character.dexterity}
+CON +{tmp_character.constitution}
+INT +{tmp_character.intelligence}
+WIS +{tmp_character.wisdom}
+CHA +{tmp_character.charisma}
You can swap the values of two abilities around.
You can only do this once, so choose carefully!
@@ -710,7 +710,7 @@ node.
6.8. Node: Creating the Character¶
We get here from the main node by opting to finish chargen.
node_apply_character(caller, raw_string, **kwargs):
- """
+ """
End chargen and create the character. We will also puppet it.
"""
diff --git a/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Equipment.html b/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Equipment.html
index c06435b315..5f5bb95abe 100644
--- a/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Equipment.html
+++ b/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Equipment.html
@@ -173,7 +173,7 @@ for doing one specific thing (managing equipment, in our case).
self._load()
def _load(self):
- """Load our data from an Attribute on `self.obj`"""
+ """Load our data from an Attribute on `self.obj`"""
self.slots = self.obj.attributes.get(
self.save_attribute,
category="inventory",
@@ -188,7 +188,7 @@ for doing one specific thing (managing equipment, in our case).
)
def _save(self):
- """Save our data back to the same Attribute"""
+ """Save our data back to the same Attribute"""
self.obj.attributes.add(self.save_attribute, self.slots, category="inventory")
@@ -270,21 +270,21 @@ we will skip that for this tutorial.
# ...
def at_pre_object_receive(self, moved_object, source_location, **kwargs):
- """Called by Evennia before object arrives 'in' this character (that is,
+ """Called by Evennia before object arrives 'in' this character (that is,
if they pick up something). If it returns False, move is aborted.
"""
return self.equipment.validate_slot_usage(moved_object)
def at_object_receive(self, moved_object, source_location, **kwargs):
- """
+ """
Called by Evennia when an object arrives 'in' the character.
"""
self.equipment.add(moved_object)
def at_object_leave(self, moved_object, destination, **kwargs):
- """
+ """
Called by Evennia when object leaves the Character.
"""
@@ -306,7 +306,7 @@ we can use this, we need to go actually adding those methods.
from .enums import WieldLocation, Ability
class EquipmentError(TypeError):
- """All types of equipment-errors"""
+ """All types of equipment-errors"""
pass
class EquipmentHandler:
@@ -315,11 +315,11 @@ we can use this, we need to go actually adding those methods.
@property
def max_slots(self):
- """Max amount of slots, based on CON defense (CON + 10)"""
+ """Max amount of slots, based on CON defense (CON + 10)"""
return getattr(self.obj, Ability.CON.value, 1) + 10
def count_slots(self):
- """Count current slot usage"""
+ """Count current slot usage"""
slots = self.slots
wield_usage = sum(
getattr(slotobj, "size", 0) or 0
@@ -332,7 +332,7 @@ we can use this, we need to go actually adding those methods.
return wield_usage + backpack_usage
def validate_slot_usage(self, obj):
- """
+ """
Check if obj can fit in equipment, based on its size.
"""
@@ -436,7 +436,7 @@ it is (even if it was in your hands).
# ...
def add(self, obj):
- """
+ """
Put something in the backpack.
"""
self.validate_slot_usage(obj)
@@ -444,7 +444,7 @@ it is (even if it was in your hands).
self._save()
def remove(self, slot):
- """
+ """
Remove contents of a particular slot, for
example `equipment.remove(WieldLocation.SHIELD_HAND)`
"""
@@ -486,7 +486,7 @@ on the EquipmentHan
# ...
def move(self, obj):
- """Move object from backpack to its intended `inventory_use_slot`."""
+ """Move object from backpack to its intended `inventory_use_slot`."""
# make sure to remove from equipment/backpack first, to avoid double-adding
self.remove(obj)
@@ -539,7 +539,7 @@ from before. Anything we replace goes back to the backpack.
# ...
def all(self):
- """
+ """
Get all objects in inventory, regardless of location.
"""
slots = self.slots
diff --git a/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Objects.html b/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Objects.html
index 8193375fcc..f81a2b8c87 100644
--- a/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Objects.html
+++ b/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Objects.html
@@ -183,7 +183,7 @@ child classes to represent the relevant types:
class EvAdventureObject(DefaultObject):
- """
+ """
Base for all evadventure objects.
"""
@@ -196,14 +196,14 @@ child classes to represent the relevant types:
obj_type = ObjType.GEAR
def at_object_creation(self):
- """Called when this object is first created. We convert the .obj_type
+ """Called when this object is first created. We convert the .obj_type
property to a database tag."""
for obj_type in make_iter(self.obj_type):
self.tags.add(self.obj_type.value, category="obj_type")
def get_help(self):
- """Get any help text for this item"""
+ """Get any help text for this item"""
return "No help for this item"
@@ -267,11 +267,11 @@ is also Magical, for example.
class EvAdventureQuestObject(EvAdventureObject):
- """Quest objects should usually not be possible to sell or trade."""
+ """Quest objects should usually not be possible to sell or trade."""
obj_type = ObjType.QUEST
class EvAdventureTreasure(EvAdventureObject):
- """Treasure is usually just for selling for coin"""
+ """Treasure is usually just for selling for coin"""
obj_type = ObjType.TREASURE
value = AttributeProperty(100, autocreate=False)
@@ -287,22 +287,22 @@ anymore. An example would be a health potion.
# ...
class EvAdventureConsumable(EvAdventureObject):
- """An item that can be used up"""
+ """An item that can be used up"""
obj_type = ObjType.CONSUMABLE
value = AttributeProperty(0.25, autocreate=False)
uses = AttributeProperty(1, autocreate=False)
def at_pre_use(self, user, *args, **kwargs):
- """Called before using. If returning False, abort use."""
+ """Called before using. If returning False, abort use."""
return uses > 0
def at_use(self, user, *args, **kwargs):
- """Called when using the item"""
+ """Called when using the item"""
pass
def at_post_use(self. user, *args, **kwargs):
- """Called after using the item"""
+ """Called after using the item"""
# detract a usage, deleting the item if used up.
self.uses -= 1
if self.uses <= 0:
@@ -323,7 +323,7 @@ later, overriding a
# ...
class EvAdventureWeapon(EvAdventureObject):
- """Base class for all weapons"""
+ """Base class for all weapons"""
obj_type = ObjType.WEAPON
inventory_use_slot = AttributeProperty(WieldLocation.WEAPON_HAND, autocreate=False)
@@ -354,7 +354,7 @@ that is also a ‘consumable’ of sorts.
# ...
class EvAdventureRuneStone(EvAdventureWeapon, EvAdventureConsumable):
- """Base for all magical rune stones"""
+ """Base for all magical rune stones"""
obj_type = (ObjType.WEAPON, ObjType.MAGIC)
inventory_use_slot = WieldLocation.TWO_HANDS # always two hands for magic
@@ -366,13 +366,13 @@ that is also a ‘consumable’ of sorts.
damage_roll = AttibuteProperty("1d8", autocreate=False)
def at_post_use(self, user, *args, **kwargs):
- """Called after usage/spell was cast"""
+ """Called after usage/spell was cast"""
self.uses -= 1
# we don't delete the rune stone here, but
# it must be reset on next rest.
def refresh(self):
- """Refresh the rune stone (normally after rest)"""
+ """Refresh the rune stone (normally after rest)"""
self.uses = 1
diff --git a/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Rules.html b/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Rules.html
index 0f061e0ef3..f1d8333c3c 100644
--- a/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Rules.html
+++ b/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Rules.html
@@ -239,7 +239,7 @@ modules:
class EvAdventureRollEngine:
def roll(self, roll_string):
- """
+ """
Roll XdY dice, where X is the number of dice
and Y the number of sides per die.
@@ -358,7 +358,7 @@ Attribute is available as def saving_throw(self, character, bonus_type=Ability.STR, target=15,
advantage=False, disadvantage=False):
- """
+ """
Do a saving throw, trying to beat a target.
Args:
@@ -461,7 +461,7 @@ health on game entities. We will need # ...
def heal_from_rest(self, character):
- """
+ """
A night's rest retains 1d8 + CON HP
"""
@@ -540,7 +540,7 @@ early table results, for example).
# ...
def roll_random_table(self, dieroll, table_choices):
- """
+ """
Args:
dieroll (str): A die roll string, like "1d20".
table_choices (iterable): A list of either single elements or
@@ -707,7 +707,7 @@ character!
class TestEvAdventureRuleEngine(BaseEvenniaTest):
def setUp(self):
- """Called before every test method"""
+ """Called before every test method"""
super().setUp()
self.roll_engine = rules.EvAdventureRollEngine()
diff --git a/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Utilities.html b/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Utilities.html
index ebc8fbda51..f3ed212cc9 100644
--- a/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Utilities.html
+++ b/docs/1.0/Howtos/Beginner-Tutorial/Part3/Beginner-Tutorial-Utilities.html
@@ -198,7 +198,7 @@ likely gradually expand on your enums as you figure out what you’ll need).
# mygame/evadventure/enums.py
class Ability(Enum):
- """
+ """
The six base ability-bonuses and other
abilities
@@ -254,9 +254,9 @@ a function that produces a pretty display of any object we pass to it.
_OBJ_STATS = """
|c{key}|n
-Value: ~|y{value}|n coins{carried}
+Value: ~|y{value}|n coins{carried}
-{desc}
+{desc}
Slots: |w{size}|n, Used from: |w{use_slot_name}|n
Quality: |w{quality}|n, Uses: |wuses|n
@@ -266,7 +266,7 @@ a function that produces a pretty display of any object we pass to it.
def get_obj_stats(obj, owner=None):
- """
+ """
Get a string of stats about the object.
Args:
@@ -349,7 +349,7 @@ testing get_obj_sta
# check that the result is what we expected
self.assertEqual(
result,
- """
+ """
|ctestobj|n
Value: ~|y10|n coins
diff --git a/docs/1.0/Howtos/Evennia-for-Diku-Users.html b/docs/1.0/Howtos/Evennia-for-Diku-Users.html
index cc0d792686..7b36f854a4 100644
--- a/docs/1.0/Howtos/Evennia-for-Diku-Users.html
+++ b/docs/1.0/Howtos/Evennia-for-Diku-Users.html
@@ -141,15 +141,15 @@ are also highly optimized for querying large data sets efficiently.
pay attention to what object you are using, and when you are accessing another through back-
handling, that you are accessing the right object. In Diku C, accessing character object is normally
done by:
-/* creating pointer of both character and room struct */
+/* creating pointer of both character and room struct */
-void(struct char ch*, struct room room*){
- int dam;
- if (ROOM_FLAGGED(room, ROOM_LAVA)){
- dam = 100;
- ch->damage_taken = dam;
- }
-}
+void(struct char ch*, struct room room*){
+ int dam;
+ if (ROOM_FLAGGED(room, ROOM_LAVA)){
+ dam = 100;
+ ch->damage_taken = dam;
+ }
+}
As an example for creating Commands in Evennia via the from evennia import Command the character
@@ -161,7 +161,7 @@ Account object. For a more familiar Diku feel, create a variable that becomes th
from evennia import Command
class CmdMyCmd(Command):
- """
+ """
This is a Command Evennia Object
"""
diff --git a/docs/1.0/Howtos/Evennia-for-MUSH-Users.html b/docs/1.0/Howtos/Evennia-for-MUSH-Users.html
index 56c085cb49..4dfa344a55 100644
--- a/docs/1.0/Howtos/Evennia-for-MUSH-Users.html
+++ b/docs/1.0/Howtos/Evennia-for-MUSH-Users.html
@@ -214,7 +214,7 @@ commands) are available to the player from moment to moment depending on circums
from evennia.contrib import multidescer # <- added now
class CharacterCmdSet(default_cmds.CharacterCmdSet):
- """
+ """
The CharacterCmdSet contains general in-game commands like look,
get etc available on in-game Character objects. It is merged with
the AccountCmdSet when an Account puppets a Character.
@@ -222,7 +222,7 @@ commands) are available to the player from moment to moment depending on circums
key = "DefaultCharacter"
def at_cmdset_creation(self):
- """
+ """
Populates the cmdset
"""
super().at_cmdset_creation()
diff --git a/docs/1.0/Howtos/Evennia-for-roleplaying-sessions.html b/docs/1.0/Howtos/Evennia-for-roleplaying-sessions.html
index 396227d19a..1bac21dd53 100644
--- a/docs/1.0/Howtos/Evennia-for-roleplaying-sessions.html
+++ b/docs/1.0/Howtos/Evennia-for-roleplaying-sessions.html
@@ -228,7 +228,7 @@ access) and the IC “Character objects”.
class Character(DefaultCharacter):
# [...]
def get_display_name(self, looker, **kwargs):
- """
+ """
This method customizes how character names are displayed. We assume
only permissions of types "Developers" and "Admins" require
special attention.
@@ -277,7 +277,7 @@ Evennia’s default “mux-like” commands here.
import evennia
class CmdMakeGM(default_cmds.MuxCommand):
- """
+ """
Change an account's GM status
Usage:
@@ -535,7 +535,7 @@ example.
self.update_charsheet()
def update_charsheet(self):
- """
+ """
Call this to update the sheet after any of the ingoing data
has changed.
"""
@@ -584,7 +584,7 @@ The easiest to force an existing Character to re-fire its return True
class CmdSheet(MuxCommand):
- """
+ """
Edit a field on the character sheet
Usage:
@@ -647,7 +647,7 @@ The easiest to force an existing Character to re-fire its # continuing in mygame/commands/command.py
class CmdGMsheet(MuxCommand):
- """
+ """
GM-modification of char sheets
Usage:
diff --git a/docs/1.0/Howtos/Howto-Command-Cooldown.html b/docs/1.0/Howtos/Howto-Command-Cooldown.html
index fb83b50d9e..904d3aaf03 100644
--- a/docs/1.0/Howtos/Howto-Command-Cooldown.html
+++ b/docs/1.0/Howtos/Howto-Command-Cooldown.html
@@ -138,7 +138,7 @@ a while.
from evennia import default_cmds
class CmdSpellFirestorm(default_cmds.MuxCommand):
- """
+ """
Spell - Firestorm
Usage:
diff --git a/docs/1.0/Howtos/Howto-Command-Duration.html b/docs/1.0/Howtos/Howto-Command-Duration.html
index eddc7ec08a..de995c6076 100644
--- a/docs/1.0/Howtos/Howto-Command-Duration.html
+++ b/docs/1.0/Howtos/Howto-Command-Duration.html
@@ -153,7 +153,7 @@ Commands. It works because Evennia has especially catered for it as a convenient
15
16
class CmdTest(Command):
- """
+ """
A test command just to test waiting.
Usage:
@@ -218,7 +218,7 @@ can be made persistent and also works outside of 31
from evennia import default_cmds, utils
class CmdEcho(default_cmds.MuxCommand):
- """
+ """
Wait for an echo
Usage:
@@ -239,7 +239,7 @@ can be made persistent and also works outside of )
def func(self):
- """
+ """
This is called at the initial shout.
"""
self.caller.msg(f"You shout '{self.args}' and wait for an echo ...")
@@ -307,7 +307,7 @@ asynchronous systems. You can also link such calls together:
36
from evennia import default_cmds, utils
class CmdEcho(default_cmds.MuxCommand):
- """
+ """
waits for an echo
Usage:
@@ -375,7 +375,7 @@ delay.
from evennia import utils, default_cmds
class CmdBigSwing(default_cmds.MuxCommand):
- """
+ """
swing your weapon in a big way
Usage:
@@ -426,7 +426,7 @@ Below is an example of a crafting command that can be aborted by starting a figh
from evennia import utils, default_cmds
class CmdCraftArmour(default_cmds.MuxCommand):
- """
+ """
Craft armour
Usage:
@@ -492,7 +492,7 @@ Below is an example of a crafting command that can be aborted by starting a figh
# example of a command that aborts crafting
class CmdAttack(default_cmds.MuxCommand):
- """
+ """
attack someone
Usage:
diff --git a/docs/1.0/Howtos/Howto-Command-Prompt.html b/docs/1.0/Howtos/Howto-Command-Prompt.html
index 9b94a5c633..6672dffb62 100644
--- a/docs/1.0/Howtos/Howto-Command-Prompt.html
+++ b/docs/1.0/Howtos/Howto-Command-Prompt.html
@@ -134,7 +134,7 @@ the prompt when they cause a change in health, for example.
from evennia import Command
class CmdDiagnose(Command):
- """
+ """
see how hurt your are
Usage:
diff --git a/docs/1.0/Howtos/Howto-Default-Exit-Errors.html b/docs/1.0/Howtos/Howto-Default-Exit-Errors.html
index 3739aaeff6..b605779615 100644
--- a/docs/1.0/Howtos/Howto-Default-Exit-Errors.html
+++ b/docs/1.0/Howtos/Howto-Default-Exit-Errors.html
@@ -136,12 +136,12 @@ exit-object, which is why you can see the exit in the room and just write its na
from evennia import default_cmds, CmdSet
class CmdExitError(default_cmds.MuxCommand):
- """Parent class for all exit-errors."""
+ """Parent class for all exit-errors."""
locks = "cmd:all()"
arg_regex = r"\s|$"
auto_help = False
def func(self):
- """Returns error based on key"""
+ """Returns error based on key"""
self.caller.msg(f"You cannot move {self.key}.")
class CmdExitErrorNorth(CmdExitError):
diff --git a/docs/1.0/Howtos/Howto-Game-Time.html b/docs/1.0/Howtos/Howto-Game-Time.html
index abd0fd9f86..fb9c6eb154 100644
--- a/docs/1.0/Howtos/Howto-Game-Time.html
+++ b/docs/1.0/Howtos/Howto-Game-Time.html
@@ -202,13 +202,13 @@ time updated correctly… and going (by default) twice as fast as the real time.
from typeclasses.rooms import Room
def at_sunrise():
- """When the sun rises, display a message in every room."""
+ """When the sun rises, display a message in every room."""
# Browse all rooms
for room in Room.objects.all():
room.msg_contents("The sun rises from the eastern horizon.")
def start_sunrise_event():
- """Schedule an sunrise event to happen every day at 6 AM."""
+ """Schedule an sunrise event to happen every day at 6 AM."""
script = gametime.schedule(at_sunrise, repeat=True, hour=6, min=0, sec=0)
script.key = "at sunrise"
@@ -292,7 +292,7 @@ on other MU*. Here’s an example of how we could write it (for the example, yo
class CmdTime(Command):
- """
+ """
Display the time.
Syntax:
@@ -304,7 +304,7 @@ on other MU*. Here’s an example of how we could write it (for the example, yo
locks = "cmd:all()"
def func(self):
- """Execute the time command."""
+ """Execute the time command."""
# Get the absolute game time
year, month, day, hour, mins, secs = custom_gametime.custom_gametime(absolute=True)
time_string = f"We are in year {year}, day {day}, month {month}."
@@ -320,7 +320,7 @@ on other MU*. Here’s an example of how we could write it (for the example, yo
# ...
class CharacterCmdSet(default_cmds.CharacterCmdSet):
- """
+ """
The `CharacterCmdSet` contains general in-game commands like `look`,
`get`, etc available on in-game Character objects. It is merged with
the `AccountCmdSet` when an Account puppets a Character.
@@ -328,7 +328,7 @@ on other MU*. Here’s an example of how we could write it (for the example, yo
key = "DefaultCharacter"
def at_cmdset_creation(self):
- """
+ """
Populates the cmdset
"""
super().at_cmdset_creation()
diff --git a/docs/1.0/Howtos/Implementing-a-game-rule-system.html b/docs/1.0/Howtos/Implementing-a-game-rule-system.html
index bd19e4663a..a170fa8fad 100644
--- a/docs/1.0/Howtos/Implementing-a-game-rule-system.html
+++ b/docs/1.0/Howtos/Implementing-a-game-rule-system.html
@@ -199,7 +199,7 @@ weather, NPC artificial intelligence and game economy. Basically everything abou
from evennia import DefaultCharacter
class Character(DefaultCharacter):
- """
+ """
Custom rule-restricted character. We randomize
the initial skill and ability values bettween 1-10.
"""
@@ -250,7 +250,7 @@ the following command:
character.msg(f"You are now level {character.db.level}!")
def skill_combat(*args):
- """
+ """
This determines outcome of combat. The one who
rolls under their combat skill AND higher than
their opponent's roll hits.
@@ -285,7 +285,7 @@ the following command:
SKILLS = {"combat": skill_combat}
def roll_challenge(character1, character2, skillname):
- """
+ """
Determine the outcome of a skill challenge between
two characters based on the skillname given.
"""
@@ -307,7 +307,7 @@ everyone of their results via from world import rules
class CmdAttack(Command):
- """
+ """
attack an opponent
Usage:
diff --git a/docs/1.0/Howtos/Turn-based-Combat-System.html b/docs/1.0/Howtos/Turn-based-Combat-System.html
index 74e7785f12..6c66323198 100644
--- a/docs/1.0/Howtos/Turn-based-Combat-System.html
+++ b/docs/1.0/Howtos/Turn-based-Combat-System.html
@@ -161,7 +161,7 @@ need to disengage from the first combat before they could join another).
from world.rules import resolve_combat
class CombatHandler(DefaultScript):
- """
+ """
This implements the combat handler.
"""
@@ -170,7 +170,7 @@ need to disengage from the first combat before they could join another).
def at_script_creation(self):
"Called when script is first created"
- self.key = f"combat_handler_{random.randint(1, 1000)}"
+ self.key = f"combat_handler_{random.randint(1, 1000)}"
self.desc = "handles combat"
self.interval = 60 * 2 # two minute timeout
self.start_delay = True
@@ -184,7 +184,7 @@ need to disengage from the first combat before they could join another).
self.db.action_count = {}
def _init_character(self, character):
- """
+ """
This initializes handler back-reference
and combat cmdset on a character
"""
@@ -192,7 +192,7 @@ need to disengage from the first combat before they could join another).
character.cmdset.add("commands.combat.CombatCmdSet")
def _cleanup_character(self, character):
- """
+ """
Remove character from handler and clean
it of the back-reference and cmdset
"""
@@ -204,7 +204,7 @@ need to disengage from the first combat before they could join another).
character.cmdset.delete("commands.combat.CombatCmdSet")
def at_start(self):
- """
+ """
This is called on first start but also when the script is restarted
after a server reboot. We need to re-assign this combat handler to
all characters as well as re-assign the cmdset.
@@ -219,7 +219,7 @@ need to disengage from the first combat before they could join another).
self._cleanup_character(character)
def at_repeat(self):
- """
+ """
This is called every self.interval seconds (turn timeout) or
when force_repeat is called (because everyone has entered their
commands). We know this by checking the existence of the
@@ -262,7 +262,7 @@ need to disengage from the first combat before they could join another).
character.msg(message)
def add_action(self, action, character, target):
- """
+ """
Called by combat commands to register an action with the handler.
action - string identifying the action, like "hit" or "parry"
@@ -284,7 +284,7 @@ need to disengage from the first combat before they could join another).
return True
def check_end_turn(self):
- """
+ """
Called by the command to eventually trigger
the resolution of the turn. We check if everyone
has added all their actions; if so we call force the
@@ -296,7 +296,7 @@ need to disengage from the first combat before they could join another).
self.force_repeat()
def end_turn(self):
- """
+ """
This resolves all actions by calling the rules module.
It then resets everything and starts the next turn. It
is called by at_repeat().
@@ -334,7 +334,7 @@ their actions once they have been added (but before the last one has added their
from evennia import Command
class CmdHit(Command):
- """
+ """
hit an enemy
Usage:
@@ -414,7 +414,7 @@ subsequent attack and so on …
# messages
def resolve_combat(combat_handler, actiondict):
- """
+ """
This is called by the combat handler
actiondict is a dictionary with a list of two actions
for each character:
@@ -496,7 +496,7 @@ subsequent attack and so on …
from evennia import create_script
class CmdAttack(Command):
- """
+ """
initiates combat
Usage:
diff --git a/docs/1.0/Howtos/Tutorial-Building-a-Mech.html b/docs/1.0/Howtos/Tutorial-Building-a-Mech.html
index d1884d6f30..152a3de214 100644
--- a/docs/1.0/Howtos/Tutorial-Building-a-Mech.html
+++ b/docs/1.0/Howtos/Tutorial-Building-a-Mech.html
@@ -163,7 +163,7 @@ mech-suitable commands. In Evennia, commands are defined as Python classes.
from evennia import Command
class CmdShoot(Command):
- """
+ """
Firing the mech’s gun
Usage:
@@ -210,7 +210,7 @@ damage to the target, but this is enough for now.
from evennia import default_cmds
class MechCmdSet(CmdSet):
- """
+ """
This allows mechs to do do mech stuff.
"""
key = "mechcmdset"
@@ -254,7 +254,7 @@ behind the scenes. A Typeclass is created in a normal Python source file:
from evennia import default_cmds
class Mech(Object):
- """
+ """
This typeclass describes an armed Mech.
"""
def at_object_creation(self):
diff --git a/docs/1.0/Howtos/Tutorial-Building-a-Train.html b/docs/1.0/Howtos/Tutorial-Building-a-Train.html
index 80676a34aa..ff8af0794f 100644
--- a/docs/1.0/Howtos/Tutorial-Building-a-Train.html
+++ b/docs/1.0/Howtos/Tutorial-Building-a-Train.html
@@ -159,7 +159,7 @@ available to whomever is either inside it or in the same room as the train.
from evennia import Command, CmdSet
class CmdEnterTrain(Command):
- """
+ """
entering the train
Usage:
@@ -178,7 +178,7 @@ available to whomever is either inside it or in the same room as the train.
class CmdLeaveTrain(Command):
- """
+ """
leaving the train
Usage:
@@ -244,7 +244,7 @@ already, but none that we can use for locking a command in this particular case.
# file mygame/server/conf/lockfuncs.py
def cmdinside(accessing_obj, accessed_obj, *args, **kwargs):
- """
+ """
Usage: cmdinside()
Used to lock commands and only allows access if the command
is defined on an object which accessing_obj is inside of.
diff --git a/docs/1.0/Howtos/Tutorial-Coordinates.html b/docs/1.0/Howtos/Tutorial-Coordinates.html
index c050c98685..e2f263cb39 100644
--- a/docs/1.0/Howtos/Tutorial-Coordinates.html
+++ b/docs/1.0/Howtos/Tutorial-Coordinates.html
@@ -140,7 +140,7 @@ properties to easily access and update coordinates. This is a Pythonic approach
from evennia import DefaultRoom
class Room(DefaultRoom):
- """
+ """
Rooms are like any Object, except their location is None
(which is default). They also use basetype_setup() to
add locks so they cannot be puppeted or picked up.
@@ -152,13 +152,13 @@ properties to easily access and update coordinates. This is a Pythonic approach
@property
def x(self):
- """Return the X coordinate or None."""
+ """Return the X coordinate or None."""
x = self.tags.get(category="coordx")
return int(x) if isinstance(x, str) else None
@x.setter
def x(self, x):
- """Change the X coordinate."""
+ """Change the X coordinate."""
old = self.tags.get(category="coordx")
if old is not None:
self.tags.remove(old, category="coordx")
@@ -167,13 +167,13 @@ properties to easily access and update coordinates. This is a Pythonic approach
@property
def y(self):
- """Return the Y coordinate or None."""
+ """Return the Y coordinate or None."""
y = self.tags.get(category="coordy")
return int(y) if isinstance(y, str) else None
@y.setter
def y(self, y):
- """Change the Y coordinate."""
+ """Change the Y coordinate."""
old = self.tags.get(category="coordy")
if old is not None:
self.tags.remove(old, category="coordy")
@@ -182,13 +182,13 @@ properties to easily access and update coordinates. This is a Pythonic approach
@property
def z(self):
- """Return the Z coordinate or None."""
+ """Return the Z coordinate or None."""
z = self.tags.get(category="coordz")
return int(z) if isinstance(z, str) else None
@z.setter
def z(self, z):
- """Change the Z coordinate."""
+ """Change the Z coordinate."""
old = self.tags.get(category="coordz")
if old is not None:
self.tags.remove(old, category="coordz")
@@ -203,7 +203,7 @@ is well-explained and should help you understand the idea.
Let’s look at our properties for x. First of all is the read property.
@property
def x(self):
- """Return the X coordinate or None."""
+ """Return the X coordinate or None."""
x = self.tags.get(category="coordx")
return int(x) if isinstance(x, str) else None
@@ -219,7 +219,7 @@ so we’ll need to convert it.
Now, let’s look at the method that will be called when we wish to set x in our room:
@x.setter
def x(self, x):
- """Change the X coordinate."""
+ """Change the X coordinate."""
old = self.tags.get(category="coordx")
if old is not None:
self.tags.remove(old, category="coordx")
@@ -262,7 +262,7 @@ Z=0?
# ...
@classmethod
def get_room_at(cls, x, y, z):
- """
+ """
Return the room at the given location or None if not found.
Args:
@@ -305,7 +305,7 @@ lost.
@classmethod
def get_rooms_around(cls, x, y, z, distance):
- """
+ """
Return the list of rooms around the given coordinates.
This method returns a list of tuples (distance, room) that
diff --git a/docs/1.0/Howtos/Tutorial-NPC-Listening.html b/docs/1.0/Howtos/Tutorial-NPC-Listening.html
index 6c4eb561cc..b914f1875b 100644
--- a/docs/1.0/Howtos/Tutorial-NPC-Listening.html
+++ b/docs/1.0/Howtos/Tutorial-NPC-Listening.html
@@ -116,11 +116,11 @@ The troll under the bridge answers, "well, well. Hello."
from characters import Character
class Npc(Character):
- """
+ """
A NPC typeclass which extends the character class.
"""
def at_heard_say(self, message, from_obj):
- """
+ """
A simple listener and response. This makes it easy to change for
subclasses of NPCs reacting differently to says.
diff --git a/docs/1.0/Howtos/Tutorial-NPC-Merchants.html b/docs/1.0/Howtos/Tutorial-NPC-Merchants.html
index f3f1825709..d15e57e1e8 100644
--- a/docs/1.0/Howtos/Tutorial-NPC-Merchants.html
+++ b/docs/1.0/Howtos/Tutorial-NPC-Merchants.html
@@ -127,7 +127,7 @@ To enter the shop, you’ll just need to stand in the same room and use the from evennia import Command, CmdSet, EvMenu
class CmdOpenShop(Command):
- """
+ """
Open the shop!
Usage:
diff --git a/docs/1.0/Howtos/Tutorial-NPC-Reacting.html b/docs/1.0/Howtos/Tutorial-NPC-Reacting.html
index fe145c2428..dd667e0074 100644
--- a/docs/1.0/Howtos/Tutorial-NPC-Reacting.html
+++ b/docs/1.0/Howtos/Tutorial-NPC-Reacting.html
@@ -119,11 +119,11 @@ location.
from typeclasses.characters import Character
class NPC(Character):
- """
+ """
A NPC typeclass which extends the character class.
"""
def at_char_entered(self, character):
- """
+ """
A simple is_aggressive check.
Can be expanded upon later.
"""
diff --git a/docs/1.0/Howtos/Tutorial-Parsing-Commands.html b/docs/1.0/Howtos/Tutorial-Parsing-Commands.html
index 1d6312e441..74e493033f 100644
--- a/docs/1.0/Howtos/Tutorial-Parsing-Commands.html
+++ b/docs/1.0/Howtos/Tutorial-Parsing-Commands.html
@@ -173,7 +173,7 @@ access the command arguments in To begin with, look at this example:
class CmdTest(Command):
- """
+ """
Test command.
Syntax:
@@ -212,7 +212,7 @@ in self.args
force Python to display the command arguments as a debug string using a little shortcut.
class CmdTest(Command):
- """
+ """
Test command.
Syntax:
@@ -280,7 +280,7 @@ string.
separator, we call lstrip on the command arguments:
class CmdTest(Command):
- """
+ """
Test command.
Syntax:
@@ -293,7 +293,7 @@ separator, we call
key = "test"
def parse(self):
- """Parse arguments, just strip them."""
+ """Parse arguments, just strip them."""
self.args = self.args.lstrip()
def func(self):
@@ -350,7 +350,7 @@ won’t work as is, I warn you:
class CmdRoll(Command):
- """
+ """
Play random, enter a number and try your luck.
Usage:
@@ -367,7 +367,7 @@ won’t work as is, I warn you:
key = "roll"
def parse(self):
- """Convert the argument to a number."""
+ """Convert the argument to a number."""
self.args = self.args.lstrip()
def func(self):
@@ -399,7 +399,7 @@ converting:
class CmdRoll(Command):
- """
+ """
Play random, enter a number and try your luck.
Usage:
@@ -416,7 +416,7 @@ converting:
key = "roll"
def parse(self):
- """Convert the argument to number if possible."""
+ """Convert the argument to number if possible."""
args = self.args.lstrip()
# Convert to int if possible
@@ -459,7 +459,7 @@ by grouping:
class CmdRoll(Command):
- """
+ """
Play random, enter a number and try your luck.
Usage:
@@ -476,7 +476,7 @@ by grouping:
key = "roll"
def parse(self):
- """Convert the argument to number if possible."""
+ """Convert the argument to number if possible."""
args = self.args.lstrip()
# Convert to int if possible
@@ -586,7 +586,7 @@ the number of dice to roll.
class CmdRoll(Command):
- """
+ """
Play random, enter a number and try your luck.
Specify two numbers separated by a space. The first number is the
@@ -606,7 +606,7 @@ the number of dice to roll.
key = "roll"
def parse(self):
- """Split the arguments and convert them."""
+ """Split the arguments and convert them."""
args = self.args.lstrip()
# Split: we expect two arguments separated by a space
diff --git a/docs/1.0/Howtos/Tutorial-for-basic-MUSH-like-game.html b/docs/1.0/Howtos/Tutorial-for-basic-MUSH-like-game.html
index 5c4387e204..5abd3719a6 100644
--- a/docs/1.0/Howtos/Tutorial-for-basic-MUSH-like-game.html
+++ b/docs/1.0/Howtos/Tutorial-for-basic-MUSH-like-game.html
@@ -168,7 +168,7 @@ SQLite3 database.
from evennia import DefaultCharacter
class Character(DefaultCharacter):
- """
+ """
[...]
"""
def at_object_creation(self):
@@ -230,7 +230,7 @@ just import from that instead.
from evennia import Command # just for clarity; already imported above
class CmdSetPower(Command):
- """
+ """
set the power of a character
Usage:
@@ -278,7 +278,7 @@ the end of this file, to hold only our chargen-specific command(s):
# end of default_cmdsets.py
class ChargenCmdset(CmdSet):
- """
+ """
This cmdset it used in character generation areas.
"""
key = "Chargen"
@@ -302,7 +302,7 @@ It’s cleaner to put it on a room, so it’s only available when players are in
# down at the end of rooms.py
class ChargenRoom(Room):
- """
+ """
This room class is used by character-generation rooms. It makes
the ChargenCmdset available.
"""
@@ -368,7 +368,7 @@ You +attack with a combat score of 12!
# ...
class CmdAttack(Command):
- """
+ """
issues an attack
Usage:
@@ -438,7 +438,7 @@ comes into play for real).
implementation of return appearance is found in evennia.DefaultCharacter.
If you want to make bigger changes you could copy & paste the whole default thing into our overloading method. In our case the change is small though:
class Character(DefaultCharacter):
- """
+ """
[...]
"""
def at_object_creation(self):
@@ -447,7 +447,7 @@ implementation of r
self.db.combat_score = 1
def return_appearance(self, looker):
- """
+ """
The return from this method is what
looker sees when looking at this object.
"""
@@ -496,7 +496,7 @@ You created the NPC 'Anna'.
from evennia import create_object
class CmdCreateNPC(Command):
- """
+ """
create a new npc
Usage:
@@ -571,7 +571,7 @@ Set Anna's property 'power' to 10.
This is a slightly more complex command. It goes at the end of your command.py file as before.
class CmdEditNPC(Command):
- """
+ """
edit an existing NPC
Usage:
@@ -669,7 +669,7 @@ Anna says, 'Hello!'
Again, add to the end of your command.py module:
class CmdNPC(Command):
- """
+ """
controls an NPC
Usage:
diff --git a/docs/1.0/Howtos/Web-Add-a-wiki.html b/docs/1.0/Howtos/Web-Add-a-wiki.html
index be0c821997..b926f5862f 100644
--- a/docs/1.0/Howtos/Web-Add-a-wiki.html
+++ b/docs/1.0/Howtos/Web-Add-a-wiki.html
@@ -266,15 +266,15 @@ solution for connecting the Evennia permission levels to wiki access, this is th
# Custom methods to link wiki permissions to game perms
def is_superuser(article, user):
- """Return True if user is a superuser, False otherwise."""
+ """Return True if user is a superuser, False otherwise."""
return not user.is_anonymous() and user.is_superuser
def is_builder(article, user):
- """Return True if user is a builder, False otherwise."""
+ """Return True if user is a builder, False otherwise."""
return not user.is_anonymous() and user.locks.check_lockstring(user, "perm(Builders)")
def is_player(article, user):
- """Return True if user is a builder, False otherwise."""
+ """Return True if user is a builder, False otherwise."""
return not user.is_anonymous() and user.locks.check_lockstring(user, "perm(Players)")
# Create new users
diff --git a/docs/1.0/Howtos/Web-Character-Generation.html b/docs/1.0/Howtos/Web-Character-Generation.html
index 0ec42cda69..9f5af01097 100644
--- a/docs/1.0/Howtos/Web-Character-Generation.html
+++ b/docs/1.0/Howtos/Web-Character-Generation.html
@@ -632,8 +632,8 @@ mygame/web/chargen/templates/chargen/detail.html
Once you have all these files stand in your mygame/folder and run:
-evennia makemigrations
-evennia migrate
+evennia makemigrations
+evennia migrate
This will create and update the models. If you see any errors at this stage, read the traceback
diff --git a/docs/1.0/Howtos/Web-Extending-the-REST-API.html b/docs/1.0/Howtos/Web-Extending-the-REST-API.html
index 8e80b79bb1..80ae7eb570 100644
--- a/docs/1.0/Howtos/Web-Extending-the-REST-API.html
+++ b/docs/1.0/Howtos/Web-Extending-the-REST-API.html
@@ -140,7 +140,7 @@
# our own custom view
class CharacterViewSet(ObjectDBViewSet):
- """
+ """
A customized Character view that adds an inventory detail
"""
queryset = DefaultCharacter.objects.all_family()
@@ -261,7 +261,7 @@
# our own custom view
class CharacterViewSet(ObjectDBViewSet):
- """
+ """
A customized Character view that adds an inventory detail
"""
queryset = DefaultCharacter.objects.all_family()
@@ -295,7 +295,7 @@
Next, we’ll be defining our own serializer class. Since it’s for retrieving inventory data, we’ll name it appropriately.
class InventorySerializer(TypeclassSerializerMixin, serializers.ModelSerializer):
- """
+ """
Serializing an inventory
"""
@@ -318,14 +318,14 @@
Which is why our next step is to add those methods! We defined the properties worn and carried, so the methods we’ll add are get_worn and get_carried. They’ll be static methods - that is, they don’t include self - since they don’t need to reference the serializer class itself.
# these methods filter the character's contents based on the `worn` attribute
def get_worn(character):
- """
+ """
Serializes only worn objects in the target's inventory.
"""
worn = [obj for obj in character.contents if obj.db.worn]
return SimpleObjectDBSerializer(worn, many=True).data
def get_carried(character):
- """
+ """
Serializes only non-worn objects in the target's inventory.
"""
carried = [obj for obj in character.contents if not obj.db.worn]
@@ -350,7 +350,7 @@
from evennia.objects.objects import DefaultObject
class InventorySerializer(TypeclassSerializerMixin, serializers.ModelSerializer):
- """
+ """
Serializing an inventory
"""
@@ -370,14 +370,14 @@
# these methods filter the character's contents based on the `worn` attribute
def get_worn(character):
- """
+ """
Serializes only worn objects in the target's inventory.
"""
worn = [obj for obj in character.contents if obj.db.worn]
return SimpleObjectDBSerializer(worn, many=True).data
def get_carried(character):
- """
+ """
Serializes only non-worn objects in the target's inventory.
"""
carried = [obj for obj in character.contents if not obj.db.worn]
@@ -419,7 +419,7 @@
# our own custom view
class CharacterViewSet(ObjectDBViewSet):
- """
+ """
A customized Character view that adds an inventory detail
"""
queryset = DefaultCharacter.objects.all_family()
@@ -444,7 +444,7 @@
class CharacterPermission(EvenniaPermission):
def has_object_permission(self, request, view, obj):
- """
+ """
Checks object-level permissions after has_permission
"""
# our new permission check
@@ -478,7 +478,7 @@
# our own custom view
class CharacterViewSet(ObjectDBViewSet):
- """
+ """
A customized Character view that adds an inventory detail
"""
permission_classes = [CharacterPermission] # <--- NEW
diff --git a/docs/1.0/Howtos/Web-Help-System-Tutorial.html b/docs/1.0/Howtos/Web-Help-System-Tutorial.html
index 5f0c48d8a6..f77ecccd35 100644
--- a/docs/1.0/Howtos/Web-Help-System-Tutorial.html
+++ b/docs/1.0/Howtos/Web-Help-System-Tutorial.html
@@ -196,7 +196,7 @@ lines:
from django.shortcuts import render
def index(request):
- """The 'index' view."""
+ """The 'index' view."""
return render(request, "help_system/index.html")
@@ -342,7 +342,7 @@ in or not. Last gift by Evennia, if the user is logged in, def index(request):
- """The 'index' view."""
+ """The 'index' view."""
user = request.user
if not user.is_anonymous() and user.character:
character = user.character
@@ -353,7 +353,7 @@ an account object, which will help us a lot in coupling the game and online syst
have something like:
def index(request):
- """The 'index' view."""
+ """The 'index' view."""
user = request.user
if not user.is_anonymous() and user.db._playable_characters:
character = user.db._playable_characters[0]
@@ -374,7 +374,7 @@ create it through your game: connect to it and enter:
from typeclasses.characters import Character
def index(request):
- """The 'index' view."""
+ """The 'index' view."""
user = request.user
if not user.is_anonymous() and user.character:
character = user.character
@@ -398,7 +398,7 @@ that can be seen by this character (either our ‘anonymous’ character, or our
from typeclasses.characters import Character
def index(request):
- """The 'index' view."""
+ """The 'index' view."""
user = request.user
if not user.is_anonymous() and user.character:
character = user.character
@@ -428,7 +428,7 @@ that can be seen by this character (either our ‘anonymous’ character, or our
return render(request, "help_system/index.html", context)
def _get_topics(character):
- """Return the categories and topics for this character."""
+ """Return the categories and topics for this character."""
cmdset = character.cmdset.all()[0]
commands = cmdset.commands
entries = [entry for entry in HelpEntry.objects.all()]
diff --git a/docs/1.0/Howtos/Web-Tweeting-Game-Stats.html b/docs/1.0/Howtos/Web-Tweeting-Game-Stats.html
index 5a8656ba92..707683b59f 100644
--- a/docs/1.0/Howtos/Web-Tweeting-Game-Stats.html
+++ b/docs/1.0/Howtos/Web-Tweeting-Game-Stats.html
@@ -111,7 +111,7 @@ regularly, from player deaths to how much currency is in the economy etc.
from evennia import DefaultScript
class TweetStats(DefaultScript):
- """
+ """
This implements the tweeting of stats to a registered twitter account
"""
@@ -126,7 +126,7 @@ regularly, from player deaths to how much currency is in the economy etc.
self.start_delay = False
def at_repeat(self):
- """
+ """
This is called every self.interval seconds to
tweet interesting stats about the game.
"""
diff --git a/docs/1.0/Setup/Channels-to-Twitter.html b/docs/1.0/Setup/Channels-to-Twitter.html
index 49176816f3..baf689b01d 100644
--- a/docs/1.0/Setup/Channels-to-Twitter.html
+++ b/docs/1.0/Setup/Channels-to-Twitter.html
@@ -141,7 +141,7 @@ This is how it can look:
access_token_secret='access_token_secret')
class CmdTweet(Command):
- """
+ """
Tweet a message
Usage:
diff --git a/docs/1.0/Setup/Choosing-a-Database.html b/docs/1.0/Setup/Choosing-a-Database.html
index 642807f2e3..e791274e0b 100644
--- a/docs/1.0/Setup/Choosing-a-Database.html
+++ b/docs/1.0/Setup/Choosing-a-Database.html
@@ -150,9 +150,9 @@ drawbacks:
without changing any database options. An optional requirement is the sqlite3 client program - this is required if you want to inspect the database data manually. A shortcut for using it with the
evennia database is evennia dbshell. Linux users should look for the sqlite3 package for their distro while Mac/Windows should get the sqlite-tools package from this page.
To inspect the default Evennia database (once it’s been created), go to your game dir and do
- sqlite3 server/evennia.db3
- # or
- evennia dbshell
+ sqlite3 server/evennia.db3
+ # or
+ evennia dbshell
This will bring you into the sqlite command line. Use .help for instructions and .quit to exit.
@@ -174,7 +174,7 @@ game has an very large database and/or extensive web presence through a separate
For interaction with Evennia you need to also install psycopg2 to your Evennia install
(pip install psycopg2-binary in your virtualenv). This acts as the python bridge to the database server.
Next, start the postgres client:
- psql -U postgres --password
+ psql -U postgres --password
@@ -185,16 +185,16 @@ have to since the resulting command, and your password, will be logged in the sh
This will open a console to the postgres service using the psql client.
On the psql command line:
-CREATE USER evennia WITH PASSWORD 'somepassword';
-CREATE DATABASE evennia;
+CREATE USER evennia WITH PASSWORD 'somepassword';
+CREATE DATABASE evennia;
-- Postgres-specific optimizations
-- https://docs.djangoproject.com/en/dev/ref/databases/#optimizing-postgresql-s-configuration
-ALTER ROLE evennia SET client_encoding TO 'utf8';
-ALTER ROLE evennia SET default_transaction_isolation TO 'read committed';
-ALTER ROLE evennia SET timezone TO 'UTC';
+ALTER ROLE evennia SET client_encoding TO 'utf8';
+ALTER ROLE evennia SET default_transaction_isolation TO 'read committed';
+ALTER ROLE evennia SET timezone TO 'UTC';
-GRANT ALL PRIVILEGES ON DATABASE evennia TO evennia;
+GRANT ALL PRIVILEGES ON DATABASE evennia TO evennia;
-- Other useful commands:
-- \l (list all databases and permissions)
-- \q (exit)
@@ -247,9 +247,9 @@ an Internet-accessible server.
The above discussion is for hosting a local server. In certain configurations it may make sense host the database on a server remote to the one Evennia is running on. One example case is where code development may be done on multiple machines by multiple users. In this configuration, a local data base (such as SQLite3) is not feasible since all the machines and developers do not have access to the file.
Choose a remote machine to host the database and PostgreSQl server. Follow the instructions above on that server to set up the database. Depending on distribution, PostgreSQL will only accept connections on the local machine (localhost). In order to enable remote access, two files need to be changed.
First, determine which cluster is running your database. Use pg_lscluster:
-$ pg_lsclusters
-Ver Cluster Port Status Owner Data directory Log file
-12 main 5432 online postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log
+$ pg_lsclusters
+Ver Cluster Port Status Owner Data directory Log file
+12 main 5432 online postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log
Next, edit the database’s postgresql.conf. This is found on Ubuntu systems in /etc/postgresql/<ver>/<cluster>, where <ver> and <cluster> are what are reported in the pg_lscluster output. So, for the above example, the file is /etc/postgresql/12/main/postgresql.conf.
@@ -290,7 +290,7 @@ for more details.)
the PosgreSQL documentation on how to limit this.
Now, restart your cluster:
-$ pg_ctlcluster 12 main restart
+$ pg_ctlcluster 12 main restart
Finally, update the database settings in your Evennia secret_settings.py (as described above modifying SERVER and PORT to match your server.
@@ -305,18 +305,18 @@ the PosgreSQL documentation on how to limit this.
First, install and setup MariaDB or MySQL for your specific server. Linux users should look for the mysql-server or mariadb-server packages for their respective distributions. Windows/Mac users will find what they need from the MySQL downloads or MariaDB downloads pages. You also need the respective database clients (mysql, mariadb-client), so you can setup the database itself. When you install the server you should usually be asked to set up the database root user and password.
You will finally also need a Python interface to allow Evennia to talk to the database. Django recommends the mysqlclient one. Install this into the evennia virtualenv with pip install mysqlclient.
Start the database client (this is named the same for both mysql and mariadb):
-mysql -u root -p
+mysql -u root -p
You should get to enter your database root password (set this up when you installed the database
server).
Inside the database client interface:
-CREATE USER 'evennia'@'localhost' IDENTIFIED BY 'somepassword';
-CREATE DATABASE evennia;
+CREATE USER 'evennia'@'localhost' IDENTIFIED BY 'somepassword';
+CREATE DATABASE evennia;
ALTER DATABASE `evennia` CHARACTER SET utf8; -- note that it's `evennia` with back-ticks, not
-quotes!
-GRANT ALL PRIVILEGES ON evennia.* TO 'evennia'@'localhost';
-FLUSH PRIVILEGES;
+quotes!
+GRANT ALL PRIVILEGES ON evennia.* TO 'evennia'@'localhost';
+FLUSH PRIVILEGES;
-- use 'exit' to quit client
diff --git a/docs/1.0/Setup/Config-HAProxy.html b/docs/1.0/Setup/Config-HAProxy.html
index 944b034278..7a9371155a 100644
--- a/docs/1.0/Setup/Config-HAProxy.html
+++ b/docs/1.0/Setup/Config-HAProxy.html
@@ -256,31 +256,31 @@ the outgoing wss port, so this should be open in firewall).
# base stuff to set up haproxy
global
- log /dev/log local0
- chroot /var/lib/haproxy
- maxconn 4000
- user haproxy
- tune.ssl.default-dh-param 2048
- ## uncomment this when everything works
- # daemon
+ log /dev/log local0
+ chroot /var/lib/haproxy
+ maxconn 4000
+ user haproxy
+ tune.ssl.default-dh-param 2048
+ ## uncomment this when everything works
+ # daemon
defaults
- mode http
- option forwardfor
+ mode http
+ option forwardfor
# Evennia Specifics
-listen evennia-https-website
- bind my.awesomegame.com:443 ssl no-sslv3 no-tlsv10 crt /etc/letsencrypt/live/my.awesomegame.com>/my.awesomegame.com.pem
- server localhost 127.0.0.1:4001
- timeout client 10m
- timeout server 10m
- timeout connect 5m
+listen evennia-https-website
+ bind my.awesomegame.com:443 ssl no-sslv3 no-tlsv10 crt /etc/letsencrypt/live/my.awesomegame.com>/my.awesomegame.com.pem
+ server localhost 127.0.0.1:4001
+ timeout client 10m
+ timeout server 10m
+ timeout connect 5m
-listen evennia-secure-websocket
- bind my.awesomegame.com:4002 ssl no-sslv3 no-tlsv10 crt /etc/letsencrypt/live/my.awesomegame.com/my.awesomegame.com.pem
- server localhost 127.0.0.1:4002
- timeout client 10m
- timeout server 10m
- timeout connect 5m
+listen evennia-secure-websocket
+ bind my.awesomegame.com:4002 ssl no-sslv3 no-tlsv10 crt /etc/letsencrypt/live/my.awesomegame.com/my.awesomegame.com.pem
+ server localhost 127.0.0.1:4002
+ timeout client 10m
+ timeout server 10m
+ timeout connect 5m
diff --git a/docs/1.0/Setup/Installation-Docker.html b/docs/1.0/Setup/Installation-Docker.html
index 2526e38993..df1b9540eb 100644
--- a/docs/1.0/Setup/Installation-Docker.html
+++ b/docs/1.0/Setup/Installation-Docker.html
@@ -130,12 +130,12 @@
gets the image based off Evennia’s unstable develop branch.
Next, cd to a place where your game dir is, or where you want to create it. Then run:
-docker run -it --rm -p 4000:4000 -p 4001:4001 -p 4002:4002 --rm -v $PWD:/usr/src/game --user $UID:$GID evennia/evennia
+docker run -it --rm -p 4000:4000 -p 4001:4001 -p 4002:4002 --rm -v $PWD:/usr/src/game --user $UID:$GID evennia/evennia
Having run this (see next section for a description of what’s what), you will be at a prompt inside
the docker container:
-evennia|docker /usr/src/game $
+evennia|docker /usr/src/game $
This is a normal shell prompt. We are in the /usr/src/game location inside the docker container. If you had anything in the folder you started from, you should see it here (with ls) since we mounted the current directory to usr/src/game (with -v above). You have the evennia command available and can now proceed to create a new game as per the normal game setup instructions (no virtualenv needed).
@@ -185,7 +185,7 @@ and the container go down.
evennia/evennia image, but also makes sure to start evennia when it runs (so we don’t need to
enter it and run commands).
To build the image:
- docker build -t mydhaccount/mygame .
+ docker build -t mydhaccount/mygame .
(don’t forget the period at the end, it will use the Dockerfile from the current location). Here mydhaccount is the name of your dockerhub account. If you don’t have a dockerhub account you can build the image locally only (name the container whatever you like in that case, like just mygame).
@@ -212,10 +212,10 @@ option and just give the following command:
Your game will be downloaded from your docker-hub account and a new container will be built using the image and started on the server! If your server environment forces you to use different ports, you can just map the normal ports differently in the command above.
Above we added the -d option, which starts the container in daemon mode - you won’t see any
return in the console. You can see it running with docker ps:
-$ docker ps
+$ docker ps
-CONTAINER ID IMAGE COMMAND CREATED ...
-f6d4ca9b2b22 mygame "/bin/sh -c 'evenn..." About a minute ago ...
+CONTAINER ID IMAGE COMMAND CREATED ...
+f6d4ca9b2b22 mygame "/bin/sh -c 'evenn..." About a minute ago ...
Note the container ID, this is how you manage the container as it runs.
diff --git a/docs/1.0/Setup/Installation-Git.html b/docs/1.0/Setup/Installation-Git.html
index 4d717e2e11..15e5e08288 100644
--- a/docs/1.0/Setup/Installation-Git.html
+++ b/docs/1.0/Setup/Installation-Git.html
@@ -146,8 +146,8 @@ not recognize local
Using py on Windows
If you have older versions of Python installed on Windows, you should instead use py here instead of python. The py launcher automatically selects the latest python version among those you installed.
-python3.11 -m venv evenv (linux/mac)
-python -m venv evenv (Windows)
+python3.11 -m venv evenv (linux/mac)
+python -m venv evenv (Windows)
This will create a new folder evenv in your current directory.
@@ -173,15 +173,15 @@ start a new terminal/console (or restart your computer). Until you do, the Linux Install¶
For Debian-derived systems (like Ubuntu, Mint etc), start a terminal and
install the requirements:
-sudo apt-get update
-sudo apt-get install python3.11 python3.11-venv python3.11-dev gcc
+sudo apt-get update
+sudo apt-get install python3.11 python3.11-venv python3.11-dev gcc
You should make sure to not be root after this step, running as root is a
security risk. Now create a folder where you want to do all your Evennia
development:
-mkdir muddev
-cd muddev
+mkdir muddev
+cd muddev
Next we fetch Evennia itself:
diff --git a/docs/1.0/Setup/Running-Evennia.html b/docs/1.0/Setup/Running-Evennia.html
index 8ec96efcda..3f02b16ae8 100644
--- a/docs/1.0/Setup/Running-Evennia.html
+++ b/docs/1.0/Setup/Running-Evennia.html
@@ -239,9 +239,9 @@ initial return given when starting the server:
Django options¶
The evennia program will also pass-through options used by the django-admin. These operate on the database in various ways.
- evennia migrate # migrate the database
- evennia shell # launch an interactive, django-aware python shell
- evennia dbshell # launch the database shell
+ evennia migrate # migrate the database
+ evennia shell # launch an interactive, django-aware python shell
+ evennia dbshell # launch the database shell
For (many) more options, see the django-admin docs.
diff --git a/docs/1.0/_modules/django/conf.html b/docs/1.0/_modules/django/conf.html
index 7664617e9c..26883445e5 100644
--- a/docs/1.0/_modules/django/conf.html
+++ b/docs/1.0/_modules/django/conf.html
@@ -117,7 +117,7 @@
class SettingsReference(str):
- """
+ """
String subclass which references a current settings value. It's treated as
the value in memory but serializes to a settings.NAME attribute reference.
"""
@@ -130,14 +130,14 @@
class LazySettings(LazyObject):
- """
+ """
A lazy proxy for either global Django settings or a custom settings object.
The user can manually configure settings prior to using them. Otherwise,
Django uses the settings module pointed to by DJANGO_SETTINGS_MODULE.
"""
def _setup(self, name=None):
- """
+ """
Load the settings module pointed to by the environment variable. This
is used the first time settings are needed, if the user hasn't
configured settings manually.
@@ -163,7 +163,7 @@
}
def __getattr__(self, name):
- """Return the value of a setting and cache it in self.__dict__."""
+ """Return the value of a setting and cache it in self.__dict__."""
if (_wrapped := self._wrapped) is empty:
self._setup(name)
_wrapped = self._wrapped
@@ -180,7 +180,7 @@
return val
def __setattr__(self, name, value):
- """
+ """
Set the value of setting. Clear all cached values if _wrapped changes
(@override_settings does this) or clear single values when set.
"""
@@ -191,12 +191,12 @@
super().__setattr__(name, value)
def __delattr__(self, name):
- """Delete a setting and clear it from cache if needed."""
+ """Delete a setting and clear it from cache if needed."""
super().__delattr__(name)
self.__dict__.pop(name, None)
def configure(self, default_settings=global_settings, **options):
- """
+ """
Called to manually configure the settings. The 'default_settings'
parameter sets where to retrieve any unspecified values from (its
argument must support attribute access (__getattr__)).
@@ -212,7 +212,7 @@
@staticmethod
def _add_script_prefix(value):
- """
+ """
Add SCRIPT_NAME prefix to relative paths.
Useful when the app is being served at a subpath and manually prefixing
@@ -227,7 +227,7 @@
@property
def configured(self):
- """Return True if the settings have already been configured."""
+ """Return True if the settings have already been configured."""
return self._wrapped is not empty
@property
@@ -326,14 +326,14 @@
class UserSettingsHolder:
- """Holder for user configured settings."""
+ """Holder for user configured settings."""
# SETTINGS_MODULE doesn't make much sense in the manually configured
# (standalone) case.
SETTINGS_MODULE = None
def __init__(self, default_settings):
- """
+ """
Requests for configuration variables not in this class are satisfied
from the module specified in default_settings (if possible).
"""
diff --git a/docs/1.0/_modules/django/db/models/fields/related_descriptors.html b/docs/1.0/_modules/django/db/models/fields/related_descriptors.html
index 260d04b26c..3de6b38fc7 100644
--- a/docs/1.0/_modules/django/db/models/fields/related_descriptors.html
+++ b/docs/1.0/_modules/django/db/models/fields/related_descriptors.html
@@ -160,7 +160,7 @@
class ForwardManyToOneDescriptor:
- """
+ """
Accessor to the related object on the forward side of a many-to-one or
one-to-one (via ForwardOneToOneDescriptor subclass) relation.
@@ -246,7 +246,7 @@
return qs.get(self.field.get_reverse_related_filter(instance))
def __get__(self, instance, cls=None):
- """
+ """
Get the related instance through the forward relation.
With the example above, when getting ``child.parent``:
@@ -297,7 +297,7 @@
return rel_obj
def __set__(self, instance, value):
- """
+ """
Set the related instance through the forward relation.
With the example above, when setting ``child.parent = parent``:
@@ -373,7 +373,7 @@
remote_field.set_cached_value(value, instance)
def __reduce__(self):
- """
+ """
Pickling should return the instance attached by self.field on the
model, not a new copy of that descriptor. Use getattr() to retrieve
the instance directly from the model.
@@ -382,7 +382,7 @@
class ForwardOneToOneDescriptor(ForwardManyToOneDescriptor):
- """
+ """
Accessor to the related object on the forward side of a one-to-one relation.
In the example::
@@ -433,7 +433,7 @@
class ReverseOneToOneDescriptor:
- """
+ """
Accessor to the related object on the reverse side of a one-to-one
relation.
@@ -499,7 +499,7 @@
)
def __get__(self, instance, cls=None):
- """
+ """
Get the related instance through the reverse relation.
With the example above, when getting ``place.restaurant``:
@@ -544,7 +544,7 @@
return rel_obj
def __set__(self, instance, value):
- """
+ """
Set the related instance through the reverse relation.
With the example above, when setting ``place.restaurant = restaurant``:
@@ -620,7 +620,7 @@
class ReverseManyToOneDescriptor:
- """
+ """
Accessor to the related objects manager on the reverse side of a
many-to-one relation.
@@ -649,7 +649,7 @@
)
def __get__(self, instance, cls=None):
- """
+ """
Get the related objects through the reverse relation.
With the example above, when getting ``parent.children``:
@@ -677,7 +677,7 @@
def create_reverse_many_to_one_manager(superclass, rel):
- """
+ """
Create a manager for the reverse side of a many-to-one relation.
This manager subclasses another manager, generally the default manager of
@@ -710,7 +710,7 @@
)
def _apply_rel_filters(self, queryset):
- """
+ """
Filter the queryset for the instance this manager is bound to.
"""
db = self._db or router.db_for_read(self.model, instance=self.instance)
@@ -957,7 +957,7 @@
class ManyToManyDescriptor(ReverseManyToOneDescriptor):
- """
+ """
Accessor to the related objects manager on the forward and reverse sides of
a many-to-many relation.
@@ -1004,7 +1004,7 @@
def create_forward_many_to_many_manager(superclass, rel, reverse):
- """
+ """
Create a manager for the either side of a many-to-many relation.
This manager subclasses another manager, generally the default manager of
@@ -1090,7 +1090,7 @@
return filters
def _apply_rel_filters(self, queryset):
- """
+ """
Filter the queryset for the instance this manager is bound to.
"""
queryset._add_hints(instance=self.instance)
@@ -1302,7 +1302,7 @@
aupdate_or_create.alters_data = True
def _get_target_ids(self, target_field_name, objs):
- """
+ """
Return the set of ids of `objs` that the target field references.
"""
from django.db.models import Model
@@ -1336,7 +1336,7 @@
def _get_missing_target_ids(
self, source_field_name, target_field_name, db, target_ids
):
- """
+ """
Return the subset of ids of `objs` that aren't already assigned to
this relationship.
"""
@@ -1353,7 +1353,7 @@
return target_ids.difference(vals)
def _get_add_plan(self, db, source_field_name):
- """
+ """
Return a boolean triple of the way the add should be performed.
The first element is whether or not bulk_create(ignore_conflicts)
diff --git a/docs/1.0/_modules/django/db/models/manager.html b/docs/1.0/_modules/django/db/models/manager.html
index 007c59e781..931bb11ff0 100644
--- a/docs/1.0/_modules/django/db/models/manager.html
+++ b/docs/1.0/_modules/django/db/models/manager.html
@@ -108,14 +108,14 @@
self._hints = {}
def __str__(self):
- """Return "app_label.model_label.manager_name"."""
+ """Return "app_label.model_label.manager_name"."""
return "%s.%s" % (self.model._meta.label, self.name)
def __class_getitem__(cls, *args, **kwargs):
return cls
def deconstruct(self):
- """
+ """
Return a 5-tuple of the form (as_manager (True), manager_class,
queryset_class, args, kwargs).
@@ -202,7 +202,7 @@
cls._meta.add_manager(self)
def _set_creation_counter(self):
- """
+ """
Set the creation counter value for this instance and increment the
class-level copy.
"""
@@ -224,7 +224,7 @@
#######################
def get_queryset(self):
- """
+ """
Return a new QuerySet object. Subclasses can override this method to
customize the behavior of the Manager.
"""
diff --git a/docs/1.0/_modules/django/db/models/query.html b/docs/1.0/_modules/django/db/models/query.html
index c74fd38b7e..7db1368978 100644
--- a/docs/1.0/_modules/django/db/models/query.html
+++ b/docs/1.0/_modules/django/db/models/query.html
@@ -152,7 +152,7 @@
class ModelIterable(BaseIterable):
- """Iterable that yields a model instance for each row."""
+ """Iterable that yields a model instance for each row."""
def __iter__(self):
queryset = self.queryset
@@ -217,7 +217,7 @@
class RawModelIterable(BaseIterable):
- """
+ """
Iterable that yields a model instance for each row from a raw queryset.
"""
@@ -261,7 +261,7 @@
class ValuesIterable(BaseIterable):
- """
+ """
Iterable returned by QuerySet.values() that yields a dict for each row.
"""
@@ -284,7 +284,7 @@
class ValuesListIterable(BaseIterable):
- """
+ """
Iterable returned by QuerySet.values_list(flat=False) that yields a tuple
for each row.
"""
@@ -323,7 +323,7 @@
class NamedValuesListIterable(ValuesListIterable):
- """
+ """
Iterable returned by QuerySet.values_list(named=True) that yields a
namedtuple for each row.
"""
@@ -346,7 +346,7 @@
class FlatValuesListIterable(BaseIterable):
- """
+ """
Iterable returned by QuerySet.values_list(flat=True) that yields single
values.
"""
@@ -361,7 +361,7 @@
class QuerySet:
- """Represent a lazy database lookup for a set of objects."""
+ """Represent a lazy database lookup for a set of objects."""
def __init__(self, model=None, query=None, using=None, hints=None):
self.model = model
@@ -409,7 +409,7 @@
########################
def __deepcopy__(self, memo):
- """Don't populate the QuerySet's cache."""
+ """Don't populate the QuerySet's cache."""
obj = self.__class__()
for k, v in self.__dict__.items():
if k == "_result_cache":
@@ -453,7 +453,7 @@
return len(self._result_cache)
def __iter__(self):
- """
+ """
The queryset iterator protocol uses three nested iterators in the
default case:
1. sql.compiler.execute_sql()
@@ -485,7 +485,7 @@
return bool(self._result_cache)
def __getitem__(self, k):
- """Retrieve an item or slice from the set of results."""
+ """Retrieve an item or slice from the set of results."""
if not isinstance(k, (int, slice)):
raise TypeError(
"QuerySet indices must be integers or slices, not %s."
@@ -594,7 +594,7 @@
yield from results
def iterator(self, chunk_size=None):
- """
+ """
An iterator over the results from applying this QuerySet to the
database. chunk_size must be provided for QuerySets that prefetch
related objects. Otherwise, a default chunk_size of 2000 is supplied.
@@ -620,7 +620,7 @@
return self._iterator(use_chunked_fetch, chunk_size)
async def aiterator(self, chunk_size=2000):
- """
+ """
An asynchronous iterator over the results from applying this QuerySet
to the database.
"""
@@ -639,7 +639,7 @@
yield item
def aggregate(self, *args, **kwargs):
- """
+ """
Return a dictionary containing the calculations (aggregation)
over the current queryset.
@@ -684,7 +684,7 @@
return await sync_to_async(self.aggregate)(*args, **kwargs)
def count(self):
- """
+ """
Perform a SELECT COUNT() and return the number of records as an
integer.
@@ -700,7 +700,7 @@
return await sync_to_async(self.count)()
def get(self, *args, **kwargs):
- """
+ """
Perform the query and return a single object matching the given
keyword arguments.
"""
@@ -738,7 +738,7 @@
return await sync_to_async(self.get)(*args, **kwargs)
def create(self, **kwargs):
- """
+ """
Create a new object with the given kwargs, saving it to the database
and returning the created object.
"""
@@ -820,7 +820,7 @@
update_fields=None,
unique_fields=None,
):
- """
+ """
Insert each of the instances into the database. Do *not* call
save() on each of the instances, do not send any pre/post_save
signals, and do not set the primary key attribute if it is an
@@ -930,7 +930,7 @@
)
def bulk_update(self, objs, fields, batch_size=None):
- """
+ """
Update the given fields in each of the given objects in the database.
"""
if batch_size is not None and batch_size < 0:
@@ -993,7 +993,7 @@
abulk_update.alters_data = True
def get_or_create(self, defaults=None, **kwargs):
- """
+ """
Look up an object with the given kwargs, creating one if necessary.
Return a tuple of (object, created), where created is a boolean
specifying whether an object was created.
@@ -1024,7 +1024,7 @@
)
def update_or_create(self, defaults=None, **kwargs):
- """
+ """
Look up an object with the given kwargs, updating one with defaults
if it exists, otherwise create a new one.
Return a tuple (object, created), where created is a boolean
@@ -1050,7 +1050,7 @@
)
def _extract_model_params(self, defaults, **kwargs):
- """
+ """
Prepare `params` for creating a model instance based on the given
kwargs; for use by get_or_create().
"""
@@ -1077,7 +1077,7 @@
return params
def _earliest(self, *fields):
- """
+ """
Return the earliest object according to fields (if given) or by the
model's Meta.get_latest_by.
"""
@@ -1107,7 +1107,7 @@
return await sync_to_async(self.earliest)(*fields)
def latest(self, *fields):
- """
+ """
Return the latest object according to fields (if given) or by the
model's Meta.get_latest_by.
"""
@@ -1119,7 +1119,7 @@
return await sync_to_async(self.latest)(*fields)
def first(self):
- """Return the first object of a query or None if no match is found."""
+ """Return the first object of a query or None if no match is found."""
for obj in (self if self.ordered else self.order_by("pk"))[:1]:
return obj
@@ -1127,7 +1127,7 @@
return await sync_to_async(self.first)()
def last(self):
- """Return the last object of a query or None if no match is found."""
+ """Return the last object of a query or None if no match is found."""
for obj in (self.reverse() if self.ordered else self.order_by("-pk"))[:1]:
return obj
@@ -1135,7 +1135,7 @@
return await sync_to_async(self.last)()
def in_bulk(self, id_list=None, *, field_name="pk"):
- """
+ """
Return a dictionary mapping each of the given IDs to the object with
that ID. If `id_list` isn't provided, evaluate the entire QuerySet.
"""
@@ -1183,7 +1183,7 @@
)
def delete(self):
- """Delete the records in the current QuerySet."""
+ """Delete the records in the current QuerySet."""
self._not_support_combined_queries("delete")
if self.query.is_sliced:
raise TypeError("Cannot use 'limit' or 'offset' with delete().")
@@ -1222,7 +1222,7 @@
adelete.queryset_only = True
def _raw_delete(self, using):
- """
+ """
Delete objects found from the given queryset in single direct SQL
query. No signals are sent and there is no protection for cascades.
"""
@@ -1237,7 +1237,7 @@
_raw_delete.alters_data = True
def update(self, **kwargs):
- """
+ """
Update all elements in the current QuerySet, setting all the given
fields to the appropriate values.
"""
@@ -1276,7 +1276,7 @@
aupdate.alters_data = True
def _update(self, values):
- """
+ """
A version of update() that accepts field objects instead of field names.
Used primarily for model saving and not intended for use by general
code (it requires too much poking around at model internals to be
@@ -1295,7 +1295,7 @@
_update.queryset_only = False
def exists(self):
- """
+ """
Return True if the QuerySet would have any results, False otherwise.
"""
if self._result_cache is None:
@@ -1306,7 +1306,7 @@
return await sync_to_async(self.exists)()
def contains(self, obj):
- """
+ """
Return True if the QuerySet contains the provided obj,
False otherwise.
"""
@@ -1335,7 +1335,7 @@
self._prefetch_done = True
def explain(self, *, format=None, **options):
- """
+ """
Runs an EXPLAIN on the SQL query this QuerySet would perform, and
returns the results.
"""
@@ -1414,7 +1414,7 @@
return clone
def dates(self, field_name, kind, order="ASC"):
- """
+ """
Return a list of date objects representing all available dates for
the given field_name, scoped to 'kind'.
"""
@@ -1438,7 +1438,7 @@
def datetimes(
self, field_name, kind, order="ASC", tzinfo=None, is_dst=timezone.NOT_PASSED
):
- """
+ """
Return a list of datetime objects representing all available
datetimes for the given field_name, scoped to 'kind'.
"""
@@ -1472,7 +1472,7 @@
)
def none(self):
- """Return an empty QuerySet."""
+ """Return an empty QuerySet."""
clone = self._chain()
clone.query.set_empty()
return clone
@@ -1482,14 +1482,14 @@
##################################################################
def all(self):
- """
+ """
Return a new QuerySet that is a copy of the current one. This allows a
QuerySet to proxy for a model manager in some cases.
"""
return self._chain()
def filter(self, *args, **kwargs):
- """
+ """
Return a new QuerySet instance with the args ANDed to the existing
set.
"""
@@ -1497,7 +1497,7 @@
return self._filter_or_exclude(False, args, kwargs)
def exclude(self, *args, **kwargs):
- """
+ """
Return a new QuerySet instance with NOT (args) ANDed to the existing
set.
"""
@@ -1522,7 +1522,7 @@
self._query.add_q(Q(*args, **kwargs))
def complex_filter(self, filter_obj):
- """
+ """
Return a new QuerySet instance with filter_obj added to the filters.
filter_obj can be a Q object or a dictionary of keyword lookup
@@ -1578,7 +1578,7 @@
return self._combinator_query("difference", *other_qs)
def select_for_update(self, nowait=False, skip_locked=False, of=(), no_key=False):
- """
+ """
Return a new QuerySet instance that will select objects with a
FOR UPDATE lock.
"""
@@ -1594,7 +1594,7 @@
return obj
def select_related(self, *fields):
- """
+ """
Return a new QuerySet instance that will select related objects.
If fields are specified, they must be ForeignKey fields and only those
@@ -1618,7 +1618,7 @@
return obj
def prefetch_related(self, *lookups):
- """
+ """
Return a new QuerySet instance that will prefetch the specified
Many-To-One and Many-To-Many related objects when the QuerySet is
evaluated.
@@ -1643,7 +1643,7 @@
return clone
def annotate(self, *args, **kwargs):
- """
+ """
Return a query set in which the returned objects have been annotated
with extra data or aggregations.
"""
@@ -1651,7 +1651,7 @@
return self._annotate(args, kwargs, select=True)
def alias(self, *args, **kwargs):
- """
+ """
Return a query set with added aliases for extra data or aggregations.
"""
self._not_support_combined_queries("alias")
@@ -1713,7 +1713,7 @@
return clone
def order_by(self, *field_names):
- """Return a new QuerySet instance with the ordering changed."""
+ """Return a new QuerySet instance with the ordering changed."""
if self.query.is_sliced:
raise TypeError("Cannot reorder a query once a slice has been taken.")
obj = self._chain()
@@ -1722,7 +1722,7 @@
return obj
def distinct(self, *field_names):
- """
+ """
Return a new QuerySet instance that will select only distinct results.
"""
self._not_support_combined_queries("distinct")
@@ -1743,7 +1743,7 @@
order_by=None,
select_params=None,
):
- """Add extra SQL fragments to the query."""
+ """Add extra SQL fragments to the query."""
self._not_support_combined_queries("extra")
if self.query.is_sliced:
raise TypeError("Cannot change a query once a slice has been taken.")
@@ -1752,7 +1752,7 @@
return clone
def reverse(self):
- """Reverse the ordering of the QuerySet."""
+ """Reverse the ordering of the QuerySet."""
if self.query.is_sliced:
raise TypeError("Cannot reverse a query once a slice has been taken.")
clone = self._chain()
@@ -1760,7 +1760,7 @@
return clone
def defer(self, *fields):
- """
+ """
Defer the loading of data for certain fields until they are accessed.
Add the set of deferred fields to any existing set of deferred fields.
The only exception to this is if None is passed in as the only
@@ -1777,7 +1777,7 @@
return clone
def only(self, *fields):
- """
+ """
Essentially, the opposite of defer(). Only the fields passed into this
method and that are not already specified as deferred are loaded
immediately when the queryset is evaluated.
@@ -1798,7 +1798,7 @@
return clone
def using(self, alias):
- """Select which database this QuerySet should execute against."""
+ """Select which database this QuerySet should execute against."""
clone = self._chain()
clone._db = alias
return clone
@@ -1809,7 +1809,7 @@
@property
def ordered(self):
- """
+ """
Return True if the QuerySet is ordered -- i.e. has an order_by()
clause or a default ordering on the model (or is empty).
"""
@@ -1830,7 +1830,7 @@
@property
def db(self):
- """Return the database used if this query is executed now."""
+ """Return the database used if this query is executed now."""
if self._for_write:
return self._db or router.db_for_write(self.model, **self._hints)
return self._db or router.db_for_read(self.model, **self._hints)
@@ -1850,7 +1850,7 @@
update_fields=None,
unique_fields=None,
):
- """
+ """
Insert a new record for the given model. This provides an interface to
the InsertQuery class and is how Model.save() is implemented.
"""
@@ -1878,7 +1878,7 @@
update_fields=None,
unique_fields=None,
):
- """
+ """
Helper method for bulk_create() to insert objs one batch at a time.
"""
connection = connections[self.db]
@@ -1909,7 +1909,7 @@
return inserted_rows
def _chain(self):
- """
+ """
Return a copy of the current QuerySet that's ready for another
operation.
"""
@@ -1920,7 +1920,7 @@
return obj
def _clone(self):
- """
+ """
Return a copy of the current QuerySet. A lightweight alternative
to deepcopy().
"""
@@ -1945,7 +1945,7 @@
self._prefetch_related_objects()
def _next_is_sticky(self):
- """
+ """
Indicate that the next filter call and the one following that should
be treated as a single filter. This is only important when it comes to
determining when to reuse tables for many-to-many filters. Required so
@@ -1959,7 +1959,7 @@
return self
def _merge_sanity_check(self, other):
- """Check that two QuerySet classes may be merged."""
+ """Check that two QuerySet classes may be merged."""
if self._fields is not None and (
set(self.query.values_select) != set(other.query.values_select)
or set(self.query.extra_select) != set(other.query.extra_select)
@@ -1971,7 +1971,7 @@
)
def _merge_known_related_objects(self, other):
- """
+ """
Keep track of all known related objects from either QuerySet instance.
"""
for field, objects in other._known_related_objects.items():
@@ -1989,14 +1989,14 @@
resolve_expression.queryset_only = True
def _add_hints(self, **hints):
- """
+ """
Update hinting information for use by routers. Add new key/values or
overwrite existing key/values.
"""
self._hints.update(hints)
def _has_filters(self):
- """
+ """
Check if this QuerySet has any filtering going on. This isn't
equivalent with checking if all objects are present in results, for
example, qs[1:]._has_filters() -> False.
@@ -2035,7 +2035,7 @@
class EmptyQuerySet(metaclass=InstanceCheckMeta):
- """
+ """
Marker class to checking if a queryset is empty by .none():
isinstance(qs.none(), EmptyQuerySet) -> True
"""
@@ -2045,7 +2045,7 @@
class RawQuerySet:
- """
+ """
Provide an iterator which converts the results of raw SQL queries into
annotated model instances.
"""
@@ -2072,7 +2072,7 @@
self._prefetch_done = False
def resolve_model_init_order(self):
- """Resolve the init field names and value positions."""
+ """Resolve the init field names and value positions."""
converter = connections[self.db].introspection.identifier_converter
model_init_fields = [
f for f in self.model._meta.fields if converter(f.column) in self.columns
@@ -2089,7 +2089,7 @@
return model_init_names, model_init_order, annotation_fields
def prefetch_related(self, *lookups):
- """Same as QuerySet.prefetch_related()"""
+ """Same as QuerySet.prefetch_related()"""
clone = self._clone()
if lookups == (None,):
clone._prefetch_related_lookups = ()
@@ -2102,7 +2102,7 @@
self._prefetch_done = True
def _clone(self):
- """Same as QuerySet._clone()"""
+ """Same as QuerySet._clone()"""
c = self.__class__(
self.raw_query,
model=self.model,
@@ -2154,11 +2154,11 @@
@property
def db(self):
- """Return the database used if this query is executed now."""
+ """Return the database used if this query is executed now."""
return self._db or router.db_for_read(self.model, **self._hints)
def using(self, alias):
- """Select the database this RawQuerySet should execute against."""
+ """Select the database this RawQuerySet should execute against."""
return RawQuerySet(
self.raw_query,
model=self.model,
@@ -2170,7 +2170,7 @@
@cached_property
def columns(self):
- """
+ """
A list of model field names in the order they'll appear in the
query results.
"""
@@ -2188,7 +2188,7 @@
@cached_property
def model_fields(self):
- """A dict mapping column names to model field names."""
+ """A dict mapping column names to model field names."""
converter = connections[self.db].introspection.identifier_converter
model_fields = {}
for field in self.model._meta.fields:
@@ -2259,7 +2259,7 @@
def normalize_prefetch_lookups(lookups, prefix=None):
- """Normalize lookups into Prefetch objects."""
+ """Normalize lookups into Prefetch objects."""
ret = []
for lookup in lookups:
if not isinstance(lookup, Prefetch):
@@ -2271,7 +2271,7 @@
def prefetch_related_objects(model_instances, *related_lookups):
- """
+ """
Populate prefetched object caches for a list of model instances based on
the lookups/Prefetch instances given.
"""
@@ -2425,7 +2425,7 @@
def get_prefetcher(instance, through_attr, to_attr):
- """
+ """
For the attribute 'through_attr' on the given instance, find
an object that has a get_prefetch_queryset().
Return a 4 tuple containing:
@@ -2484,7 +2484,7 @@
def prefetch_one_level(instances, prefetcher, lookup, level):
- """
+ """
Helper function for prefetch_related_objects().
Run prefetches on all instances using the prefetcher object,
@@ -2590,7 +2590,7 @@
class RelatedPopulator:
- """
+ """
RelatedPopulator is used for select_related() object instantiation.
The idea is that each select_related() model will be populated by a
diff --git a/docs/1.0/_modules/django/db/models/query_utils.html b/docs/1.0/_modules/django/db/models/query_utils.html
index 823f0f46a8..06627c0a1e 100644
--- a/docs/1.0/_modules/django/db/models/query_utils.html
+++ b/docs/1.0/_modules/django/db/models/query_utils.html
@@ -110,7 +110,7 @@
class Q(tree.Node):
- """
+ """
Encapsulate filters as objects that can then be combined logically (using
`&` and `|`).
"""
@@ -176,7 +176,7 @@
return clause
def flatten(self):
- """
+ """
Recursively yield this Q object and all subexpressions, in depth-first
order.
"""
@@ -191,7 +191,7 @@
yield child
def check(self, against, using=DEFAULT_DB_ALIAS):
- """
+ """
Do a database query to check if the expressions of the Q instance
matches against the expressions.
"""
@@ -233,7 +233,7 @@
class DeferredAttribute:
- """
+ """
A wrapper for a deferred-loading field. When the value is read from this
object the first time, the query is executed.
"""
@@ -242,7 +242,7 @@
self.field = field
def __get__(self, instance, cls=None):
- """
+ """
Retrieve and caches the value from the datastore on the first lookup.
Return the cached value.
"""
@@ -261,7 +261,7 @@
return data[field_name]
def _check_parent_chain(self, instance):
- """
+ """
Check if the field value can be fetched from a parent field already
loaded in the instance. This can be done if the to-be fetched
field is a primary key field.
@@ -308,7 +308,7 @@
@staticmethod
def merge_dicts(dicts):
- """
+ """
Merge dicts in reverse to preference the order of the original list. e.g.,
merge_dicts([a, b]) will preference the keys in 'a' over those in 'b'.
"""
@@ -334,7 +334,7 @@
@classmethod
def _unregister_lookup(cls, lookup, lookup_name=None):
- """
+ """
Remove given lookup from cls lookups. For use in tests only as it's
not thread-safe.
"""
@@ -345,7 +345,7 @@
def select_related_descend(field, restricted, requested, load_fields, reverse=False):
- """
+ """
Return True if this field should be used to descend deeper for
select_related() purposes. Used by both the query construction code
(compiler.get_related_selections()) and the model instance creation code
@@ -382,7 +382,7 @@
def refs_expression(lookup_parts, annotations):
- """
+ """
Check if the lookup_parts contains references to the given annotations set.
Because the LOOKUP_SEP is contained in the default annotation names, check
each prefix of the lookup_parts for a match.
@@ -395,7 +395,7 @@
def check_rel_lookup_compatibility(model, target_opts, field):
- """
+ """
Check that self.model is compatible with target_opts. Compatibility
is OK if:
1) model and opts match (where proxy inheritance is removed)
@@ -424,7 +424,7 @@
class FilteredRelation:
- """Specify custom filtering in the ON clause of SQL joins."""
+ """Specify custom filtering in the ON clause of SQL joins."""
def __init__(self, relation_name, *, condition=Q()):
if not relation_name:
@@ -452,7 +452,7 @@
return clone
def resolve_expression(self, *args, **kwargs):
- """
+ """
QuerySet.annotate() only accepts expression-like arguments
(with a resolve_expression() method).
"""
diff --git a/docs/1.0/_modules/django/utils/functional.html b/docs/1.0/_modules/django/utils/functional.html
index 5ea210f374..173ce49fa3 100644
--- a/docs/1.0/_modules/django/utils/functional.html
+++ b/docs/1.0/_modules/django/utils/functional.html
@@ -82,7 +82,7 @@
class cached_property:
- """
+ """
Decorator that converts a method with a single self argument into a
property cached on the instance.
@@ -123,7 +123,7 @@
)
def __get__(self, instance, cls=None):
- """
+ """
Call the function and put the return value in instance.__dict__ so that
subsequent attribute access on the instance returns the cached value
instead of calling cached_property.__get__().
@@ -135,7 +135,7 @@
class classproperty:
- """
+ """
Decorator that converts a method with a single cls argument into a property
that can be accessed directly from the class.
"""
@@ -152,7 +152,7 @@
class Promise:
- """
+ """
Base class for the proxy class created in the closure of the lazy function.
It's used to recognize promises in code.
"""
@@ -161,7 +161,7 @@
def lazy(func, *resultclasses):
- """
+ """
Turn any callable into a lazy evaluated callable. result classes or types
is required -- at least one is needed so that the automatic forcing of
the lazy evaluation code is triggered. Results are not memoized; the
@@ -170,7 +170,7 @@
@total_ordering
class __proxy__(Promise):
- """
+ """
Encapsulate a function call and act as a proxy for methods that are
called on the result of that function. The function is not evaluated
until one of the methods on the result is called.
@@ -293,14 +293,14 @@
def lazystr(text):
- """
+ """
Shortcut for the common case of a lazy callable that returns str.
"""
return lazy(str, str)(text)
def keep_lazy(*resultclasses):
- """
+ """
A decorator that allows a function to be called with one or more lazy
arguments. If none of the args are lazy, the function is evaluated
immediately, otherwise a __proxy__ is returned that will evaluate the
@@ -327,7 +327,7 @@
def keep_lazy_text(func):
- """
+ """
A decorator for functions that accept lazy arguments and return text.
"""
return keep_lazy(str)(func)
@@ -348,7 +348,7 @@
class LazyObject:
- """
+ """
A wrapper for another class that can be used to delay instantiation of the
wrapped class.
@@ -394,7 +394,7 @@
delattr(self._wrapped, name)
def _setup(self):
- """
+ """
Must be implemented by subclasses to initialize the wrapped object.
"""
raise NotImplementedError(
@@ -464,7 +464,7 @@
def unpickle_lazyobject(wrapped):
- """
+ """
Used to unpickle lazy objects. Just return its argument, which will be the
wrapped object.
"""
@@ -472,7 +472,7 @@
class SimpleLazyObject(LazyObject):
- """
+ """
A lazy object initialized from any function.
Designed for compound objects of unknown type. For builtins or objects of
@@ -480,7 +480,7 @@
"""
def __init__(self, func):
- """
+ """
Pass in a callable that returns the object to be wrapped.
If copies are made of the resulting SimpleLazyObject, which can happen
@@ -529,7 +529,7 @@
def partition(predicate, values):
- """
+ """
Split the values into two sets, based on the return value of the function
(True/False). e.g.:
diff --git a/docs/1.0/_modules/evennia.html b/docs/1.0/_modules/evennia.html
index eb332ef6ae..0b9fc349a3 100644
--- a/docs/1.0/_modules/evennia.html
+++ b/docs/1.0/_modules/evennia.html
@@ -101,7 +101,7 @@
Online manual and API docs are found at http://www.evennia.com.
Flat-API shortcut names:
-{}
+{}
"""
# Delayed loading of properties
@@ -182,7 +182,7 @@
def _create_version():
- """
+ """
Helper function for building the version string
"""
import os
@@ -213,7 +213,7 @@
def _init():
- """
+ """
This function is called automatically by the launcher only after
Evennia has fully initialized all its models. It sets up the API
in a safe environment where all models are available already.
@@ -299,7 +299,7 @@
# API containers
class _EvContainer(object):
- """
+ """
Parent for other containers
"""
@@ -313,7 +313,7 @@
help = property(_help)
class DBmanagers(_EvContainer):
- """
+ """
Links to instantiated Django database managers. These are used
to perform more advanced custom database queries than the standard
search functions allow.
@@ -358,7 +358,7 @@
del DBmanagers
class DefaultCmds(_EvContainer):
- """
+ """
This container holds direct shortcuts to all default commands in Evennia.
To access in code, do 'from evennia import default_cmds' then
@@ -409,7 +409,7 @@
del DefaultCmds
class SystemCmds(_EvContainer):
- """
+ """
Creating commands with keys set to these constants will make
them system commands called as a replacement by the parser when
special situations occur. If not defined, the hard-coded
@@ -445,7 +445,7 @@
[docs]def set_trace(term_size=(140, 80), debugger="auto"):
- """
+ """
Helper function for running a debugger inside the Evennia event loop.
Args:
diff --git a/docs/1.0/_modules/evennia/accounts/accounts.html b/docs/1.0/_modules/evennia/accounts/accounts.html
index 0065039526..26a6d8294a 100644
--- a/docs/1.0/_modules/evennia/accounts/accounts.html
+++ b/docs/1.0/_modules/evennia/accounts/accounts.html
@@ -151,13 +151,13 @@
class AccountSessionHandler(object):
- """
+ """
Manages the session(s) attached to an account.
"""
def __init__(self, account):
- """
+ """
Initializes the handler.
Args:
@@ -167,7 +167,7 @@
self.account = account
def get(self, sessid=None):
- """
+ """
Get the sessions linked to this object.
Args:
@@ -188,7 +188,7 @@
return _SESSIONS.sessions_from_account(self.account)
def all(self):
- """
+ """
Alias to get(), returning all sessions.
Returns:
@@ -198,7 +198,7 @@
return self.get()
def count(self):
- """
+ """
Get amount of sessions connected.
Returns:
@@ -209,7 +209,7 @@
[docs]class DefaultAccount(AccountDB, metaclass=TypeclassBase):
- """
+ """
This is the base Typeclass for all Accounts. Accounts represent
the person playing the game and tracks account info, password
etc. They are OOC entities without presence in-game. An Account
@@ -325,7 +325,7 @@
return objs
[docs] def uses_screenreader(self, session=None):
- """
+ """
Shortcut to determine if a session uses a screenreader. If no session given,
will return true if any of the sessions use a screenreader.
@@ -341,7 +341,7 @@
)
[docs] def get_display_name(self, looker, **kwargs):
- """
+ """
This is used by channels and other OOC communications methods to give a
custom display of this account's input.
@@ -358,7 +358,7 @@
# session-related methods
[docs] def disconnect_session_from_account(self, session, reason=None):
- """
+ """
Access method for disconnecting a given session from the
account (connection happens automatically in the
sessionhandler)
@@ -376,7 +376,7 @@
# puppeting operations
[docs] def puppet_object(self, session, obj):
- """
+ """
Use the given session to control (puppet) the given object (usually
a Character type).
@@ -464,7 +464,7 @@
SIGNAL_OBJECT_POST_PUPPET.send(sender=obj, account=self, session=session)
[docs] def unpuppet_object(self, session):
- """
+ """
Disengage control over an object.
Args:
@@ -491,14 +491,14 @@
session.puid = None
[docs] def unpuppet_all(self):
- """
+ """
Disconnect all puppets. This is called by server before a
reset/shutdown.
"""
self.unpuppet_object(self.sessions.all())
[docs] def get_puppet(self, session):
- """
+ """
Get an object puppeted by this session through this account. This is
the main method for retrieving the puppeted object from the
account's end.
@@ -513,7 +513,7 @@
return session.puppet if session else None
[docs] def get_all_puppets(self):
- """
+ """
Get all currently puppeted objects.
Returns:
@@ -524,7 +524,7 @@
return list(set(session.puppet for session in self.sessions.all() if session.puppet))
def __get_single_puppet(self):
- """
+ """
This is a legacy convenience link for use with `MULTISESSION_MODE`.
Returns:
@@ -544,7 +544,7 @@
# utility methods
[docs] @classmethod
def is_banned(cls, **kwargs):
- """
+ """
Checks if a given username or IP is banned.
Keyword Args:
@@ -576,7 +576,7 @@
def get_username_validators(
cls, validator_config=getattr(settings, "AUTH_USERNAME_VALIDATORS", [])
):
- """
+ """
Retrieves and instantiates validators for usernames.
Args:
@@ -602,7 +602,7 @@
[docs] @classmethod
def authenticate(cls, username, password, ip="", **kwargs):
- """
+ """
Checks the given username/password against the database to see if the
credentials are valid.
@@ -685,7 +685,7 @@
[docs] @classmethod
def normalize_username(cls, username):
- """
+ """
Django: Applies NFKC Unicode normalization to usernames so that visually
identical characters with different Unicode code points are considered
identical.
@@ -706,7 +706,7 @@
[docs] @classmethod
def validate_username(cls, username):
- """
+ """
Checks the given username against the username validator associated with
Account objects, and also checks the database to make sure it is unique.
@@ -744,7 +744,7 @@
[docs] @classmethod
def validate_password(cls, password, account=None):
- """
+ """
Checks the given password against the list of Django validators enabled
in the server.conf file.
@@ -776,7 +776,7 @@
return valid, error
[docs] def set_password(self, password, **kwargs):
- """
+ """
Applies the given password to the account. Logs and triggers the `at_password_change` hook.
Args:
@@ -793,7 +793,7 @@
self.at_password_change()
[docs] def create_character(self, *args, **kwargs):
- """
+ """
Create a character linked to this account.
Args:
@@ -844,7 +844,7 @@
[docs] @classmethod
def create(cls, *args, **kwargs):
- """
+ """
Creates an Account (or Account/Character pair for MULTISESSION_MODE<2)
with default (or overridden) permissions and having joined them to the
appropriate default channels.
@@ -976,7 +976,7 @@
return account, errors
[docs] def delete(self, *args, **kwargs):
- """
+ """
Deletes the account persistently.
Notes:
@@ -1012,7 +1012,7 @@
# methods inherited from database model
[docs] def msg(self, text=None, from_obj=None, session=None, options=None, **kwargs):
- """
+ """
Evennia -> User
This is the main route for sending data back to the user from the
server.
@@ -1066,7 +1066,7 @@
session.data_out(**kwargs)
[docs] def execute_cmd(self, raw_string, session=None, **kwargs):
- """
+ """
Do something as this account. This method is never called normally,
but only when the account object itself is supposed to execute the
command. It takes account nicks into account, but not nicks of
@@ -1102,7 +1102,7 @@
# channel receive hooks
[docs] def at_pre_channel_msg(self, message, channel, senders=None, **kwargs):
- """
+ """
Called by the Channel just before passing a message into `channel_msg`.
This allows for tweak messages per-user and also to abort the
receive on the receiver-level.
@@ -1143,7 +1143,7 @@
return message
[docs] def channel_msg(self, message, channel, senders=None, **kwargs):
- """
+ """
This performs the actions of receiving a message to an un-muted
channel.
@@ -1169,7 +1169,7 @@
)
[docs] def at_post_channel_msg(self, message, channel, senders=None, **kwargs):
- """
+ """
Called by `self.channel_msg` after message was received.
Args:
@@ -1197,7 +1197,7 @@
quiet=False,
**kwargs,
):
- """
+ """
This is similar to `DefaultObject.search` but defaults to searching
for Accounts only.
@@ -1269,7 +1269,7 @@
[docs] def access(
self, accessing_obj, access_type="read", default=False, no_superuser_bypass=False, **kwargs
):
- """
+ """
Determines if another object has permission to access this
object in whatever way.
@@ -1299,7 +1299,7 @@
@property
def idle_time(self):
- """
+ """
Returns the idle time of the least idle session in seconds. If
no sessions are connected it returns nothing.
"""
@@ -1310,7 +1310,7 @@
@property
def connection_time(self):
- """
+ """
Returns the maximum connection time of all connected sessions
in seconds. Returns nothing if there are no sessions.
"""
@@ -1322,7 +1322,7 @@
# account hooks
[docs] def basetype_setup(self):
- """
+ """
This sets up the basic properties for an account. Overload this
with at_account_creation rather than changing this method.
@@ -1339,7 +1339,7 @@
self.cmdset.add_default(_CMDSET_ACCOUNT, persistent=True)
[docs] def at_account_creation(self):
- """
+ """
This is called once, the very first time the account is created
(i.e. first time they register with the game). It's a good
place to store attributes all accounts should have, like
@@ -1352,7 +1352,7 @@
self.attributes.add("_saved_protocol_flags", {}, lockstring=lockstring)
[docs] def at_init(self):
- """
+ """
This is always called whenever this object is initiated --
that is, whenever it its typeclass is cached from memory. This
happens on-demand first time the object is used or activated
@@ -1371,7 +1371,7 @@
# character is currently connected to this account.
[docs] def at_first_save(self):
- """
+ """
This is a generic hook called by Evennia when this object is
saved to the database the very first time. You generally
don't override this method but the hooks called by it.
@@ -1417,7 +1417,7 @@
self.permissions.batch_add(*permissions)
[docs] def at_access(self, result, accessing_obj, access_type, **kwargs):
- """
+ """
This is triggered after an access-call on this Account has
completed.
@@ -1442,7 +1442,7 @@
pass
[docs] def at_cmdset_get(self, **kwargs):
- """
+ """
Called just *before* cmdsets on this account are requested by
the command handler. The cmdsets are available as
`self.cmdset`. If changes need to be done on the fly to the
@@ -1455,7 +1455,7 @@
pass
[docs] def at_first_login(self, **kwargs):
- """
+ """
Called the very first time this account logs into the game.
Note that this is called *before* at_pre_login, so no session
is established and usually no character is yet assigned at
@@ -1470,7 +1470,7 @@
pass
[docs] def at_password_change(self, **kwargs):
- """
+ """
Called after a successful password set/modify.
Args:
@@ -1481,7 +1481,7 @@
pass
[docs] def at_pre_login(self, **kwargs):
- """
+ """
Called every time the user logs in, just before the actual
login-state is set.
@@ -1493,7 +1493,7 @@
pass
def _send_to_connect_channel(self, message):
- """
+ """
Helper method for loading and sending to the comm channel dedicated to
connection messages. This will also be sent to the mudinfo channel.
@@ -1532,7 +1532,7 @@
_CONNECT_CHANNEL.msg(f"[{now}]: {message}")
[docs] def at_post_login(self, session=None, **kwargs):
- """
+ """
Called at the end of the login process, just before letting
the account loose.
@@ -1575,7 +1575,7 @@
)
[docs] def at_failed_login(self, session, **kwargs):
- """
+ """
Called by the login process if a user account is targeted correctly
but provided with an invalid password. By default it does nothing,
but exists to be overridden.
@@ -1588,7 +1588,7 @@
pass
[docs] def at_disconnect(self, reason=None, **kwargs):
- """
+ """
Called just before user is disconnected.
Args:
@@ -1599,13 +1599,13 @@
"""
- reason = f" ({reason if reason else ''})"
+ reason = f" ({reason if reason else ''})"
self._send_to_connect_channel(
_("|R{key} disconnected{reason}|n").format(key=self.key, reason=reason)
)
[docs] def at_post_disconnect(self, **kwargs):
- """
+ """
This is called *after* disconnection is complete. No messages
can be relayed to the account from here. After this call, the
account should not be accessed any more, making this a good
@@ -1620,7 +1620,7 @@
pass
[docs] def at_msg_receive(self, text=None, from_obj=None, **kwargs):
- """
+ """
This hook is called whenever someone sends a message to this
object using the `msg` method.
@@ -1650,7 +1650,7 @@
return True
[docs] def at_msg_send(self, text=None, to_obj=None, **kwargs):
- """
+ """
This is a hook that is called when *this* object sends a
message to another object with `obj.msg(text, to_obj=obj)`.
@@ -1670,7 +1670,7 @@
pass
[docs] def at_server_reload(self):
- """
+ """
This hook is called whenever the server is shutting down for
restart/reboot. If you want to, for example, save
non-persistent properties across a restart, this is the place
@@ -1679,7 +1679,7 @@
pass
[docs] def at_server_shutdown(self):
- """
+ """
This hook is called whenever the server is shutting down fully
(i.e. not for a restart).
"""
@@ -1687,9 +1687,9 @@
ooc_appearance_template = """
--------------------------------------------------------------------
-{header}
+{header}
-{sessions}
+{sessions}
|whelp|n - more commands
|wpublic <text>|n - talk on public channel
@@ -1698,13 +1698,13 @@
|wic <name>|n - enter the game as character (|wooc|n to get back here)
|wic|n - enter the game as latest character controlled.
-{characters}
-{footer}
+{characters}
+{footer}
--------------------------------------------------------------------
""".strip()
[docs] def at_look(self, target=None, session=None, **kwargs):
- """
+ """
Called when this object executes a look. It allows to customize
just what this means.
@@ -1747,9 +1747,9 @@
ip_addr = sess.address[0] if isinstance(sess.address, tuple) else sess.address
addr = f"{sess.protocol_key} ({ip_addr})"
sess_str = (
- f"|w* {isess + 1}|n"
+ f"|w* {isess + 1}|n"
if session and session.sessid == sess.sessid
- else f" {isess + 1}"
+ else f" {isess + 1}"
)
sess_strings.append(f"{sess_str} {addr}")
@@ -1799,7 +1799,7 @@
[docs]class DefaultGuest(DefaultAccount):
- """
+ """
This class is used for guest logins. Unlike Accounts, Guests and
their characters are deleted after disconnection.
@@ -1807,7 +1807,7 @@
[docs] @classmethod
def create(cls, **kwargs):
- """
+ """
Forwards request to cls.authenticate(); returns a DefaultGuest object
if one is available for use.
@@ -1816,7 +1816,7 @@
[docs] @classmethod
def authenticate(cls, **kwargs):
- """
+ """
Gets or creates a Guest account object.
Keyword Args:
@@ -1889,7 +1889,7 @@
return account, errors
[docs] def at_post_login(self, session=None, **kwargs):
- """
+ """
By default, Guests only have one character regardless of which
MAX_NR_CHARACTERS we use. They also always auto-puppet a matching
character and don't get a choice.
@@ -1904,7 +1904,7 @@
self.puppet_object(session, self.db._last_puppet)
[docs] def at_server_shutdown(self):
- """
+ """
We repeat the functionality of `at_disconnect()` here just to
be on the safe side.
"""
@@ -1916,7 +1916,7 @@
character.delete()
[docs] def at_post_disconnect(self, **kwargs):
- """
+ """
Once having disconnected, destroy the guest's characters and
Args:
diff --git a/docs/1.0/_modules/evennia/accounts/bots.html b/docs/1.0/_modules/evennia/accounts/bots.html
index 4a8bdeeaa3..1706ffb7a1 100644
--- a/docs/1.0/_modules/evennia/accounts/bots.html
+++ b/docs/1.0/_modules/evennia/accounts/bots.html
@@ -102,7 +102,7 @@
[docs]class BotStarter(DefaultScript):
- """
+ """
This non-repeating script has the
sole purpose of kicking its bot
into gear when it is initialized.
@@ -110,7 +110,7 @@
"""
[docs] def at_script_creation(self):
- """
+ """
Called once, when script is created.
"""
@@ -122,7 +122,7 @@
self.at_start()
[docs] def at_start(self):
- """
+ """
Kick bot into gear.
"""
@@ -130,7 +130,7 @@
self.account.start()
[docs] def at_repeat(self):
- """
+ """
Called self.interval seconds to keep connection. We cannot use
the IDLE command from inside the game since the system will
not catch it (commands executed from the server side usually
@@ -150,7 +150,7 @@
[docs]class Bot(DefaultAccount):
- """
+ """
A Bot will start itself when the server starts (it will generally
not do so on a reload - that will be handled by the normal Portal
session resync)
@@ -158,7 +158,7 @@
"""
[docs] def basetype_setup(self):
- """
+ """
This sets up the basic properties for the bot.
"""
@@ -175,28 +175,28 @@
self.is_bot = True
[docs] def msg(self, text=None, from_obj=None, session=None, options=None, **kwargs):
- """
+ """
Evennia -> outgoing protocol
"""
super().msg(text=text, from_obj=from_obj, session=session, options=options, **kwargs)
[docs] def execute_cmd(self, raw_string, session=None):
- """
+ """
Incoming protocol -> Evennia
"""
super().msg(raw_string, session=session)
[docs] def at_server_shutdown(self):
- """
+ """
We need to handle this case manually since the shutdown may be
a reset.
@@ -211,7 +211,7 @@
[docs]class IRCBot(Bot):
- """
+ """
Bot for handling IRC connections.
"""
@@ -228,7 +228,7 @@
irc_port=None,
irc_ssl=None,
):
- """
+ """
Start by telling the portal to start a new session.
Args:
@@ -292,7 +292,7 @@
pass
[docs] def get_nicklist(self, caller):
- """
+ """
Retrive the nick list from the connected channel.
Args:
@@ -312,7 +312,7 @@
return
[docs] def ping(self, caller):
- """
+ """
Fire a ping to the IRC server.
Args:
@@ -325,7 +325,7 @@
super().msg(ping="")
[docs] def reconnect(self):
- """
+ """
Force a protocol-side reconnect of the client without
having to destroy/recreate the bot "account".
@@ -333,7 +333,7 @@
super().msg(reconnect="")
[docs] def msg(self, text=None, **kwargs):
- """
+ """
Takes text from connected channel (only).
Args:
@@ -361,7 +361,7 @@
super().msg(channel=text)
[docs] def execute_cmd(self, session=None, txt=None, **kwargs):
- """
+ """
Take incoming data and send it to connected channel. This is
triggered by the bot_data_in Inputfunc.
@@ -430,7 +430,7 @@
utils.time_format(delta_cmd, 1),
)
)
- text = f"Who list (online/idle): {', '.join(sorted(whos, key=lambda w: w.lower()))}"
+ text = f"Who list (online/idle): {', '.join(sorted(whos, key=lambda w: w.lower()))}"
elif txt.lower().startswith("about"):
# some bot info
text = f"This is an Evennia IRC bot connecting from '{settings.SERVERNAME}'."
@@ -460,14 +460,14 @@
[docs]class RSSBot(Bot):
- """
+ """
An RSS relayer. The RSS protocol itself runs a ticker to update
its feed at regular intervals.
"""
[docs] def start(self, ev_channel=None, rss_url=None, rss_rate=None):
- """
+ """
Start by telling the portal to start a new RSS session
Args:
@@ -505,7 +505,7 @@
_SESSIONS.start_bot_session("evennia.server.portal.rss.RSSBotFactory", configdict)
[docs] def execute_cmd(self, txt=None, session=None, **kwargs):
- """
+ """
Take incoming data and send it to connected channel. This is
triggered by the bot_data_in Inputfunc.
@@ -528,7 +528,7 @@
[docs]class GrapevineBot(Bot):
- """
+ """
g Grapevine (https://grapevine.haus) relayer. The channel to connect to is the first
name in the settings.GRAPEVINE_CHANNELS list.
@@ -537,7 +537,7 @@
factory_path = "evennia.server.portal.grapevine.RestartingWebsocketServerFactory"
[docs] def start(self, ev_channel=None, grapevine_channel=None):
- """
+ """
Start by telling the portal to connect to the grapevine network.
"""
@@ -572,7 +572,7 @@
pass
[docs] def msg(self, text=None, **kwargs):
- """
+ """
Takes text from connected channel (only).
Args:
@@ -622,7 +622,7 @@
game=None,
**kwargs,
):
- """
+ """
Take incoming data from protocol and send it to connected channel. This is
triggered by the bot_data_in Inputfunc.
"""
@@ -642,7 +642,7 @@
[docs]class DiscordBot(Bot):
- """
+ """
Discord bot relay. You will need to set up your own bot
(https://discord.com/developers/applications) and add the bot token as `DISCORD_BOT_TOKEN` to
`secret_settings.py` to use
@@ -651,7 +651,7 @@
factory_path = "evennia.server.portal.discord.DiscordWebsocketServerFactory"
[docs] def at_init(self):
- """
+ """
Load required channels back into memory
"""
@@ -669,7 +669,7 @@
self.ndb.ev_channels[channel_name] = channel
[docs] def start(self):
- """
+ """
Tell the Discord protocol to connect.
"""
@@ -704,7 +704,7 @@
_SESSIONS.start_bot_session(self.factory_path, configdict)
[docs] def at_pre_channel_msg(self, message, channel, senders=None, **kwargs):
- """
+ """
Called by the Channel just before passing a message into `channel_msg`.
We overload this to set the channel tag prefix.
@@ -714,7 +714,7 @@
return super().at_pre_channel_msg(message, channel, senders=senders, **kwargs)
[docs] def channel_msg(self, message, channel, senders=None, relayed=False, **kwargs):
- """
+ """
Passes channel messages received on to discord
Args:
@@ -737,7 +737,7 @@
super().msg(channel=(strip_ansi(message.strip()), dc_chan))
[docs] def direct_msg(self, message, sender, **kwargs):
- """
+ """
Called when the Discord bot receives a direct message on Discord.
Args:
@@ -753,7 +753,7 @@
[docs] def relay_to_channel(
self, message, to_channel, sender=None, from_channel=None, from_server=None, **kwargs
):
- """
+ """
Formats and sends a Discord -> Evennia message. Called when the Discord bot receives a
channel message on Discord.
@@ -796,7 +796,7 @@
sender=None,
**kwargs,
):
- """
+ """
Take incoming data from protocol and send it to connected channel. This is
triggered by the bot_data_in Inputfunc.
diff --git a/docs/1.0/_modules/evennia/accounts/manager.html b/docs/1.0/_modules/evennia/accounts/manager.html
index 710c1fda19..ad12706864 100644
--- a/docs/1.0/_modules/evennia/accounts/manager.html
+++ b/docs/1.0/_modules/evennia/accounts/manager.html
@@ -98,7 +98,7 @@
[docs]class AccountDBManager(TypedObjectManager, UserManager):
- """
+ """
This AccountManager implements methods for searching
and manipulating Accounts directly from the database.
@@ -123,7 +123,7 @@
"""
[docs] def num_total_accounts(self):
- """
+ """
Get total number of accounts.
Returns:
@@ -133,7 +133,7 @@
return self.count()
[docs] def get_connected_accounts(self):
- """
+ """
Get all currently connected accounts.
Returns:
@@ -144,7 +144,7 @@
return self.filter(db_is_connected=True)
[docs] def get_recently_created_accounts(self, days=7):
- """
+ """
Get accounts recently created.
Args:
@@ -160,7 +160,7 @@
return self.filter(date_joined__range=(start_date, end_date))
[docs] def get_recently_connected_accounts(self, days=7):
- """
+ """
Get accounts recently connected to the game.
Args:
@@ -177,7 +177,7 @@
return self.filter(last_login__range=(start_date, end_date)).order_by("-last_login")
[docs] def get_account_from_email(self, uemail):
- """
+ """
Search account by
Returns an account object based on email address.
@@ -191,7 +191,7 @@
return self.filter(email__iexact=uemail)
[docs] def get_account_from_uid(self, uid):
- """
+ """
Get an account by id.
Args:
@@ -207,7 +207,7 @@
return None
[docs] def get_account_from_name(self, uname):
- """
+ """
Get account object based on name.
Args:
@@ -223,7 +223,7 @@
return None
[docs] def search_account(self, ostring, exact=True, typeclass=None):
- """
+ """
Searches for a particular account by name or
database id.
@@ -279,7 +279,7 @@
attributes=None,
report_to=None,
):
- """
+ """
This creates a new account.
Args:
diff --git a/docs/1.0/_modules/evennia/accounts/models.html b/docs/1.0/_modules/evennia/accounts/models.html
index 60657d3235..e22c4c1b0b 100644
--- a/docs/1.0/_modules/evennia/accounts/models.html
+++ b/docs/1.0/_modules/evennia/accounts/models.html
@@ -119,7 +119,7 @@
[docs]class AccountDB(TypedObject, AbstractUser):
- """
+ """
This is a special model using Django's 'profile' functionality
and extends the default Django User model. It is defined as such
by use of the variable AUTH_PROFILE_MODULE in the settings.
@@ -191,7 +191,7 @@
# This seems very sensitive to caching, so leaving it be for now /Griatch
# @property
def __cmdset_storage_get(self):
- """
+ """
Getter. Allows for value = self.name. Returns a list of cmdset_storage.
"""
storage = self.db_cmdset_storage
@@ -200,7 +200,7 @@
# @cmdset_storage.setter
def __cmdset_storage_set(self, value):
- """
+ """
Setter. Allows for self.name = value. Stores as a comma-separated
string.
"""
diff --git a/docs/1.0/_modules/evennia/commands/cmdhandler.html b/docs/1.0/_modules/evennia/commands/cmdhandler.html
index 1744ab04f6..85997d7fc0 100644
--- a/docs/1.0/_modules/evennia/commands/cmdhandler.html
+++ b/docs/1.0/_modules/evennia/commands/cmdhandler.html
@@ -159,12 +159,12 @@
_ERROR_UNTRAPPED = (
_(
- """
+ """
An untrapped error occurred.
"""
),
_(
- """
+ """
An untrapped error occurred. Please file a bug report detailing the steps to reproduce.
"""
),
@@ -172,13 +172,13 @@
_ERROR_CMDSETS = (
_(
- """
+ """
A cmdset merger-error occurred. This is often due to a syntax
error in one of the cmdsets to merge.
"""
),
_(
- """
+ """
A cmdset merger-error occurred. Please file a bug report detailing the
steps to reproduce.
"""
@@ -187,13 +187,13 @@
_ERROR_NOCMDSETS = (
_(
- """
+ """
No command sets found! This is a critical bug that can have
multiple causes.
"""
),
_(
- """
+ """
No command sets found! This is a sign of a critical bug. If
disconnecting/reconnecting doesn't" solve the problem, try to contact
the server admin through" some other means for assistance.
@@ -203,14 +203,14 @@
_ERROR_CMDHANDLER = (
_(
- """
+ """
A command handler bug occurred. If this is not due to a local change,
please file a bug report with the Evennia project, including the
traceback and steps to reproduce.
"""
),
_(
- """
+ """
A command handler bug occurred. Please notify staff - they should
likely file a bug report with the Evennia project.
"""
@@ -230,7 +230,7 @@
def _msg_err(receiver, stringtuple):
- """
+ """
Helper function for returning an error to the caller.
Args:
@@ -261,7 +261,7 @@
def _process_input(caller, prompt, result, cmd, generator):
- """
+ """
Specifically handle the get_input value to send to _progressive_cmd_run as
part of yielding from a Command's `func`.
@@ -282,7 +282,7 @@
def _progressive_cmd_run(cmd, generator, response=None):
- """
+ """
Progressively call the command that was given in argument. Used
when `yield` is present in the Command's `func()` method.
@@ -361,7 +361,7 @@
@inlineCallbacks
def get_and_merge_cmdsets(caller, session, account, obj, callertype, raw_string):
- """
+ """
Gather all relevant cmdsets and merge them.
Args:
@@ -391,7 +391,7 @@
@inlineCallbacks
def _get_local_obj_cmdsets(obj):
- """
+ """
Helper-method; Get Object-level cmdsets
"""
@@ -444,7 +444,7 @@
@inlineCallbacks
def _get_cmdsets(obj):
- """
+ """
Helper method; Get cmdset while making sure to trigger all
hooks safely. Returns the stack and the valid options.
@@ -584,7 +584,7 @@
cmdobj_key=None,
**kwargs,
):
- """
+ """
This is the main mechanism that handles any string sent to the engine.
Args:
@@ -630,7 +630,7 @@
@inlineCallbacks
def _run_command(cmd, cmdname, args, raw_cmdname, cmdset, session, account):
- """
+ """
Helper function: This initializes and runs the Command
instance once the parser has identified it as either a normal
command or one of the system commands.
diff --git a/docs/1.0/_modules/evennia/commands/cmdparser.html b/docs/1.0/_modules/evennia/commands/cmdparser.html
index f1c470ab92..589f124dd8 100644
--- a/docs/1.0/_modules/evennia/commands/cmdparser.html
+++ b/docs/1.0/_modules/evennia/commands/cmdparser.html
@@ -95,7 +95,7 @@