mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Merge pull request #3201 from InspectorCaracal/patch-6
Minor fixes to crafting contrib
This commit is contained in:
commit
3d40b2237d
1 changed files with 5 additions and 5 deletions
|
|
@ -604,8 +604,12 @@ class CraftingRecipe(CraftingRecipeBase):
|
|||
else:
|
||||
self.tool_names = self.tool_tags
|
||||
|
||||
assert isinstance(
|
||||
self.output_prototypes, (list, tuple)
|
||||
), "Crafting {self.__class__}.output_prototypes must be a list or tuple."
|
||||
|
||||
if self.output_names:
|
||||
assert len(self.consumable_names) == len(self.consumable_tags), (
|
||||
assert len(self.output_names) == len(self.output_prototypes), (
|
||||
f"Crafting {self.__class__}.output_names list must "
|
||||
"have the same length as .output_prototypes."
|
||||
)
|
||||
|
|
@ -617,10 +621,6 @@ class CraftingRecipe(CraftingRecipeBase):
|
|||
for prot in self.output_prototypes
|
||||
]
|
||||
|
||||
assert isinstance(
|
||||
self.output_prototypes, (list, tuple)
|
||||
), "Crafting {self.__class__}.output_prototypes must be a list or tuple."
|
||||
|
||||
# don't allow reuse if we have consumables. If only tools we can reuse
|
||||
# over and over since nothing changes.
|
||||
self.allow_reuse = not bool(self.consumable_tags)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue