#55 correctly use device IDs vs unit IDs

This commit is contained in:
Mikayla Fischler
2022-05-18 13:49:04 -04:00
parent cc856d4d80
commit 790571b6fc
7 changed files with 48 additions and 23 deletions

View File

@@ -88,17 +88,17 @@ rtu.new_session = function (id, in_queue, out_queue, advertisement)
-- create unit by type
if u_type == RTU_UNIT_TYPES.REDSTONE then
unit, rs_in_q = svrs_redstone.new(self.id, unit_advert, self.out_q)
unit, rs_in_q = svrs_redstone.new(self.id, i, unit_advert, self.out_q)
elseif u_type == RTU_UNIT_TYPES.BOILER then
unit = svrs_boiler.new(self.id, unit_advert, self.out_q)
unit = svrs_boiler.new(self.id, i, unit_advert, self.out_q)
elseif u_type == RTU_UNIT_TYPES.BOILER_VALVE then
-- @todo Mekanism 10.1+
elseif u_type == RTU_UNIT_TYPES.TURBINE then
unit = svrs_turbine.new(self.id, unit_advert, self.out_q)
unit = svrs_turbine.new(self.id, i, unit_advert, self.out_q)
elseif u_type == RTU_UNIT_TYPES.TURBINE_VALVE then
-- @todo Mekanism 10.1+
elseif u_type == RTU_UNIT_TYPES.EMACHINE then
unit = svrs_emachine.new(self.id, unit_advert, self.out_q)
unit = svrs_emachine.new(self.id, i, unit_advert, self.out_q)
elseif u_type == RTU_UNIT_TYPES.IMATRIX then
-- @todo Mekanism 10.1+
else