colony monitor: print table keys

This commit is contained in:
Buduf 2022-06-30 12:04:25 +02:00
parent 437b8f1a91
commit bdb6a7f860

View File

@ -1,6 +1,7 @@
local function _printTable(table, tabs) local function _printTable(table, tabs)
for key, value in pairs(table) do for key, value in pairs(table) do
if type(value) == "table" then if type(value) == "table" then
print(string.rep(" ", tabs) .. key .. ":")
_printTable(value, tabs + 1) _printTable(value, tabs + 1)
else else
print(string.rep(" ", tabs) .. key .. ": " .. value) print(string.rep(" ", tabs) .. key .. ": " .. value)