[2.0.73] Reading elem_tooltip for virtual signal returns invalid table
Posted: Sat Feb 07, 2026 5:46 pm
Sorry, this is a minor annoyance and I wasn't sure how to summarise it in the title. To reproduce:
Start any Factorio game world.
Run these commands:
This creates a GUI element with an element tooltip corresponding to a virtual signal.
When you try to read the elem_tooltip, perhaps to make a copy of it elsewhere, you get this:
"virtual-signal" (NOT "signal") is not a valid ElemType for creating an elem_tooltip.
EDIT: Oh, just to be really clear, I expect this output:
Start any Factorio game world.
Run these commands:
Code: Select all
/c x = game.player.gui.center.add{type = "frame"}; x.style.height = 100; x.style.width = 100
/c x.elem_tooltip = {type = "signal", name = "signal-A", signal_type = "virtual"}
When you try to read the elem_tooltip, perhaps to make a copy of it elsewhere, you get this:
Code: Select all
/c game.print(serpent.block(x.elem_tooltip))
Code: Select all
{
name = "signal-A",
signal_type = "virtual",
type = "virtual-signal",
}
EDIT: Oh, just to be really clear, I expect this output:
Code: Select all
{
name = "signal-A",
signal_type = "virtual",
type = "signal",
}