allow custom filter in `dfhack.printall_recurse`

Objects with links like `job` output way too much. With this change, it's possible to provide an optional filter and exclude the `list_link`.
```
[lua]# j = dfhack.gui.getSelectedJob()
[lua]# printall_recurse(j, {[tostring(j.list_link)]=true, [tostring(j.pos)]=true})
```
develop
Timur Kelman 2020-02-23 16:57:57 +01:00 committed by GitHub
parent c3637be99f
commit 1d8998de22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

@ -285,8 +285,8 @@ do_print_recurse = function(printfn, value, seen, indent)
return recurse_type_map[t](printfn, value, seen, indent)
end
function printall_recurse(value)
local seen = {}
function printall_recurse(value, seen)
local seen = seen or {}
do_print_recurse(dfhack.println, value, seen, 0)
end