Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Output API, By SuPeRMiNoR2
- LICENSE
- http://creativecommons.org/licenses/by-nc/3.0/
- This license only applies to THIS PROGRAM, not to minecraft, computercraft, or redpower
- You may edit, and/or use this program/API in your own programs/APIS, provided you leave the license comment in. ]]--
- --Version: 1.4
- local output_side = "back"
- local output_white = 0
- local output_orange = 0
- local output_magenta = 0
- local output_lightblue = 0
- local output_yellow = 0
- local output_lime = 0
- local output_pink = 0
- local output_gray = 0
- local output_lightgray = 0
- local output_cyan = 0
- local output_purple = 0
- local output_blue = 0
- local output_brown = 0
- local output_green = 0
- local output_red = 0
- local output_black = 0
- local output = 0
- function alloff()
- output_white = 0
- output_orange = 0
- output_magenta = 0
- output_lightblue = 0
- output_yellow = 0
- output_lime = 0
- output_pink = 0
- output_gray = 0
- output_lightgray = 0
- output_cyan = 0
- output_purple = 0
- output_blue = 0
- output_brown = 0
- output_green = 0
- output_red = 0
- output_black = 0
- update()
- end
- function set(color, state)
- if state == true then
- state = 1
- end
- if state == false then
- state = 0
- end
- if color == "white" then
- output_white = state
- end
- if color == "orange" then
- output_orange = state
- end
- if color == "magenta" then
- output_magenta = state
- end
- if color == "lightBlue" then
- output_lightblue = state
- end
- if color == "yellow" then
- output_yellow = state
- end
- if color == "lime" then
- output_lime = state
- end
- if color == "pink" then
- output_pink = state
- end
- if color == "gray" then
- output_gray = state
- end
- if color == "lightGray" then
- output_lightgray = state
- end
- if color == "cyan" then
- output_cyan = state
- end
- if color == "purple" then
- output_purple = state
- end
- if color == "blue" then
- output_blue = state
- end
- if color == "brown" then
- output_brown = state
- end
- if color == "green" then
- output_green = state
- end
- if color == "red" then
- output_red = state
- end
- if color == "black" then
- output_black = state
- end
- update()
- end
- function get(color)
- color = colors[color]
- return rs.testBundledInput(output_side, color)
- end
- function setside(side)
- output_side = side
- end
- function update()
- output = 0
- if output_white == 1 then
- output = output + colors.white
- end
- if output_orange == 1 then
- output = output + colors.orange
- end
- if output_magenta == 1 then
- output = output + colors.magenta
- end
- if output_lightblue == 1 then
- output = output + colors.lightBlue
- end
- if output_yellow == 1 then
- output = output + colors.yellow
- end
- if output_lime == 1 then
- output = output + colors.lime
- end
- if output_pink == 1 then
- output = output + colors.pink
- end
- if output_gray == 1 then
- output = output + colors.gray
- end
- if output_lightgray == 1 then
- output = output + colors.lightGray
- end
- if output_cyan == 1 then
- output = output + colors.cyan
- end
- if output_purple == 1 then
- output = output + colors.purple
- end
- if output_blue == 1 then
- output = output + colors.blue
- end
- if output_brown == 1 then
- output = output + colors.brown
- end
- if output_green == 1 then
- output = output + colors.green
- end
- if output_red == 1 then
- output = output + colors.red
- end
- if output_black == 1 then
- output = output + colors.black
- end
- rs.setBundledOutput(output_side, output)
- end
- function help()
- return "The output api, by SuPeRMiNoR2."
- end
Advertisement
Add Comment
Please, Sign In to add comment