When using a named logistic request section, unpacking a packed vehicle causes the following crash:
Error while running event packing-tape::on_built_entity (ID 6)
'filters': table expected, got string
stack traceback:
[C]: in function 'newindex'
__packing-tape/control.lua:140: in function 'set_requester_data'
packing-tape/control.lua:424: in function 'unpack_entity'
packing-tape/control.lua:457: in function <packing-tape/control.lua:452>
I already checked it out, you already added support for that but it seems that you accidentally forgot to put "string" in quotation marks and compared it to the library instead, in the line with "type(section_data) == string"
local function set_requester_data(entity, requests)
local logistic_point = entity.get_requester_point()
if not logistic_point then return end
if logistic_point.sections_count > 0 then
logistic_point.remove_section(logistic_point.sections_count)
end
for index, section_data in pairs(requests) do
if type(section_data) == string then
logistic_point.add_section(section_data)
else
game.print(section_data)
game.print(type(section_data))
logistic_point.add_section().filters = section_data
end
end
end