Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- pastebin get 8X1mxs5L startup
- local Info = {}
- function DisplayBoiler_solid(boiler_solid,pos)
- periboiler = peripheral.wrap(boiler_solid)
- if periboiler ~= nil then
- quantite_slot_1 = "item"
- nom_slot_1 = 0
- quantite_slot_2 = "item"
- nom_slot_2 = 0
- quantite_slot_3 = "item"
- nom_slot_3 = 0
- quantite_slot_4 = "item"
- nom_slot_4 = 0
- --Item Boiler
- if periboiler.getStackInSlot(3) ~= nil then
- quantite_slot_1 = periboiler.getStackInSlot(3).qty
- nom_slot_1 = periboiler.getStackInSlot(3).display_name
- end
- if periboiler.getStackInSlot(4) ~= nil then
- quantite_slot_2 = periboiler.getStackInSlot(4).qty
- nom_slot_2 = periboiler.getStackInSlot(4).display_name
- end
- if periboiler.getStackInSlot(5) ~= nil then
- quantite_slot_3 = periboiler.getStackInSlot(5).qty
- nom_slot_3 = periboiler.getStackInSlot(5).display_name
- end
- if periboiler.getStackInSlot(6) ~= nil then
- quantite_slot_4 = periboiler.getStackInSlot(6).qty
- nom_slot_4 = periboiler.getStackInSlot(6).display_name
- end
- infos_boiler_solid = periboiler.getTankInfo()
- tableau = infos_boiler_solid[2]
- capacity = tableau.capacity
- if tableau.contents == nil then
- amount = 0
- rawName = "Vide"
- else
- amount = tableau.contents.amount
- rawName= tableau.contents.rawName
- end
- temperature = periboiler.getTemperature()
- end
- ALL = {
- ["name"] = boiler_solid,
- ["Quantite1"] = quantite_slot_1,
- ["Nom1"] = nom_slot_1,
- ["Quantite2"] = quantite_slot_2,
- ["Nom2"] = nom_slot_2,
- ["Quantite3"] = quantite_slot_3,
- ["Nom3"] = nom_slot_3,
- ["Quantite4"] = quantite_slot_4,
- ["Nom4"] = nom_slot_4,
- ["Capacite"] = capacity,
- ["Amount"] = amount,
- ["LiquideName"] = rawName,
- ["Temperature"] = temperature
- }
- table.insert(Info,pos,ALL)
- end
- while true do
- Info = {}
- modem = peripheral.wrap("left")
- DisplayBoiler_solid("solid_fueled_boiler_firebox_2",1)
- DisplayBoiler_solid("solid_fueled_boiler_firebox_6",2)
- modem.transmit(1,1,Info)
- sleep(5)
- end
Advertisement
Add Comment
Please, Sign In to add comment