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

This subforum contains all the issues which we already resolved.
commanderguy3001
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sun Jul 30, 2023 7:32 am
Contact:

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

Post 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.
Pi-C
Smart Inserter
Smart Inserter
Posts: 1742
Joined: Sun Oct 14, 2018 8:13 am
Contact:

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

Post 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 2208 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.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
commanderguy3001
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sun Jul 30, 2023 7:32 am
Contact:

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

Post 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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14680
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 »

Thanks for the report. This is now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.
Pi-C
Smart Inserter
Smart Inserter
Posts: 1742
Joined: Sun Oct 14, 2018 8:13 am
Contact:

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

Post by Pi-C »

Thank you, great news! I'm looking forward to try it out. :-)
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Post Reply

Return to “Resolved Problems and Bugs”