SHARE
TWEET

openperipheral_bridge

a guest Mar 15th, 2015 267 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. METHODMAN: Practical display for in game documentation of computercraft + addons
  2.  
  3. Peripheral found
  4.         Side: right
  5.         Type: openperipheral_bridge
  6.  
  7. openperipheral_bridge method list:
  8.  
  9.         getGuid
  10.         addLiquid
  11.         getStringWidth
  12.         getSurfaceByUUID
  13.         addText
  14.         clear
  15.         getAllIds
  16.         listSources
  17.         sync
  18.         getSurfaceByName
  19.         getById
  20.         getUsers
  21.         addGradientBox
  22.         getAllObjects
  23.         getAdvancedMethodsData
  24.         listMethods
  25.         addIcon
  26.         addBox
  27.  
  28. Open Peripherals Advanced Method Data
  29.  
  30. 1. getUsers
  31.  
  32. Return Type: TABLE
  33. Description: Get the names of all the users linked up to this bridge
  34.  
  35.         Arguments: getUsers()
  36.         No Arguments
  37.  
  38. 2. listSources
  39.  
  40. Return Type: TABLE
  41. Description: List all method sources
  42.  
  43.         Arguments: listSources()
  44.         No Arguments
  45.  
  46. 3. getById
  47.  
  48. Return Type: OBJECT
  49. Description: Get object by id
  50.  
  51.         Arguments: getById(id)
  52.  
  53.                 1. id
  54.                 Description: Id of drawed object
  55.                 Type: NUMBER
  56.  
  57. 4. listMethods
  58.  
  59. Return Type: STRING
  60. Description: List all the methods available
  61.  
  62.         Arguments: listMethods()
  63.         No Arguments
  64.  
  65. 5. getGuid
  66.  
  67. Return Type: STRING
  68. Description: Get the Guid of this bridge
  69.  
  70.         Arguments: getGuid()
  71.         No Arguments
  72.  
  73. 6. addBox
  74.  
  75. Return Type: OBJECT
  76. Description: Add a new box to the screen
  77.  
  78.         Arguments: addBox(x, y, width, height, color, opacity)
  79.  
  80.                 1. x
  81.                 Description: The x position from the top left
  82.                 Type: NUMBER
  83.                 2. y
  84.                 Description: The y position from the top left
  85.                 Type: NUMBER
  86.                 3. width
  87.                 Description: The width of the box
  88.                 Type: NUMBER
  89.                 4. height
  90.                 Description: The height of the box
  91.                 Type: NUMBER
  92.                 5. color
  93.                 Description: The color of the box
  94.                 Type: NUMBER
  95.                 6. opacity
  96.                 Description: The opacity of the box (from 0 to 1)
  97.                 Type: NUMBER
  98.  
  99. 7. getSurfaceByName
  100.  
  101. Return Type: OBJECT
  102. Description: Get the surface of a user to draw privately on their screen
  103.  
  104.         Arguments: getSurfaceByName(username)
  105.  
  106.                 1. username
  107.                 Description: The username of the user to get the draw surface for
  108.                 Type: STRING
  109.  
  110. 8. clear
  111.  
  112. Return Type:
  113. Description: Clear all the objects from the screen
  114.  
  115.         Arguments: clear()
  116.         No Arguments
  117.  
  118. 9. addText
  119.  
  120. Return Type: OBJECT
  121. Description: Add a new text object to the screen
  122.  
  123.         Arguments: addText(x, y, text, color)
  124.  
  125.                 1. x
  126.                 Description: The x position from the top left
  127.                 Type: NUMBER
  128.                 2. y
  129.                 Description: The y position from the top left
  130.                 Type: NUMBER
  131.                 3. text
  132.                 Description: The text to display
  133.                 Type: STRING
  134.                 4. color
  135.                 Description: The text color
  136.                 Type: NUMBER
  137.  
  138. 10. getSurfaceByUUID
  139.  
  140. Return Type: OBJECT
  141. Description: Get the surface of a user to draw privately on their screen
  142.  
  143.         Arguments: getSurfaceByUUID(uuid)
  144.  
  145.                 1. uuid
  146.                 Description: The uuid of the user to get the draw surface for
  147.                 Type: STRING
  148.  
  149. 11. sync
  150.  
  151. Return Type:
  152. Description: Send updates to client. Without it changes won't be visible
  153.  
  154.         Arguments: sync()
  155.         No Arguments
  156.  
  157. 12. getStringWidth
  158.  
  159. Return Type: NUMBER
  160. Description: Get the display width of some text
  161.  
  162.         Arguments: getStringWidth(text)
  163.  
  164.                 1. text
  165.                 Description: The text you want to measure
  166.                 Type: STRING
  167.  
  168. 13. getAllObjects
  169.  
  170. Return Type: TABLE
  171. Description: Get all objects on the screen
  172.  
  173.         Arguments: getAllObjects()
  174.         No Arguments
  175.  
  176. 14. addGradientBox
  177.  
  178. Return Type: OBJECT
  179. Description: Add a new gradient box to the screen
  180.  
  181.         Arguments: addGradientBox(x, y, width, height, color, opacity, color, opacity, gradient)
  182.  
  183.                 1. x
  184.                 Description: The x position from the top left
  185.                 Type: NUMBER
  186.                 2. y
  187.                 Description: The y position from the top left
  188.                 Type: NUMBER
  189.                 3. width
  190.                 Description: The width of the box
  191.                 Type: NUMBER
  192.                 4. height
  193.                 Description: The height of the box
  194.                 Type: NUMBER
  195.                 5. color
  196.                 Description: The color of the box
  197.                 Type: NUMBER
  198.                 6. opacity
  199.                 Description: The opacity of the box (from 0 to 1)
  200.                 Type: NUMBER
  201.                 7. color
  202.                 Description: The color of the other side of the box
  203.                 Type: NUMBER
  204.                 8. opacity
  205.                 Description: The opacity of the other side of the box (from 0 to 1)
  206.                 Type: NUMBER
  207.                 9. gradient
  208.                 Description: The gradient direction (1 for horizontal, 2 for vertical)
  209.                 Type: NUMBER
  210.  
  211. 15. addIcon
  212.  
  213. Return Type: OBJECT
  214. Description: Add an icon of an item to the screen
  215.  
  216.         Arguments: addIcon(x, y, id, meta)
  217.  
  218.                 1. x
  219.                 Description: The x position from the top left
  220.                 Type: NUMBER
  221.                 2. y
  222.                 Description: The y position from the top left
  223.                 Type: NUMBER
  224.                 3. id
  225.                 Description: The id of the item to draw
  226.                 Type: STRING
  227.                 4. meta
  228.                 Description: The meta of the item to draw
  229.                 Type: NUMBER
  230.  
  231. 16. getAdvancedMethodsData
  232.  
  233. Return Type: TABLE
  234. Description: Get a complete table of information about all available methods
  235.  
  236.         Arguments: getAdvancedMethodsData()
  237.         No Arguments
  238.  
  239. 17. addLiquid
  240.  
  241. Return Type: OBJECT
  242. Description: Add a box textured like a liquid to the screen
  243.  
  244.         Arguments: addLiquid(x, y, width, height, string)
  245.  
  246.                 1. x
  247.                 Description: The x position from the top left
  248.                 Type: NUMBER
  249.                 2. y
  250.                 Description: The y position from the top left
  251.                 Type: NUMBER
  252.                 3. width
  253.                 Description: The width of the liquid box
  254.                 Type: NUMBER
  255.                 4. height
  256.                 Description: The height of the liquid box
  257.                 Type: NUMBER
  258.                 5. string
  259.                 Description: The name of the fluid to render
  260.                 Type: STRING
  261.  
  262. 18. getAllIds
  263.  
  264. Return Type: TABLE
  265. Description: Get the Ids of all the objects on the screen
  266.  
  267.         Arguments: getAllIds()
  268.         No Arguments
  269.  
  270.  
  271. --------------------
  272.  
  273. All actual documentation is written by the mod developer who made the peripheral, not me. I just displayed it - happy computercrafting
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top