In the meanwhile I've been ever busy with studies and other semi-important stuff. I have a code base ready for a more universal version that will be able to scan all sorts of things like items all through the same API. I kind of lost interest when I couldn't find a good return format that was intuitive to use, but I received a decent comment on that from Symmetric. So it seems that I will finish this for CC 1.52 when I find time in between my finals.
Until then, gamax92 did a great job porting version 0.4 (the one without the extras) to CC 1.51. You can find it in the downloads section under here. gamax92's explanation can be found in this post. Thanks a lot man for helping out! Be sure to give him a +1!
Download here:
- Universal for CC 1.51 (Dropbox) (v0.4) [This is a port by gamax92, his post about this port can be found here.]
- Universal for CC 1.47 (Dropbox) (v0.4)
- Universal for CC 1.46 (Dropbox) (v0.4)
Requirements:
- Minecraft 1.4.2 or above
- ComputerCraft 1.46 or above
- latest stable release of Forge
Changelog:
Spoiler
0.1:- First upload
0.2:
- Fixed Shift+Click bug
0.3:
- Added support for reading the writable books from vanilla Minecraft
- Added the method 'getAuthor()'
- Added the method 'getPageSize()'
0.4:
- Fixed incompatibility with BuildCraft (computers without textures)
API:
Spoiler
Wrap the peripheral as always:
local side = "right"
local scanner = peripheral.wrap(side)
Get the page count, zero when no page is inserted:
scanner.getPageCount()
Get the title of the page:
scanner.getTitle()
Get a character at specified position:
scanner.getChar(x,y)
scanner.getChar(x,y,page)
Get the colour of a character at specified position:
scanner.getColour(x,y)
scanner.getColour(x,y,page)
or
scanner.getColor(x,y)
scanner.getColor(x,y,page)
Get the author of a vanilla writable book (returns nil for ComputerCraft printouts)
scanner.getAuthor()
Get the size of one page depending on what is in the scanner (ComputerCraft, vanilla or nothing)
local x,y = scanner.getPageSize()
Recipe (always open to suggestions):
Spoiler
Stone + Redstone Lamp + Glass Pane
Screenshots:
Spoiler
Spoiler
Spoiler
Please, don't hesitate to post bug reports and comments under this post.