#621 support environment_detector peripheral type

This commit is contained in:
Mikayla
2025-06-16 15:07:56 +00:00
parent 264edc0030
commit 6d3b35a41d
5 changed files with 11 additions and 11 deletions

View File

@@ -506,7 +506,7 @@ function system.create(tool_ctl, main_pane, cfg_sys, divs, ext, style)
local u, idx = def.unit, def.index
if util.table_contains(NEEDS_UNIT, mount.type) then
if (mount.type == "dynamicValve" or mount.type == "environmentDetector") and for_facility then
if (mount.type == "dynamicValve" or mount.type == "environmentDetector" or mount.type == "environment_detector") and for_facility then
-- skip
elseif not (util.is_int(u) and u > 0 and u < 5) then
err = true
@@ -527,7 +527,7 @@ function system.create(tool_ctl, main_pane, cfg_sys, divs, ext, style)
else index = idx end
elseif mount.type == "dynamicValve" then
index = 1
elseif mount.type == "environmentDetector" then
elseif mount.type == "environmentDetector" or mount.type == "environment_detector" then
if not (util.is_int(idx) and idx > 0) then
err = true
else index = idx end