From ca95d4712761dd8a54b1f6a63e3bdb582955edfd Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Tue, 15 Mar 2022 14:02:05 +0100 Subject: [PATCH] Factorio: improve generation speed of make_quick_recipe slightly --- worlds/factorio/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/worlds/factorio/__init__.py b/worlds/factorio/__init__.py index 98f5c1c8..04c8f907 100644 --- a/worlds/factorio/__init__.py +++ b/worlds/factorio/__init__.py @@ -201,10 +201,10 @@ class Factorio(World): new_ingredient = pool.pop() if new_ingredient in liquids: while liquids_used == allow_liquids and new_ingredient in liquids: - # liquids already at max for current recipe. Return the liquid to the pool, shuffle, and get a new ingredient. + # liquids already at max for current recipe. + # Return the liquid to the pool and get a new ingredient. pool.append(new_ingredient) - self.world.random.shuffle(pool) - new_ingredient = pool.pop() + new_ingredient = pool.pop(0) liquids_used += 1 new_ingredients[new_ingredient] = 1 return Recipe(original.name, self.get_category(original.category, liquids_used), new_ingredients,