Quote:
Originally Posted by NuclearTonic
That's exactly what the v1.5.2 version of TonicBars does. Copied strait after deepcopy provided by Turbine.
|
It might just be because I don't have the TurbinePlugins folder anymore, but I couldn't find that particular code. Instead, I just went with these functions:
Code:
function settingsEncode(t)
local t2={};
for k,v in pairs(t) do
if(type(v)=="number")then
v=tostring(v);
elseif (type(v)=="table")then
v=settingsEncode(v);
end
t2[k]=v;
end
return t2
end
Code:
function settingsDecode(t)
local t2={};
for k,v in pairs(t) do
if(tonumber(v)~=nil)then
v=tonumber(v);
elseif (type(v)=="table")then
v=settingsDecode(v);
end
t2[k]=v;
end
return t2
end