Redstone API
Redstone.getAnalogueOutput Redstone.getBundledInput Redstone.getBundledOutput
|
|||||||||||
When given a parameter with a valid side, this function will return a boolean value indicating whether the computer or turtle is receiving a redstone signal. Where true corresponds to a present signal and false corresponds to no present signal. | |||||||||||
Syntax | redstone.getInput(
|
||||||||||
Returns | boolean state of the redstone signal | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | redstone | ||||||||||
|
|
|||||||||||
When given a parameter with a valid side, this function will return a boolean value indicating whether the computer or turtle is outputting a redstone signal. Where true corresponds to a present signal and false corresponds to no present signal. | |||||||||||
Syntax | redstone.getOutput(
|
||||||||||
Returns | boolean state of the redstone signal | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | redstone | ||||||||||
|
|
|||||||||||
Searches every side available to the computer or turtle and returns a table of sides that are valid for redstone interaction. | |||||||||||
Syntax | redstone.getSides() | ||||||||||
Returns | table of valid sides | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | redstone | ||||||||||
|
|
|||||||||||
When passed a valid side, this function will return a number value indicating the strength of the redstone signal received on that side. If there is no redstone signal it returns 0. Similar to redstone.getInput except it returns the strength instead of boolean on/off status. | |||||||||||
Syntax | redstone.getAnalogueInput(
|
||||||||||
Returns | number strength of the redstone signal | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | redstone | ||||||||||
|
Redstone.getAnalogOutput
|
|||||||||||
When passed a valid side, this function will return a number value indicating the strength of the redstone signal received on that side. If there is no redstone signal it returns 0. Similar to redstone.getInput except it returns the strength instead of boolean on/off status. | |||||||||||
Syntax | redstone.getAnalogueInput(
|
||||||||||
Returns | number strength of the redstone signal | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | redstone | ||||||||||
|
Redstone.setAnalogOutput Redstone.setAnalogueOutput Redstone.setBundledOutput
|
|||||||||||
When given a parameter with a valid side, this function will return a boolean value indicating whether the computer or turtle is receiving a redstone signal. Where true corresponds to a present signal and false corresponds to no present signal. | |||||||||||
Syntax | redstone.setOutput(
|
||||||||||
Returns | nil | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | redstone | ||||||||||
|
Redstone.testBundledInput
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.