1
0
Bifurcation 0

Added code to hopefully output the DB structure.

Cette révision appartient à :
Nathanial.C.Jones 2011-06-29 17:00:59 +00:00
Parent 314eb5b873
révision 20219320fd
1 fichiers modifiés avec 27 ajouts et 0 suppressions

Voir le fichier

@ -274,3 +274,30 @@ function DB_DumpItems()
end
return dt
end
function DB_PrintTable(tbl, idt)
for k, v in pairs(tbl) do
if type(v) ~= "table" then
print(idt .. tostring(k) .. " = " .. tostring(v))
else
print(idt .. tostring(k) .. " =")
DB_PrintTable(v, idt .. " ")
end
end
end
function DB_Export()
for group, _ in pairs(QHDB) do
print(group)
for idx = 1, 99999 do
if DB_HasItem(group, idx) then
local ite = DB_GetItem(group, idx)
if type(ite) == "table" then
DB_PrintTable(ite, " ")
else
print(ite)
end
end
end
end
end