[Not needed] Allow specification of custom lamp light picture for type = "basic"
Posted: Fri Oct 04, 2019 11:43 am
Following this thread.
From the wiki for LightDefinition:
You can sort of work around this by using type = "oriented" and then specifying a very small scale for the sprite, but this feels a bit dodgy and I'm not certain it won't break at some point. If we could specify a sprite for type = "basic", I would be able to decrease the size of the lamp radius without much/any visible effect, which would remove the need to increase the renderer search radius, or at worst, make that increase considerably smaller.
For context, the default Factorio lamp sprite is on the left (with a black background added), the one I would like to use (or similar) is on the right:
From the wiki for LightDefinition:
It would be very useful to be able to specify a custom sprite for "basic"-type lights as well. The default Factorio sprite (light-medium.png) has a surprising amount of nearly dead/invisible space around it, close to 50% of the width/height of the sprite. This works well and gives a nice effect for small lamps, which is what it was intended for - but for larger lamps, we're now looking at extending the renderer search parameters to get large off-screen lamps to render properly, which is going to have an impact on performance - and with the default sprite, a fair whack of that impact is going to be for correctly rendering something which is 99-100% invisible.type
Type: Types/string
Default: "basic"
Either "basic" or "oriented". If the type is "oriented", the following properties are read additionally to the other properties:
picture - Types/Sprite, mandatory
rotation_shift - Types/float, optional
You can sort of work around this by using type = "oriented" and then specifying a very small scale for the sprite, but this feels a bit dodgy and I'm not certain it won't break at some point. If we could specify a sprite for type = "basic", I would be able to decrease the size of the lamp radius without much/any visible effect, which would remove the need to increase the renderer search radius, or at worst, make that increase considerably smaller.
For context, the default Factorio lamp sprite is on the left (with a black background added), the one I would like to use (or similar) is on the right: