From fd3df487e5b4b2af9fa273ca6f04d886e778049f Mon Sep 17 00:00:00 2001 From: mrkubax10 Date: Thu, 24 Oct 2024 16:28:18 +0200 Subject: [PATCH] Implement util function for merging 2 tables --- api/common.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/common.lua b/api/common.lua index fb70081..6a8e970 100644 --- a/api/common.lua +++ b/api/common.lua @@ -36,6 +36,12 @@ function industrialtest.internal.clamp(num,min,max) return math.max(math.min(num,max),min) end +function industrialtest.internal.unpackTableInto(first,second) + for k,v in pairs(second) do + first[k]=v + end +end + -- \brief Returns machine speed in items per operation -- \param meta MetaDataRef -- \returns number