From 6d5140cebd9df3e0c679c2797485862740d8100e Mon Sep 17 00:00:00 2001 From: InspectorCaracal <51038201+InspectorCaracal@users.noreply.github.com> Date: Sun, 11 Feb 2024 21:47:59 -0700 Subject: [PATCH] don't override if setting is empty this is just so it can pass the test contrivance --- evennia/contrib/game_systems/crafting/crafting.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/evennia/contrib/game_systems/crafting/crafting.py b/evennia/contrib/game_systems/crafting/crafting.py index ccbc734b98..7dea838ab3 100644 --- a/evennia/contrib/game_systems/crafting/crafting.py +++ b/evennia/contrib/game_systems/crafting/crafting.py @@ -146,9 +146,10 @@ def _load_recipes(): global _RECIPE_CLASSES if not _RECIPE_CLASSES: - paths = ["evennia.contrib.game_systems.crafting.example_recipes"] - if hasattr(settings, "CRAFT_RECIPE_MODULES"): + if paths := getattr(settings, "CRAFT_RECIPE_MODULES", None): paths = make_iter(settings.CRAFT_RECIPE_MODULES) + else: + paths = ["evennia.contrib.game_systems.crafting.example_recipes"] for path in paths: for cls in callables_from_module(path).values(): if inherits_from(cls, CraftingRecipeBase):