From 3b1d5691187d60306f1e390f239cce5efc813d00 Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Sat, 21 Jan 2023 00:43:38 +0100 Subject: [PATCH] Attempt to Quick Crafting replacements (again) --- src/caches.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/caches.lua b/src/caches.lua index a3c94f2..3fdbc51 100644 --- a/src/caches.lua +++ b/src/caches.lua @@ -178,13 +178,9 @@ local function cache_recipes(item) _recipes[#recipes + 1 - k] = v end - local shift = 1 local size_rpl = maxn(replacements[item]) local size_rcp = #_recipes - - if size_rpl > size_rcp then - shift = size_rcp - size_rpl - end + local shift = size_rcp - size_rpl for k, v in pairs(replacements[item]) do k += shift