In Rotarycraft, is there a way to read an engine's fuel level with Computercraft?

  • FTB will be shutting down this forum by the end of July. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Nightdagger

New Member
Jul 29, 2019
21
0
0
I know Rotarycraft has Computercraft compatibility built in now, but I haven't found a way to read the amount of fuel in an engine with it. I'd like to be able to read the amount of fuel in my gas turbine so that I can display it on a status monitor and maybe automatically control fuel production and routing, but I can't figure out what to call to do it, and the Rotarycraft manual's section on Computercraft compatibility wasn't much help. The closest I was able to get was being able to read the type of liquid in the tank (Jet Fuel, of course, since I was reading a gas turbine), but I can't figure out how to tell how much is in it.

Anyone know how to read the amount of fluid in Rotarycraft tanks with CC?
 

Nightdagger

New Member
Jul 29, 2019
21
0
0
For the record, I figured it out. In case anyone else wants to know:

a = peripheral.wrap("<SIDE>")
b, c = a.readTank(1)


then B will contain the type of fuel, and C will contain the amount of fuel in millibuckets.
 
Last edited:

Reika

RotaryCraft Dev
FTB Mod Dev
Sep 3, 2013
5,079
5,331
550
Toronto, Canada
sites.google.com
For the record, I figured it out. In case anyone else wants to know:

a = peripheral.wrap("<SIDE>")
b, c = a.readTank(1)


then B will contain the type of fuel, and C will contain the amount of fuel in millibuckets.
If you understand java, this can be of use:
https://github.com/ReikaKalseki/DragonAPI/blob/master/ModInteract/Lua/LuaMethod.java
https://github.com/ReikaKalseki/RotaryCraft/tree/master/ModInterface/Lua
https://github.com/ReikaKalseki/ReactorCraft/tree/master/Auxiliary/Lua
https://github.com/ReikaKalseki/ElectriCraft/tree/master/Auxiliary/Lua