Advertisement
9551

bundle lib

Jun 16th, 2021 (edited)
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. -------bundle lib---------
  2. local function bundle(side, color, state)
  3.     if (type(side) == "string") and (type(color) == "number") and (type(state) == "boolean") then
  4.         if state == true then
  5.             rs.setBundledOutput(side, colors.combine(rs.getBundledOutput(side), color))
  6.         elseif state == false then
  7.             rs.setBundledOutput(side, colors.subtract(rs.getBundledOutput(side), color))
  8.         end
  9.     else
  10.         error("please use like this:\nbundle(side:string,colors.(color),state:boolean)")
  11.     end
  12. end
  13.  
  14. return {bundle = bundle}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement