Hi Linver,
as you mentioned that you'll not consider it a issue that you are intending to fix, i have looked into it a bit myself, and would like to propose the following fix:
In "Krastorio2\prototypes\items" you are introducing the Substation mk2 as "hidden" and this is the item that gets extended with a Lamp by "Lighted Electric Poles+"
In "Krastorio2\prototypes\vanilla-changes\optional" you are checking if the Substation MK2 is enabled and removing the hidden flag if it is.
data.raw.item["kr-substation-mk2"].flags = nil
data.raw["electric-pole"]["substation"].fast_replaceable_group = "substation"
data.raw["electric-pole"]["substation"].next_upgrade = "kr-substation-mk2"
As this is a custom way of enabling the item, LEP does not know about this, resulting in the reported issues.
As you have a Compatibility script for Lighted Electric Poles + in "Krastorio2\compatibility-scripts\data-final-fixes\LightedPolesPlus.lua" anyways, I would suggest the following extension of the compatibility script:
if krastorio.general.getSafeSettingValue("kr-substation-mk2") then
-- also unhide lighted mk2
data.raw["item"]["lighted-kr-substation-mk2"].flags = nil
--fix fast_replaceable_group
data.raw["electric-pole"]["lighted-substation"].fast_replaceable_group = "substation"
-- remove specific upgrade path
data.raw["electric-pole"]["substation"].next_upgrade = nil
data.raw["electric-pole"]["lighted-substation"].next_upgrade = nil
end
Thanks for looking into it.