Introduce utility function for deriving table fields

This commit is contained in:
2026-05-28 21:15:00 +02:00
parent d47c4ad2ae
commit ff76d6f012
45 changed files with 96 additions and 173 deletions
+10
View File
@@ -56,6 +56,16 @@ function industrialtest.internal.unpackTableInto(first,second)
end
end
-- \brief Copies table passed in super while overriding fields with those from override and returns result
-- \param super table
-- \param override table
-- \returns table
function industrialtest.internal.derive(super,override)
local result=table.copy(super)
industrialtest.internal.unpackTableInto(result,override)
return result
end
-- \brief Returns machine speed in items per operation
-- \param meta MetaDataRef
-- \returns number