mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-27 17:43:53 +01:00
db7b20d485
Also, you can return a value from dofile()!!!! This changes everything.
12 lines
371 B
Lua
12 lines
371 B
Lua
--- SHALLOW ONLY - applies the values in source to overwrite the equivalent keys in target.
|
|
-- Warning: This function mutates target!
|
|
-- @param source table The source to take values from
|
|
-- @param target table The target to write values to
|
|
local function table_apply(source, target)
|
|
for key, value in pairs(source) do
|
|
target[key] = value
|
|
end
|
|
end
|
|
|
|
return table_apply
|