[1.1.88] LuaGuiElement of type=camera does not render "missing electricity" symbols
Posted: Sat Aug 05, 2023 12:25 am
As per Title, when adding a LuaGuiElement of type=camera, it will not show the "missing electricity" symbols that the player can see above any entities that need electricity, but aren't connected to the network in any way.
Actual behaviour: The camera doesn't show the "missing electricity" symbols
Expected behaviour: The camera does show the given surface exactly the way a player would see it
Minimal example to reproduce:
- start a new default settings save file
- run the below code in game in the chat/command line:
This will create a new camera LuaGuiElement in the top left corner showing the coordinates at 0, 0 of nauvis. it will place an assembling machine there, to show the behaviour.
Actual behaviour: The camera doesn't show the "missing electricity" symbols
Expected behaviour: The camera does show the given surface exactly the way a player would see it
Minimal example to reproduce:
- start a new default settings save file
- run the below code in game in the chat/command line:
Code: Select all
/c
local screen = game.player.gui.screen
local surface = game.get_surface("nauvis")
local camera = screen.add{ type="camera", surface_index=surface.index, position={0,0}, zoom=2 }
camera.style.size = 300
surface.create_entity{ name="assembling-machine-2", position={0,0}, force=game.player.force }