add another debug print and change position of debug print in SetThrusterPower
This commit is contained in:
10
main.lua
10
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)
|
||||
|
||||
Reference in New Issue
Block a user