Updated: This API can now be used in vanilla ComputerCraft 1.42. No need for BuildCraft anymore.
Description
This API manages the printing of multiple colors on one page. This is done be recycling the printed page trough the printer while changing dyes.
Usage
This is a turtle API. The turtle holds all 15 dyes (white would be useless in general) like shown in this picture:
Spoiler
The default setup looks as follows:
Spoiler
os.loadAPI('MCP')
local page = MCP.newPage()
page.write('test', colors.red)
page.setCursorPos(1,2)
page.write('test', colors.blue)
page.print()
Practically; to actually print a page, make sure that before the printing of the page there's exactly one paper item in the upper slot of the printer. Also make sure that the ink slot of the printer is empty and that the turtle slots are filled with the dyes as layed out in the first image.
Screenshots
Only one for now. This is the output of the test program:
Spoiler
Downloads
API:
current version (v0.4):
Pastebin:
http://pastebin.com/RHKR8sj4
Can be downloaded in game by running this in the ComputerCraft terminal:
pastebin get RHKR8sj4 MCP
Test program:
http://pastebin.com/twzPbqj3
pastebin get twzPbqj3 MCP-test
Changelog
v0.4 (29 sept '12):
got rid of BuildCraft for paper cycling and made it vanilla (lead to a reasonable speed improvement)
added support for adding titles to pages
other minor tweaks
v0.3 (28 sept '12):
fixed removing the 'printer.newPage()' line
v0.2 (28 sept '12):
fixed an error on checking the dye level
v0.1 (28 sept '12):
release