Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Function Descriptions:
- wrapMon : Wraps a monitor on the specified side
- clear : Clears the monitor and resets the text
- print : Writes the text and then goes to the next line (Bit buggy right now)
- ]]
- --Local Functions
- local function getMonStats()
- monw,monh = apimon.getSize()
- end
- local function getMyStats()
- myx,myy = apimon.getCursorPos()
- end
- local function inc()
- local vx, vy = p.getCursorPos()
- local vw, vh = p.getPageSize()
- cons = vy + 1
- ram = vh - 1
- if cons == ram then
- cons = 1
- end
- end
- --Testing Functions (Remove before release)
- local function test()
- getMonStats()
- print(monw.." : "..monh)
- getMyStats()
- print(myx.." : "..myy)
- end
- --Public Functions
- function wrapMon(side)
- apimon = peripheral.wrap(side)
- getMyStats()
- getMonStats()
- end
- function clear()
- apimon.clear()
- apimon.setCursorPos(1,1)
- end
- function print(text)
- apimon.write(text)
- inc()
- p.setCursorPos(1,cons)
- end
Advertisement
Add Comment
Please, Sign In to add comment