Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("back")
- count = 0
- repeat
- print(" ")
- count = count+1
- until count == 19
- while true do
- --term.clear()
- local id, message, protocol = rednet.receive()
- if protocol == "fussion_reactor_stats" then
- local tab = textutils.unserialize(message)
- if tab[0] == "ignited" then
- term.setTextColor(colors.white)
- write("Status: ")
- if tab[1] then
- term.setTextColor(colors.green)
- print("An")
- else
- term.setTextColor(colors.red)
- print("Aus")
- end
- end
- if tab[0] == "producing" then
- term.setTextColor(colors.white)
- write("Produziert: ")
- print(math.ceil(tonumber(tab[1])/1000) .. "kRF/t")
- end
- if tab[0] == "injection_rate" then
- term.setTextColor(colors.white)
- print("Injektionsrate: " .. tab[1])
- end
- if tab[0] == "percentage_full" then
- term.setTextColor(colors.white)
- write("Interner Speicher: ")
- print(math.ceil(tonumber(tab[1])*100) .. "%")
- end
- if tab[0] == "clear" then
- term.clear()
- end
- end
- if protocol == "induction_matrix_stats" then
- local tab = textutils.unserialize(message)
- if tab[0] == "max" then
- term.setTextColor(colors.white)
- print("Maximale Kapazität: " .. tab[1])
- end
- if tab[0] == "transfer_max" then
- term.setTextColor(colors.white)
- print("Maximaler In/Output: " .. math.ceil(tonumber(tab[1])/1000/1000) .. "MRF/t")
- end
- if tab[0] == "balance" then
- term.setTextColor(colors.white)
- print("In/Out Balance: " .. tab[1])
- end
- if tab[0] == "charge" then
- term.setTextColor(colors.white)
- print("Speicher: " .. math.ceil(tonumber(tab[1])/1000/1000/1000) .. "GRF")
- end
- if tab[0] == "charge_percent" then
- term.setTextColor(colors.white)
- print("Speicher: " .. math.ceil(tonumber(tab[1])) .. "%")
- end
- if tab[0] == "clear" then
- term.clear()
- end
- end
- end
Add Comment
Please, Sign In to add comment