Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --v2.0 by GraySloth 2013-Apr-30 For the miscperipherals mod with the Thaum Scanner Upgrade, based off of Direwolf20 video.
- --New aspect reference guide just type thaum list
- --works well with this program http://pastebin.com/yigYBdad to startup on a monitor just edit the clock argument to thaum
- local tArgs = {...};
- local aspectNumbers = {};
- local box = nil;
- local song = nil;
- local action = 'mainList';
- local maxtoshow = 12;
- local startat = 1;
- local sPath = shell.resolve( "aspectFile" )
- local tLines = {}
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- if tArgs[1] == nil then
- local tSide = nil
- for n,sthaumScannerSide in ipairs(rs.getSides()) do
- if peripheral.isPresent(sthaumScannerSide) and peripheral.getType(sthaumScannerSide) == "thaumScanner" then
- tSide = sthaumScannerSide
- break
- end
- end
- if not tSide then
- print( "No thaumScanner attached" )
- return
- end
- thaumScanner = peripheral.wrap("right")
- while true do
- clear()
- for i, j in pairs(thaumScanner.getAspects()) do
- print(i..":"..j)
- end
- os.sleep(1)
- end
- elseif tArgs[1] == "list" or "print" or "printall" then
- local function load(_sPath)
- tLines = {}
- if fs.exists( _sPath ) then
- local file = io.open( _sPath, "r" )
- local sLine = file:read()
- while sLine do
- table.insert( tLines, sLine )
- sLine = file:read()
- end
- file:close()
- end
- if #tLines == 0 then
- table.insert( tLines, "" )
- end
- end
- local aspectNumbers = {"Aer","Alienis","Animus","Aqua","Aura","Bestia","Bestiola","Carus","Cognitio","Corpus","Fabrico","Flos","Fractus","Fungus","Gelum","Herba","Ignis","Imperito","Instrumentum","Lignum","Lux","Machina","Malum","Messis","Metallum","Mortuus","Motus","Mutatio","Obscurus","Pannus","Permutatio","Potentia","Praecantatio","Purus","Sano","Saxum","Solum","Sonus","Telum","Tempus","Tenebris","Tutamen","Vacuos","Venenum","Victus","Vinculum","Visum","Vitreus","Volito"}
- local aspectData =
- {[[
- Aer
- Weather, Mist, Climate
- Wispy Essence x 4
- ]]
- ,[[
- Alienis
- Eldritch, The End, Strange, Alien
- REther Pearl x 3
- Beacon x 6
- Ender Pearl x 4
- Eye of Ender x 3
- Music Disk (far) x 4
- Nether Star x 8
- Obsidian Totem x 2
- Twilight Forest Scepters
- ]]
- ,[[
- Animus
- Soul, Spirit
- Creeper Head x 4
- Ghast Tear x 4
- Skeleton Skull x 4
- Soul Sand x 1
- Wispy Essence x 1
- Wither Skeleton Skull x 4
- Zombie Head x 4
- ]]
- ,[[
- Aqua
- Water, Fluid
- Awkward Potion x 1*
- Boat x 4
- Brewing Stand x 2
- Cactus x 1
- Cake x 8
- Clay (ball) x 1
- Empty Map x 13
- Ghast Tear x 4
- Lily Pad x 1
- Mundane Potion x 1
- Music Disk (13) x 4
- Paper x 2
- Pumpkin Pie x 2
- Raw Fish x 1
- Reeds x 2
- Slime Ball x 2
- Sugar x 2
- Thick Potion x 1
- Water Bottle x 1*
- Water Bucket x 4
- Water Shard x 2
- ]]
- ,[[
- Aura
- Air, Wind, Breath
- Air Shard x 2
- Dead Bush x 1
- Feather x 2
- Grass x 1
- Aluminium x 2
- Raven's Feathers x 2
- ]]
- ,[[
- Bestia
- Animal, Beast
- Bed x 2
- Leather x 2
- Music Disk (cat) x 4
- Naga Scale x 16
- Raw Porkchop x 1
- Wool (any) x 1
- Feather x 2
- ]]
- ,[[
- Bestiola
- Spider, Web, Insects
- Bow x 2
- Enchanted Book (Bane of Arthropods) x 4
- Firefly x 4
- Moonworm Queen x 12
- Spider Eye x 2
- String x 1
- Royal Jelly x 2
- Bee (Drone or Princess) x 1 (Queen) x 2
- ]]
- ,[[
- Carus
- Expensive, Precious, Valuable
- Diamond x 4
- Emerald x 2
- Enchantment Table x 6
- Gold x 4
- Lapis Lazuli x 1
- Music Disk (any) x 4
- Smooth Sandstone x 1
- Chiseled Stone Brick x 1
- ]]
- ,[[
- Cognitio
- Learning, Knowledge, Inquiry
- Book x 5
- Bookshelf x 12
- Knowledge Fragment x 16*
- Paper x 2
- Zombie Brain x 4
- Research Notes ( Theory of Everything and Tiny Hats... perhaps others? (id 0)) x 115
- ]]
- ,[[
- Corpus
- Body, Flesh, Physique
- Black Wool x 1
- Bone Meal x 1
- Bones x 2
- Cake x 3
- Cooked Chicken x 4
- Cooked Porkchop x 4
- Egg x 2
- Ink x 1
- Raw Beef x 4
- Raw Chicken x 4
- Raw Porkchop x 4
- Rotten Flesh x 4
- Steak x 4
- Zombie Brain x 2
- Meat Nugget (any, from cooking meat in the Infernal Furnace) x 1*
- Player when standing on a Crucible (~ x 1 per 20 sec)*
- ]]
- ,[[
- Fabrico
- Create, Construct, Work
- Anvil x 2
- Crafting Table x 1
- Music Disc (blocks) x 4
- Slightly Damaged Anvil x 1
- Steel Ingot x 1
- Very Damaged Anvil x 1
- ]]
- ,[[
- Flos
- Flower, Bloom, Blossom
- Dandelion Yellow x 2
- Flowers x 4
- Magenta Dye x 1
- Magenta Wool x 1
- Orange Dye x 2
- Orange Wool x 2
- Pink Dye x 1
- Pink Wool x 1
- Purple Dye x 1
- Purple Wool x 1
- Red Wool x 2
- Rose Red x 2
- Yellow Wool x 2
- Cowbar x 3
- ]]
- ,[[
- Fractus
- Destruction, Fragmented, Shattered
- Cobblestone x 1
- Gunpowder x 4
- Red Xychorium x 2
- TNT x 16
- ]]
- ,[[
- Fungus
- Mushroom, Toadstool, Fungi
- Brown Mushroom x 4*
- Mushroom Stew x 3
- Mushroom (Block) x 4
- Mycelium x 1
- Nether Wart x 1
- Red Mushroom x 4*
- ]]
- ,[[
- Gelum
- Cold, Ice, Frost
- Ice x 3*
- Snow x 3*
- Snowball x 1*
- Water Shard x 2
- ]]
- ,[[
- Herba
- Herb, Plant, Grass
- Cactus x 4
- Dead Bush x 1
- Saplings x 4
- Seeds x 1
- Cocoa Beans x 1
- Leaves x 2*
- Moss Stone x 1
- ]]
- ,[[
- Ignis
- Fire, Heat, Burn
- Blaze Rod x 6
- Brick x 1
- Charcoal x 2
- Coal x 2
- Enchantment Table x 6
- Fire Shard x 2
- Flint and Steel x 4
- Furnace x 2
- Gunpowder x 4
- Music Disc (11) x 4
- Nether Wart x 1
- Netherrack x 1
- Rose x 1
- ]]
- ,[[
- Imperito
- Control, Command, Dominate
- Blue Xychorium x 2
- Bronze Ingot x 1
- Lever x 1
- Music Disc (strad) x 4
- Rubber (IC2) x 2
- Saddle x 4
- Slime Ball x 2
- Tin Ore x 1
- ]]
- ,[[
- Instrumentum
- Instrument, Tool, Implement
- Anvil x 2
- Axe x (depends on material)
- Flint x 1
- Hoe x (depends on material)
- Pickaxe x (depends on material)
- Shears x 4
- Shovel x (depends on material)
- Slightly Damaged Anvil x 2
- Very Damaged Anvil x 1
- ]]
- ,[[
- Lignum
- Wood, Forest, Tree
- Bed x 3
- Charcoal x 2
- Chest x 3
- Crafting Table x 3
- Jukebox x 3
- Lever x 1
- Log (any type) x 8*
- Piston x 3
- Redstone Repeater x 2
- Saplings x 2
- Sign x 1
- Stick x 1*
- Sticky Piston x 3
- Tripwire Hook x 1
- Note Block x 3
- Wooden Bowl x 1
- Wooden Button x 1
- Wooden Door x 3
- Wooden Fence x 1
- Wooden Fence Gate x 5
- Wooden Planks (any type) x 2*
- Wooden Pressure Plate x 3
- Wooden Slab (any type) x 1*
- Wooden Stairs (any type) x 2*
- Wooden Tools x (depends on tool)
- ]]
- ,[[
- Lux
- Light, Brightness, Day
- Flower (Yellow) x 1
- Glowstone x 10
- Glowstone Dust x 3
- Jack o Lantern x 1
- Light Xychorium x 2
- Redstone Lamp x 8
- Torch x 1*
- ]]
- ,[[
- Machina
- Mechanism, Machine, Device
- Button (any) x 1
- Fence Gate x 1
- Nicolite (RedPower 2) x 2
- Redstone x 2
- Redstone Repeater x 8
- Redstone Torch x 4
- Pressure Plate (any) x 1
- ]]
- ,[[
- Malum
- Evil, The Nether, Malice
- Creeper Head x 4
- Ghast Tear x 4
- Music Disc (stal) x 4
- Skeleton Skull x 4
- Wither Skeleton Skull x 4
- Zombie Brain x 2
- Zombie Head x 4
- ]]
- ,[[
- Messis
- Crops, Harvest
- Apple x 2
- Cake x 8
- Carrot x 2
- Golden Apple x 2
- Potato x 2
- Sugar Canes x 2
- Pumpkin x 8*
- Wheat x 2
- ]]
- ,[[
- Metallum
- Metal, Mine, Ore
- Anvil x 26
- Cinnabar Ore x 3
- Copper/Tin/Silver/Bronze/Lead Dust x 5
- Copper/Tin/Silver/Bronze/Lead Ingot x 6
- Copper/Tin/Silver Ore x 5
- Iron Ingot x 8*
- Gold Ingot x 8
- Iron/Gold Dust x 7
- Iron/Gold Ore x 6
- Nugget (any) x 1*
- Quicksilver x 4
- Refined Uranium x 6
- Slightly Damaged Anvil x 6
- Shears x 13
- Very Damaged Anvil x 26
- ]]
- ,[[
- Mortuus
- Death, Decay, Undead
- Bone Meal x 2
- Bones x 6
- Ghast Tear x 4
- Gray Dye x 1
- Light Blue Dye x 1
- Light Gray Wool x 1
- Lime Dye x 1
- Potion of Harming (I) x3
- Potion of Harming (II) x6
- Rotten Flesh x 4
- Wither Skeleton Skull x 8
- Zombie Brain x 2
- ]]
- ,[[
- Motus
- Motion, Movement, Speed
- Air Shard x 2
- Boat x 4
- Doors x 1
- Minecart x 4
- Music Disc (mellohi) x 4
- Piston x 4
- Potion of Speed (I) x 3
- Potion of Speed (II) x 6
- Quicksilver x1
- Rubber (IC2) x 2
- Rubberwood x1
- Trapdoor x 1
- Naga Stone x 4
- Naga Headstone x 4
- ]]
- ,[[
- Mutatio
- Flux, Chaos
- Magma Cream x 2
- Mossy Cobblestone x 1
- Nether Wart x 1
- Slimeball x 2
- Wispy Essence x 1 or (only violet ones) x 5
- ]]
- ,[[
- Obscurus
- Unknown, Obscured
- (Not an Aspect: This symbol appears only while researching. It indicates that an Aspect has been detected, but further research is needed to identify it.)
- ]]
- ,[[
- Aspect Pannus Pannus
- Cloth, Fabric, Garment, Thread
- Bed x 17
- Bow x 5
- Leather x 1
- Non-white Wool x 6
- String x 2
- White Wool x 7
- ]]
- ,[[
- Permutatio
- Exchange, Change, Barter
- Copper Ore x 1
- Egg x 4
- Emerald x 4
- Flax Seeds x 1
- Melon Seeds x 1
- Music Disc (mall) x 4
- Pumpkin Seeds x 1
- Seeds x 1
- Silver Ore x 1
- Honey Drop x 2
- ]]
- ,[[
- Potentia
- Power, Energy, Strength
- Charcoal x 2
- Coal x 2
- Cocoa Beans x 1
- Nicolite (RedPower 2) x 2
- Quartz Crystal x 1
- Redstone x 2
- Redstone Repeater x 5
- Refined Uranium x 6
- Apatite x 2
- ]]
- ,[[
- Praecantatio
- Magic, Sorcery
- Air / Earth / Fire / Water / Dull Shard x 2
- Any Enchanted Item (Depends On Level) x 2-8(?)
- Any Potion (I) x 2
- Any Potion (II) x 4
- Arcane Stone Block x 2
- Arcane Wood Block x 1
- Arcane Worktable x 2
- Beacon x 8
- Blaze Rod x 2
- Chiseled Sandstone x 1
- Emerald x 4
- Enchantment Table x 8
- Ender Pearl x 4
- Glass Vial x 1
- Golden Carrot x 2
- Great Wood x 1
- Music Disc (ward) x 4
- Nether Star x 8
- Silverwood Log x 2
- Vis Shard x 6
- Magic Wax x2
- ]]
- ,[[
- Purus
- Pure, Clean, Stainless
- Beacon x 6
- Diamond x 4
- Nether Star x 8
- Silverwood Leaves x 1
- Silverwood Log x 2
- Refined Iron x 1
- ]]
- ,[[
- Sano
- Heal, Repair
- Cake x 8
- Golden Apple (Block) x 8
- Golden Apple (Nugget) x 4
- Milk Bucket x 2
- Potion of Health (I) x 3
- Potion of Health (II) x 6
- Potion of Regeneration (I) x 3
- Potion of Regeneration (II) x 6
- ]]
- ,[[
- Saxum
- Stone, Rock
- Beacon x 12
- Cobblestone x 1
- Enchanting Table x 16
- End Stone x 1
- Gravel x 1
- Nether Brick x 2
- Netherrack x 1
- Obsidian x 5
- Redstone Repeater x 5
- Silver Ore x 2
- Stone x 2*
- ]]
- ,[[
- Solum
- Earth, Soil, Ground, Foundation
- Brick x 2
- Bricks (Block) x 6
- Clay (ball) x2
- Dirt x 2*
- End Stone x 1
- Gravel x 1
- Music Disc (chirp) x 4
- Mycelium x 2
- Netherrack x 1
- Sand x 2*
- Soul Sand x 1
- ]]
- ,[[
- Sonus
- Sound, Noise, Din
- Cicada x 4 (Twilight Forest)
- Jukebox x 8
- Music Disc (any) x 12
- Noteblock x 4
- ]]
- ,[[
- Telum
- Arrow, Sword, Weapon
- Arrow x 1*
- Bow x 6
- Cactus x 1
- Potion of Strength (I) x 3
- Potion of Strength (II) x 6
- Sword (depends on material) x 4-10
- ]]
- ,[[
- Tempus
- Time, Moment, Season
- Clock x 4
- Redstone Repeater x 1
- Written Book x 1
- ]]
- ,[[
- Tenebris
- Dark, Night, Blindness
- Black Wool x 1
- Dark Xychorium x 2
- End Stone x 1
- Ink Sac x 1
- Obsidian x 1
- Obsidian Totem x 2
- Obsidian Tile x 1
- ]]
- ,[[
- Tutamen
- Defense, Protection, Security
- Armor x (depends on material) 3-9
- Enchanted Book of (any) Protection (depends On Level) x 2-6
- Leather x 1
- Potion of Fire Resistance x 1
- Mazestone x 1
- ]]
- ,[[
- Vacuos
- Empty, Void, Insubstantial
- Bowl x 1
- Bucket x 1
- Chest x 4
- Flower Pot x 1
- Glass Phial / Bottle x 1
- Lead Ingot x 2
- ]]
- ,[[
- Venenum
- Poison, Drug, Impure
- Poisonous Potato x 2
- Potion of Poison (I) x 3
- Potion of Poison (II) x 6
- Quicksilver x 1
- Refined Uranium x 4
- Spider Eye x 1
- ]]
- ,[[
- Victus
- Life Force, Food, Sustenance
- Apple x 2
- Bread x 5
- Cake x 10
- Copper Dust / Ingot x 2
- Green Xychorium x 2
- Melon Slice x 1*
- Porkchop x 4
- Steak x 4
- Sulfur x 2
- Wheat x 2
- ]]
- ,[[
- Vinculum
- Bind, Imprison, Trap
- Amber x 4
- Cobweb x 2
- Potion of Slowness x 3
- Soul Sand x 1
- String x 1
- ]]
- ,[[
- Visum
- Sight, Vision, Appearance
- Carrot x 2
- Cinnabar Ore x 3
- Glowstone Dust x 1
- Potion of Night Vision x 3
- Quicksilver x 4
- Spider Eye x 2
- ]]
- ,[[
- Vitreus
- Glass, Crystal, Gem, Transparent
- Beacon x 8
- Diamond x 12
- Emerald x 10
- Enchanting Table x 19
- Ender Pearl x 4
- Glass x 2*
- Glass Bottle x 2
- Glass Pane x 1*
- Glass Phial x 1
- Ice x 1
- Quartz Crystal x 4
- Xychorium (all) x 2
- ]]
- ,[[
- Volito
- Flight, Leap
- Feather x 2
- Bees (Forestry) x 2
- Bow (Possibly not usable in research glitch?)
- ]]}
- if turtle ~= nil then
- maxtoshow = 7;
- end
- function printAspects(x)
- action = 'mainList';
- clear();
- for i = x, #aspectNumbers do
- if x + maxtoshow <= i then break end
- print(i .. ") " .. aspectNumbers[i]);
- end
- print("----------------------\n0) [More]\n\nEnter the Aspect number to view properties: ");
- term.setCursorBlink(true);
- selected = tonumber(read());
- print(selected);
- term.setCursorBlink(false);
- if selected > 0 and selected <= #aspectNumbers then
- action = 'showAspect';
- else
- action = 'backNextaspectNumbers';
- if true then
- return 2, x; -- just goes to the next page instead of new aspectNumbers
- else
- term.clear();
- print("1) Previous Page of Aspects...");
- print("2) Next Page of Aspects...");
- print("\n\n0) [Back]\n\nEnter the option number: ");
- term.setCursorBlink(true);
- selected = tonumber(read());
- term.setCursorBlink(false);
- end
- end
- return selected, x;
- end
- function MakeBook()
- load(sPath)
- term.clear() term.setCursorPos( 1, 1 )
- local sPrinterSide = nil
- for n,sSide in ipairs(rs.getSides()) do
- if peripheral.isPresent(sSide) and peripheral.getType(sSide) == "printer" then
- sPrinterSide = sSide
- break
- end
- end
- if not sPrinterSide then
- print( "No printer attached" )
- return
- end
- local nPage = 0
- local sName = fs.getName( sPath )
- local printer = peripheral.wrap(sPrinterSide)
- if printer.getInkLevel() < 1 then
- print( "Printer out of ink")
- return
- elseif printer.getPaperLevel() < 1 then
- print( "Printer out of paper")
- return
- end
- local terminal = {
- getCursorPos = printer.getCursorPos,
- setCursorPos = printer.setCursorPos,
- getSize = printer.getPageSize,
- write = printer.write,
- }
- terminal.scroll = function()
- if nPage == 1 then
- printer.setPageTitle( "Encyclopedia Thaumamatica: "..aspectNumbers[selected].." (page "..nPage..")" )
- end
- while not printer.newPage() do
- if printer.getInkLevel() < 1 then
- print( "Printer out of ink, please refill")
- elseif printer.getPaperLevel() < 1 then
- print( "Printer out of paper, please refill")
- else
- print( "Printer output tray full, please empty")
- end
- term.restore()
- term.redirect( terminal )
- local timer = os.startTimer(0.5)
- sleep(0.5)
- end
- nPage = nPage + 1
- if nPage == 1 then
- printer.setPageTitle( "Encyclopedia Thaumamatica: "..aspectNumbers[selected] )
- else
- printer.setPageTitle( "Encyclopedia Thaumamatica: "..aspectNumbers[selected].." (page "..nPage..")" )
- end
- end
- term.redirect( terminal )
- local ok, error = pcall( function()
- term.scroll()
- for n, sLine in ipairs( tLines ) do
- print( sLine )
- end
- end )
- term.restore()
- if not ok then
- print( error )
- end
- while not printer.endPage() do
- term.clear() term.setCursorPos( 1, 1 )
- print( "Printer output tray full, please empty")
- sleep( 0.5 )
- end
- if nPage > 1 then
- print( "Printed "..nPage.." Pages")
- else
- print( "Printed 1 Page")
- end
- sleep( 2 )
- end
- if tArgs[1] == "printall" then
- for i=1, #aspectNumbers do
- selected = i
- local w = fs.open("aspectFile", "w")
- w.write(aspectData[selected])
- w.close()
- local r = fs.open("aspectFile", "r")
- clear()
- MakeBook()
- r.close()
- fs.delete("aspectFile")
- clear()
- end
- else
- selected, startat = printAspects(1);
- while true do
- if action == 'showAspect' then
- local w = fs.open("aspectFile", "w")
- w.write(aspectData[selected])
- w.close()
- local r = fs.open("aspectFile", "r")
- if tArgs[1] == "print" then
- clear()
- MakeBook()
- os.pullEvent("key")
- else
- repeat
- term.clear() term.setCursorPos( 1, 1 )
- for _=1,maxtoshow do
- print(r.readLine())
- end
- print("\n\n\n Press any key to continue")
- os.pullEvent("key")
- term.clear() term.setCursorPos( 1, 1 )
- until not r.readLine()
- end
- r.close()
- fs.delete("aspectFile")
- term.clear() term.setCursorPos( 1, 1 )
- action = 'backNextaspectNumbers'
- else
- if action == 'backNextaspectNumbers' then
- if selected == 1 then
- startat = startat - maxtoshow;
- if startat < 1 then startat = 1; end
- selected, startat = printAspects(startat);
- elseif selected == 2 then
- startat = startat + maxtoshow
- if startat > #aspectNumbers then startat = 1; end
- selected, startat = printAspects(startat);
- else --if selected == 0 then
- selected, startat = printAspects(startat);
- end
- elseif action =='mainList' then
- selected, startat = printAspects(startat);
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment