[Rseding] [0.17.79] Wrong events marked as being filterable on the api

This subforum contains all the issues which we already resolved.
Post Reply
jan1i3
Burner Inserter
Burner Inserter
Posts: 19
Joined: Sun Dec 09, 2018 1:36 pm
Contact:

[Rseding] [0.17.79] Wrong events marked as being filterable on the api

Post by jan1i3 »

Issues
The events on_player_mined_item and on_robot_mined are marked as being filterable, but cannot be filtered.
The events on_player_mined_entity and on_robot_mined_entity are not marked as filterable, but actually can be filtered.
Expected
on_player_mined_item and on_robot_mined should not be marked as filterable.
on_player_mined_entity and on_robot_mined_entity should be marked as filterable.
Notes
on_player_mined_item and on_robot_mined do not even make sense to be filterable (by entity related stuff), since they have to do with both tiles and entities.

Code used for testing:

Code: Select all

local no_filter = {}
local yes_filter = {}
for name, id in pairs(defines.events) do
  if pcall(script.on_event, id, function() end, {}) then
    yes_filter[#yes_filter+1] = name
  else
    no_filter[#no_filter+1] = name
  end
end

log("no_filter: " .. serpent.block(no_filter))
log("yes_filter: " .. serpent.block(yes_filter))
Attachments
factorio-current.log
(10.8 KiB) Downloaded 5 times
Also known as JanSharp. jan1i3 was/is my old name ;)

Rseding91
Factorio Staff
Factorio Staff
Posts: 10238
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding] [0.17.79] Wrong events marked as being filterable on the api

Post by Rseding91 »

Thanks for the report. I've fixed the lua docs for the next release.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”

Who is online

Users browsing this forum: No registered users