Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --SteamPunk_Devil's Tank Monitor!
- print("SteamPunk_Devil's Tank Monitor V1.0")
- os.unloadAPI("API/steAmPI")
- os.loadAPI("API/steAmPI")
- while true do
- local PeriList = peripheral.getNames()
- local TankList = {}
- local OtherPeriList = {}
- local MonList = {}
- local Pos = 1
- for i = 1, #PeriList do
- if string.match(PeriList[i],"tankvalvetile") then
- TankList[#TankList + 1] = PeriList[i]
- elseif string.match(PeriList[i],"monitor") then
- MonList[#MonList + 1] = PeriList[i]
- else
- OtherPeriList[#OtherPeriList + 1] = PeriList[i]
- end
- end
- local Mon = peripheral.wrap(MonList[1])
- if #TankList <= 8 then
- for T = 1, #TankList do
- steAmPI.FluPrinter(TankList[T], Mon, Pos)
- Pos = Pos + 1
- end
- else
- print("This Program can only use up to 8 tanks")
- end
- local MonTouch = {os.pullEvent()}
- if MonTouch[1] == "monitor_touch" then
- if MonTouch[3] >= 2 and MonTouch[3] <= 12 and MonTouch[4] >= 2 and MonTouch[4] <= 3 then
- steAmPI.OnPushData(TankList[1], Mon)
- elseif MonTouch[3] >= 18 and MonTouch[3] <= 28 and MonTouch[4] >= 2 and MonTouch[4] <= 3 then
- steAmPI.OnPushData(TankList[2], Mon)
- elseif MonTouch[3] >= 2 and MonTouch[3] <= 12 and MonTouch[4] >= 5 and MonTouch[4] <= 6 then
- steAmPI.OnPushData(TankList[3], Mon)
- elseif MonTouch[3] >= 18 and MonTouch[3] <= 28 and MonTouch[4] >= 5 and MonTouch[4] <= 6 then
- steAmPI.OnPushData(TankList[4], Mon)
- elseif MonTouch[3] >= 2 and MonTouch[3] <= 12 and MonTouch[4] >= 8 and MonTouch[4] <= 9 then
- steAmPI.OnPushData(TankList[5], Mon)
- elseif MonTouch[3] >= 18 and MonTouch[3] <= 28 and MonTouch[4] >= 8 and MonTouch[4] <= 9 then
- steAmPI.OnPushData(TankList[6], Mon)
- elseif MonTouch[3] >= 2 and MonTouch[3] <= 12 and MonTouch[4] >= 11 and MonTouch[4] <= 12 then
- steAmPI.OnPushData(TankList[7], Mon)
- elseif MonTouch[3] >= 18 and MonTouch[3] <= 28 and MonTouch[4] >= 11 and MonTouch[4] <= 12 then
- steAmPI.OnPushData(TankList[8], Mon)
- else
- end
- else
- end
- --skip
- end
Advertisement
Add Comment
Please, Sign In to add comment