forked from mrkubax10/industrialtest
Introduce utility function for deriving table fields
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user