File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,12 +15,19 @@ if construction_robotics and roboport_upgrade and architecture_2 then
1515 roboport_upgrade .count = math.max (construction_robotics .count or 0 , architecture_2 .count or 0 ) + 15
1616 roboport_upgrade .time = math.max (construction_robotics .time or 0 , architecture_2 .time or 0 ) + 15
1717 local ingredients = {}
18- for _ , tech in pairs {construction_robotics , architecture_2 } do
18+ for _ , tech in pairs {construction_robotics , architecture_2 } do
1919 for _ , ingredient in pairs (tech .ingredients ) do
20- ingredients [# ingredients + 1 ] = ingredient
20+ if type (ingredient ) == " table" and type (ingredient [1 ]) == " string" then
21+ for _ , existing in pairs (ingredients ) do
22+ if existing [1 ] == ingredient [1 ] then
23+ goto dedupe
24+ end
25+ end
26+ ingredients [# ingredients + 1 ] = ingredient
27+ :: dedupe::
28+ end
2129 end
2230 end
23- ingredients = table .dedupe (ingredients )
2431 roboport_upgrade .ingredients = ingredients
2532 end
2633end
You can’t perform that action at this time.
0 commit comments