Open modo-lv opened 3 years ago
Event handler filter function is never called if more than one event ID is specified when registering an event.
Use event.register to define an event handler for more than one event, and also set a filter — the filter is never called.
event.register
No save file, since it's not save-dependent, but here's the code to reproduce:
events.register( { defines.events.on_gui_checked_state_changed, defines.events.on_gui_selection_state_changed }, function() end, function() game.print("Testing") return true end )
"Testing" will never get printed. It works fine if only one event ID is specified, without using a table.
Nothing to log.
Describe the Bug
Event handler filter function is never called if more than one event ID is specified when registering an event.
To Reproduce
Use
event.register
to define an event handler for more than one event, and also set a filter — the filter is never called.Save file & Username
No save file, since it's not save-dependent, but here's the code to reproduce:
"Testing" will never get printed. It works fine if only one event ID is specified, without using a table.
Log file
Nothing to log.