diff --git a/main.lua b/main.lua index 6f29ab6..2890957 100644 --- a/main.lua +++ b/main.lua @@ -786,6 +786,9 @@ function SetThrusterPower(thruster, power) print("ERROR: SetThrusterPower called with nil thruster.") return end + + if Config.Debug then print("DEBUG: thruster "..thruster.name..": power "..power) end + if thruster.type == "rotator" then thruster.power = power local actualPower = 0 @@ -820,15 +823,14 @@ function SetThrusterPower(thruster, power) end peripheral.wrap(thruster.transmission).setSignal(actualPower) + + if Config.Debug then print("DEBUG: actualPower: "..actualPower) end end - end - if thruster.type == "thruster" then + elseif thruster.type == "thruster" then thruster.power = power thruster.thruster.setPowerNormalized(power) end - - if Config.Debug then print("DEBUG: thruster "..thruster.name..": power "..power) end end function GetThrusterPower(thruster)