Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --##################--
- -- Programm von endminecraffter
- -- https://pastebin.com/u/endminecraffter
- -- Server: MyFTB.de Deutsches Minecraft modded Netzwerk
- -- Benötigte Mods/Apis: API Button(uhw8NuF3)
- -- MonSize: 8x5
- --##################--
- --Programm nicht benutzbar!
- os.loadAPI("Button")
- local t = Button.new("back")
- mon = peripheral.wrap("back")
- label = "endBaseControll"
- os.loadAPI("button")
- function buttons()
- t:add("Abriegeln",nil,5,5,8,8,colors.red,colors.lime)
- t:draw()
- end
- function monitor()
- mon.setTextScale(1)
- mon.setBackgroundColor(colors.black)
- mon.clear()
- mon.setTextScale(2)
- mon.setCursorPos(15,1)
- mon.write(label)
- mon.setTextScale(1)
- end
- monitor()
- function toggleFarm(name)
- local colorss = 32768
- boiler[name]["active"] = not boiler[name]["active"]
- btn.toggle(name)
- if not boiler[name]["active"] then
- write("Farm ")
- term.setTextColor(colors.green)
- write(boiler[name]["name"])
- term.setTextColor(colors.white)
- print(" wurde aktiviert")
- else
- write("Farm ")
- term.setTextColor(colors.red)
- write(boiler[name]["name"])
- term.setTextColor(colors.white)
- print(" wurde deaktiviert")
- end
- for name, data in pairs(boiler) do
- if data["active"] then
- colorss = colors.combine(colorss, data["color"])
- else
- colorss = colors.subtract(colorss, data["color"])
- end
- end
- rs.setBundledOutput(cfg["redSide"], colorss)
- save()
- end
- --while true do
- -- local event, p1 = t:handleEvents(os.pullEvent())
- -- if event == "button_click" then
- -- t:toggleButton(p1)
- --monitor()
- -- end
- --end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement