Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --t
- os.loadAPI("rAPI")
- local modem = nil
- local channel = nil
- local replyChannel = nil
- function init(varModem, varChannel, varReplyChannel)
- modem = varModem
- channel = varChannel
- replyChannel = varReplyChannel
- varModem.open(replyChannel)
- end
- --returns void
- function setActive(bool)
- rAPI.call(modem, channel, replyChannel, textutils.serialize({"setActive",bool}))
- end
- --returns bool
- function getActive()
- return rAPI.call(modem, channel, replyChannel, "getActive")
- end
- --returns void
- function setInductorEngaged(bool)
- rAPI.call(modem, channel, replyChannel, textutils.serialize({"setInductorEngaged",bool}))
- end
- --returns bool
- function getInductorEngaged()
- return rAPI.call(modem, channel, replyChannel, "getInductorEngaged")
- end
- --returns num
- function getRotorSpeed()
- return tonumber(rAPI.call(modem, channel, replyChannel, "getRotorSpeed"))
- end
- --returns num
- function getEnergyProducedLastTick()
- return tonumber(rAPI.call(modem, channel, replyChannel, "getEnergyProducedLastTick"))
- end
- --returns num
- function getFluidFlowRate()
- return tonumber(rAPI.call(modem, channel, replyChannel, "getFluidFlowRate"))
- end
- --returns num
- function getFluidFlowRateMax()
- return tonumber(rAPI.call(modem, channel, replyChannel, "getFluidFlowRateMax"))
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement