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.")
|
print("ERROR: SetThrusterPower called with nil thruster.")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if Config.Debug then print("DEBUG: thruster "..thruster.name..": power "..power) end
|
||||||
|
|
||||||
if thruster.type == "rotator" then
|
if thruster.type == "rotator" then
|
||||||
thruster.power = power
|
thruster.power = power
|
||||||
local actualPower = 0
|
local actualPower = 0
|
||||||
@@ -820,15 +823,14 @@ function SetThrusterPower(thruster, power)
|
|||||||
end
|
end
|
||||||
|
|
||||||
peripheral.wrap(thruster.transmission).setSignal(actualPower)
|
peripheral.wrap(thruster.transmission).setSignal(actualPower)
|
||||||
|
|
||||||
|
if Config.Debug then print("DEBUG: actualPower: "..actualPower) end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
elseif thruster.type == "thruster" then
|
||||||
if thruster.type == "thruster" then
|
|
||||||
thruster.power = power
|
thruster.power = power
|
||||||
thruster.thruster.setPowerNormalized(power)
|
thruster.thruster.setPowerNormalized(power)
|
||||||
end
|
end
|
||||||
|
|
||||||
if Config.Debug then print("DEBUG: thruster "..thruster.name..": power "..power) end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function GetThrusterPower(thruster)
|
function GetThrusterPower(thruster)
|
||||||
|
|||||||
Reference in New Issue
Block a user