←  Peripherals and Turtle Upgrades

ComputerCraft | Programmable Computers for Minecraft

»

[MC 1.6.4 / CC 1.57] CCScanner 1.0 - Scan...

Tiin57's Photo Tiin57 18 Oct 2013

So, it's a pretty simple mod. It adds a scanner peripheral to Computercraft. This peripheral does exactly one thing; it takes printed pages (I'm not sure if books/bundles of pages work yet, and if not they're coming soon) and converts them into data when you call scan() on the peripheral.

Here's the recipe:
Posted Image

Just plonk that thing down.

Methods (scanner is the wrapped peripheral):
data, title, pageCount = scanner.scan()
The return value of scan() is a bit strange.
If there's no paper in the slot, it'll return nil.
title and pageCount are exactly what they look like.
If there is paper in the slot, the method will return a weird table for data.
It looks like this;
{ { line, color }, { line, color } ... } -- And so on and so forth.

Downloads
Spoiler

License:
The code is private.
I don't give a damn what you do with the binary, so long as people know it's my work.

That ought to be all; if I've left anything out, please tell me below!

Please, I can't emphasize enough how important bug reports and feature requests are.
Edited by Tiin57, 16 January 2014 - 07:37 PM.
Quote

Zudo's Photo Zudo 19 Oct 2013

I like this, it is nice and simple. Shame there is no 1.5.2 download, as I would use it in my private mod pack.
Quote

theoriginalbit's Photo theoriginalbit 19 Oct 2013

I like it. Simple, and something that isn't going to be added into CC on you :P

Will test out more thoroughly next chance I get.

One suggestion though, give us a use for all those left over glass panes from crafting a computer, use glass panes. Then while you're at it, have the top of the scanner open when we right-click on it :P oh also showing a blank piece of paper on the scanner when there's paper in there would be cool too xD :P
Quote

gamax92's Photo gamax92 19 Oct 2013

View Posttheoriginalbit, on 19 October 2013 - 03:40 AM, said:

... Then while you're at it, have the top of the scanner open when we right-click on it :P oh also showing a blank piece of paper on the scanner when there's paper in there would be cool too xD :P

You mean like Orwell's scanner?
Spoiler
Quote

Geforce Fan's Photo Geforce Fan 19 Oct 2013

Adding this to my private modpack
This could be useful for extremely short programs cause it saves you a floppy disk
Quote

awsmazinggenius's Photo awsmazinggenius 28 Nov 2013

May I ask what happens if you print "Hello " in one color, then reinsert the page into the printer, printer.setCursorPos(7, 1) and then printer.write(" World",) in another color? That puts two colors on one page, like this:
Hello World
How does the output work?
Quote

F1repl4ce's Photo F1repl4ce 05 Feb 2014

You need to add a mcmod.info file to the jar. Just a heads up.
Quote