Lua Code:
--[[
If you would like to slip the whole table called ["Damage_Taken"](remove the space) into Stylemeter.datamodules then you can just use
--]]
Stylemeter.datamodules.Damage_Taken = dt.Damage_Taken
--[[
or if the name of the table is dynamic/unknown then try this
--]]
for TableName, TableValue in pairs(dt) do
Stylemeter.datamodules[TableName] = TableValue
end
--[[
or if you want to only copy the values within the table ["strings"] then try
NOTE: This is provided that a table with these names already exists
--]]
for StringName, StringValue in pairs(dt.Damage_Taken.strings) do
Stylemeter.datamodules.Damage_Taken.strings[StringName] = StringValue
end
--[[
or if you want to only copy the values within the table ["strings"] and the name is dynamic/unknown then try
NOTE: This is provided that a table with these names already exists
--]]
for TableName, TableValue in pairs(dt) do
for StringName, StringValue in pairs(TableValue.strings) do
Stylemeter.datamodules[TableName].strings[StringName] = StringValue
end
end