Feldherren

Thaumic Tinkerer/ComputerCraft Aspect Dictionary Generator

Feb 5th, 2016
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. local aspectalyser = peripheral.find("tt_aspectanalyzer")
  2. if aspectalyser ~= nil then
  3.     print("Aspectalyser found!")
  4. end
  5.  
  6. -- scanning item - should be a button that just scans the current thing in the aspectalyser, adds to definitions --
  7. function scanItem()
  8.     if aspectalyser.hasItem() then
  9.         local item = aspectalyser.getInventory()
  10.         if aspectalyser.itemHasAspects() then
  11.             local aspectList = aspectalyser.getAspectCount()
  12.             for k,v in pairs(aspectList) do
  13.                 print(k, ": ",v)
  14.             end
  15.         end
  16.     end
  17. end
  18.  
  19. scanItem()
Advertisement
Add Comment
Please, Sign In to add comment