Added code to hopefully output the DB structure.
Cette révision appartient à :
Parent
314eb5b873
révision
20219320fd
|
@ -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
|
Référencer dans un nouveau ticket