←  Wiki Discussion

ComputerCraft | Programmable Computers for Minecraft

»

Sided Information Needed For Peripheral Page

Termanater13's Photo Termanater13 29 Jul 2013

I was looking at the peripheral api page and nothing is stated about what the side names are. is it left, right, top, bottom, front, back or something else, and aliases for the sides if any.
Quote

theoriginalbit's Photo theoriginalbit 30 Jul 2013

Sides are fairly straight forward. There are not many other names for sides of things........ left, right, top, bottom, front, and back are always the same, there is no other word in the English language that can take their place. With front and back your could make the argument that they could be "forward" and "backward" but they are movement words, not side words.

So I don't think it is necessarily needed to be on the wiki, it is fairly common sense...

There is also `rs.getSides()` / `redstone.getSides()`...
Quote

Sora Firestorm's Photo Sora Firestorm 30 Jul 2013

I'm simply going to add my two-cents and say that I've tried to use "up" and "down" (well, at least "down") several times before remembering "top" and "bottom".
Quote

jesusthekiller's Photo jesusthekiller 30 Jul 2013

for _,v in ipairs(rs.getSides()) do
write(v..", ")
end
Quote

Lyqyd's Photo Lyqyd 01 Aug 2013

table.concat(rs.getSides(), ", ")

And yeah, it probably wouldn't hurt to call out those six explicitly someplace.
Quote

NOTUSEDPLEASEDELETE's Photo NOTUSEDPLEASEDELETE 02 Aug 2013

They are:
left
right
top
bottom
front
back
Quote

Lyqyd's Photo Lyqyd 03 Aug 2013

The correct order for them (disk drive preference, etc.) is:

top, bottom, front, back, left, right
Quote