[Rseding] [0.17.79] Wrong events marked as being filterable on the api
Posted: Mon Jan 20, 2020 12:45 am
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))