Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- --term.clear()
- local items = {}
- local max = 16
- local function getItems(items, max)
- for slot = 1, max do
- if turtle.getItemDetail(slot) ~= nil then
- scan = turtle.getItemDetail(slot)
- if items[scan.name] == nil then
- items[scan.name] = 0
- end
- items[scan.name] = items[scan.name] + scan.count
- end
- end
- end
- local function displayItems(items, monitor) -- side
- monitor = peripheral.find("monitor") -- side
- term.redirect(monitor) -- dernier ajout
- --term.setBackgroundColor(colors.blue)
- term.setPaletteColour(colors.yellow, 0x018281) -- win 95/98
- term.setBackgroundColor(colors.yellow)
- monitor.setTextScale(0.5)
- term.setCursorPos(1,1)
- term.clear()
- for k,v in pairs(items) do
- if k == "minecraft:ancient_debris" then
- monitor.setTextColor(colors.brown)
- k = "ancient_debris"
- print(k.." x"..v)
- elseif k == "allthemodium:allthemodium_ore" then
- monitor.setTextColor(colors.orange)
- k = "allthemodium"
- print(k.." x"..v)
- elseif k == "allthemodium:vibranium_ore" then
- monitor.setTextColor(colors.green)
- k = "vibranium"
- print(k.." x"..v)
- elseif k == "allthemodium:unobtainium_ore" then
- monitor.setTextColor(colors.purple)
- k = "unobtainium"
- print(k.." x"..v)
- elseif k == "tconstruct:cobalt_ore" then
- monitor.setTextColor(colors.cyan)
- k = "cobalt_ore"
- print(k.." x"..v)
- else
- --monitor.setTextColor(colors.white)
- term.setPaletteColour(colors.white, 0x999966)
- term.setTextColour(colors.white)
- print(k.." x"..v)
- end
- end
- end
- getItems(items, max)
- displayItems(items, monitor) -- "top"
- sleep(0.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement