don't override if setting is empty

this is just so it can pass the test contrivance
This commit is contained in:
InspectorCaracal 2024-02-11 21:47:59 -07:00 committed by InspectorCaracal
parent d1f0988d80
commit 6d5140cebd

View file

@ -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):