Update links/paths to new contrib locations

This commit is contained in:
Griatch 2021-12-19 17:04:26 +01:00
parent 7f2b8c81d7
commit 8139fd79c7
61 changed files with 171 additions and 248 deletions

View file

@ -51,7 +51,7 @@ tools will be identified before consumables).
```python
from evennia.contrib.crafting import crafting
from evennia.contrib.game_systems.crafting import crafting
spiked_club = crafting.craft(crafter, "spiked club", club, nails)
@ -87,7 +87,7 @@ substantially this way.
```python
from evennia.contrib.crafting.crafting import CraftingRecipe
from evennia.contrib.game_systems.crafting.crafting import CraftingRecipe
class PigIronRecipe(CraftingRecipe):
# Pig iron is a high-carbon result of melting iron in a blast furnace.
@ -112,7 +112,7 @@ substantially this way.
If the above class was added to a module in `CRAFT_RECIPE_MODULES`, it could be
called using its `.name` property, as "pig iron".
The [example_recipies](api:evennia.contrib.crafting.example_recipes) module has
The [example_recipies](api:evennia.contrib.game_systems.crafting.example_recipes) module has
a full example of the components for creating a sword from base components.
----
@ -139,7 +139,7 @@ def _load_recipes():
global _RECIPE_CLASSES
if not _RECIPE_CLASSES:
paths = ["evennia.contrib.crafting.example_recipes"]
paths = ["evennia.contrib.game_systems.crafting.example_recipes"]
if hasattr(settings, "CRAFT_RECIPE_MODULES"):
paths += make_iter(settings.CRAFT_RECIPE_MODULES)
for path in paths:
@ -462,7 +462,7 @@ class CraftingRecipe(CraftingRecipeBase):
this deletes consumables.
Use `.msg` to conveniently send messages to the crafter. Raise
`evennia.contrib.crafting.crafting.CraftingError` exception to abort
`evennia.contrib.game_systems.crafting.crafting.CraftingError` exception to abort
crafting at any time in the sequence. If raising with a text, this will be
shown to the crafter automatically
@ -909,7 +909,8 @@ def craft(crafter, recipe_name, *inputs, raise_exception=False, **kwargs):
Notes:
If no recipe_module is given, will look for a list `settings.CRAFT_RECIPE_MODULES` and
lastly fall back to the example module `"evennia.contrib."`
lastly fall back to the example module
`"evennia.contrib.game_systems.crafting.example_recipes"`
"""
# delayed loading/caching of recipes

View file

@ -485,7 +485,7 @@ class TestCraftSword(TestCase):
self.crafter.msg = mock.MagicMock()
@override_settings(CRAFT_RECIPE_MODULES=[], DEFAULT_HOME="#999999")
@mock.patch("evennia.contrib.crafting.example_recipes.random")
@mock.patch("evennia.contrib.game_systems.crafting.example_recipes.random")
def test_craft_sword(self, mockrandom):
"""
Craft example sword. For the test, every crafting works.
@ -652,8 +652,8 @@ class TestCraftSword(TestCase):
self.assertIsNotNone(cauldron)
@mock.patch("evennia.contrib.crafting.crafting._load_recipes", new=mock.MagicMock())
@mock.patch("evennia.contrib.crafting.crafting._RECIPE_CLASSES", new={"testrecipe": _MockRecipe})
@mock.patch("evennia.contrib.game_systems.crafting.crafting._load_recipes", new=mock.MagicMock())
@mock.patch("evennia.contrib.game_systems.crafting.crafting._RECIPE_CLASSES", new={"testrecipe": _MockRecipe})
@override_settings(CRAFT_RECIPE_MODULES=[], DEFAULT_HOME="#999999")
class TestCraftCommand(CommandTest):
"""Test the crafting command"""