From d2bacd30bb20aca7278b454ea45375a615d31ea3 Mon Sep 17 00:00:00 2001 From: templeofshadow Date: Mon, 29 Jun 2026 21:52:47 -0500 Subject: [PATCH] add another debug print and change position of debug print in SetThrusterPower --- main.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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)