redstone.getSides

From ComputerCraft
Jump to: navigation, search

redstone.getSides
Function
Syntax
redstone.getSides()
Returns table of valid sides
API redstone
Source CC:Tweaked (source)

Searches every side available to the computer or turtle and returns a table of sides that are valid for redstone interaction.

ExampleExampleCheck for valid sides
Prints any side that is valid for redstone interaction
Code
for key, value in pairs(redstone.getSides()) do
    print("Side "..value.." is valid.")
end
Output Side [top, bottom, front, back, left, right] is valid.