From 842791297a98f2a046c828bc015d5a4bee85c363 Mon Sep 17 00:00:00 2001
From: Evennia docbuilder action
Date: Sun, 25 Feb 2024 15:41:14 +0000
Subject: [PATCH] Updated HTML docs.
---
docs/latest/.buildinfo | 2 +-
docs/latest/Coding/Changelog.html | 35 +-
docs/latest/Setup/Settings-Default.html | 1 -
.../evennia/commands/default/tests.html | 175 ++++++----
.../contrib/rpg/rpsystem/rpsystem.html | 159 +--------
.../evennia/contrib/rpg/rpsystem/tests.html | 92 +++--
.../_modules/evennia/objects/objects.html | 329 +++++++++++++-----
.../_modules/evennia/server/validators.html | 49 ---
docs/latest/_sources/Coding/Changelog.md.txt | 24 +-
.../_sources/Setup/Settings-Default.md.txt | 1 -
.../api/evennia.commands.default.admin.html | 4 +-
...evennia.commands.default.batchprocess.html | 4 +-
.../evennia.commands.default.building.html | 8 +-
.../api/evennia.commands.default.general.html | 16 +-
.../api/evennia.commands.default.system.html | 4 +-
.../api/evennia.commands.default.tests.html | 2 +-
.../evennia.commands.default.unloggedin.html | 8 +-
....base_systems.email_login.email_login.html | 8 +-
...b.base_systems.ingame_python.commands.html | 4 +-
...systems.mux_comms_cmds.mux_comms_cmds.html | 8 +-
...rib.full_systems.evscaperoom.commands.html | 16 +-
...ontrib.game_systems.clothing.clothing.html | 4 +-
...trib.game_systems.turnbattle.tb_basic.html | 4 +-
...trib.game_systems.turnbattle.tb_equip.html | 4 +-
...trib.game_systems.turnbattle.tb_items.html | 4 +-
...trib.game_systems.turnbattle.tb_magic.html | 4 +-
...trib.game_systems.turnbattle.tb_range.html | 4 +-
.../api/evennia.contrib.rpg.dice.dice.html | 4 +-
...evennia.contrib.rpg.rpsystem.rpsystem.html | 83 +----
.../evennia.contrib.rpg.rpsystem.tests.html | 6 +
...ontrib.tutorials.evadventure.commands.html | 8 +-
...ntrib.tutorials.red_button.red_button.html | 16 +-
...trib.tutorials.tutorial_world.objects.html | 12 +-
...ontrib.tutorials.tutorial_world.rooms.html | 8 +-
...utils.git_integration.git_integration.html | 4 +-
docs/latest/api/evennia.objects.objects.html | 137 +++++++-
.../latest/api/evennia.server.validators.html | 55 ---
docs/latest/api/evennia.utils.eveditor.html | 4 +-
docs/latest/api/evennia.utils.evmenu.html | 4 +-
docs/latest/api/evennia.utils.evmore.html | 4 +-
docs/latest/genindex.html | 36 +-
docs/latest/objects.inv | Bin 166332 -> 166383 bytes
docs/latest/searchindex.js | 2 +-
43 files changed, 727 insertions(+), 629 deletions(-)
diff --git a/docs/latest/.buildinfo b/docs/latest/.buildinfo
index 394d6563f1..ff3247169a 100644
--- a/docs/latest/.buildinfo
+++ b/docs/latest/.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: bee62a60e87a7d499134e040f17e1f7a
+config: 9843c9ebb164850b1f9b8b77fa5ec43e
tags: 645f666f9bcd5a90fca523b33c5a78b7
diff --git a/docs/latest/Coding/Changelog.html b/docs/latest/Coding/Changelog.html
index 8f3e8dca3e..4a91b22568 100644
--- a/docs/latest/Coding/Changelog.html
+++ b/docs/latest/Coding/Changelog.html
@@ -193,23 +193,38 @@
main branch
-[Feature] Add evennia.ON_DEMAND_HANDLER for making it easier to implement
-timed element with the on-demand approach (Griatch)
-[Fix] Remove AMP_ENABLED setting since it services no real purpose and
-erroring out on setting it would make it even less useful (Griatch).
-[Fix] services command with no args would traceback (regression) (Griatch)
-Feature: Make it possible to add custom webclient css in
+
Feature: Add [evennia.ON_DEMAND_HANDLER][new-ondemandhandler] for making it
+easier to implement changes that are calculated on-demand (Griatch)
+[Feature][pull3412]: Make it possible to add custom webclient css in
webclient/css/custom.css, same as for website (InspectorCaracal)
-Fix: Fix wilderness contrib error moving to an already existing
+
[Feature][pull3367]: [Component contrib][pull3367extra] got better
+inheritance, slot names to choose attr storage, speedups and fixes (ChrisLR)
+Feature: Break up DefaultObject.search method into several helpers to make
+it easier to override (Griatch)
+Fix: Resolve multimatch error with rpsystem contrib (Griatch)
+Fix: Remove AMP_ENABLED setting since it services no real purpose and
+erroring out on setting it would make it even less useful (Griatch).
+Feature: Remove too-strict password restrictions for Evennia logins, using
+django defaults instead for passwords with more varied characters.
+Fix services command with no args would traceback (regression) (Griatch)
+[Fix][pull3423]: Fix wilderness contrib error moving to an already existing
wilderness room (InspectorCaracal)
-Fix: Don’t always include example the crafting recipe when
+
[Fix][pull3425]: Don’t always include example the crafting recipe when
using the crafting contrib (InspectorCaracal)
-pull3426: Traceback banning a channel using with only one nick
+
[Fix][pull3426]: Traceback banning a channel using with only one nick
(InspectorCaracal)
-pull3434: Adjust lunr search weights to void clashing of cmd-aliases over
+
[Fix][pull3434]: Adjust lunr search weights to void clashing of cmd-aliases over
keys which caused some help entries to shadow others (InspectorCaracal)
Doc fixes (InspectorCaracal, Griatch)
+[new-ondemandhandler][https://www.evennia.com/docs/latest/Components/OnDemandHandler.html]
+[pull3412]: https://github.com/evennia/evennia/pull/3412
+[pull3423]: https://github.com/evennia/evennia/pull/3423
+[pull3425]: https://github.com/evennia/evennia/pull/3425
+[pull3426]: https://github.com/evennia/evennia/pull/3426
+[pull3434]: https://github.com/evennia/evennia/pull/3434
+[pull3367]: https://github.com/evennia/evennia/pull/3367
+[pull3367extra]: https://www.evennia.com/docs/latest/Contribs/Contrib-Components.html
Evennia 3.1.1
diff --git a/docs/latest/Setup/Settings-Default.html b/docs/latest/Setup/Settings-Default.html
index 93d636bdf7..01c0b44722 100644
--- a/docs/latest/Setup/Settings-Default.html
+++ b/docs/latest/Setup/Settings-Default.html
@@ -1219,7 +1219,6 @@ to change into myga
},
{"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"},
{"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"},
- {"NAME": "evennia.server.validators.EvenniaPasswordValidator"},
]
# Username validation plugins
diff --git a/docs/latest/_modules/evennia/commands/default/tests.html b/docs/latest/_modules/evennia/commands/default/tests.html
index fdb34eef0d..8c0697ef80 100644
--- a/docs/latest/_modules/evennia/commands/default/tests.html
+++ b/docs/latest/_modules/evennia/commands/default/tests.html
@@ -104,13 +104,10 @@
import datetime
from unittest.mock import MagicMock, Mock, patch
+import evennia
from anything import Anything
from django.conf import settings
from django.test import override_settings
-from parameterized import parameterized
-from twisted.internet import task
-
-import evennia
from evennia import (
DefaultCharacter,
DefaultExit,
@@ -122,14 +119,7 @@
from evennia.commands import cmdparser
from evennia.commands.cmdset import CmdSet
from evennia.commands.command import Command, InterruptCommand
-from evennia.commands.default import (
- account,
- admin,
- batchprocess,
- building,
- comms,
- general,
-)
+from evennia.commands.default import account, admin, batchprocess, building, comms, general
from evennia.commands.default import help as help_module
from evennia.commands.default import syscommands, system, unloggedin
from evennia.commands.default.cmdset_character import CharacterCmdSet
@@ -138,6 +128,8 @@
from evennia.utils import create, gametime, utils
from evennia.utils.test_resources import BaseEvenniaCommandTest # noqa
from evennia.utils.test_resources import BaseEvenniaTest, EvenniaCommandTest
+from parameterized import parameterized
+from twisted.internet import task
# ------------------------------------------------------------
# Command testing
@@ -239,14 +231,18 @@
self.call(
CmdTest(),
"/t",
- "test: Ambiguous switch supplied: "
- "Did you mean /test or /testswitch or /testswitch2?|Switches matched: []",
+ (
+ "test: Ambiguous switch supplied: "
+ "Did you mean /test or /testswitch or /testswitch2?|Switches matched: []"
+ ),
)
self.call(
CmdTest(),
"/tests",
- "test: Ambiguous switch supplied: "
- "Did you mean /testswitch or /testswitch2?|Switches matched: []",
+ (
+ "test: Ambiguous switch supplied: "
+ "Did you mean /testswitch or /testswitch2?|Switches matched: []"
+ ),
)
[docs] def test_say(self):
@@ -936,8 +932,10 @@
self.call(
building.CmdCpAttr(),
"/copy Obj2/test2 = Obj2/test3",
-
'@cpattr: Extra switch "/copy" ignored.|\nCopied Obj2.test2 -> Obj2.test3. '
-
"(value: 'value2')",
+
(
+
'@cpattr: Extra switch "/copy" ignored.|\nCopied Obj2.test2 -> Obj2.test3. '
+
"(value: 'value2')"
+
),
)
self.call(building.CmdMvAttr(), "", "Usage: ")
self.call(building.CmdMvAttr(), "Obj2/test2 = Obj/test3", "Moved Obj2.test2 -> Obj.test3")
@@ -992,8 +990,10 @@
self.call(
building.CmdSetAttribute(),
"Obj/test1[5] =",
-
"No attribute Obj/test1[5] [category: None] was found to "
-
"delete. (Nested lookups attempted)",
+
(
+
"No attribute Obj/test1[5] [category: None] was found to "
+
"delete. (Nested lookups attempted)"
+
),
)
# Append
self.call(
@@ -1046,8 +1046,10 @@
self.call(
building.CmdSetAttribute(),
"Obj/test2[+'three']",
-
"Attribute Obj/test2[+'three'] [category:None] does not exist. (Nested lookups"
-
" attempted)",
+
(
+
"Attribute Obj/test2[+'three'] [category:None] does not exist. (Nested lookups"
+
" attempted)"
+
),
)
self.call(
building.CmdSetAttribute(),
@@ -1088,8 +1090,10 @@
self.call(
building.CmdSetAttribute(),
"Obj/test2['five'] =",
-
"No attribute Obj/test2['five'] [category: None] "
-
"was found to delete. (Nested lookups attempted)",
+
(
+
"No attribute Obj/test2['five'] [category: None] "
+
"was found to delete. (Nested lookups attempted)"
+
),
)
self.call(
building.CmdSetAttribute(),
@@ -1099,8 +1103,10 @@
self.call(
building.CmdSetAttribute(),
"Obj/test2[+1]=33",
-
"Modified attribute Obj/test2 [category:None] = "
-
"{'one': 99, 'three': 3, '+': 42, '+1': 33}",
+
(
+
"Modified attribute Obj/test2 [category:None] = "
+
"{'one': 99, 'three': 3, '+': 42, '+1': 33}"
+
),
)
# dict - case sensitive keys
@@ -1161,8 +1167,10 @@
building.CmdSetAttribute(),
# Special case for tuple, could have a better message
"Obj/tup[1] = ",
-
"No attribute Obj/tup[1] [category: None] "
-
"was found to delete. (Nested lookups attempted)",
+
(
+
"No attribute Obj/tup[1] [category: None] "
+
"was found to delete. (Nested lookups attempted)"
+
),
)
# Deaper nesting
@@ -1237,8 +1245,10 @@
self.call(
building.CmdSetAttribute(),
"Obj/test4[0]['one']",
-
"Attribute Obj/test4[0]['one'] [category:None] does not exist. (Nested lookups"
-
" attempted)",
+
(
+
"Attribute Obj/test4[0]['one'] [category:None] does not exist. (Nested lookups"
+
" attempted)"
+
),
)
[docs] def test_split_nested_attr(self):
@@ -1345,8 +1355,10 @@
self.call(
building.CmdDestroy(),
"Obj",
-
"Could not find 'Obj'.| (Objects to destroy "
-
"must either be local or specified with a unique #dbref.)",
+
(
+
"Could not find 'Obj'.| (Objects to destroy "
+
"must either be local or specified with a unique #dbref.)"
+
),
)
settings.DEFAULT_HOME = f"#{self.room1.dbid}"
self.call(
@@ -1466,14 +1478,18 @@
self.call(
building.CmdTypeclass(),
"Obj = evennia.objects.objects.DefaultExit",
-
"Obj changed typeclass from evennia.objects.objects.DefaultObject "
-
"to evennia.objects.objects.DefaultExit.",
+
(
+
"Obj changed typeclass from evennia.objects.objects.DefaultObject "
+
"to evennia.objects.objects.DefaultExit."
+
),
)
self.call(
building.CmdTypeclass(),
"Obj2 = evennia.objects.objects.DefaultExit",
-
"Obj2 changed typeclass from evennia.objects.objects.DefaultObject "
-
"to evennia.objects.objects.DefaultExit.",
+
(
+
"Obj2 changed typeclass from evennia.objects.objects.DefaultObject "
+
"to evennia.objects.objects.DefaultExit."
+
),
cmdstring="swap",
inputs=["yes"],
)
@@ -1486,8 +1502,10 @@
self.call(
building.CmdTypeclass(),
"Obj = evennia.objects.objects.DefaultExit",
-
"Obj already has the typeclass 'evennia.objects.objects.DefaultExit'. Use /force to"
-
" override.",
+
(
+
"Obj already has the typeclass 'evennia.objects.objects.DefaultExit'. Use /force to"
+
" override."
+
),
)
self.call(
building.CmdTypeclass(),
@@ -1503,16 +1521,20 @@
self.call(
building.CmdTypeclass(),
"Obj",
-
"Obj updated its existing typeclass (evennia.objects.objects.DefaultObject).\nOnly the"
-
" at_object_creation hook was run (update mode). Attributes set before swap were not"
-
" removed\n(use `swap` or `type/reset` to clear all).",
+
(
+
"Obj updated its existing typeclass (evennia.objects.objects.DefaultObject).\nOnly"
+
" the at_object_creation hook was run (update mode). Attributes set before swap"
+
" were not removed\n(use `swap` or `type/reset` to clear all)."
+
),
cmdstring="update",
)
self.call(
building.CmdTypeclass(),
"/reset/force Obj=evennia.objects.objects.DefaultObject",
-
"Obj updated its existing typeclass (evennia.objects.objects.DefaultObject).\n"
-
"All object creation hooks were run. All old attributes where deleted before the swap.",
+
(
+
"Obj updated its existing typeclass (evennia.objects.objects.DefaultObject).\nAll"
+
" object creation hooks were run. All old attributes where deleted before the swap."
+
),
inputs=["yes"],
)
@@ -1536,11 +1558,13 @@
self.call(
building.CmdTypeclass(),
"/prototype Obj=testkey",
-
"replaced_obj changed typeclass from evennia.objects.objects.DefaultObject to "
-
"typeclasses.objects.Object.\nOnly the at_object_creation hook was run "
-
"(update mode). Attributes set before swap were not removed\n"
-
"(use `swap` or `type/reset` to clear all). Prototype 'replaced_obj' was "
-
"successfully applied over the object type.",
+
(
+
"replaced_obj changed typeclass from evennia.objects.objects.DefaultObject to "
+
"typeclasses.objects.Object.\nOnly the at_object_creation hook was run "
+
"(update mode). Attributes set before swap were not removed\n"
+
"(use `swap` or `type/reset` to clear all). Prototype 'replaced_obj' was "
+
"successfully applied over the object type."
+
),
)
assert self.obj1.db.desc == "protdesc"
@@ -1557,8 +1581,10 @@
self.call(
building.CmdLock(),
"/view Obj = edit:false()",
- "Switch(es) view can not be used with a lock assignment. "
- "Use e.g. lock/del objname/locktype instead.",
+ (
+ "Switch(es) view can not be used with a lock assignment. "
+ "Use e.g. lock/del objname/locktype instead."
+ ),
)
self.call(building.CmdLock(), "Obj = control:false()")
self.call(building.CmdLock(), "Obj = edit:false()")
@@ -1684,9 +1710,11 @@
self.call(
building.CmdScripts(),
"/delete #{}-#{}".format(script1.id, script3.id),
- f"Global Script Deleted - #{script1.id} (evennia.scripts.scripts.DefaultScript)|"
- f"Global Script Deleted - #{script2.id} (evennia.scripts.scripts.DefaultScript)|"
- f"Global Script Deleted - #{script3.id} (evennia.scripts.scripts.DefaultScript)",
+ (
+ f"Global Script Deleted - #{script1.id} (evennia.scripts.scripts.DefaultScript)|"
+ f"Global Script Deleted - #{script2.id} (evennia.scripts.scripts.DefaultScript)|"
+ f"Global Script Deleted - #{script3.id} (evennia.scripts.scripts.DefaultScript)"
+ ),
inputs=["y"],
)
self.assertFalse(script1.pk)
@@ -1707,9 +1735,8 @@
self.call(
building.CmdTeleport(),
"Obj = Room2",
- "Obj(#{}) is leaving Room(#{}), heading for Room2(#{}).|Teleported Obj -> Room2.".format(
- oid, rid, rid2
- ),
+ "Obj(#{}) is leaving Room(#{}), heading for Room2(#{}).|Teleported Obj -> Room2."
+ .format(oid, rid, rid2),
)
self.call(building.CmdTeleport(), "NotFound = Room", "Could not find 'NotFound'.")
self.call(
@@ -1782,16 +1809,20 @@
self.call(
building.CmdSpawn(),
- "/save {'prototype_key': 'testprot', 'key':'Test Char', "
- "'typeclass':'evennia.objects.objects.DefaultCharacter'}",
+ (
+ "/save {'prototype_key': 'testprot', 'key':'Test Char', "
+ "'typeclass':'evennia.objects.objects.DefaultCharacter'}"
+ ),
"Saved prototype: testprot",
inputs=["y"],
)
self.call(
building.CmdSpawn(),
- "/save testprot2 = {'key':'Test Char', "
- "'typeclass':'evennia.objects.objects.DefaultCharacter'}",
+ (
+ "/save testprot2 = {'key':'Test Char', "
+ "'typeclass':'evennia.objects.objects.DefaultCharacter'}"
+ ),
"(Replacing `prototype_key` in prototype with given key.)|Saved prototype: testprot2",
inputs=["y"],
)
@@ -1802,8 +1833,10 @@
self.call(
building.CmdSpawn(),
"/save {'key':'Test Char', 'typeclass':'evennia.objects.objects.DefaultCharacter'}",
- "A prototype_key must be given, either as `prototype_key = <prototype>` or as "
- "a key 'prototype_key' inside the prototype structure.",
+ (
+ "A prototype_key must be given, either as `prototype_key = <prototype>` or as "
+ "a key 'prototype_key' inside the prototype structure."
+ ),
)
self.call(building.CmdSpawn(), "/list", "Key ")
@@ -1825,7 +1858,8 @@
self.call(
building.CmdSpawn(),
"{'prototype_key':'GOBLIN', 'typeclass':'evennia.objects.objects.DefaultCharacter', "
- "'key':'goblin', 'location':'%s'}" % spawnLoc.dbref,
+ "'key':'goblin', 'location':'%s'}"
+ % spawnLoc.dbref,
"Spawned goblin",
)
goblin = get_object(self, "goblin")
@@ -1873,7 +1907,8 @@
self.call(
building.CmdSpawn(),
"/noloc {'prototype_parent':'TESTBALL', 'key': 'Ball', 'prototype_key': 'foo',"
- " 'location':'%s'}" % spawnLoc.dbref,
+ " 'location':'%s'}"
+ % spawnLoc.dbref,
"Spawned Ball",
)
ball = get_object(self, "Ball")
@@ -2111,8 +2146,10 @@
self.call(
comms.CmdPage(),
"TestAccount2 = Test",
- "TestAccount2 is offline. They will see your message if they list their pages later."
- "|You paged TestAccount2 with: 'Test'.",
+ (
+ "TestAccount2 is offline. They will see your message if they list their pages"
+ " later.|You paged TestAccount2 with: 'Test'."
+ ),
receiver=self.account,
)
@@ -2185,8 +2222,10 @@
self.call(
batchprocess.CmdBatchCommands(),
"batchprocessor.example_batch_cmds_test",
- "Running Batch-command processor - Automatic mode for"
- " batchprocessor.example_batch_cmds",
+ (
+ "Running Batch-command processor - Automatic mode for"
+ " batchprocessor.example_batch_cmds"
+ ),
)
# we make sure to delete the button again here to stop the running reactor
confirm = building.CmdDestroy.confirm
diff --git a/docs/latest/_modules/evennia/contrib/rpg/rpsystem/rpsystem.html b/docs/latest/_modules/evennia/contrib/rpg/rpsystem/rpsystem.html
index ebab8a85da..16bee4303a 100644
--- a/docs/latest/_modules/evennia/contrib/rpg/rpsystem/rpsystem.html
+++ b/docs/latest/_modules/evennia/contrib/rpg/rpsystem/rpsystem.html
@@ -244,18 +244,12 @@
import inflect
from django.conf import settings
-
from evennia.commands.cmdset import CmdSet
from evennia.commands.command import Command
from evennia.objects.models import ObjectDB
from evennia.objects.objects import DefaultCharacter, DefaultObject
from evennia.utils import ansi, logger
-from evennia.utils.utils import (
- iter_to_str,
- lazy_property,
- make_iter,
- variable_from_module,
-)
+from evennia.utils.utils import iter_to_str, lazy_property, make_iter, variable_from_module
_INFLECT = inflect.engine()
@@ -269,7 +263,7 @@
# The prefix is the (single-character) symbol used to find the start
# of a object reference, such as /tall (note that
# the system will understand multi-word references like '/a tall man' too).
-_PREFIX = getattr(settings, 'RPSYSTEM_EMOTE_PREFIX', "/")
+_PREFIX = getattr(settings, "RPSYSTEM_EMOTE_PREFIX", "/")
# The num_sep is the (single-character) symbol used to separate the
# sdesc from the number when trying to separate identical sdescs from
@@ -1407,145 +1401,25 @@
self.db.pose_default = "is here."
self.db._sdesc = ""
-[docs] def search(
+
[docs] def get_search_result(
self,
searchdata,
-
global_search=False,
-
use_nicks=True,
-
typeclass=None,
-
location=None,
attribute_name=None,
-
quiet=False,
-
exact=False,
+
typeclass=None,
candidates=None,
-
nofound_string=None,
-
multimatch_string=None,
+
exact=False,
use_dbref=None,
+
tags=None,
+
**kwargs,
):
"""
-
Returns an Object matching a search string/condition, taking
-
sdescs into account.
-
-
Perform a standard object search in the database, handling
-
multiple results and lack thereof gracefully. By default, only
-
objects in the current `location` of `self` or its inventory are searched for.
-
-
Args:
-
searchdata (str or obj): Primary search criterion. Will be matched
-
against `object.key` (with `object.aliases` second) unless
-
the keyword attribute_name specifies otherwise.
-
**Special strings:**
-
- `#<num>`: search by unique dbref. This is always
-
a global search.
-
- `me,self`: self-reference to this object
-
- `<num>-<string>` - can be used to differentiate
-
between multiple same-named matches
-
global_search (bool): Search all objects globally. This is overruled
-
by `location` keyword.
-
use_nicks (bool): Use nickname-replace (nicktype "object") on `searchdata`.
-
typeclass (str or Typeclass, or list of either): Limit search only
-
to `Objects` with this typeclass. May be a list of typeclasses
-
for a broader search.
-
location (Object or list): Specify a location or multiple locations
-
to search. Note that this is used to query the *contents* of a
-
location and will not match for the location itself -
-
if you want that, don't set this or use `candidates` to specify
-
exactly which objects should be searched.
-
attribute_name (str): Define which property to search. If set, no
-
key+alias search will be performed. This can be used
-
to search database fields (db_ will be automatically
-
appended), and if that fails, it will try to return
-
objects having Attributes with this name and value
-
equal to searchdata. A special use is to search for
-
"key" here if you want to do a key-search without
-
including aliases.
-
quiet (bool): don't display default error messages - this tells the
-
search method that the user wants to handle all errors
-
themselves. It also changes the return value type, see
-
below.
-
exact (bool): if unset (default) - prefers to match to beginning of
-
string rather than not matching at all. If set, requires
-
exact matching of entire string.
-
candidates (list of objects): this is an optional custom list of objects
-
to search (filter) between. It is ignored if `global_search`
-
is given. If not set, this list will automatically be defined
-
to include the location, the contents of location and the
-
caller's contents (inventory).
-
nofound_string (str): optional custom string for not-found error message.
-
multimatch_string (str): optional custom string for multimatch error header.
-
use_dbref (bool or None): If None, only turn off use_dbref if we are of a lower
-
permission than Builder. Otherwise, honor the True/False value.
-
-
Returns:
-
match (Object, None or list): will return an Object/None if `quiet=False`,
-
otherwise it will return a list of 0, 1 or more matches.
-
-
Notes:
-
To find Accounts, use eg. `evennia.account_search`. If
-
`quiet=False`, error messages will be handled by
-
`settings.SEARCH_AT_RESULT` and echoed automatically (on
-
error, return will be `None`). If `quiet=True`, the error
-
messaging is assumed to be handled by the caller.
+
Override of the parent method for producing search results that understands sdescs.
+
These are used in the main .search() method of the parent class.
"""
-
is_string = isinstance(searchdata, str)
-
-
if is_string:
-
# searchdata is a string; wrap some common self-references
-
if searchdata.lower() in ("here",):
-
return [self.location] if quiet else self.location
-
if searchdata.lower() in ("me", "self"):
-
return [self] if quiet else self
-
-
if use_nicks:
-
# do nick-replacement on search
-
searchdata = self.nicks.nickreplace(
-
searchdata, categories=("object", "account"), include_account=True
-
)
-
-
if global_search or (
-
is_string
-
and searchdata.startswith("#")
-
and len(searchdata) > 1
-
and searchdata[1:].isdigit()
-
):
-
# only allow exact matching if searching the entire database
-
# or unique #dbrefs
-
exact = True
-
elif candidates is None:
-
# no custom candidates given - get them automatically
-
if location:
-
# location(s) were given
-
candidates = []
-
for obj in make_iter(location):
-
candidates.extend(obj.contents)
-
else:
-
# local search. Candidates are taken from
-
# self.contents, self.location and
-
# self.location.contents
-
location = self.location
-
candidates = self.contents
-
if location:
-
candidates = candidates + [location] + location.contents
-
else:
-
# normally we don't need this since we are
-
# included in location.contents
-
candidates.append(self)
-
-
# the sdesc-related substitution
+
# we also want to use the default search method
+
search_obj = super().get_search_result
is_builder = self.locks.check_lockstring(self, "perm(Builder)")
-
use_dbref = is_builder if use_dbref is None else use_dbref
-
-
def search_obj(string):
-
"helper wrapper for searching"
-
return ObjectDB.objects.object_search(
-
string,
-
attribute_name=attribute_name,
-
typeclass=typeclass,
-
candidates=candidates,
-
exact=exact,
-
use_dbref=use_dbref,
-
)
if candidates:
candidates = parse_sdescs_and_recogs(
@@ -1568,16 +1442,7 @@
# only done in code, so is controlled, #dbrefs are turned off
# for non-Builders.
results = search_obj(searchdata)
-
-
if quiet:
-
return results
-
return _AT_SEARCH_RESULT(
-
results,
-
self,
-
query=searchdata,
-
nofound_string=nofound_string,
-
multimatch_string=multimatch_string,
-
)
+
return results
[docs] def get_posed_sdesc(self, sdesc, **kwargs):
"""
diff --git a/docs/latest/_modules/evennia/contrib/rpg/rpsystem/tests.html b/docs/latest/_modules/evennia/contrib/rpg/rpsystem/tests.html
index db7a8edec9..602c5b8bcb 100644
--- a/docs/latest/_modules/evennia/contrib/rpg/rpsystem/tests.html
+++ b/docs/latest/_modules/evennia/contrib/rpg/rpsystem/tests.html
@@ -95,8 +95,7 @@
import time
from anything import Anything
-
-
from evennia import create_object
+
from evennia import DefaultObject, create_object, default_cmds
from evennia.commands.default.tests import BaseEvenniaCommandTest
from evennia.utils.test_resources import BaseEvenniaTest
@@ -247,12 +246,11 @@
self.assertEqual(
rpsystem.parse_language(self.speaker, language_emote),
(
-
'For a change of pace, /me says, {##0}',
-
{"##0": ('elvish', '"This is in elvish!"')},
+
"For a change of pace, /me says, {##0}",
+
{"##0": ("elvish", '"This is in elvish!"')},
),
)
-
[docs] def test_parse_sdescs_and_recogs(self):
speaker = self.speaker
speaker.sdesc.add(sdesc0)
@@ -341,18 +339,24 @@
rpsystem.send_emote(speaker, receivers, emote, case_sensitive=False)
self.assertEqual(
self.out0[0],
-
"With a flair, |mSender|n looks at |bThe first receiver of emotes.|n "
-
'and |bAnother nice colliding sdesc-guy for tests|n. She says |w"This is a test."|n',
+
(
+
"With a flair, |mSender|n looks at |bThe first receiver of emotes.|n "
+
'and |bAnother nice colliding sdesc-guy for tests|n. She says |w"This is a test."|n'
+
),
)
self.assertEqual(
self.out1[0],
-
"With a flair, |bA nice sender of emotes|n looks at |mReceiver1|n and "
-
'|bAnother nice colliding sdesc-guy for tests|n. She says |w"This is a test."|n',
+
(
+
"With a flair, |bA nice sender of emotes|n looks at |mReceiver1|n and "
+
'|bAnother nice colliding sdesc-guy for tests|n. She says |w"This is a test."|n'
+
),
)
self.assertEqual(
self.out2[0],
-
"With a flair, |bA nice sender of emotes|n looks at |bThe first "
-
'receiver of emotes.|n and |mReceiver2|n. She says |w"This is a test."|n',
+
(
+
"With a flair, |bA nice sender of emotes|n looks at |bThe first "
+
'receiver of emotes.|n and |mReceiver2|n. She says |w"This is a test."|n'
+
),
)
[docs] def test_send_emote_fallback(self):
@@ -377,8 +381,10 @@
)
self.assertEqual(
self.out2[0],
-
"|bA nice sender of emotes|n is distracted from |bthe first receiver of emotes.|n by"
-
" something.",
+
(
+
"|bA nice sender of emotes|n is distracted from |bthe first receiver of emotes.|n"
+
" by something."
+
),
)
[docs] def test_send_case_sensitive_emote(self):
@@ -396,21 +402,27 @@
rpsystem.send_emote(speaker, receivers, case_emote)
self.assertEqual(
self.out0[0],
-
"|mSender|n looks at |bthe first receiver of emotes.|n. Then, |mSender|n "
-
"looks at |bTHE FIRST RECEIVER OF EMOTES.|n, |bThe first receiver of emotes.|n "
-
"and |bAnother nice colliding sdesc-guy for tests|n twice.",
+
(
+
"|mSender|n looks at |bthe first receiver of emotes.|n. Then, |mSender|n "
+
"looks at |bTHE FIRST RECEIVER OF EMOTES.|n, |bThe first receiver of emotes.|n "
+
"and |bAnother nice colliding sdesc-guy for tests|n twice."
+
),
)
self.assertEqual(
self.out1[0],
-
"|bA nice sender of emotes|n looks at |mReceiver1|n. Then, "
-
"|ba nice sender of emotes|n looks at |mReceiver1|n, |mReceiver1|n "
-
"and |bAnother nice colliding sdesc-guy for tests|n twice.",
+
(
+
"|bA nice sender of emotes|n looks at |mReceiver1|n. Then, "
+
"|ba nice sender of emotes|n looks at |mReceiver1|n, |mReceiver1|n "
+
"and |bAnother nice colliding sdesc-guy for tests|n twice."
+
),
)
self.assertEqual(
self.out2[0],
-
"|bA nice sender of emotes|n looks at |bthe first receiver of emotes.|n. "
-
"Then, |ba nice sender of emotes|n looks at |bTHE FIRST RECEIVER OF EMOTES.|n, "
-
"|bThe first receiver of emotes.|n and |mReceiver2|n twice.",
+
(
+
"|bA nice sender of emotes|n looks at |bthe first receiver of emotes.|n. "
+
"Then, |ba nice sender of emotes|n looks at |bTHE FIRST RECEIVER OF EMOTES.|n, "
+
"|bThe first receiver of emotes.|n and |mReceiver2|n twice."
+
),
)
[docs] def test_rpsearch(self):
@@ -461,8 +473,10 @@
self.call(
rpsystem.CmdRecog(),
"",
-
"Currently recognized (use 'recog <sdesc> as <alias>' to add new "
-
"and 'forget <alias>' to remove):\n friend (BarFoo Character)",
+
(
+
"Currently recognized (use 'recog <sdesc> as <alias>' to add new "
+
"and 'forget <alias>' to remove):\n friend (BarFoo Character)"
+
),
)
self.call(
rpsystem.CmdRecog(),
@@ -471,7 +485,35 @@
cmdstring="forget",
)
-
self.call(rpsystem.CmdSdesc(), "clear", 'Cleared sdesc, using name "Char".', inputs=["Y"])
+ self.call(rpsystem.CmdSdesc(), "clear", 'Cleared sdesc, using name "Char".', inputs=["Y"])
+
+[docs] def test_multi_match_search(self):
+
"""
+
Test that the multi-match search works as expected
+
+
"""
+
mushroom1 = create_object(rpsystem.ContribRPObject, key="Mushroom", location=self.room1)
+
mushroom1.db.desc = "The first mushroom is brown."
+
mushroom2 = create_object(rpsystem.ContribRPObject, key="Mushroom", location=self.room1)
+
mushroom2.db.desc = "The second mushroom is red."
+
+
# check locations and contents
+
self.assertEqual(self.char1.location, self.room1)
+
self.assertTrue(set(self.room1.contents).intersection(set([mushroom1, mushroom2])))
+
+
expected_first_call = [
+
"More than one match for 'Mushroom' (please narrow target):",
+
f" Mushroom({mushroom1.dbref})-1 []",
+
f" Mushroom({mushroom2.dbref})-2 []",
+
]
+
+
self.call(default_cmds.CmdLook(), "Mushroom", "\n".join(expected_first_call)) # PASSES
+
+
expected_second_call = f"Mushroom({mushroom1.dbref})\nThe first mushroom is brown."
+
self.call(default_cmds.CmdLook(), "Mushroom-1", expected_second_call) # FAILS
+
+
expected_third_call = f"Mushroom({mushroom2.dbref})\nThe second mushroom is red."
+
self.call(default_cmds.CmdLook(), "Mushroom-2", expected_third_call) # FAILS
diff --git a/docs/latest/_modules/evennia/objects/objects.html b/docs/latest/_modules/evennia/objects/objects.html
index b3a33cc522..d24d502e72 100644
--- a/docs/latest/_modules/evennia/objects/objects.html
+++ b/docs/latest/_modules/evennia/objects/objects.html
@@ -116,6 +116,7 @@
from evennia.utils import ansi, create, funcparser, logger, search
from evennia.utils.utils import (
class_from_module,
+ dbref,
is_iter,
iter_to_str,
lazy_property,
@@ -416,7 +417,213 @@
"""
return [exi for exi in self.contents if exi.destination]
- # main methods
+ # search methods and hooks
+
+[docs] def get_search_query_replacement(self, searchdata, **kwargs):
+
"""
+
This method is called by the search method to allow for direct
+
replacements of the search string before it is used in the search.
+
+
Args:
+
searchdata (str): The search string to replace.
+
**kwargs (any): These are the same as passed to the `search` method.
+
+
Returns:
+
str: The (potentially modified) search string.
+
+
"""
+
if kwargs.get("use_nicks"):
+
return self.nicks.nickreplace(
+
searchdata, categories=("object", "account"), include_account=True
+
)
+
return searchdata
+
+[docs] def get_search_direct_match(self, searchdata, **kwargs):
+
"""
+
This method is called by the search method to allow for direct
+
replacements, such as 'me' always being an alias for this object.
+
+
Args:
+
searchdata (str): The search string to replace.
+
**kwargs (any): These are the same as passed to the `search` method.
+
+
Returns:
+
tuple: `(should_return, str or Obj)`, where `should_return` is a boolean indicating
+
the `.search` method should return the result immediately without further
+
processing. If `should_return` is `True`, the second element of the tuple is the result
+
that is returned.
+
+
"""
+
if isinstance(searchdata, str):
+
match searchdata.lower():
+
case "me" | "self":
+
return True, self
+
case "here":
+
return True, self.location
+
return False, searchdata
+
+[docs] def get_search_candidates(self, searchdata, **kwargs):
+
"""
+
Get the candidates for a search. Also the `candidates` provided to the
+
search function is included, and could be modified in-place here.
+
+
Args:
+
searchdata (str): The search criterion (could be modified by `get_search_query_replacement`).
+
**kwargs (any): These are the same as passed to the `search` method.
+
+
Returns:
+
list: A list of objects to search between.
+
+
Notes:
+
If `searchdata` is a #dbref, this method should always return `None`. This is because
+
the search should always be global in this case. If `candidates` were already given,
+
they should be used as is. If `location` was given, the candidates should be based on
+
that.
+
+
"""
+
if kwargs.get("global_search") or dbref(searchdata):
+
# global searches (dbref-searches are always global too) should not have any candidates
+
return None
+
+
# if candidates were already given, use them
+
candidates = kwargs.get("candidates")
+
if candidates:
+
return candidates
+
+
# find candidates based on location
+
location = kwargs.get("location")
+
+
if location:
+
# location(s) were given
+
candidates = []
+
for obj in make_iter(location):
+
candidates.extend(obj.contents)
+
else:
+
# local search. Candidates are taken from
+
# self.contents, self.location and
+
# self.location.contents
+
location = self.location
+
candidates = self.contents
+
if location:
+
candidates = candidates + [location] + location.contents
+
else:
+
# normally we don't need this since we are
+
# included in location.contents
+
candidates.append(self)
+
return candidates
+
+[docs] def get_search_result(
+
self,
+
searchdata,
+
attribute_name=None,
+
typeclass=None,
+
candidates=None,
+
exact=False,
+
use_dbref=None,
+
tags=None,
+
**kwargs,
+
):
+
"""
+
This is a wrapper for actually searching for objects, used by the `search` method.
+
This is broken out into a separate method to allow for easier overriding in child classes.
+
+
Args:
+
searchdata (str): The search criterion.
+
attribute_name (str): The attribute to search on (default is `.
+
typeclass (Typeclass or list): The typeclass to search for.
+
candidates (list): A list of objects to search between.
+
exact (bool): Require exact match.
+
use_dbref (bool): Allow dbref search.
+
tags (list): Tags to search for.
+
+
"""
+
+
return ObjectDB.objects.search_object(
+
searchdata,
+
attribute_name=attribute_name,
+
typeclass=typeclass,
+
candidates=candidates,
+
exact=exact,
+
use_dbref=use_dbref,
+
tags=tags,
+
)
+
+[docs] def get_stacked_results(self, results, **kwargs):
+
"""
+
This method is called by the search method to allow for handling of multi-match
+
results that should be stacked.
+
+
Args:
+
results (list): The list of results from the search.
+
+
Returns:
+
tuple: `(stacked, results)`, where `stacked` is a boolean indicating if the
+
result is stacked and `results` is the list of results to return. If `stacked`
+
is True, the ".search" method will return `results` immediately without further
+
processing (it will not result in a multimatch-error).
+
+
Notes:
+
The `stacked` keyword argument is an integer that controls the max size of each stack
+
(if >0). It's important to make sure to only stack _identical_ objects, otherwise we
+
risk losing track of objects.
+
+
"""
+
nresults = len(results)
+
max_stack_size = kwargs.get("stacked", 0)
+
typeclass = kwargs.get("typeclass")
+
exact = kwargs.get("exact", False)
+
+
if max_stack_size > 0 and nresults > 1:
+
nstack = nresults
+
if not exact:
+
# we re-run exact match against one of the matches to make sure all are indeed
+
# equal and we were not catching partial matches not belonging to the stack
+
nstack = len(
+
ObjectDB.objects.get_objs_with_key_or_alias(
+
results[0].key,
+
exact=True,
+
candidates=list(results),
+
typeclasses=[typeclass] if typeclass else None,
+
)
+
)
+
if nstack == nresults:
+
# a valid stack of identical items, return multiple results
+
return True, list(results)[:max_stack_size]
+
+
return False, results
+
+[docs] def handle_search_results(self, searchdata, results, **kwargs):
+
"""
+
This method is called by the search method to allow for handling of the final search result.
+
+
Args:
+
searchdata (str): The original search criterion (potentially modified by
+
`get_search_query_replacement`).
+
results (list): The list of results from the search.
+
**kwargs (any): These are the same as passed to the `search` method.
+
+
Returns:
+
Object, None or list: Normally this is a single object, but if `quiet=True` it should be
+
a list. If quiet=False and we have to handle a no/multi-match error (directly messaging
+
the user), this should return `None`.
+
+
"""
+
if kwargs.get("quiet"):
+
# don't care about no/multi-match errors, just return list of whatever we have
+
return list(results)
+
+
# handle any error messages, otherwise return a single result
+
+
nofound_string = kwargs.get("nofound_string")
+
multimatch_string = kwargs.get("multimatch_string")
+
+
return _AT_SEARCH_RESULT(
+
results,
+
self,
+
query=searchdata,
+
nofound_string=nofound_string,
+
multimatch_string=multimatch_string,
+
)
[docs] def search(
self,
@@ -501,10 +708,10 @@
more tag definitions on the form `tagname` or `(tagname, tagcategory)`.
stacked (int, optional): If > 0, multimatches will be analyzed to determine if they
only contains identical objects; these are then assumed 'stacked' and no multi-match
-
error will be generated, instead `stacked` number of matches will be returned. If
-
`stacked` is larger than number of matches, returns that number of matches. If
-
the found stack is a mix of objects, return None and handle the multi-match
-
error depending on the value of `quiet`.
+
error will be generated, instead `stacked` number of matches will be returned as a
+
list. If `stacked` is larger than number of matches, returns that number of matches.
+
If the found stack is a mix of objects, return None and handle the multi-match error
+
depending on the value of `quiet`.
Returns:
Object, None or list: Will return an `Object` or `None` if `quiet=False`. Will return
@@ -519,59 +726,40 @@
messaging is assumed to be handled by the caller.
"""
-
is_string = isinstance(searchdata, str)
+
# store input kwargs for sub-methods (this must be done first in this method)
+
input_kwargs = {
+
key: value for key, value in locals().items() if key not in ("self", "searchdata")
+
}
-
if is_string:
-
# searchdata is a string; wrap some common self-references
-
if searchdata.lower() in ("here",):
-
return [self.location] if quiet else self.location
-
if searchdata.lower() in ("me", "self"):
-
return [self] if quiet else self
+
# replace incoming searchdata string with a potentially modified version
+
searchdata = self.get_search_query_replacement(searchdata, **input_kwargs)
-
if use_dbref is None:
-
use_dbref = self.locks.check_lockstring(self, "_dummy:perm(Builder)")
+
# handle special input strings, like "me" or "here".
+
should_return, searchdata = self.get_search_direct_match(searchdata, **input_kwargs)
+
if should_return:
+
# we got an actual result, return it immediately
+
return [searchdata] if quiet else searchdata
-
if use_nicks:
-
# do nick-replacement on search
-
searchdata = self.nicks.nickreplace(
-
searchdata, categories=("object", "account"), include_account=True
-
)
+
# if use_dbref is None, we use a lock to determine if dbref search is allowed
+
use_dbref = (
+
self.locks.check_lockstring(self, "_dummy:perm(Builder)")
+
if use_dbref is None
+
else use_dbref
+
)
-
if global_search or (
-
is_string
-
and searchdata.startswith("#")
-
and len(searchdata) > 1
-
and searchdata[1:].isdigit()
-
):
-
# only allow exact matching if searching the entire database
-
# or unique #dbrefs
-
exact = True
-
candidates = None
+
# convert tags into tag tuples suitable for query
+
tags = [
+
(tagkey, tagcat[0] if tagcat else None) for tagkey, *tagcat in make_iter(tags or [])
+
]
-
elif candidates is None:
-
# no custom candidates given - get them automatically
-
if location:
-
# location(s) were given
-
candidates = []
-
for obj in make_iter(location):
-
candidates.extend(obj.contents)
-
else:
-
# local search. Candidates are taken from
-
# self.contents, self.location and
-
# self.location.contents
-
location = self.location
-
candidates = self.contents
-
if location:
-
candidates = candidates + [location] + location.contents
-
else:
-
# normally we don't need this since we are
-
# included in location.contents
-
candidates.append(self)
+
# always use exact match for dbref/global searches
+
exact = True if global_search or dbref(searchdata) else exact
-
if tags:
-
tags = [(tagkey, tagcat[0] if tagcat else None) for tagkey, *tagcat in make_iter(tags)]
+
# get candidates
+
candidates = self.get_search_candidates(searchdata, **input_kwargs)
-
results = ObjectDB.objects.search_object(
+
# do the actual search
+
results = self.get_search_result(
searchdata,
attribute_name=attribute_name,
typeclass=typeclass,
@@ -581,41 +769,18 @@
tags=tags,
)
+
# filter out objects we are not allowed to search
if use_locks:
results = [x for x in list(results) if x.access(self, "search", default=True)]
-
nresults = len(results)
-
if stacked > 0 and nresults > 1:
-
# handle stacks, disable multimatch errors
-
nstack = nresults
-
if not exact:
-
# we re-run exact match against one of the matches to
-
# make sure we were not catching partial matches not belonging
-
# to the stack
-
nstack = len(
-
ObjectDB.objects.get_objs_with_key_or_alias(
-
results[0].key,
-
exact=True,
-
candidates=list(results),
-
typeclasses=[typeclass] if typeclass else None,
-
)
-
)
-
if nstack == nresults:
-
# a valid stack, return multiple results
-
return list(results)[:stacked]
+
# handle stacked objects
+
is_stacked, results = self.get_stacked_results(results, **input_kwargs)
+
if is_stacked:
+
# we have a stacked result, return it immediately (a list)
+
return results
-
if quiet:
-
# don't auto-handle error messaging
-
return list(results)
-
-
# handle error messages
-
return _AT_SEARCH_RESULT(
-
results,
-
self,
-
query=searchdata,
-
nofound_string=nofound_string,
-
multimatch_string=multimatch_string,
-
)
+ # handle the end (unstacked) results, returning a single object, a list or None
+ return self.handle_search_results(searchdata, results, **input_kwargs)
[docs] def search_account(self, searchdata, quiet=False):
"""
diff --git a/docs/latest/_modules/evennia/server/validators.html b/docs/latest/_modules/evennia/server/validators.html
index 81aa056709..ce0e08e9c1 100644
--- a/docs/latest/_modules/evennia/server/validators.html
+++ b/docs/latest/_modules/evennia/server/validators.html
@@ -129,55 +129,6 @@
_("Sorry, that username is already taken."), code="evennia_username_taken"
)
-
-[docs]class EvenniaPasswordValidator:
-
[docs] def __init__(
-
self,
-
regex=r"^[\w. @+\-',]+$",
-
policy="Password should contain a mix of letters, spaces, digits and @/./+/-/_/'/, only.",
-
):
-
"""
-
Constructs a standard Django password validator.
-
-
Args:
-
regex (str): Regex pattern of valid characters to allow.
-
policy (str): Brief explanation of what the defined regex permits.
-
-
"""
-
self.regex = regex
-
self.policy = policy
-
-
[docs] def validate(self, password, user=None):
-
"""
-
Validates a password string to make sure it meets predefined Evennia
-
acceptable character policy.
-
-
Args:
-
password (str): Password to validate
-
user (None): Unused argument but required by Django
-
-
Returns:
-
None (None): None if password successfully validated,
-
raises ValidationError otherwise.
-
-
"""
-
# Check complexity
-
if not re.findall(self.regex, password):
-
raise ValidationError(_(self.policy), code="evennia_password_policy")
-
-
[docs] def get_help_text(self):
-
"""
-
Returns a user-facing explanation of the password policy defined
-
by this validator.
-
-
Returns:
-
text (str): Explanation of password policy.
-
-
"""
-
return _(
-
"{policy} From a terminal client, you can also use a phrase of multiple words if "
-
"you enclose the password in double quotes.".format(policy=self.policy)
-
)
diff --git a/docs/latest/_sources/Coding/Changelog.md.txt b/docs/latest/_sources/Coding/Changelog.md.txt
index c7331c75be..9f7c9fbc22 100644
--- a/docs/latest/_sources/Coding/Changelog.md.txt
+++ b/docs/latest/_sources/Coding/Changelog.md.txt
@@ -2,28 +2,38 @@
## main branch
-- [Feature] Add `evennia.ON_DEMAND_HANDLER` for making it easier to implement
- timed element with the on-demand approach (Griatch)
-- [Fix] Remove `AMP_ENABLED` setting since it services no real purpose and
- erroring out on setting it would make it even less useful (Griatch).
-- [Fix] `services` command with no args would traceback (regression) (Griatch)
+- Feature: Add [`evennia.ON_DEMAND_HANDLER`][new-ondemandhandler] for making it
+ easier to implement changes that are calculated on-demand (Griatch)
- [Feature][pull3412]: Make it possible to add custom webclient css in
`webclient/css/custom.css`, same as for website (InspectorCaracal)
+- [Feature][pull3367]: [Component contrib][pull3367extra] got better
+ inheritance, slot names to choose attr storage, speedups and fixes (ChrisLR)
+- Feature: Break up `DefaultObject.search` method into several helpers to make
+ it easier to override (Griatch)
+- Fix: Resolve multimatch error with rpsystem contrib (Griatch)
+- Fix: Remove `AMP_ENABLED` setting since it services no real purpose and
+ erroring out on setting it would make it even less useful (Griatch).
+- Feature: Remove too-strict password restrictions for Evennia logins, using
+ django defaults instead for passwords with more varied characters.
+- Fix `services` command with no args would traceback (regression) (Griatch)
- [Fix][pull3423]: Fix wilderness contrib error moving to an already existing
wilderness room (InspectorCaracal)
- [Fix][pull3425]: Don't always include example the crafting recipe when
using the crafting contrib (InspectorCaracal)
-- [pull3426]: Traceback banning a channel using with only one nick
+- [Fix][pull3426]: Traceback banning a channel using with only one nick
(InspectorCaracal)
-- [pull3434]: Adjust lunr search weights to void clashing of cmd-aliases over
+- [Fix][pull3434]: Adjust lunr search weights to void clashing of cmd-aliases over
keys which caused some help entries to shadow others (InspectorCaracal)
- Doc fixes (InspectorCaracal, Griatch)
+[new-ondemandhandler][https://www.evennia.com/docs/latest/Components/OnDemandHandler.html]
[pull3412]: https://github.com/evennia/evennia/pull/3412
[pull3423]: https://github.com/evennia/evennia/pull/3423
[pull3425]: https://github.com/evennia/evennia/pull/3425
[pull3426]: https://github.com/evennia/evennia/pull/3426
[pull3434]: https://github.com/evennia/evennia/pull/3434
+[pull3367]: https://github.com/evennia/evennia/pull/3367
+[pull3367extra]: https://www.evennia.com/docs/latest/Contribs/Contrib-Components.html
## Evennia 3.1.1
diff --git a/docs/latest/_sources/Setup/Settings-Default.md.txt b/docs/latest/_sources/Setup/Settings-Default.md.txt
index 5535899c02..a52729f166 100644
--- a/docs/latest/_sources/Setup/Settings-Default.md.txt
+++ b/docs/latest/_sources/Setup/Settings-Default.md.txt
@@ -1115,7 +1115,6 @@ AUTH_PASSWORD_VALIDATORS = [
},
{"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"},
{"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"},
- {"NAME": "evennia.server.validators.EvenniaPasswordValidator"},
]
# Username validation plugins
diff --git a/docs/latest/api/evennia.commands.default.admin.html b/docs/latest/api/evennia.commands.default.admin.html
index db66aa5bd1..a975cd8d30 100644
--- a/docs/latest/api/evennia.commands.default.admin.html
+++ b/docs/latest/api/evennia.commands.default.admin.html
@@ -329,7 +329,7 @@ to accounts respectively.
-
-
aliases = ['remit', 'pemit']
+aliases = ['pemit', 'remit']
@@ -360,7 +360,7 @@ to accounts respectively.
-
-
search_index_entry = {'aliases': 'remit pemit', 'category': 'admin', 'key': 'emit', 'no_prefix': ' remit pemit', 'tags': '', 'text': '\n admin command for emitting message to multiple objects\n\n Usage:\n emit[/switches] [<obj>, <obj>, ... =] <message>\n remit [<obj>, <obj>, ... =] <message>\n pemit [<obj>, <obj>, ... =] <message>\n\n Switches:\n room - limit emits to rooms only (default)\n accounts - limit emits to accounts only\n contents - send to the contents of matched objects too\n\n Emits a message to the selected objects or to\n your immediate surroundings. If the object is a room,\n send to its contents. remit and pemit are just\n limited forms of emit, for sending to rooms and\n to accounts respectively.\n '}
+search_index_entry = {'aliases': 'pemit remit', 'category': 'admin', 'key': 'emit', 'no_prefix': ' pemit remit', 'tags': '', 'text': '\n admin command for emitting message to multiple objects\n\n Usage:\n emit[/switches] [<obj>, <obj>, ... =] <message>\n remit [<obj>, <obj>, ... =] <message>\n pemit [<obj>, <obj>, ... =] <message>\n\n Switches:\n room - limit emits to rooms only (default)\n accounts - limit emits to accounts only\n contents - send to the contents of matched objects too\n\n Emits a message to the selected objects or to\n your immediate surroundings. If the object is a room,\n send to its contents. remit and pemit are just\n limited forms of emit, for sending to rooms and\n to accounts respectively.\n '}
diff --git a/docs/latest/api/evennia.commands.default.batchprocess.html b/docs/latest/api/evennia.commands.default.batchprocess.html
index e678db2e75..4d83c612c8 100644
--- a/docs/latest/api/evennia.commands.default.batchprocess.html
+++ b/docs/latest/api/evennia.commands.default.batchprocess.html
@@ -150,7 +150,7 @@ skipping, reloading etc.
-
-
aliases = ['batchcmd', 'batchcommand']
+aliases = ['batchcommand', 'batchcmd']
@@ -181,7 +181,7 @@ skipping, reloading etc.
-
-
search_index_entry = {'aliases': 'batchcmd batchcommand', 'category': 'building', 'key': 'batchcommands', 'no_prefix': ' batchcmd batchcommand', 'tags': '', 'text': '\n build from batch-command file\n\n Usage:\n batchcommands[/interactive] <python.path.to.file>\n\n Switch:\n interactive - this mode will offer more control when\n executing the batch file, like stepping,\n skipping, reloading etc.\n\n Runs batches of commands from a batch-cmd text file (*.ev).\n\n '}
+search_index_entry = {'aliases': 'batchcommand batchcmd', 'category': 'building', 'key': 'batchcommands', 'no_prefix': ' batchcommand batchcmd', 'tags': '', 'text': '\n build from batch-command file\n\n Usage:\n batchcommands[/interactive] <python.path.to.file>\n\n Switch:\n interactive - this mode will offer more control when\n executing the batch file, like stepping,\n skipping, reloading etc.\n\n Runs batches of commands from a batch-cmd text file (*.ev).\n\n '}
diff --git a/docs/latest/api/evennia.commands.default.building.html b/docs/latest/api/evennia.commands.default.building.html
index 97a03caa3e..436127f8e5 100644
--- a/docs/latest/api/evennia.commands.default.building.html
+++ b/docs/latest/api/evennia.commands.default.building.html
@@ -641,7 +641,7 @@ You can specify the /force switch to bypass this confirmation.
-
-
aliases = ['@del', '@delete']
+aliases = ['@delete', '@del']
@@ -682,7 +682,7 @@ You can specify the /force switch to bypass this confirmation.
-
-
search_index_entry = {'aliases': '@del @delete', 'category': 'building', 'key': '@destroy', 'no_prefix': 'destroy del delete', 'tags': '', 'text': '\n permanently delete objects\n\n Usage:\n destroy[/switches] [obj, obj2, obj3, [dbref-dbref], ...]\n\n Switches:\n override - The destroy command will usually avoid accidentally\n destroying account objects. This switch overrides this safety.\n force - destroy without confirmation.\n Examples:\n destroy house, roof, door, 44-78\n destroy 5-10, flower, 45\n destroy/force north\n\n Destroys one or many objects. If dbrefs are used, a range to delete can be\n given, e.g. 4-10. Also the end points will be deleted. This command\n displays a confirmation before destroying, to make sure of your choice.\n You can specify the /force switch to bypass this confirmation.\n '}
+search_index_entry = {'aliases': '@delete @del', 'category': 'building', 'key': '@destroy', 'no_prefix': 'destroy delete del', 'tags': '', 'text': '\n permanently delete objects\n\n Usage:\n destroy[/switches] [obj, obj2, obj3, [dbref-dbref], ...]\n\n Switches:\n override - The destroy command will usually avoid accidentally\n destroying account objects. This switch overrides this safety.\n force - destroy without confirmation.\n Examples:\n destroy house, roof, door, 44-78\n destroy 5-10, flower, 45\n destroy/force north\n\n Destroys one or many objects. If dbrefs are used, a range to delete can be\n given, e.g. 4-10. Also the end points will be deleted. This command\n displays a confirmation before destroying, to make sure of your choice.\n You can specify the /force switch to bypass this confirmation.\n '}
@@ -1409,7 +1409,7 @@ server settings.
-
-
aliases = ['@type', '@swap', '@typeclasses', '@parent', '@update']
+aliases = ['@parent', '@type', '@swap', '@typeclasses', '@update']
@@ -1440,7 +1440,7 @@ server settings.
-
-
search_index_entry = {'aliases': '@type @swap @typeclasses @parent @update', 'category': 'building', 'key': '@typeclass', 'no_prefix': 'typeclass type swap typeclasses parent update', 'tags': '', 'text': "\n set or change an object's typeclass\n\n Usage:\n typeclass[/switch] <object> [= typeclass.path]\n typeclass/prototype <object> = prototype_key\n\n typeclasses or typeclass/list/show [typeclass.path]\n swap - this is a shorthand for using /force/reset flags.\n update - this is a shorthand for using the /force/reload flag.\n\n Switch:\n show, examine - display the current typeclass of object (default) or, if\n given a typeclass path, show the docstring of that typeclass.\n update - *only* re-run at_object_creation on this object\n meaning locks or other properties set later may remain.\n reset - clean out *all* the attributes and properties on the\n object - basically making this a new clean object. This will also\n reset cmdsets!\n force - change to the typeclass also if the object\n already has a typeclass of the same name.\n list - show available typeclasses. Only typeclasses in modules actually\n imported or used from somewhere in the code will show up here\n (those typeclasses are still available if you know the path)\n prototype - clean and overwrite the object with the specified\n prototype key - effectively making a whole new object.\n\n Example:\n type button = examples.red_button.RedButton\n type/prototype button=a red button\n\n If the typeclass_path is not given, the current object's typeclass is\n assumed.\n\n View or set an object's typeclass. If setting, the creation hooks of the\n new typeclass will be run on the object. If you have clashing properties on\n the old class, use /reset. By default you are protected from changing to a\n typeclass of the same name as the one you already have - use /force to\n override this protection.\n\n The given typeclass must be identified by its location using python\n dot-notation pointing to the correct module and class. If no typeclass is\n given (or a wrong typeclass is given). Errors in the path or new typeclass\n will lead to the old typeclass being kept. The location of the typeclass\n module is searched from the default typeclass directory, as defined in the\n server settings.\n\n "}
+search_index_entry = {'aliases': '@parent @type @swap @typeclasses @update', 'category': 'building', 'key': '@typeclass', 'no_prefix': 'typeclass parent type swap typeclasses update', 'tags': '', 'text': "\n set or change an object's typeclass\n\n Usage:\n typeclass[/switch] <object> [= typeclass.path]\n typeclass/prototype <object> = prototype_key\n\n typeclasses or typeclass/list/show [typeclass.path]\n swap - this is a shorthand for using /force/reset flags.\n update - this is a shorthand for using the /force/reload flag.\n\n Switch:\n show, examine - display the current typeclass of object (default) or, if\n given a typeclass path, show the docstring of that typeclass.\n update - *only* re-run at_object_creation on this object\n meaning locks or other properties set later may remain.\n reset - clean out *all* the attributes and properties on the\n object - basically making this a new clean object. This will also\n reset cmdsets!\n force - change to the typeclass also if the object\n already has a typeclass of the same name.\n list - show available typeclasses. Only typeclasses in modules actually\n imported or used from somewhere in the code will show up here\n (those typeclasses are still available if you know the path)\n prototype - clean and overwrite the object with the specified\n prototype key - effectively making a whole new object.\n\n Example:\n type button = examples.red_button.RedButton\n type/prototype button=a red button\n\n If the typeclass_path is not given, the current object's typeclass is\n assumed.\n\n View or set an object's typeclass. If setting, the creation hooks of the\n new typeclass will be run on the object. If you have clashing properties on\n the old class, use /reset. By default you are protected from changing to a\n typeclass of the same name as the one you already have - use /force to\n override this protection.\n\n The given typeclass must be identified by its location using python\n dot-notation pointing to the correct module and class. If no typeclass is\n given (or a wrong typeclass is given). Errors in the path or new typeclass\n will lead to the old typeclass being kept. The location of the typeclass\n module is searched from the default typeclass directory, as defined in the\n server settings.\n\n "}
diff --git a/docs/latest/api/evennia.commands.default.general.html b/docs/latest/api/evennia.commands.default.general.html
index 95b1d15d92..692b2a7fec 100644
--- a/docs/latest/api/evennia.commands.default.general.html
+++ b/docs/latest/api/evennia.commands.default.general.html
@@ -280,7 +280,7 @@ for everyone to use, you need build privileges and the alias command.
-
-
aliases = ['nicks', 'nickname']
+aliases = ['nickname', 'nicks']
@@ -312,7 +312,7 @@ for everyone to use, you need build privileges and the alias command.
-
-
search_index_entry = {'aliases': 'nicks nickname', 'category': 'general', 'key': 'nick', 'no_prefix': ' nicks nickname', 'tags': '', 'text': '\n define a personal alias/nick by defining a string to\n match and replace it with another on the fly\n\n Usage:\n nick[/switches] <string> [= [replacement_string]]\n nick[/switches] <template> = <replacement_template>\n nick/delete <string> or number\n nicks\n\n Switches:\n inputline - replace on the inputline (default)\n object - replace on object-lookup\n account - replace on account-lookup\n list - show all defined aliases (also "nicks" works)\n delete - remove nick by index in /list\n clearall - clear all nicks\n\n Examples:\n nick hi = say Hello, I\'m Sarah!\n nick/object tom = the tall man\n nick build $1 $2 = create/drop $1;$2\n nick tell $1 $2=page $1=$2\n nick tm?$1=page tallman=$1\n nick tm\\=$1=page tallman=$1\n\n A \'nick\' is a personal string replacement. Use $1, $2, ... to catch arguments.\n Put the last $-marker without an ending space to catch all remaining text. You\n can also use unix-glob matching for the left-hand side <string>:\n\n * - matches everything\n ? - matches 0 or 1 single characters\n [abcd] - matches these chars in any order\n [!abcd] - matches everything not among these chars\n \\= - escape literal \'=\' you want in your <string>\n\n Note that no objects are actually renamed or changed by this command - your nicks\n are only available to you. If you want to permanently add keywords to an object\n for everyone to use, you need build privileges and the alias command.\n\n '}
+search_index_entry = {'aliases': 'nickname nicks', 'category': 'general', 'key': 'nick', 'no_prefix': ' nickname nicks', 'tags': '', 'text': '\n define a personal alias/nick by defining a string to\n match and replace it with another on the fly\n\n Usage:\n nick[/switches] <string> [= [replacement_string]]\n nick[/switches] <template> = <replacement_template>\n nick/delete <string> or number\n nicks\n\n Switches:\n inputline - replace on the inputline (default)\n object - replace on object-lookup\n account - replace on account-lookup\n list - show all defined aliases (also "nicks" works)\n delete - remove nick by index in /list\n clearall - clear all nicks\n\n Examples:\n nick hi = say Hello, I\'m Sarah!\n nick/object tom = the tall man\n nick build $1 $2 = create/drop $1;$2\n nick tell $1 $2=page $1=$2\n nick tm?$1=page tallman=$1\n nick tm\\=$1=page tallman=$1\n\n A \'nick\' is a personal string replacement. Use $1, $2, ... to catch arguments.\n Put the last $-marker without an ending space to catch all remaining text. You\n can also use unix-glob matching for the left-hand side <string>:\n\n * - matches everything\n ? - matches 0 or 1 single characters\n [abcd] - matches these chars in any order\n [!abcd] - matches everything not among these chars\n \\= - escape literal \'=\' you want in your <string>\n\n Note that no objects are actually renamed or changed by this command - your nicks\n are only available to you. If you want to permanently add keywords to an object\n for everyone to use, you need build privileges and the alias command.\n\n '}
@@ -335,7 +335,7 @@ inv
-
-
aliases = ['i', 'inv']
+aliases = ['inv', 'i']
@@ -366,7 +366,7 @@ inv
-
-
search_index_entry = {'aliases': 'i inv', 'category': 'general', 'key': 'inventory', 'no_prefix': ' i inv', 'tags': '', 'text': '\n view inventory\n\n Usage:\n inventory\n inv\n\n Shows your inventory.\n '}
+search_index_entry = {'aliases': 'inv i', 'category': 'general', 'key': 'inventory', 'no_prefix': ' inv i', 'tags': '', 'text': '\n view inventory\n\n Usage:\n inventory\n inv\n\n Shows your inventory.\n '}
@@ -721,7 +721,7 @@ automatically begin with your name.
-
-
aliases = [':', 'emote']
+aliases = ['emote', ':']
@@ -762,7 +762,7 @@ space.
-
-
search_index_entry = {'aliases': ': emote', 'category': 'general', 'key': 'pose', 'no_prefix': ' : emote', 'tags': '', 'text': "\n strike a pose\n\n Usage:\n pose <pose text>\n pose's <pose text>\n\n Example:\n pose is standing by the wall, smiling.\n -> others will see:\n Tom is standing by the wall, smiling.\n\n Describe an action being taken. The pose text will\n automatically begin with your name.\n "}
+search_index_entry = {'aliases': 'emote :', 'category': 'general', 'key': 'pose', 'no_prefix': ' emote :', 'tags': '', 'text': "\n strike a pose\n\n Usage:\n pose <pose text>\n pose's <pose text>\n\n Example:\n pose is standing by the wall, smiling.\n -> others will see:\n Tom is standing by the wall, smiling.\n\n Describe an action being taken. The pose text will\n automatically begin with your name.\n "}
@@ -785,7 +785,7 @@ which permission groups you are a member of.
-
-
aliases = ['hierarchy', 'groups']
+aliases = ['groups', 'hierarchy']
@@ -816,7 +816,7 @@ which permission groups you are a member of.
-
-
search_index_entry = {'aliases': 'hierarchy groups', 'category': 'general', 'key': 'access', 'no_prefix': ' hierarchy groups', 'tags': '', 'text': '\n show your current game access\n\n Usage:\n access\n\n This command shows you the permission hierarchy and\n which permission groups you are a member of.\n '}
+search_index_entry = {'aliases': 'groups hierarchy', 'category': 'general', 'key': 'access', 'no_prefix': ' groups hierarchy', 'tags': '', 'text': '\n show your current game access\n\n Usage:\n access\n\n This command shows you the permission hierarchy and\n which permission groups you are a member of.\n '}
diff --git a/docs/latest/api/evennia.commands.default.system.html b/docs/latest/api/evennia.commands.default.system.html
index 537be7e371..3da57e3e28 100644
--- a/docs/latest/api/evennia.commands.default.system.html
+++ b/docs/latest/api/evennia.commands.default.system.html
@@ -695,7 +695,7 @@ See |luhttps://ww
-
-
aliases = ['@task', '@delays']
+aliases = ['@delays', '@task']
@@ -741,7 +741,7 @@ to all the variables defined therein.
-
-
search_index_entry = {'aliases': '@task @delays', 'category': 'system', 'key': '@tasks', 'no_prefix': 'tasks task delays', 'tags': '', 'text': "\n Display or terminate active tasks (delays).\n\n Usage:\n tasks[/switch] [task_id or function_name]\n\n Switches:\n pause - Pause the callback of a task.\n unpause - Process all callbacks made since pause() was called.\n do_task - Execute the task (call its callback).\n call - Call the callback of this task.\n remove - Remove a task without executing it.\n cancel - Stop a task from automatically executing.\n\n Notes:\n A task is a single use method of delaying the call of a function. Calls are created\n in code, using `evennia.utils.delay`.\n See |luhttps://www.evennia.com/docs/latest/Command-Duration.html|ltthe docs|le for help.\n\n By default, tasks that are canceled and never called are cleaned up after one minute.\n\n Examples:\n - `tasks/cancel move_callback` - Cancels all movement delays from the slow_exit contrib.\n In this example slow exits creates it's tasks with\n `utils.delay(move_delay, move_callback)`\n - `tasks/cancel 2` - Cancel task id 2.\n\n "}
+search_index_entry = {'aliases': '@delays @task', 'category': 'system', 'key': '@tasks', 'no_prefix': 'tasks delays task', 'tags': '', 'text': "\n Display or terminate active tasks (delays).\n\n Usage:\n tasks[/switch] [task_id or function_name]\n\n Switches:\n pause - Pause the callback of a task.\n unpause - Process all callbacks made since pause() was called.\n do_task - Execute the task (call its callback).\n call - Call the callback of this task.\n remove - Remove a task without executing it.\n cancel - Stop a task from automatically executing.\n\n Notes:\n A task is a single use method of delaying the call of a function. Calls are created\n in code, using `evennia.utils.delay`.\n See |luhttps://www.evennia.com/docs/latest/Command-Duration.html|ltthe docs|le for help.\n\n By default, tasks that are canceled and never called are cleaned up after one minute.\n\n Examples:\n - `tasks/cancel move_callback` - Cancels all movement delays from the slow_exit contrib.\n In this example slow exits creates it's tasks with\n `utils.delay(move_delay, move_callback)`\n - `tasks/cancel 2` - Cancel task id 2.\n\n "}
diff --git a/docs/latest/api/evennia.commands.default.tests.html b/docs/latest/api/evennia.commands.default.tests.html
index cc874c24ed..3b8a948906 100644
--- a/docs/latest/api/evennia.commands.default.tests.html
+++ b/docs/latest/api/evennia.commands.default.tests.html
@@ -973,7 +973,7 @@ main test suite started with
Test the batch processor.
-
-
red_button = <module 'evennia.contrib.tutorials.red_button.red_button' from '/tmp/tmppnsswh9b/0edcebea0fdd67c4ba5c58f3b0d589b02a6bea3e/evennia/contrib/tutorials/red_button/red_button.py'>
+red_button = <module 'evennia.contrib.tutorials.red_button.red_button' from '/tmp/tmpf2ikqp42/015698d06fe192d64f19176508e8cd7e59df9d4c/evennia/contrib/tutorials/red_button/red_button.py'>
diff --git a/docs/latest/api/evennia.commands.default.unloggedin.html b/docs/latest/api/evennia.commands.default.unloggedin.html
index b124e4c244..b9ea7c3907 100644
--- a/docs/latest/api/evennia.commands.default.unloggedin.html
+++ b/docs/latest/api/evennia.commands.default.unloggedin.html
@@ -134,7 +134,7 @@ connect “account name” “pass word”
-
-
aliases = ['co', 'conn', 'con']
+aliases = ['conn', 'co', 'con']
@@ -169,7 +169,7 @@ there is no object yet before the account has logged in)
-
-
search_index_entry = {'aliases': 'co conn con', 'category': 'general', 'key': 'connect', 'no_prefix': ' co conn con', 'tags': '', 'text': '\n connect to the game\n\n Usage (at login screen):\n connect accountname password\n connect "account name" "pass word"\n\n Use the create command to first create an account before logging in.\n\n If you have spaces in your name, enclose it in double quotes.\n '}
+search_index_entry = {'aliases': 'conn co con', 'category': 'general', 'key': 'connect', 'no_prefix': ' conn co con', 'tags': '', 'text': '\n connect to the game\n\n Usage (at login screen):\n connect accountname password\n connect "account name" "pass word"\n\n Use the create command to first create an account before logging in.\n\n If you have spaces in your name, enclose it in double quotes.\n '}
@@ -353,7 +353,7 @@ for simplicity. It shows a pane of info.
-
-
aliases = ['h', '?']
+aliases = ['?', 'h']
@@ -379,7 +379,7 @@ for simplicity. It shows a pane of info.
-
-
search_index_entry = {'aliases': 'h ?', 'category': 'general', 'key': 'help', 'no_prefix': ' h ?', 'tags': '', 'text': '\n get help when in unconnected-in state\n\n Usage:\n help\n\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}
+search_index_entry = {'aliases': '? h', 'category': 'general', 'key': 'help', 'no_prefix': ' ? h', 'tags': '', 'text': '\n get help when in unconnected-in state\n\n Usage:\n help\n\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}
diff --git a/docs/latest/api/evennia.contrib.base_systems.email_login.email_login.html b/docs/latest/api/evennia.contrib.base_systems.email_login.email_login.html
index 3ea0de2a7e..c6c891c2d6 100644
--- a/docs/latest/api/evennia.contrib.base_systems.email_login.email_login.html
+++ b/docs/latest/api/evennia.contrib.base_systems.email_login.email_login.html
@@ -151,7 +151,7 @@ the module given by settings.CONNECTION_SCREEN_MODULE.
-
-
aliases = ['co', 'conn', 'con']
+aliases = ['conn', 'co', 'con']
@@ -181,7 +181,7 @@ there is no object yet before the account has logged in)
-
-
search_index_entry = {'aliases': 'co conn con', 'category': 'general', 'key': 'connect', 'no_prefix': ' co conn con', 'tags': '', 'text': '\n Connect to the game.\n\n Usage (at login screen):\n connect <email> <password>\n\n Use the create command to first create an account before logging in.\n '}
+search_index_entry = {'aliases': 'conn co con', 'category': 'general', 'key': 'connect', 'no_prefix': ' conn co con', 'tags': '', 'text': '\n Connect to the game.\n\n Usage (at login screen):\n connect <email> <password>\n\n Use the create command to first create an account before logging in.\n '}
@@ -347,7 +347,7 @@ for simplicity. It shows a pane of info.
-
-
aliases = ['h', '?']
+aliases = ['?', 'h']
@@ -373,7 +373,7 @@ for simplicity. It shows a pane of info.
-
-
search_index_entry = {'aliases': 'h ?', 'category': 'general', 'key': 'help', 'no_prefix': ' h ?', 'tags': '', 'text': '\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}
+search_index_entry = {'aliases': '? h', 'category': 'general', 'key': 'help', 'no_prefix': ' ? h', 'tags': '', 'text': '\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}
diff --git a/docs/latest/api/evennia.contrib.base_systems.ingame_python.commands.html b/docs/latest/api/evennia.contrib.base_systems.ingame_python.commands.html
index 6298bcfa59..f40c6fb7ec 100644
--- a/docs/latest/api/evennia.contrib.base_systems.ingame_python.commands.html
+++ b/docs/latest/api/evennia.contrib.base_systems.ingame_python.commands.html
@@ -128,7 +128,7 @@
-
-
aliases = ['@callbacks', '@calls', '@callback']
+aliases = ['@callback', '@callbacks', '@calls']
@@ -209,7 +209,7 @@ on user permission.
-
-
search_index_entry = {'aliases': '@callbacks @calls @callback', 'category': 'building', 'key': '@call', 'no_prefix': 'call callbacks calls callback', 'tags': '', 'text': '\n Command to edit callbacks.\n '}
+search_index_entry = {'aliases': '@callback @callbacks @calls', 'category': 'building', 'key': '@call', 'no_prefix': 'call callback callbacks calls', 'tags': '', 'text': '\n Command to edit callbacks.\n '}
diff --git a/docs/latest/api/evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.html b/docs/latest/api/evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.html
index 7e3f138b69..8f20c35672 100644
--- a/docs/latest/api/evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.html
+++ b/docs/latest/api/evennia.contrib.base_systems.mux_comms_cmds.mux_comms_cmds.html
@@ -172,7 +172,7 @@ aliases to an already joined channel.
-
-
aliases = ['aliaschan', 'chanalias']
+aliases = ['chanalias', 'aliaschan']
@@ -203,7 +203,7 @@ aliases to an already joined channel.
-
-
search_index_entry = {'aliases': 'aliaschan chanalias', 'category': 'comms', 'key': 'addcom', 'no_prefix': ' aliaschan chanalias', 'tags': '', 'text': '\n Add a channel alias and/or subscribe to a channel\n\n Usage:\n addcom [alias=] <channel>\n\n Joins a given channel. If alias is given, this will allow you to\n refer to the channel by this alias rather than the full channel\n name. Subsequent calls of this command can be used to add multiple\n aliases to an already joined channel.\n '}
+search_index_entry = {'aliases': 'chanalias aliaschan', 'category': 'comms', 'key': 'addcom', 'no_prefix': ' chanalias aliaschan', 'tags': '', 'text': '\n Add a channel alias and/or subscribe to a channel\n\n Usage:\n addcom [alias=] <channel>\n\n Joins a given channel. If alias is given, this will allow you to\n refer to the channel by this alias rather than the full channel\n name. Subsequent calls of this command can be used to add multiple\n aliases to an already joined channel.\n '}
@@ -229,7 +229,7 @@ for that channel.
-
-
aliases = ['delchanalias', 'delaliaschan']
+aliases = ['delaliaschan', 'delchanalias']
@@ -260,7 +260,7 @@ for that channel.
-
-
search_index_entry = {'aliases': 'delchanalias delaliaschan', 'category': 'comms', 'key': 'delcom', 'no_prefix': ' delchanalias delaliaschan', 'tags': '', 'text': "\n remove a channel alias and/or unsubscribe from channel\n\n Usage:\n delcom <alias or channel>\n delcom/all <channel>\n\n If the full channel name is given, unsubscribe from the\n channel. If an alias is given, remove the alias but don't\n unsubscribe. If the 'all' switch is used, remove all aliases\n for that channel.\n "}
+search_index_entry = {'aliases': 'delaliaschan delchanalias', 'category': 'comms', 'key': 'delcom', 'no_prefix': ' delaliaschan delchanalias', 'tags': '', 'text': "\n remove a channel alias and/or unsubscribe from channel\n\n Usage:\n delcom <alias or channel>\n delcom/all <channel>\n\n If the full channel name is given, unsubscribe from the\n channel. If an alias is given, remove the alias but don't\n unsubscribe. If the 'all' switch is used, remove all aliases\n for that channel.\n "}
diff --git a/docs/latest/api/evennia.contrib.full_systems.evscaperoom.commands.html b/docs/latest/api/evennia.contrib.full_systems.evscaperoom.commands.html
index d0f582b851..d9bd1c260d 100644
--- a/docs/latest/api/evennia.contrib.full_systems.evscaperoom.commands.html
+++ b/docs/latest/api/evennia.contrib.full_systems.evscaperoom.commands.html
@@ -223,7 +223,7 @@ the operation will be general or on the room.
-
-
aliases = ['chicken out', 'abort', 'quit', 'q']
+aliases = ['chicken out', 'abort', 'q', 'quit']
@@ -247,7 +247,7 @@ set in self.parse())
-
-
search_index_entry = {'aliases': 'chicken out abort quit q', 'category': 'evscaperoom', 'key': 'give up', 'no_prefix': ' chicken out abort quit q', 'tags': '', 'text': '\n Give up\n\n Usage:\n give up\n\n Abandons your attempts at escaping and of ever winning the pie-eating contest.\n\n '}
+search_index_entry = {'aliases': 'chicken out abort q quit', 'category': 'evscaperoom', 'key': 'give up', 'no_prefix': ' chicken out abort q quit', 'tags': '', 'text': '\n Give up\n\n Usage:\n give up\n\n Abandons your attempts at escaping and of ever winning the pie-eating contest.\n\n '}
@@ -383,7 +383,7 @@ shout
-
-
aliases = ['whisper', ';', 'shout']
+aliases = [';', 'whisper', 'shout']
@@ -412,7 +412,7 @@ set in self.parse())
-
-
search_index_entry = {'aliases': 'whisper ; shout', 'category': 'general', 'key': 'say', 'no_prefix': ' whisper ; shout', 'tags': '', 'text': '\n Perform an communication action.\n\n Usage:\n say <text>\n whisper\n shout\n\n '}
+search_index_entry = {'aliases': '; whisper shout', 'category': 'general', 'key': 'say', 'no_prefix': ' ; whisper shout', 'tags': '', 'text': '\n Perform an communication action.\n\n Usage:\n say <text>\n whisper\n shout\n\n '}
@@ -502,7 +502,7 @@ looks and what actions is available.
-
-
aliases = ['unfocus', 'examine', 'ex', 'e']
+aliases = ['ex', 'examine', 'e', 'unfocus']
@@ -531,7 +531,7 @@ set in self.parse())
-
-
search_index_entry = {'aliases': 'unfocus examine ex e', 'category': 'evscaperoom', 'key': 'focus', 'no_prefix': ' unfocus examine ex e', 'tags': '', 'text': '\n Focus your attention on a target.\n\n Usage:\n focus <obj>\n\n Once focusing on an object, use look to get more information about how it\n looks and what actions is available.\n\n '}
+search_index_entry = {'aliases': 'ex examine e unfocus', 'category': 'evscaperoom', 'key': 'focus', 'no_prefix': ' ex examine e unfocus', 'tags': '', 'text': '\n Focus your attention on a target.\n\n Usage:\n focus <obj>\n\n Once focusing on an object, use look to get more information about how it\n looks and what actions is available.\n\n '}
@@ -593,7 +593,7 @@ set in self.parse())
-
-
aliases = ['give', 'i', 'inventory', 'inv']
+aliases = ['inv', 'i', 'give', 'inventory']
@@ -617,7 +617,7 @@ set in self.parse())
-
-
search_index_entry = {'aliases': 'give i inventory inv', 'category': 'evscaperoom', 'key': 'get', 'no_prefix': ' give i inventory inv', 'tags': '', 'text': '\n Use focus / examine instead.\n\n '}
+search_index_entry = {'aliases': 'inv i give inventory', 'category': 'evscaperoom', 'key': 'get', 'no_prefix': ' inv i give inventory', 'tags': '', 'text': '\n Use focus / examine instead.\n\n '}
diff --git a/docs/latest/api/evennia.contrib.game_systems.clothing.clothing.html b/docs/latest/api/evennia.contrib.game_systems.clothing.clothing.html
index 50be8b27ce..c9c64eb2a6 100644
--- a/docs/latest/api/evennia.contrib.game_systems.clothing.clothing.html
+++ b/docs/latest/api/evennia.contrib.game_systems.clothing.clothing.html
@@ -634,7 +634,7 @@ inv
-
-
aliases = ['i', 'inv']
+aliases = ['inv', 'i']
@@ -665,7 +665,7 @@ inv
-
-
search_index_entry = {'aliases': 'i inv', 'category': 'general', 'key': 'inventory', 'no_prefix': ' i inv', 'tags': '', 'text': '\n view inventory\n\n Usage:\n inventory\n inv\n\n Shows your inventory.\n '}
+search_index_entry = {'aliases': 'inv i', 'category': 'general', 'key': 'inventory', 'no_prefix': ' inv i', 'tags': '', 'text': '\n view inventory\n\n Usage:\n inventory\n inv\n\n Shows your inventory.\n '}
diff --git a/docs/latest/api/evennia.contrib.game_systems.turnbattle.tb_basic.html b/docs/latest/api/evennia.contrib.game_systems.turnbattle.tb_basic.html
index 062632c0b1..9adfd36d1a 100644
--- a/docs/latest/api/evennia.contrib.game_systems.turnbattle.tb_basic.html
+++ b/docs/latest/api/evennia.contrib.game_systems.turnbattle.tb_basic.html
@@ -684,7 +684,7 @@ if there are still any actions you can take.
-
-
aliases = ['hold', 'wait']
+aliases = ['wait', 'hold']
@@ -710,7 +710,7 @@ if there are still any actions you can take.
-
-
search_index_entry = {'aliases': 'hold wait', 'category': 'combat', 'key': 'pass', 'no_prefix': ' hold wait', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}
+search_index_entry = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'no_prefix': ' wait hold', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}
diff --git a/docs/latest/api/evennia.contrib.game_systems.turnbattle.tb_equip.html b/docs/latest/api/evennia.contrib.game_systems.turnbattle.tb_equip.html
index 862b0c29e9..b4d3094806 100644
--- a/docs/latest/api/evennia.contrib.game_systems.turnbattle.tb_equip.html
+++ b/docs/latest/api/evennia.contrib.game_systems.turnbattle.tb_equip.html
@@ -579,7 +579,7 @@ if there are still any actions you can take.
-
-
aliases = ['hold', 'wait']
+aliases = ['wait', 'hold']
@@ -599,7 +599,7 @@ if there are still any actions you can take.
-
-
search_index_entry = {'aliases': 'hold wait', 'category': 'combat', 'key': 'pass', 'no_prefix': ' hold wait', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}
+search_index_entry = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'no_prefix': ' wait hold', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}
diff --git a/docs/latest/api/evennia.contrib.game_systems.turnbattle.tb_items.html b/docs/latest/api/evennia.contrib.game_systems.turnbattle.tb_items.html
index 09dab4a90a..5cc91fba32 100644
--- a/docs/latest/api/evennia.contrib.game_systems.turnbattle.tb_items.html
+++ b/docs/latest/api/evennia.contrib.game_systems.turnbattle.tb_items.html
@@ -702,7 +702,7 @@ if there are still any actions you can take.
-
-
aliases = ['hold', 'wait']
+aliases = ['wait', 'hold']
@@ -722,7 +722,7 @@ if there are still any actions you can take.
-
-
search_index_entry = {'aliases': 'hold wait', 'category': 'combat', 'key': 'pass', 'no_prefix': ' hold wait', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}
+search_index_entry = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'no_prefix': ' wait hold', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}
diff --git a/docs/latest/api/evennia.contrib.game_systems.turnbattle.tb_magic.html b/docs/latest/api/evennia.contrib.game_systems.turnbattle.tb_magic.html
index 0421235f60..141a08f0fe 100644
--- a/docs/latest/api/evennia.contrib.game_systems.turnbattle.tb_magic.html
+++ b/docs/latest/api/evennia.contrib.game_systems.turnbattle.tb_magic.html
@@ -481,7 +481,7 @@ if there are still any actions you can take.
-
-
aliases = ['hold', 'wait']
+aliases = ['wait', 'hold']
@@ -501,7 +501,7 @@ if there are still any actions you can take.
-
-
search_index_entry = {'aliases': 'hold wait', 'category': 'combat', 'key': 'pass', 'no_prefix': ' hold wait', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}
+search_index_entry = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'no_prefix': ' wait hold', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}
diff --git a/docs/latest/api/evennia.contrib.game_systems.turnbattle.tb_range.html b/docs/latest/api/evennia.contrib.game_systems.turnbattle.tb_range.html
index ed043f705a..7bb7801b25 100644
--- a/docs/latest/api/evennia.contrib.game_systems.turnbattle.tb_range.html
+++ b/docs/latest/api/evennia.contrib.game_systems.turnbattle.tb_range.html
@@ -941,7 +941,7 @@ if there are still any actions you can take.
-
-
aliases = ['hold', 'wait']
+aliases = ['wait', 'hold']
@@ -961,7 +961,7 @@ if there are still any actions you can take.
-
-
search_index_entry = {'aliases': 'hold wait', 'category': 'combat', 'key': 'pass', 'no_prefix': ' hold wait', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}
+search_index_entry = {'aliases': 'wait hold', 'category': 'combat', 'key': 'pass', 'no_prefix': ' wait hold', 'tags': '', 'text': '\n Passes on your turn.\n\n Usage:\n pass\n\n When in a fight, you can use this command to end your turn early, even\n if there are still any actions you can take.\n '}
diff --git a/docs/latest/api/evennia.contrib.rpg.dice.dice.html b/docs/latest/api/evennia.contrib.rpg.dice.dice.html
index 416482f5c4..d8ecccdc59 100644
--- a/docs/latest/api/evennia.contrib.rpg.dice.dice.html
+++ b/docs/latest/api/evennia.contrib.rpg.dice.dice.html
@@ -338,7 +338,7 @@ everyone but the person rolling.
-
-
aliases = ['roll', '@dice']
+aliases = ['@dice', 'roll']
@@ -364,7 +364,7 @@ everyone but the person rolling.
-
-
search_index_entry = {'aliases': 'roll @dice', 'category': 'general', 'key': 'dice', 'no_prefix': ' roll dice', 'tags': '', 'text': "\n roll dice\n\n Usage:\n dice[/switch] <nr>d<sides> [modifier] [success condition]\n\n Switch:\n hidden - tell the room the roll is being done, but don't show the result\n secret - don't inform the room about neither roll nor result\n\n Examples:\n dice 3d6 + 4\n dice 1d100 - 2 < 50\n\n This will roll the given number of dice with given sides and modifiers.\n So e.g. 2d6 + 3 means to 'roll a 6-sided die 2 times and add the result,\n then add 3 to the total'.\n Accepted modifiers are +, -, * and /.\n A success condition is given as normal Python conditionals\n (<,>,<=,>=,==,!=). So e.g. 2d6 + 3 > 10 means that the roll will succeed\n only if the final result is above 8. If a success condition is given, the\n outcome (pass/fail) will be echoed along with how much it succeeded/failed\n with. The hidden/secret switches will hide all or parts of the roll from\n everyone but the person rolling.\n "}
+search_index_entry = {'aliases': '@dice roll', 'category': 'general', 'key': 'dice', 'no_prefix': ' dice roll', 'tags': '', 'text': "\n roll dice\n\n Usage:\n dice[/switch] <nr>d<sides> [modifier] [success condition]\n\n Switch:\n hidden - tell the room the roll is being done, but don't show the result\n secret - don't inform the room about neither roll nor result\n\n Examples:\n dice 3d6 + 4\n dice 1d100 - 2 < 50\n\n This will roll the given number of dice with given sides and modifiers.\n So e.g. 2d6 + 3 means to 'roll a 6-sided die 2 times and add the result,\n then add 3 to the total'.\n Accepted modifiers are +, -, * and /.\n A success condition is given as normal Python conditionals\n (<,>,<=,>=,==,!=). So e.g. 2d6 + 3 > 10 means that the roll will succeed\n only if the final result is above 8. If a success condition is given, the\n outcome (pass/fail) will be echoed along with how much it succeeded/failed\n with. The hidden/secret switches will hide all or parts of the roll from\n everyone but the person rolling.\n "}
diff --git a/docs/latest/api/evennia.contrib.rpg.rpsystem.rpsystem.html b/docs/latest/api/evennia.contrib.rpg.rpsystem.rpsystem.html
index a3c4298827..d4f324e09f 100644
--- a/docs/latest/api/evennia.contrib.rpg.rpsystem.rpsystem.html
+++ b/docs/latest/api/evennia.contrib.rpg.rpsystem.rpsystem.html
@@ -1025,85 +1025,10 @@ rp-heavy game. It implements the base functionality for poses.
--
-
search(searchdata, global_search=False, use_nicks=True, typeclass=None, location=None, attribute_name=None, quiet=False, exact=False, candidates=None, nofound_string=None, multimatch_string=None, use_dbref=None)[source]
-Returns an Object matching a search string/condition, taking
-sdescs into account.
-Perform a standard object search in the database, handling
-multiple results and lack thereof gracefully. By default, only
-objects in the current location of self or its inventory are searched for.
-
-- Parameters
-
-searchdata (str or obj) –
Primary search criterion. Will be matched
-against object.key (with object.aliases second) unless
-the keyword attribute_name specifies otherwise.
-Special strings:
-- #<num>: search by unique dbref. This is always
-
-
-
-
-global_search (bool) – Search all objects globally. This is overruled
-by location keyword.
-use_nicks (bool) – Use nickname-replace (nicktype “object”) on searchdata.
-typeclass (str or Typeclass, or list of either) – Limit search only
-to Objects with this typeclass. May be a list of typeclasses
-for a broader search.
-location (Object or list) – Specify a location or multiple locations
-to search. Note that this is used to query the contents of a
-location and will not match for the location itself -
-if you want that, don’t set this or use candidates to specify
-exactly which objects should be searched.
-attribute_name (str) – Define which property to search. If set, no
-key+alias search will be performed. This can be used
-to search database fields (db_ will be automatically
-appended), and if that fails, it will try to return
-objects having Attributes with this name and value
-equal to searchdata. A special use is to search for
-“key” here if you want to do a key-search without
-including aliases.
-quiet (bool) – don’t display default error messages - this tells the
-search method that the user wants to handle all errors
-themselves. It also changes the return value type, see
-below.
-exact (bool) – if unset (default) - prefers to match to beginning of
-string rather than not matching at all. If set, requires
-exact matching of entire string.
-candidates (list of objects) – this is an optional custom list of objects
-to search (filter) between. It is ignored if global_search
-is given. If not set, this list will automatically be defined
-to include the location, the contents of location and the
-caller’s contents (inventory).
-nofound_string (str) – optional custom string for not-found error message.
-multimatch_string (str) – optional custom string for multimatch error header.
-use_dbref (bool or None) – If None, only turn off use_dbref if we are of a lower
-permission than Builder. Otherwise, honor the True/False value.
-
-
-- Returns
-match (Object, None or list) –
-
-- will return an Object/None if quiet=False,
otherwise it will return a list of 0, 1 or more matches.
-
-
-
-
-
-Notes
-To find Accounts, use eg. evennia.account_search. If
-quiet=False, error messages will be handled by
-settings.SEARCH_AT_RESULT and echoed automatically (on
-error, return will be None). If quiet=True, the error
-messaging is assumed to be handled by the caller.
+-
+
get_search_result(searchdata, attribute_name=None, typeclass=None, candidates=None, exact=False, use_dbref=None, tags=None, **kwargs)[source]
+Override of the parent method for producing search results that understands sdescs.
+These are used in the main .search() method of the parent class.
diff --git a/docs/latest/api/evennia.contrib.rpg.rpsystem.tests.html b/docs/latest/api/evennia.contrib.rpg.rpsystem.tests.html
index 2a23a42e8b..ad29c78f6f 100644
--- a/docs/latest/api/evennia.contrib.rpg.rpsystem.tests.html
+++ b/docs/latest/api/evennia.contrib.rpg.rpsystem.tests.html
@@ -242,6 +242,12 @@
test_commands()[source]
+
+-
+
test_multi_match_search()[source]
+Test that the multi-match search works as expected
+
+
diff --git a/docs/latest/api/evennia.contrib.tutorials.evadventure.commands.html b/docs/latest/api/evennia.contrib.tutorials.evadventure.commands.html
index d7d10e6f65..23beacf5c5 100644
--- a/docs/latest/api/evennia.contrib.tutorials.evadventure.commands.html
+++ b/docs/latest/api/evennia.contrib.tutorials.evadventure.commands.html
@@ -204,7 +204,7 @@ self.args).
-
-
aliases = ['i', 'inv']
+aliases = ['inv', 'i']
@@ -228,7 +228,7 @@ set in self.parse())
-
-
search_index_entry = {'aliases': 'i inv', 'category': 'general', 'key': 'inventory', 'no_prefix': ' i inv', 'tags': '', 'text': '\n View your inventory\n\n Usage:\n inventory\n\n '}
+search_index_entry = {'aliases': 'inv i', 'category': 'general', 'key': 'inventory', 'no_prefix': ' inv i', 'tags': '', 'text': '\n View your inventory\n\n Usage:\n inventory\n\n '}
@@ -305,7 +305,7 @@ unwear <item>
-
-
aliases = ['unwear', 'unwield']
+aliases = ['unwield', 'unwear']
@@ -329,7 +329,7 @@ set in self.parse())
-
-
search_index_entry = {'aliases': 'unwear unwield', 'category': 'general', 'key': 'remove', 'no_prefix': ' unwear unwield', 'tags': '', 'text': '\n Remove a remove a weapon/shield, armor or helmet.\n\n Usage:\n remove <item>\n unwield <item>\n unwear <item>\n\n To remove an item from the backpack, use |wdrop|n instead.\n\n '}
+search_index_entry = {'aliases': 'unwield unwear', 'category': 'general', 'key': 'remove', 'no_prefix': ' unwield unwear', 'tags': '', 'text': '\n Remove a remove a weapon/shield, armor or helmet.\n\n Usage:\n remove <item>\n unwield <item>\n unwear <item>\n\n To remove an item from the backpack, use |wdrop|n instead.\n\n '}
diff --git a/docs/latest/api/evennia.contrib.tutorials.red_button.red_button.html b/docs/latest/api/evennia.contrib.tutorials.red_button.red_button.html
index e334a46a1c..13e9805bf5 100644
--- a/docs/latest/api/evennia.contrib.tutorials.red_button.red_button.html
+++ b/docs/latest/api/evennia.contrib.tutorials.red_button.red_button.html
@@ -165,7 +165,7 @@ such as when closing the lid and un-blinding a character.
-
-
aliases = ['press', 'push', 'press button']
+aliases = ['push', 'press button', 'press']
@@ -194,7 +194,7 @@ check if the lid is open or closed.
-
-
search_index_entry = {'aliases': 'press push press button', 'category': 'general', 'key': 'push button', 'no_prefix': ' press push press button', 'tags': '', 'text': '\n Push the red button (lid closed)\n\n Usage:\n push button\n\n '}
+search_index_entry = {'aliases': 'push press button press', 'category': 'general', 'key': 'push button', 'no_prefix': ' push press button press', 'tags': '', 'text': '\n Push the red button (lid closed)\n\n Usage:\n push button\n\n '}
@@ -264,7 +264,7 @@ check if the lid is open or closed.
-
-
aliases = ['break lid', 'smash lid', 'smash']
+aliases = ['break lid', 'smash', 'smash lid']
@@ -291,7 +291,7 @@ break.
-
-
search_index_entry = {'aliases': 'break lid smash lid smash', 'category': 'general', 'key': 'smash glass', 'no_prefix': ' break lid smash lid smash', 'tags': '', 'text': '\n Smash the protective glass.\n\n Usage:\n smash glass\n\n Try to smash the glass of the button.\n\n '}
+search_index_entry = {'aliases': 'break lid smash smash lid', 'category': 'general', 'key': 'smash glass', 'no_prefix': ' break lid smash smash lid', 'tags': '', 'text': '\n Smash the protective glass.\n\n Usage:\n smash glass\n\n Try to smash the glass of the button.\n\n '}
@@ -391,7 +391,7 @@ be mutually exclusive.
-
-
aliases = ['press', 'push', 'press button']
+aliases = ['push', 'press button', 'press']
@@ -420,7 +420,7 @@ set in self.parse())
-
-
search_index_entry = {'aliases': 'press push press button', 'category': 'general', 'key': 'push button', 'no_prefix': ' press push press button', 'tags': '', 'text': '\n Push the red button\n\n Usage:\n push button\n\n '}
+search_index_entry = {'aliases': 'push press button press', 'category': 'general', 'key': 'push button', 'no_prefix': ' push press button press', 'tags': '', 'text': '\n Push the red button\n\n Usage:\n push button\n\n '}
@@ -518,7 +518,7 @@ be mutually exclusive.
-
-
aliases = ['ex', 'l', 'get', 'examine', 'listen', 'feel']
+aliases = ['ex', 'get', 'feel', 'examine', 'l', 'listen']
@@ -544,7 +544,7 @@ be mutually exclusive.
-
-
search_index_entry = {'aliases': 'ex l get examine listen feel', 'category': 'general', 'key': 'look', 'no_prefix': ' ex l get examine listen feel', 'tags': '', 'text': "\n Looking around in darkness\n\n Usage:\n look <obj>\n\n ... not that there's much to see in the dark.\n\n "}
+search_index_entry = {'aliases': 'ex get feel examine l listen', 'category': 'general', 'key': 'look', 'no_prefix': ' ex get feel examine l listen', 'tags': '', 'text': "\n Looking around in darkness\n\n Usage:\n look <obj>\n\n ... not that there's much to see in the dark.\n\n "}
diff --git a/docs/latest/api/evennia.contrib.tutorials.tutorial_world.objects.html b/docs/latest/api/evennia.contrib.tutorials.tutorial_world.objects.html
index d4241a55cf..b6eae9a034 100644
--- a/docs/latest/api/evennia.contrib.tutorials.tutorial_world.objects.html
+++ b/docs/latest/api/evennia.contrib.tutorials.tutorial_world.objects.html
@@ -568,7 +568,7 @@ shift green root up/down
-
-
aliases = ['pull', 'push', 'move', 'shiftroot']
+aliases = ['pull', 'push', 'shiftroot', 'move']
@@ -604,7 +604,7 @@ yellow/green - horizontal roots
-
-
search_index_entry = {'aliases': 'pull push move shiftroot', 'category': 'tutorialworld', 'key': 'shift', 'no_prefix': ' pull push move shiftroot', 'tags': '', 'text': '\n Shifts roots around.\n\n Usage:\n shift blue root left/right\n shift red root left/right\n shift yellow root up/down\n shift green root up/down\n\n '}
+search_index_entry = {'aliases': 'pull push shiftroot move', 'category': 'tutorialworld', 'key': 'shift', 'no_prefix': ' pull push shiftroot move', 'tags': '', 'text': '\n Shifts roots around.\n\n Usage:\n shift blue root left/right\n shift red root left/right\n shift yellow root up/down\n shift green root up/down\n\n '}
@@ -621,7 +621,7 @@ yellow/green - horizontal roots
-
-
aliases = ['button', 'push button', 'press button']
+aliases = ['push button', 'press button', 'button']
@@ -647,7 +647,7 @@ yellow/green - horizontal roots
-
-
search_index_entry = {'aliases': 'button push button press button', 'category': 'tutorialworld', 'key': 'press', 'no_prefix': ' button push button press button', 'tags': '', 'text': '\n Presses a button.\n '}
+search_index_entry = {'aliases': 'push button press button button', 'category': 'tutorialworld', 'key': 'press', 'no_prefix': ' push button press button button', 'tags': '', 'text': '\n Presses a button.\n '}
@@ -791,7 +791,7 @@ parry - forgoes your attack but will make you harder to hit on next
-
-
aliases = ['pierce', 'slash', 'fight', 'parry', 'defend', 'kill', 'chop', 'stab', 'thrust', 'bash', 'hit']
+aliases = ['bash', 'defend', 'fight', 'pierce', 'parry', 'hit', 'slash', 'stab', 'kill', 'chop', 'thrust']
@@ -817,7 +817,7 @@ parry - forgoes your attack but will make you harder to hit on next
-
-
search_index_entry = {'aliases': 'pierce slash fight parry defend kill chop stab thrust bash hit', 'category': 'tutorialworld', 'key': 'attack', 'no_prefix': ' pierce slash fight parry defend kill chop stab thrust bash hit', 'tags': '', 'text': '\n Attack the enemy. Commands:\n\n stab <enemy>\n slash <enemy>\n parry\n\n stab - (thrust) makes a lot of damage but is harder to hit with.\n slash - is easier to land, but does not make as much damage.\n parry - forgoes your attack but will make you harder to hit on next\n enemy attack.\n\n '}
+search_index_entry = {'aliases': 'bash defend fight pierce parry hit slash stab kill chop thrust', 'category': 'tutorialworld', 'key': 'attack', 'no_prefix': ' bash defend fight pierce parry hit slash stab kill chop thrust', 'tags': '', 'text': '\n Attack the enemy. Commands:\n\n stab <enemy>\n slash <enemy>\n parry\n\n stab - (thrust) makes a lot of damage but is harder to hit with.\n slash - is easier to land, but does not make as much damage.\n parry - forgoes your attack but will make you harder to hit on next\n enemy attack.\n\n '}
diff --git a/docs/latest/api/evennia.contrib.tutorials.tutorial_world.rooms.html b/docs/latest/api/evennia.contrib.tutorials.tutorial_world.rooms.html
index 2d1c39c424..64a6ac9957 100644
--- a/docs/latest/api/evennia.contrib.tutorials.tutorial_world.rooms.html
+++ b/docs/latest/api/evennia.contrib.tutorials.tutorial_world.rooms.html
@@ -828,7 +828,7 @@ if they fall off the bridge.
-
-
aliases = ['h', '?']
+aliases = ['?', 'h']
@@ -854,7 +854,7 @@ if they fall off the bridge.
-
-
search_index_entry = {'aliases': 'h ?', 'category': 'tutorial world', 'key': 'help', 'no_prefix': ' h ?', 'tags': '', 'text': '\n Overwritten help command while on the bridge.\n '}
+search_index_entry = {'aliases': '? h', 'category': 'tutorial world', 'key': 'help', 'no_prefix': ' ? h', 'tags': '', 'text': '\n Overwritten help command while on the bridge.\n '}
@@ -980,7 +980,7 @@ to find something.
-
-
aliases = ['feel around', 'search', 'l', 'fiddle', 'feel']
+aliases = ['fiddle', 'search', 'feel', 'l', 'feel around']
@@ -1008,7 +1008,7 @@ random chance of eventually finding a light source.
-
-
search_index_entry = {'aliases': 'feel around search l fiddle feel', 'category': 'tutorialworld', 'key': 'look', 'no_prefix': ' feel around search l fiddle feel', 'tags': '', 'text': '\n Look around in darkness\n\n Usage:\n look\n\n Look around in the darkness, trying\n to find something.\n '}
+search_index_entry = {'aliases': 'fiddle search feel l feel around', 'category': 'tutorialworld', 'key': 'look', 'no_prefix': ' fiddle search feel l feel around', 'tags': '', 'text': '\n Look around in darkness\n\n Usage:\n look\n\n Look around in the darkness, trying\n to find something.\n '}
diff --git a/docs/latest/api/evennia.contrib.utils.git_integration.git_integration.html b/docs/latest/api/evennia.contrib.utils.git_integration.git_integration.html
index 0d5c609063..c598666a1b 100644
--- a/docs/latest/api/evennia.contrib.utils.git_integration.git_integration.html
+++ b/docs/latest/api/evennia.contrib.utils.git_integration.git_integration.html
@@ -220,7 +220,7 @@ git evennia pull - Pull the latest evennia code.
-
-
directory = '/tmp/tmppnsswh9b/0edcebea0fdd67c4ba5c58f3b0d589b02a6bea3e/evennia'
+directory = '/tmp/tmpf2ikqp42/015698d06fe192d64f19176508e8cd7e59df9d4c/evennia'
@@ -281,7 +281,7 @@ git pull - Pull the latest code from your current branch.
-
-
directory = '/tmp/tmppnsswh9b/0edcebea0fdd67c4ba5c58f3b0d589b02a6bea3e/evennia/game_template'
+directory = '/tmp/tmpf2ikqp42/015698d06fe192d64f19176508e8cd7e59df9d4c/evennia/game_template'
diff --git a/docs/latest/api/evennia.objects.objects.html b/docs/latest/api/evennia.objects.objects.html
index 211a68e9ed..f807fd3e66 100644
--- a/docs/latest/api/evennia.objects.objects.html
+++ b/docs/latest/api/evennia.objects.objects.html
@@ -360,6 +360,135 @@ and filtering.
location having the property destination != None.
+
+-
+
get_search_query_replacement(searchdata, **kwargs)[source]
+This method is called by the search method to allow for direct
+replacements of the search string before it is used in the search.
+
+- Parameters
+-
+
+- Returns
+str – The (potentially modified) search string.
+
+
+
+
+
+-
+
get_search_direct_match(searchdata, **kwargs)[source]
+This method is called by the search method to allow for direct
+replacements, such as ‘me’ always being an alias for this object.
+
+- Parameters
+-
+
+- Returns
+tuple – (should_return, str or Obj), where should_return is a boolean indicating
+the .search method should return the result immediately without further
+processing. If should_return is True, the second element of the tuple is the result
+that is returned.
+
+
+
+
+
+-
+
get_search_candidates(searchdata, **kwargs)[source]
+Get the candidates for a search. Also the candidates provided to the
+search function is included, and could be modified in-place here.
+
+- Parameters
+-
+
+- Returns
+list – A list of objects to search between.
+
+
+Notes
+If searchdata is a #dbref, this method should always return None. This is because
+the search should always be global in this case. If candidates were already given,
+they should be used as is. If location was given, the candidates should be based on
+that.
+
+
+
+-
+
get_search_result(searchdata, attribute_name=None, typeclass=None, candidates=None, exact=False, use_dbref=None, tags=None, **kwargs)[source]
+This is a wrapper for actually searching for objects, used by the search method.
+This is broken out into a separate method to allow for easier overriding in child classes.
+
+- Parameters
+
+searchdata (str) – The search criterion.
+attribute_name (str) – The attribute to search on (default is **.
+typeclass (Typeclass or list) – The typeclass to search for.
+candidates (list) – A list of objects to search between.
+exact (bool) – Require exact match.
+use_dbref (bool) – Allow dbref search.
+tags (list) – Tags to search for.
+
+
+
+
+
+
+-
+
get_stacked_results(results, **kwargs)[source]
+This method is called by the search method to allow for handling of multi-match
+results that should be stacked.
+
+- Parameters
+results (list) – The list of results from the search.
+
+- Returns
+tuple –
+
+- (stacked, results), where stacked is a boolean indicating if the
result is stacked and results is the list of results to return. If stacked
+is True, the “.search” method will return results immediately without further
+processing (it will not result in a multimatch-error).
+
+
+
+
+
+Notes
+The stacked keyword argument is an integer that controls the max size of each stack
+(if >0). It’s important to make sure to only stack _identical_ objects, otherwise we
+risk losing track of objects.
+
+
+
+-
+
handle_search_results(searchdata, results, **kwargs)[source]
+This method is called by the search method to allow for handling of the final search result.
+
+- Parameters
+
+searchdata (str) – The original search criterion (potentially modified by
+get_search_query_replacement).
+results (list) – The list of results from the search.
+**kwargs (any) – These are the same as passed to the search method.
+
+
+- Returns
+Object, None or list – Normally this is a single object, but if quiet=True it should be
+a list. If quiet=False and we have to handle a no/multi-match error (directly messaging
+the user), this should return None.
+
+
+
+
-
search(searchdata, global_search=False, use_nicks=True, typeclass=None, location=None, attribute_name=None, quiet=False, exact=False, candidates=None, use_locks=True, nofound_string=None, multimatch_string=None, use_dbref=None, tags=None, stacked=0)[source]
@@ -430,10 +559,10 @@ otherwise.
more tag definitions on the form tagname or (tagname, tagcategory).
stacked (int, optional) – If > 0, multimatches will be analyzed to determine if they
only contains identical objects; these are then assumed ‘stacked’ and no multi-match
-error will be generated, instead stacked number of matches will be returned. If
-stacked is larger than number of matches, returns that number of matches. If
-the found stack is a mix of objects, return None and handle the multi-match
-error depending on the value of quiet.
+error will be generated, instead stacked number of matches will be returned as a
+list. If stacked is larger than number of matches, returns that number of matches.
+If the found stack is a mix of objects, return None and handle the multi-match error
+depending on the value of quiet.
Returns
diff --git a/docs/latest/api/evennia.server.validators.html b/docs/latest/api/evennia.server.validators.html
index ae5430692d..15c0f6730f 100644
--- a/docs/latest/api/evennia.server.validators.html
+++ b/docs/latest/api/evennia.server.validators.html
@@ -120,61 +120,6 @@
Checks to make sure a given username is not taken or otherwise reserved.
-
--
-class
evennia.server.validators.EvenniaPasswordValidator(regex="^[\\w. @+\\-',]+$", policy="Password should contain a mix of letters, spaces, digits and @/./+/-/_/'/, only.")[source]
-Bases: object
-
--
-
__init__(regex="^[\\w. @+\\-',]+$", policy="Password should contain a mix of letters, spaces, digits and @/./+/-/_/'/, only.")[source]
-Constructs a standard Django password validator.
-
-- Parameters
--
-
-
-
-
-
--
-
validate(password, user=None)[source]
-Validates a password string to make sure it meets predefined Evennia
-acceptable character policy.
-
-- Parameters
--
-
-- Returns
-None (None) –
-
-- None if password successfully validated,
raises ValidationError otherwise.
-
-
-
-
-
-
-
-
--
-
get_help_text()[source]
-Returns a user-facing explanation of the password policy defined
-by this validator.
-
-- Returns
-text (str) – Explanation of password policy.
-
-
-
-
-
-
diff --git a/docs/latest/api/evennia.utils.eveditor.html b/docs/latest/api/evennia.utils.eveditor.html
index a83bd9fea2..6ff6b624e1 100644
--- a/docs/latest/api/evennia.utils.eveditor.html
+++ b/docs/latest/api/evennia.utils.eveditor.html
@@ -348,7 +348,7 @@ indentation.
-
-
aliases = [':uu', ':>', ':q!', ':y', ':p', ':!', ':', ':i', ':u', ':DD', ':<', ':q', ':f', ':h', ':=', ':fi', ':w', ':s', ':x', ':j', ':S', ':dd', ':echo', ':r', '::', ':UU', ':A', ':I', ':::', ':dw', ':fd', ':wq']
+aliases = [':<', ':i', ':!', ':I', ':fd', ':x', ':j', ':', ':dw', ':y', ':uu', ':w', ':h', ':u', ':A', ':s', ':fi', ':>', ':S', ':=', ':UU', ':p', ':DD', '::', ':dd', ':q', ':echo', ':::', ':wq', ':f', ':q!', ':r']
@@ -376,7 +376,7 @@ efficient presentation.
-
-
search_index_entry = {'aliases': ':uu :> :q! :y :p :! : :i :u :DD :< :q :f :h := :fi :w :s :x :j :S :dd :echo :r :: :UU :A :I ::: :dw :fd :wq', 'category': 'general', 'key': ':editor_command_group', 'no_prefix': ' :uu :> :q! :y :p :! : :i :u :DD :< :q :f :h := :fi :w :s :x :j :S :dd :echo :r :: :UU :A :I ::: :dw :fd :wq', 'tags': '', 'text': '\n Commands for the editor\n '}
+search_index_entry = {'aliases': ':< :i :! :I :fd :x :j : :dw :y :uu :w :h :u :A :s :fi :> :S := :UU :p :DD :: :dd :q :echo ::: :wq :f :q! :r', 'category': 'general', 'key': ':editor_command_group', 'no_prefix': ' :< :i :! :I :fd :x :j : :dw :y :uu :w :h :u :A :s :fi :> :S := :UU :p :DD :: :dd :q :echo ::: :wq :f :q! :r', 'tags': '', 'text': '\n Commands for the editor\n '}
diff --git a/docs/latest/api/evennia.utils.evmenu.html b/docs/latest/api/evennia.utils.evmenu.html
index 6ff840b9b3..25c52c0b8a 100644
--- a/docs/latest/api/evennia.utils.evmenu.html
+++ b/docs/latest/api/evennia.utils.evmenu.html
@@ -951,7 +951,7 @@ single question.
+aliases = ['y', 'no', 'yes', 'a', 'abort', 'n', '__nomatch_command']
@@ -977,7 +977,7 @@ single question.
+search_index_entry = {'aliases': 'y no yes a abort n __nomatch_command', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' y no yes a abort n __nomatch_command', 'tags': '', 'text': '\n Handle a prompt for yes or no. Press [return] for the default choice.\n\n '}
diff --git a/docs/latest/api/evennia.utils.evmore.html b/docs/latest/api/evennia.utils.evmore.html
index ae19944f40..4927837e5e 100644
--- a/docs/latest/api/evennia.utils.evmore.html
+++ b/docs/latest/api/evennia.utils.evmore.html
@@ -149,7 +149,7 @@ the caller.msg() construct every time the page is updated.
-
-
aliases = ['end', 'abort', 'quit', 'top', 't', 'q', 'e', 'p', 'next', 'previous', 'a', 'n']
+aliases = ['next', 'p', 't', 'abort', 'top', 'a', 'end', 'q', 'previous', 'n', 'e', 'quit']
@@ -175,7 +175,7 @@ the caller.msg() construct every time the page is updated.
-
-
search_index_entry = {'aliases': 'end abort quit top t q e p next previous a n', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' end abort quit top t q e p next previous a n', 'tags': '', 'text': '\n Manipulate the text paging. Catch no-input with aliases.\n '}
+search_index_entry = {'aliases': 'next p t abort top a end q previous n e quit', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' next p t abort top a end q previous n e quit', 'tags': '', 'text': '\n Manipulate the text paging. Catch no-input with aliases.\n '}
diff --git a/docs/latest/genindex.html b/docs/latest/genindex.html
index e0baf0da39..fc5c708e75 100644
--- a/docs/latest/genindex.html
+++ b/docs/latest/genindex.html
@@ -353,8 +353,6 @@
(evennia.server.sessionhandler.ServerSessionHandler method)
(evennia.server.throttle.Throttle method)
-
- (evennia.server.validators.EvenniaPasswordValidator method)
(evennia.server.webserver.DjangoWebRoot method)
@@ -9147,8 +9145,6 @@
EvenniaIndexView (class in evennia.web.website.views.index)
EvenniaLogFile (class in evennia.utils.logger)
-
- EvenniaPasswordValidator (class in evennia.server.validators)
EvenniaPermission (class in evennia.web.api.permissions)
@@ -10774,8 +10770,6 @@
get_exit() (evennia.contrib.grid.xyzgrid.xyzgrid.XYZGrid method)
-
-
+ |
+
get_help_category() (in module evennia.web.website.views.help)
-
- get_help_text() (evennia.server.validators.EvenniaPasswordValidator method)
get_help_topic() (in module evennia.web.website.views.help)
@@ -11052,6 +11046,18 @@
get_sdesc() (evennia.contrib.rpg.rpsystem.rpsystem.ContribRPCharacter method)
+ get_search_candidates() (evennia.objects.objects.DefaultObject method)
+
+ get_search_direct_match() (evennia.objects.objects.DefaultObject method)
+
+ get_search_query_replacement() (evennia.objects.objects.DefaultObject method)
+
+ get_search_result() (evennia.contrib.rpg.rpsystem.rpsystem.ContribRPObject method)
+
+
get_season() (evennia.contrib.grid.extended_room.extended_room.ExtendedRoom method)
get_serializer_class() (evennia.web.api.views.GeneralViewSetMixin method)
@@ -11078,6 +11084,8 @@
(evennia.contrib.grid.xyzgrid.xymap_legend.TransitionMapNode method)
+ get_stacked_results() (evennia.objects.objects.DefaultObject method)
+
get_stage() (evennia.scripts.ondemandhandler.OnDemandHandler method)
|
|