I think I may have found the issue with this problem. Bear with me, this might be a long one..
Krastorio2 doesn't modify the sprites for the small lamp; the only change it makes is to the glow size (which causes the inheritance entry in the game tooltip) and adds another entity with a type of "lamp". It doesn't change "picture_on" for the lamp anywhere.
In my debugging of this issue, the problem disappeared; in my various loads of mods, the image isn't appearing anymore, including the game save where it first appeared.. However, it doesn't mean that the bug isn't there; my current theory is that in loading of the mods, the order of the layers may have changed; without digging thru Factorio's code I can't tell..
The bug still exists however; the base game's sprite for picture_on still appears in the "small-lamp" entity's definition. In my digging, I threw some debug messages in the lamp.lua code that checked the small-lamp data object before and after the modifications, and discovered that this mod's "picture_on" doesn't repace the base mod's definition, it only added to it.
The base mod's definition looks like this:
https://github.com/wube/factorio-data/blob/2b18d0a4c4f186e27e83cbf6e9a9d3e3e130408d/base/prototypes/entity/demo-entities.lua#L4218
This mod's code for adding the "picture_on" sprite does not replace the "picture_on" entry; it just adds a "layers" entry to the dictionary (via "drlamp.picture_on.layers = ..."). The resulting JSON entry looks like this (snipped and beautified):
[code]
picture_on = {
filename = "base/graphics/entity/small-lamp/lamp-light.png",
priority = "high",
width = 46,
height = 40,
frame_count = 1,
axially_symmetrical = false,
direction_count = 1,
shift = {
0,
-0.21875
},
hr_version = {
filename = "base/graphics/entity/small-lamp/hr-lamp-light.png",
priority = "high",
width = 90,
height = 78,
frame_count = 1,
axially_symmetrical = false,
direction_count = 1,
shift = {
0,
-0.21875
},
scale = 0.5
},
layers = {
{
filename = "SchallLampContrast/graphics/entity/light-on.png",
priority = "high",
width = 90,
height = 78,
frame_count = 1,
axially_symmetrical = false,
direction_count = 1,
shift = {
0,
-0.21875
},
scale = 1
}
}
[/code]
Notice that the base game's image sprites still exist in the "picture_on" entry. This happens with just this mod loaded, no other mods installed. And the fault lies with the dot notation in "drlamp.picture_on.layers = ..."; doing so doesn't replace the "picture_on" entry, it just adds the "layers" entry to it. Fixing the "picture_on" entry by removing the base mod's entry for the small lamp would possibly stop those default lamp sprites from appearing again if the layer rendering changes. This can be done either by wiping the picture_on entry when redefining it:
[code]
picture_on = {
layers =
{
{
(...lamp contrast definition....)
}
}
}
[/code]
or not using layers entry (matching base game's picture_on entry):
[code]
picture_on = {
(...lamp contrast definition....)
}
[/code]
Let me know what you think..