Page 1 of 1

[1.1.88] LuaGuiElement of type=camera does not render "missing electricity" symbols

Posted: Sat Aug 05, 2023 12:25 am
by commanderguy3001
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:

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 }
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.

Re: [1.1.88] LuaGuiElement of type=camera does not render "missing electricity" symbols

Posted: Sat Aug 05, 2023 6:12 am
by Pi-C
As I just happened to have a camera open for testing some other stuff, here's a screenshot showing that neither the icon for "No electricity" nor those for "No fuel", "No ammo" and "No logistic network" are visible on camera:
camera_icons.png
camera_icons.png (480.34 KiB) Viewed 1996 times
Extrapolating from this, I guess none of the blinking vanilla alert icons will be visible on camera. However, the icon of the car keys on top of the car near the top right corner is visible both on and off camera. If this is of any value, I've created the icon using rendering.draw_sprite, with "entity-info-icon-above" as render_layer.

Re: [1.1.88] LuaGuiElement of type=camera does not render "missing electricity" symbols

Posted: Sat Aug 05, 2023 9:49 pm
by commanderguy3001
yeah, LuaRendering luckily works just fine.
A different thing that I noticed today while testing a bit more with this, is that ghosts don't behave as I would expect them to, but I'll make a separate report for that later.

Re: [1.1.88] LuaGuiElement of type=camera does not render "missing electricity" symbols

Posted: Tue Jan 02, 2024 5:42 pm
by Rseding91
Thanks for the report. This is now fixed for the next release.

Re: [1.1.88] LuaGuiElement of type=camera does not render "missing electricity" symbols

Posted: Wed Jan 03, 2024 10:29 am
by Pi-C
Thank you, great news! I'm looking forward to try it out. :-)