Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p = peripheral.wrap("bottom")
- --for i,v in pairs(p) do print(i) end
- local oldWrite = term.write
- local storage = {}
- term.write = function(input)
- table.insert(storage, input)
- oldWrite(input)
- end
- print(p.getAspects())
- local function save()
- local File = fs.open("Aspects", "w")
- File.write(storage)
- File.close()
- end
- save()
- local function load()
- local lFile = fs.open("Aspects","r")
- Data = textutils.unserialize(lFile.readAll())
- lFile.close()
- end
- load()
- --tData = textutils.unserialize(Data)
- --print(tData)
- term.write = oldWrite
- term.clear()
- term.setCursorPos(1,1)
- local function FTU(str)
- return (str:gsub("^%1", string.upper))
- end
- print("Aspects of the item is:")
- print(" ")
- for i,v in pairs(storage) do
- v = v:gsub("%a", string.upper, 1)
- print(v)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement