Merge pull request #1503 from TymurGubayev/dev/minor-improvement/dfhack-lua/printall_recurse

allow custom filter in calls to `dfhack.printall_recurse`
develop
Ben Lubar 2020-02-24 10:05:28 -06:00 committed by GitHub
commit 8a4eac3d3e
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