[2.0.60] Leaving remote map view does not raise on_selected_entity_changed

Post your bugs and problems so we can fix them.
Honktown
Smart Inserter
Smart Inserter
Posts: 1057
Joined: Thu Oct 03, 2019 7:10 am
Contact:

[2.0.60] Leaving remote map view does not raise on_selected_entity_changed

Post by Honktown »

What you expected:
Deselecting an entity always raises on_selected_entity_changed when it's reasonable to do so.

What happens:
It doesn't. The tooltip changes and everything

To reproduce:

Code: Select all

/c
script.on_event(defines.events.on_selected_entity_changed, function(event)
	game.print(event.tick)
end)
1) open the map, zoom in, put the mouse cursor on something (event raises)
2) press m to leave map view (event doesn't raise) even though the entity is deselected according to the tooltip
I have mods! I guess!
Link
Rseding91
Factorio Staff
Factorio Staff
Posts: 15875
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.60] Leaving remote map view does not raise on_selected_entity_changed

Post by Rseding91 »

I suspect this will be a case of “won’t fix”/“not a bug”. There are a handful of cases where the engine suppresses lua events because it is not and cannot reasonably be setup to handle if some mod did something annoying during the event.

Exiting remote view can happen for one of many reasons - such as a hub dying and the player being force ejected. In that case we can’t allow a lua event because a mod may try to put the player back in the hub which is half dead.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Bug Reports”