PyCoal Touched By an Angel (Dark's version) deprecated


Patched version to fix a few issues until the official rework is done.

Tweaks
4 years ago
0.18
9

g Py Petrol Handling vs Angel Petrochem

4 years ago

I'm modifying a message left on the Pyanodons Petroleum Handling message board, since it would seem to better go here.

"I'm trying to run Pyanodon's Petroleum Handling mod with Angel's mods, Bob's mods, and an addon for Angel's mods called Petrochem Plus (https://mods.factorio.com/mod/PCPRedux)

When the game is loading, I get the following:

Error while loading recipe prototype "hotair-angels-roll-rubber-casting" (recipe): Key "icon" not found in property tree at ROOT.recipe.hotair-angels-roll-rubber-casting.icons[0]

I took a peek at the code for both of the mods, and I'm pretty sure this is caused by the logic for picking the icon for hot air recipes in your function "overrides.hotairrecipes" in prototypes/functions/functions.lua.

The code seems to default to using the "icon" property of the result of the recipe on line 431 if the recipe has no icon:

if recipe.icon ~= nil then
icon = recipe.icon
if recipe.icon_size ~= nil and recipe.icon_size == 32 then
icon_size = 32
else
icon_size = 64
end
end
if icon == nil then
icon = data.raw.item[result].icon
end
But that doesn't work in the case of the item added by PetroChem Plus, which doesn't have the "icon" property but has a list of "icons" instead:

{
type = "item",
name = "angels-roll-rubber",
icons={{icon = "PCPRedux/graphics/icons/roll-blank.png", tint = {r = 0, g = 0, b = 0},icon_size=32}},
subgroup = "petrochem-solids",
order = "ya",
stack_size = 200
}
I'm not really experienced with Factorio modding, so I'm not quite sure how to fix this, but as a temporary fix I was able to get the game to load by either adding the item to the hot air blacklist, or adding a default icon if "data.raw.item[result].icon" is nil.

New response