Page 1 of 1

fuel_icon graphics can't be replaced

Posted: Tue Jan 28, 2025 4:42 am
by Zaflis
I have a topic here with more details:
https://mods.factorio.com/mod/SmoothWar ... 0437e08a48
data.raw["utility-sprites"]["default"].fuel_icon = {
filename = "__SmoothWarnings__/graphics/fuel-icon-red.png",
priority = "extra-high",
width = 64,
height = 64,
flags = {"icon"},
scale = 1.4
}
It worked before but broke in 2.0, other icons were fine. This is the only icon that isn't replacing, and i recently added even frozen and thunderstorm ones.
fuel-icon-red.png
fuel-icon-red.png (5.66 KiB) Viewed 174 times

Re: fuel_icon graphics can't be replaced

Posted: Tue Jan 28, 2025 4:51 am
by Silari
Entities with a burner energy source specify their out of fuel icon in the burner energy source. You need to override THAT, instead of the one in the utility-sprites. I ran into the issue with my mod No Power Icons.

https://lua-api.factorio.com/latest/pro ... .html#icon

The three defined in Factorio are data.raw["burner-usage"]["fuel"]["icon"] for fuel burners (like the boiler), and data.raw["burner-usage"]["food"]["icon"] for food burners (Space Age only), and data.raw["burner-usage"]["nutrients"]["icon"] for nutrient burners (Space Age only).