#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

@@ -89,7 +89,7 @@ local function handle_unit_mount(smem, println_ts, iface, type, device, unit)
if unit.reactor < 1 or unit.reactor > 4 then fail(util.c("SNA '", unit.name, "' cannot init, not assigned to a valid unit")) end
unit.type = RTU_UNIT_TYPE.SNA
elseif type == "environmentDetector" then
elseif type == "environmentDetector" or type == "environment_detector" then
-- advanced peripherals environment detector
if unit.reactor < 0 or unit.reactor > 4 then fail(util.c("environment detector '", unit.name, "' cannot init, no valid assignment provided")) end
if (unit.index == false) or unit.index < 1 then fail(util.c("environment detector '", unit.name, "' cannot init, invalid index provided")) end