mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 16:13:12 +09:00
fix(minimap): restore nested previous_recipe name access
Furnace previous_recipe ids are nested under prev.name.name in this context. Restore the original access path and leave an inline maintainer note to prevent repeat regressions.
This commit is contained in:
1 parent
17480aafff
commit
5ddf3fe34f
1 file changed
+3
-2
@@ -187,7 +187,8 @@ local function update_entity_recipe(entity)
|
|||||||
elseif entity.type == "furnace" then
|
elseif entity.type == "furnace" then
|
||||||
local prev = entity.previous_recipe
|
local prev = entity.previous_recipe
|
||||||
if prev and prev.name then
|
if prev and prev.name then
|
||||||
recipe = prev.name
|
-- Factorio furnaces expose previous_recipe with the id nested at previous_recipe.name.name.
|
||||||
|
recipe = prev.name.name
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -510,7 +511,7 @@ local function init()
|
|||||||
elseif entity.type == "furnace" then
|
elseif entity.type == "furnace" then
|
||||||
local prev = entity.previous_recipe
|
local prev = entity.previous_recipe
|
||||||
if prev and prev.name then
|
if prev and prev.name then
|
||||||
recipe = { name = prev.name }
|
recipe = { name = prev.name.name }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if recipe then
|
if recipe then
|
||||||
|
|||||||
Reference in new issue
Block a user