Difference between revisions of "Redstone (API)"
From ComputerCraft Wiki
(fixed link, added types) |
Scarfacial (Talk | contribs) |
||
Line 11: | Line 11: | ||
!style="background:#EEE" width="*"|Description | !style="background:#EEE" width="*"|Description | ||
|- | |- | ||
− | |[[redstone.getBundledInput|getBundledInput]]([[string]] side) | + | |[[redstone.getBundledInput|getBundledInput]]([[string (type)|string]] side) |
|Returns the state of a redpower wire inside a bundle connected to ''side'' | |Returns the state of a redpower wire inside a bundle connected to ''side'' | ||
|- | |- | ||
− | |[[redstone.getBundledOutput|getBundledOutput]]([[string]] side) | + | |[[redstone.getBundledOutput|getBundledOutput]]([[string (type)|string]] side) |
|Returns the set of redpower wires inside a bundle on ''side'' that are being driven high by the local console (not those that are driven high by another device on the bundle but not driven high by the local console) | |Returns the set of redpower wires inside a bundle on ''side'' that are being driven high by the local console (not those that are driven high by another device on the bundle but not driven high by the local console) | ||
|- | |- | ||
− | |[[redstone.setBundledOutput|setBundledOutput]]([[string]] side, [[int]] colors) | + | |[[redstone.setBundledOutput|setBundledOutput]]([[string (type)|string]] side, [[int]] colors) |
|Sets one or multiple colored signals in a redpower bundled wire connected to ''Side'' | |Sets one or multiple colored signals in a redpower bundled wire connected to ''Side'' | ||
|- | |- | ||
− | |[[redstone.testBundledInput|testBundledInput]]([[string]] side, [[int]] color) | + | |[[redstone.testBundledInput|testBundledInput]]([[string (type)|string]] side, [[int]] color) |
|Returns true or false whether or not a colored signal is active in a redpower bundled wire connected to ''Side'' | |Returns true or false whether or not a colored signal is active in a redpower bundled wire connected to ''Side'' | ||
|- | |- | ||
− | |[[redstone.getInput|getInput]]([[string]] side) | + | |[[redstone.getInput|getInput]]([[string (type)|string]] side) |
|Returns the current redstone signal state on ''side'' | |Returns the current redstone signal state on ''side'' | ||
|- | |- | ||
Line 29: | Line 29: | ||
|Returns an array of possible sides | |Returns an array of possible sides | ||
|- | |- | ||
− | |[[redstone.setOutput|setOutput]]([[string]] side, [[boolean]] value) | + | |[[redstone.setOutput|setOutput]]([[string (type)|string]] side, [[boolean]] value) |
|Set or reset a redstone signal on ''side'' | |Set or reset a redstone signal on ''side'' | ||
|} | |} | ||
[[Category:APIs]] | [[Category:APIs]] |
Revision as of 12:17, 26 February 2012
Description
The redstone API contains methods to control attached RedPower cables/bundled cables
Methods
Method name | Description |
---|---|
getBundledInput(string side) | Returns the state of a redpower wire inside a bundle connected to side |
getBundledOutput(string side) | Returns the set of redpower wires inside a bundle on side that are being driven high by the local console (not those that are driven high by another device on the bundle but not driven high by the local console) |
setBundledOutput(string side, int colors) | Sets one or multiple colored signals in a redpower bundled wire connected to Side |
testBundledInput(string side, int color) | Returns true or false whether or not a colored signal is active in a redpower bundled wire connected to Side |
getInput(string side) | Returns the current redstone signal state on side |
getSides() | Returns an array of possible sides |
setOutput(string side, boolean value) | Set or reset a redstone signal on side |