I'm just dipping my toes into modding for the first time, and I've got stuck on applying tints to sprites.
I'm working on a electric pole with maximum supply distance, and I'd like it to be a different colour.
I've figured out how to tint the icon, but not the sprite.
This is what I've got so far:
Code: Select all
local maxDistanceElectricPole = table.deepcopy(data.raw["electric-pole"]["big-electric-pole"])
maxDistanceElectricPole.name = "max-distance-electric-pole"
maxDistanceElectricPole.localised_description = {"item-description.max-distance-electric-pole"}
maxDistanceElectricPole.supply_area_distance = 64
maxDistanceElectricPole.maximum_wire_distance = 64
maxDistanceElectricPole.subgroup = "energy-pipe-distribution"
maxDistanceElectricPole.icons = {
{
icon = maxDistanceElectricPole.icon,
tint = {r= 1.0, g = 0.5, b = 0.5, a = 1}
}
}
data:extend{maxDistanceElectricPole}