mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-11 15:04:52 +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
|
||||
local prev = entity.previous_recipe
|
||||
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
|
||||
|
||||
@@ -510,7 +511,7 @@ local function init()
|
||||
elseif entity.type == "furnace" then
|
||||
local prev = entity.previous_recipe
|
||||
if prev and prev.name then
|
||||
recipe = { name = prev.name }
|
||||
recipe = { name = prev.name.name }
|
||||
end
|
||||
end
|
||||
if recipe then
|
||||
|
||||
Reference in new issue
Block a user