function each_file(rgd) dump_table(rgd.GameData(), "GameData", "Inherit") end function dump_table(t, prefix, func) print(prefix," = ",func,"([[",t["$REF"] or "","]])") for k,v in t.children do if type(v) == "function" then dump_table(v(),prefix .. "[\"" .. k .. "\"]","Reference") elseif type(v) ~= "string" then print(prefix,"[\"",k,"\"] = ",v) elseif k ~= "$REF" then print(prefix,"[\"",k,"\"] = [[",v,"]]") end end end