Skip to content

Event handler filter is ignored if more than one event ID is specified in register #151

Description

@modo-lv

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:

  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.

Log file

Nothing to log.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions