Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Creator: Bolodefchoco
- --Made in: 03/09/2017
- --Last update: 03/09/2017
- --[[ Notes:
- Does:
- Funde duas tabelas
- Args:
- this -> A tabela a ser fundida
- src -> Tabela principal, base para a fundição
- ]]--
- table.turnTable = function(x)
- return (type(x)=="table" and x or {x})
- end
- table.merge = function(this,src)
- for k,v in next,src do
- if this[k] then
- if type(v) == "table" then
- this[k] = table.turnTable(this[k])
- table.merge(this[k],v)
- else
- this[k] = this[k] or v
- end
- else
- this[k] = v
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement