mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-16 04:53:00 +00:00
Starbeamrainbowlabs
db7b20d485
Also, you can return a value from dofile()!!!! This changes everything.
11 lines
371 B
Lua
11 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
|