[2.0.8] Missleading error on recipe proto about missing icon when recipe has normal/expensive defined.
Posted: Tue Oct 22, 2024 5:50 pm
This is debatable as to it being a bug or not, but it's a very misleading error to me and had me scratching my head for a few minutes about it.
The error in question:
Except the icon is optional if the recipe has one result item, so I couldn't understand why it wasn't working when other recipes did.
(This is after I changed result/result_count to results.)
As it turns out, normal/expensive has been removed, so the actual error is that those are defined, and not the missing icon itself. Once I replaced it with just the contents of the normal section, the icon error went away.
So it'd be great if the error was something along the lines of normal/expensive sections being defined, instead of something that seems completely different from a user perspective.
The error in question:
Code: Select all
Error ModManager.cpp:1733: Error while loading recipe prototype "stacked-copper-plate" (recipe): Key "icon" not found in property tree at ROOT.recipe.stacked-steel-plate
Modifications: Deadlock Experimental Stacking
Code: Select all
local stacked_cable = {
type = "recipe",
name = "stacked-copper-cable",
normal = {
enabled = false,
energy_required = 0.5 * cable_density,
ingredients = {{"deadlock-stack-copper-plate", 1}},
results = {{"deadlock-stack-copper-cable",2}},
},
expensive = {
enabled = false,
energy_required = 0.5 * cable_density,
ingredients = {{"deadlock-stack-copper-plate", 1}},
results = {{"deadlock-stack-copper-cable",2}},
},
}
As it turns out, normal/expensive has been removed, so the actual error is that those are defined, and not the missing icon itself. Once I replaced it with just the contents of the normal section, the icon error went away.
So it'd be great if the error was something along the lines of normal/expensive sections being defined, instead of something that seems completely different from a user perspective.