diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-06-23 17:43:47 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-06-23 17:43:47 +0200 |
commit | a87805a9445f280ca71da322c4b32cf357744511 (patch) | |
tree | 0404bc58a6f556b0603283fdbd01121dc73d3cd9 /builtin/common/misc_helpers.lua | |
parent | 68f9263a24a345435d2310ab559ce8a811ef0427 (diff) | |
download | dragonfireclient-a87805a9445f280ca71da322c4b32cf357744511.tar.xz |
test
Diffstat (limited to 'builtin/common/misc_helpers.lua')
-rw-r--r-- | builtin/common/misc_helpers.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/builtin/common/misc_helpers.lua b/builtin/common/misc_helpers.lua index 715f89bc4..c904bccfc 100644 --- a/builtin/common/misc_helpers.lua +++ b/builtin/common/misc_helpers.lua @@ -519,6 +519,16 @@ function table.shuffle(t, from, to, random) end end +function table.combine(t, other) + other = other or {} + for k, v in pairs(other) do + if type(v) == "table" and type(t[k]) == "table" then + table.combine(t[k], v) + else + t[k] = v + end + end +end -------------------------------------------------------------------------------- -- mainmenu only functions |