That works thanks, but it's still flashing :-(
Did some changes as i noticed result + was adding, gave the turbines their own table
turbines = {
peripheral.wrap("rcsteamturbinetile_0"),
peripheral.wrap("rcsteamturbinetile_1"),
peripheral.wrap("rcsteamturbinetile_2"),
peripheral.wrap("rcsteamturbinetile_3"),
peripheral.wrap("rcsteamturbinetile_4"),
peripheral.wrap("rcsteamturbinetile_5"),
peripheral.wrap("rcsteamturbinetile_6"),
peripheral.wrap("rcsteamturbinetile_7"),
peripheral.wrap("rcsteamturbinetile_8"),
peripheral.wrap("rcsteamturbinetile_9")
}
function getTurbineOp()
return math.floor(200*10)
end
function getTurbinesRotor()
local result = 0
for i = 1, 10 do
result = turbines[ i ].getTurbineOutput()
end
return math.floor(result)
end
function getTurbineEu()
return math.floor(getTurbineOp() * getTurbinesRotor()/100)
end
Prints
print(getTurbineEu().." EU/T")
print("Rotors: "..getTurbinesRotor().." %")
print("Output: "..getTurbineOp())
I can't add it to my monitor cause it will make the whole monitor flash, even with the edited function you did it still flashed, any idea what's casuing only these to flash? Now if i put it on top of my other prints on the console it makes them all flash
All prints that go on the console
print("Oil: "..getLiquid(1).."/"..getMaxLiquid(1))
print("Fuel: "..getLiquid(2).."/"..getMaxLiquid(2))
print("Energy: "..getEnergy().."/"..getMaxEnergy())
--Below this line is the ones that flash
print(getTurbineEu().." EU/T")
print("Rotors: "..getTurbinesRotor().." %")
print("Output: "..getTurbineOp())