Merge branch 'main' into patch-1

This commit is contained in:
Griatch 2023-01-06 18:52:44 +01:00 committed by GitHub
commit 31a068b07e
11 changed files with 15 additions and 14 deletions

View file

@ -315,4 +315,4 @@ The answer is simply **no**.
For example, the max dbref value for the default sqlite3 database is `2**64`. If you *created 10 000 new objects every second of every minute of every day of the year it would take about **60 million years** for you to run out of dbref numbers*. That's a database of 140 TeraBytes, just to store the dbrefs, no other data. For example, the max dbref value for the default sqlite3 database is `2**64`. If you *created 10 000 new objects every second of every minute of every day of the year it would take about **60 million years** for you to run out of dbref numbers*. That's a database of 140 TeraBytes, just to store the dbrefs, no other data.
If you are still using Evennia at that point and has this concern, get back to us and we can discuss adding dbref reuse then. If you are still using Evennia at that point and have this concern, get back to us and we can discuss adding dbref reuse then.

View file

@ -30,7 +30,7 @@ class Character(ComponentHolderMixin, DefaultCharacter):
Components need to inherit the Component class directly and require a name. Components need to inherit the Component class directly and require a name.
```python ```python
from evennia.contrib.components import Component from evennia.contrib.base_systems.components import Component
class Health(Component): class Health(Component):
name = "health" name = "health"

View file

@ -115,7 +115,7 @@ class RecipeBread(CraftingRecipe):
## Adding new recipes ## Adding new recipes
A *recipe* is a class inheriting from A *recipe* is a class inheriting from
`evennia.contrib.crafting.crafting.CraftingRecipe`. This class implements the `evennia.contrib.game_systems.crafting.CraftingRecipe`. This class implements the
most common form of crafting - that using in-game objects. Each recipe is a most common form of crafting - that using in-game objects. Each recipe is a
separate class which gets initialized with the consumables/tools you provide. separate class which gets initialized with the consumables/tools you provide.
@ -137,7 +137,7 @@ example setting:
```python ```python
# in mygame/world/myrecipes.py # in mygame/world/myrecipes.py
from evennia.contrib.crafting.crafting import CraftingRecipe from evennia.contrib.game_systems.crafting import CraftingRecipe
class WoodenPuppetRecipe(CraftingRecipe): class WoodenPuppetRecipe(CraftingRecipe):
"""A puppet"""" """A puppet""""
@ -200,7 +200,7 @@ in-game command:
In code we would do In code we would do
```python ```python
from evennia.contrib.crafting.crafting import craft from evennia.contrib.game_systems.crafting import craft
puppet = craft(crafter, "wooden puppet", knife, wood) puppet = craft(crafter, "wooden puppet", knife, wood)
``` ```
@ -259,7 +259,7 @@ parent class and have your recipes inherit from this.
```python ```python
from random import randint from random import randint
from evennia.contrib.crafting.crafting import CraftingRecipe from evennia.contrib.game_systems.crafting import CraftingRecipe
class SkillRecipe(CraftingRecipe): class SkillRecipe(CraftingRecipe):
"""A recipe that considers skill""" """A recipe that considers skill"""

View file

@ -21,7 +21,7 @@ Specifically, in `mygame/commands/default_cmdsets.py`:
... ...
from evennia.contrib.grid.ingame_map_display import MapDisplayCmdSet # <--- from evennia.contrib.grid.ingame_map_display import MapDisplayCmdSet # <---
class CharacterCmdset(default_cmds.Character_CmdSet): class CharacterCmdset(default_cmds.CharacterCmdSet):
... ...
def at_cmdset_creation(self): def at_cmdset_creation(self):
... ...

View file

@ -166,7 +166,7 @@ This module adds no new commands; embed it in your say/emote/whisper commands.
### Usage: ### Usage:
```python ```python
from evennia.contrib import rplanguage from evennia.contrib.rpg.rpsystem import rplanguage
# need to be done once, here we create the "default" lang # need to be done once, here we create the "default" lang
rplanguage.add_language() rplanguage.add_language()

View file

@ -7,7 +7,7 @@ object with its own functionality and state tracking.
Create the button with Create the button with
create/drop button:tutorials.red_button.RedButton create/drop button:contrib.tutorials.red_button.RedButton
Note that you must drop the button before you can see its messages! It's Note that you must drop the button before you can see its messages! It's
imperative that you press the red button. You know you want to. imperative that you press the red button. You know you want to.

View file

@ -17,7 +17,7 @@ Evmenu.
Log in as superuser (#1), then run Log in as superuser (#1), then run
batchcommand tutorials.tutorial_world.build batchcommand contrib.tutorials.tutorial_world.build
Wait a little while for building to complete and don't run the command Wait a little while for building to complete and don't run the command
again even if it's slow. This builds the world and connect it to Limbo again even if it's slow. This builds the world and connect it to Limbo

View file

@ -425,7 +425,7 @@ the room it is in.
On the game command-line, let's create a mirror: On the game command-line, let's create a mirror:
> create/drop mirror:contrib.tutorial_examples.mirror.TutorialMirror > create/drop mirror:contrib.tutorials.mirror.TutorialMirror
```{sidebar} Creating objects ```{sidebar} Creating objects

View file

@ -234,7 +234,7 @@ def init_fill_field(
# Initialize menu of selections # Initialize menu of selections
FieldEvMenu( FieldEvMenu(
caller, caller,
"evennia.contrib.utils.fieldfill", "evennia.contrib.utils.fieldfill.fieldfill",
startnode="menunode_fieldfill", startnode="menunode_fieldfill",
auto_look=False, auto_look=False,
persistent=persistent, persistent=persistent,

View file

@ -93,6 +93,7 @@ class TestListToString(TestCase):
'"1", "2" and "3"', utils.list_to_string([1, 2, 3], endsep="and", addquote=True) '"1", "2" and "3"', utils.list_to_string([1, 2, 3], endsep="and", addquote=True)
) )
self.assertEqual("1 and 2", utils.list_to_string([1, 2])) self.assertEqual("1 and 2", utils.list_to_string([1, 2]))
self.assertEqual("1, 2", utils.list_to_string([1, 2], endsep=","))
class TestMLen(TestCase): class TestMLen(TestCase):

View file

@ -448,7 +448,7 @@ def iter_to_str(iterable, sep=",", endsep=", and", addquote=False):
iterable = tuple(str(val) for val in iterable) iterable = tuple(str(val) for val in iterable)
if endsep: if endsep:
if endsep.startswith(sep): if endsep.startswith(sep) and endsep != sep:
# oxford comma alternative # oxford comma alternative
endsep = endsep[1:] if len_iter < 3 else endsep endsep = endsep[1:] if len_iter < 3 else endsep
elif endsep[0] not in punctuation: elif endsep[0] not in punctuation: