Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Config
- powerCellAmount = 1
- OilTankAmountPrLayer = 10
- xOffsett = -1
- -- end of config
- local mon = peripheral.wrap("top")
- rednet.open("right")
- function cText(text, yPos, xOff)
- x,y = mon.getSize()
- xPos = (x - string.len(text))/2 - xOffsett - xOff
- mon.setCursorPos(xPos,yPos)
- mon.write(text)
- end
- function sSave(filename, input)
- file = io.open(filename,"w")
- file:write(tostring(input))
- file:close()
- end
- function isNumeric(data)
- if type(data) == "number" then
- return true
- else
- return false
- end
- end
- function sLoad(filename)
- file = io.open(filename,"r")
- config = file:read()
- file:close()
- return config
- end
- function sendMessage(message, messageType)
- end
- function getMessage()
- senderID, message, protocol = rednet.receive()
- print(message .. " " .. protocol)
- if protocol == "power" then
- end
- if protocol == "fuel" then
- end
- if protocol == "Oil" then
- oStored = message
- end
- if protocol == "email" then
- end
- end
- pLevel = 3
- pCap = 1000000
- pStored = 3450000
- pProdused = 670
- oCap = 10000
- oStored = 9000
- fCap = 10000
- fStored = 9000
- fActive = "Active"
- fCap = 10000
- fStored = 9000
- function updateUI()
- mon.clear()
- cText("SetPanel by _TheSettler_", 2, 0)
- mon.setCursorPos(2,4)
- mon.write("Power: ")
- mon.setCursorPos(4,5)
- mon.write("Capasity: " .. pStored .. " / " .. pCap)
- mon.setCursorPos(4,6)
- mon.write("Generating " .. pProdused .. "RF / Power level: " .. pLevel)
- mon.setCursorPos(2,8)
- mon.write("Fuel levels:")
- mon.setCursorPos(4,9)
- mon.write("Disel: " .. fStored .. " / " .. fCap)
- mon.setCursorPos(4,10)
- mon.write("Oil: " .. oStored)
- mon.setCursorPos(2,12)
- mon.write("Status computer store")
- mon.setCursorPos(4,13)
- mon.write("Email: You have " .. 1 .. " unread message")
- end
- while true do
- updateUI()
- getMessage()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement