SHOW:
|
|
- or go back to the newest paste.
1 | - | --[[ |
1 | + | |
2 | - | Output API, By SuPeRMiNoR2 (With help from immibis) |
2 | + | |
3 | - | LICENSE |
3 | + | |
4 | - | http://creativecommons.org/licenses/by/3.0/deed.en_US |
4 | + | |
5 | - | This license only applies to THIS PROGRAM, not to minecraft, computercraft, or redpower |
5 | + | |
6 | - | You may edit, and/or use this program/API in your own programs/APIS. You do not have to leave this license comment in, but you can if you want :) |
6 | + | |
7 | - | ]]-- |
7 | + | |
8 | color = colors[color] or colours[color] | |
9 | - | --Version: 1.5 |
9 | + | |
10 | error("Invalid colour", 2) | |
11 | end | |
12 | local func = (state and colors.combine or colors.subtract) | |
13 | rs.setBundledOutput(side, func(rs.getBundledOutput(side), color)) | |
14 | end | |
15 | ||
16 | function get(color) | |
17 | color = colors[color] or colours[color] | |
18 | return rs.testBundledInput(output_side, color) | |
19 | end | |
20 | ||
21 | function setside(s) | |
22 | side = s | |
23 | end |