Fix replacements

This commit is contained in:
Jean-Patrick Guerrero 2020-07-26 16:22:04 +02:00
parent 6e6ff93d29
commit f88e0412fc

View File

@ -709,8 +709,14 @@ local function cache_recipes(item)
_recipes[#recipes + 1 - k] = v
end
local shift = 0
if maxn(replacements[item]) > #_recipes then
shift = -1
end
for k, v in pairs(replacements[item]) do
_recipes[k].replacements = v
_recipes[k + shift].replacements = v
end
recipes = _recipes