add another debug print and change position of debug print in SetThrusterPower

This commit is contained in:
2026-06-29 21:52:47 -05:00
parent f38c765c40
commit d2bacd30bb

View File

@@ -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)