Skip to content

Commit d7d3a30

Browse files
authored
fix: Prevent duplicate lab input startup crash (#259)
1 parent e328314 commit d7d3a30

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

prototypes/vanilla-changes.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ for _, lab in pairs(data.raw.lab) do
22
for _, input in pairs(lab.inputs or {}) do
33
if input == "cryogenic-science-pack" then
44
lab.inputs = lab.inputs or {}
5-
table.insert(lab.inputs, "hydraulic-science-pack")
5+
if not table.find(lab.inputs, "hydraulic-science-pack") then
6+
table.insert(lab.inputs, "hydraulic-science-pack")
7+
end
68
table.sort(lab.inputs, function(a, b)
79
local order_1 = (data.raw.tool[a] and data.raw.tool[a].order) or a
810
local order_2 = (data.raw.tool[b] and data.raw.tool[b].order) or b

0 commit comments

Comments
 (0)