Make surface optional by the LuaRendering
Posted: Sun May 24, 2020 12:32 pm
Hi devs!
Here is the example:
https://lua-api.factorio.com/latest/Lua ... draw_light
Why the surface is not optional here? The entity already defines rendering surface, why it cannot be optional? The same for sprite and geometry for situations, where the target is an entity.
https://lua-api.factorio.com/latest/LuaRendering.html
Here is the example:
Code: Select all
/c
local entity = game.player.selected
rendering.draw_light {sprite = "utility/light_medium", surface = entity.surface, target = entity}
https://lua-api.factorio.com/latest/LuaRendering.html