Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function renderMasterTerm(stats)
- local weather = stats.weather or 0
- local power = stats.power or 0
- local players = stats.players or {}
- term.clear()
- term.setCursorPos(1, 1)
- print("Welcome to >>")
- write(" Elli")
- term.setTextColor(colors.purple)
- print("OS")
- term.setTextColor(colors.white)
- print("\n--------------\n")
- print("Stats:")
- print(" Rain prevention: " .. stats.weather)
- print(" Power level: " .. stats.power .. "%")
- print(" Players present:")
- if next(stats.players) ~= nil then
- local day = os.day()
- for k, v in pairs(players) do
- if v >= day then
- print(" > "..k)
- end
- end
- else
- print(" None")
- end
- print("\n--------------\n")
- print("Listening for events . . .")
- end
- function renderToDo(direction, list)
- local monitor = peripheral.wrap(direction)
- local x, y = monitor.getSize()
- monitor.clear()
- monitor.setTextScale(0.5)
- monitor.setCursorPos(1, 1)
- monitor.write(">> Elli")
- monitor.setTextColor(colors.purple)
- monitor.write("OS")
- monitor.setTextColor(colors.white)
- for i = 1, x do
- monitor.setCursorPos(i, 2)
- monitor.write("-")
- end
- monitor.setCursorPos(1, 4)
- monitor.write("To-do list:")
- for i, v in ipairs(list) do
- monitor.setCursorPos(1, i+4)
- monitor.write(v)
- end
- end
- function renderWide(direction, statistic, number)
- local monitor = peripheral.wrap(direction)
- local x, y = monitor.getSize()
- monitor.clear()
- monitor.setCursorPos(1, 1)
- monitor.write(">> Elli")
- monitor.setTextColor(colors.purple)
- monitor.write("OS")
- monitor.setTextColor(colors.white)
- for i = 1, x do
- monitor.setCursorPos(i, 2)
- monitor.write("-")
- end
- monitor.setCursorPos(1, 4)
- monitor.write(statistic .. ": " .. number)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement