Update Minecraft recipebook with more recipes

This commit is contained in:
Andrew Miner
2015-01-01 11:06:25 -08:00
parent 57c6cca436
commit a265383630
18 changed files with 2093 additions and 1127 deletions
+2 -1
View File
@@ -26,7 +26,8 @@
"grunt-contrib-jade": "^0.13.0", "grunt-contrib-jade": "^0.13.0",
"grunt-contrib-sass": "^0.8.1", "grunt-contrib-sass": "^0.8.1",
"grunt-contrib-watch": "^0.6.1", "grunt-contrib-watch": "^0.6.1",
"grunt-exorcise": "^0.2.0" "grunt-exorcise": "^0.2.0",
"underscore": "^1.7.0"
}, },
"dependencies": { "dependencies": {
"backbone": "^1.1.2", "backbone": "^1.1.2",
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env coffee
global._ = require 'underscore'
global.Backbone = require 'backbone'
fs = require 'fs'
RecipeBookParser = require '../src/scripts/models/recipe_book_parser'
########################################################################################################################
if process.argv.length isnt 3
throw new Error "Expected a file name as an argument"
fileName = process.argv[2]
text = fs.readFileSync fileName, 'UTF-8'
data = JSON.parse text
parser = new RecipeBookParser
recipeBook = parser.parse data
text = parser.unparse recipeBook
fs.writeFileSync fileName, text, encoding:'UTF-8'
+282 -282
View File
@@ -5,327 +5,327 @@
"description": "Crafting recipes from Applied Energetics, by AlgorithmX2", "description": "Crafting recipes from Applied Energetics, by AlgorithmX2",
"recipes": [ "recipes": [
{ {
"output": "Grind Stone",
"input": [[3, "Certus Quartz Dust"], [3, "Stone"], [2, "Cobblestone"], "Wooden Gear"],
"tools": "Crafting Table"
}, {
"output": "Quartz Cutting Knife",
"input": ["Iron Ingot", [2, "Stick"], [2, "Certus Quartz"]],
"tools": "Crafting Table"
}, {
"output": "Basic Processor Assembly",
"input": ["Gold Ingot", [2, "Redstone"], "Silicon"],
"tools": ["Crafting Table", "Quartz Cutting Knife"]
}, {
"output": "Advanced Processor Assembly", "output": "Advanced Processor Assembly",
"input": ["Diamond", [2, "Redstone"], "Silicon"], "input": [[2, "Redstone"], "Diamond", "Silicon"],
"tools": ["Crafting Table", "Quartz Cutting Knife"] "tools": ["Crafting Table", "Quartz Cutting Knife"]
}, { }, {
"output": "Silicon", "output": "Basic Processor Assembly",
"input": "Certus Quartz Dust", "input": [[2, "Redstone"], "Gold Ingot", "Silicon"],
"tools": "Furnace" "tools": ["Crafting Table", "Quartz Cutting Knife"]
}, {
"output": "ME Basic Processor",
"input": "Basic Processor Assembly",
"tools": "Furnace"
}, {
"output": "ME Basic Processor",
"input": ["Redstone Golden Chipset", [1, "Silicon"], [1, "Fluix Dust"]],
"tools": ["Assembly Table", "Laser"]
}, {
"output": "ME Advanced Processor",
"input": "Advanced Processor Assembly",
"tools": "Furnace"
}, {
"output": "ME Advanced Processor",
"input": ["Redstone Diamond Chipset", [1, "Silicon"], [1, "Fluix Dust"]],
"tools": ["Assembly Table", "Laser"]
}, {
"output": "Vibration Catalyst",
"input": ["Iron Ingot", "ME Conversion Matrix", "Lava Bucket", [1, "Energy Cell"]],
"tools": "Crafting Table"
}, {
"output": "Entropy Accelerator",
"input": ["Iron Ingot", "ME Conversion Matrix", "Ice", [1, "Energy Cell"]],
"tools": "Crafting Table"
}, {
"output": "Tiny TNT",
"input": [[2, "Gunpowder"], [2, "Certus Quartz Dust"]]
}, {
"output": [[8, "ME Cable - Blue"]],
"input": ["Lapis Lazuli", [8, "ME Cable"]],
"tools": "Crafting Table"
}, {
"output": [[8, "ME Cable - Black"]],
"input": ["Ink Sac", [8, "ME Cable"]],
"tools": "Crafting Table"
}, {
"output": [[8, "ME Cable - White"]],
"input": ["Bone Meal", [8, "ME Cable"]],
"tools": "Crafting Table"
}, {
"output": [[8, "ME Cable - Brown"]],
"input": ["Cocoa Beans", [8, "ME Cable"]],
"tools": "Crafting Table"
}, {
"output": [[8, "ME Cable - Red"]],
"input": ["Rose Red", [8, "ME Cable"]],
"tools": "Crafting Table"
}, {
"output": [[8, "ME Cable - Yellow"]],
"input": ["Dandelion Yellow", [8, "ME Cable"]],
"tools": "Crafting Table"
}, {
"output": [[8, "ME Cable - Green"]],
"input": ["Cactus Green", [8, "ME Cable"]],
"tools": "Crafting Table"
}, {
"output": [[8, "ME Cable - Green"]],
"input": ["Cactus Green", [8, "ME Cable"]],
"tools": "Crafting Table"
}, {
"output": "ME Pattern Provider",
"input": [[4, "Iron Ingot"], [1, "Crafting Table"], [2, "Conversion Matrix"], [1, "ME Advanced Processor"], [1, "Storage Cell"]],
"tools": "Crafting Table"
}, {
"output": "ME Controller",
"input": [[4, "Iron Ingot"], [4, "Fluix Crystal"], "ME Advanced Processor"],
"tools": "Crafting Table"
}, {
"output": "ME Drive",
"input": [[4, "Iron Ingot"], [2, "Glass"], [2, "ME Basic Processor"], [1, "Chest"]],
"tools": "Crafting Table"
}, {
"output": "ME Pattern Encoder",
"input": [[7, "Iron Ingot"], [1, "Crafting Table"], [1, "Conversion Matrix"]],
"tools": "Crafting Table"
}, {
"output": "ME Wireless Access Point",
"input": [[4, "Iron Ingot"], [3, "Glass"], [1, "Wireless Receiver"], [1, "ME Cable"]],
"tools": "Crafting Table"
}, {
"output": "ME Access Terminal",
"input": [[4, "Iron Ingot"], [3, "Glass"], [1, "Conversion Matrix"], [1, "ME Cable"]],
"tools": "Crafting Table"
}, {
"output": "ME Chest",
"input": [[5, "Iron Ingot"], "Chest", "Conversion Matrix", [2, "Glass"]],
"tools": "Crafting Table"
}, {
"output": "ME Interface",
"input": [[4, "Iron Ingot"], [3, "Glass"], [1, "Conversion Matrix"], [1, "ME Cable"]],
"tools": "Craftin Table"
}, {
"output": "ME Partition Editor",
"input": [[5, "Iron Ingot"], [2, "Glass"], [1, "Conversion Matrix"], [1, "Crafting Table"]],
"tools": "Crafting Table"
}, {
"output": "ME Precision Export Bus",
"input": ["ME Basic Export Bus", [1, "ME Basic Processor"]],
"tools": "Crafting Table"
}, {
"output": "ME Precision Import Bus",
"input": ["ME Basic Import Bus", [1, "ME Basic Processor"]],
"tools": "Crafting Table"
}, {
"output": "ME Crafting Terminal",
"input": [[4, "Iron Ingot"], [2, "Glass"], [1, "Crafting Table"], [1, "Storage Cell"], [1, "ME Access Terminal"]],
"tools": "Crafting Table"
}, {
"output": "ME Level Emitter",
"input": [[2, "Iron Ingot"], "ME Basic Processor", "ME Cable", "Redstone Torch"],
"tools": "Crafting Table"
}, {
"output": "ME Crafting CPU",
"input": [[4, "Iron Ingot"], [2, "Certus Quartz"], [2, "Glowstone Dust"], "ME Advanced Processor"],
"tools": "Crafting Table"
}, {
"output": "ME Heat Vent",
"input": [[4, "Iron Ingot"], [4, "Iron Bars"], "ME Cable"],
"tools": "Crafting Table"
}, {
"output": "ME Assembler Containment Wall",
"input": [[4, "Iron Ingot"], [4, "Gold Ingot"], "Certus Quartz"],
"tools": "Crafting Table"
}, {
"output": "ME Dark Cable",
"input": [[2, "Redstone"], [2, "ME Cable"], "Lever"],
"tools": "Crafting Table"
}, {
"output": "ME Storage Bus",
"input": ["ME Cable", "ME Interface", [3, "Iron Ingot"]],
"tools": "Crafting Table"
}, {
"output": "ME IO Port",
"input": [[3, "Glass"], [2, "ME Drive"], "ME Cable", [2, "Iron Ingot"], "ME Basic Processor"],
"tools": "Crafting Table"
}, {
"output": "ME Crafting Monitor",
"input": [[4, "Iron Ingot"], [3, "Glass"], "ME Cable", "ME Basic Processor"],
"tools": "Crafting Table"
}, {
"output": "ME Storage Monitor",
"input": [[4, "Iron Ingot"], [3, "Glass"], "ME Cable", "ME Level Emitter"],
"tools": "Crafting Table"
}, {
"output": "ME Covered Cable",
"input": ["ME Cable", "Wool"],
"tools": "Crafting Table"
}, {
"output": [[3, "ME Cable"]],
"input": [[6, "Glass"], [3, "Fluix Dust"]],
"tools": "Crafting Table"
}, {
"output": "ME Fuzzy Storage Bus",
"input": [[4, "Wool"], "ME Storage Bus"],
"tools": "Crafting Table"
}, {
"output": "ME Fuzzy Export Bus",
"input": ["ME Basic Export Bus", "ME Advanced Processor"],
"tools": "Crafting Table"
}, {
"output": "ME Fuzzy Import Bus",
"input": ["ME Basic Import Bus", "ME Advanced Processor"],
"tools": "Crafting Table"
}, {
"output": "ME Basic Export Bus",
"input": ["ME Cable", [2, "Iron Ingot"], "ME Interface", "Piston"],
"tools": "Crafting Table"
}, {
"output": "ME Basic Import Bus",
"input": ["ME Cable", [2, "Iron Ingot"], "ME Interface", "Sticky Piston"],
"tools": "Crafting Table"
}, {
"output": "ME Transition Plane",
"input": [[3, "Fluix Dust"], [4, "Iron Ingot"], "Conversion Matrix", "ME Cable"],
"tools": "Crafting Table"
}, {
"output": "Energy Cell",
"input": [[4, "Iron Ingot"], [4, "Fluix Crystal"], "Glass"],
"tools": "Crafting Table"
}, {
"output": "ME Power Relay",
"input": [[4, "Iron Ingot"], [4, "ME Cable"], "Energy Cell"],
"tools": "Crafting Table"
}, {
"output": "ME Condenser",
"input": [[4, "Iron Ingot"], [4, "Glass"], "Fluix Dust"],
"tools": "Crafting Table"
}, {
"output": "Quantum Field Ring",
"input": [[4, "Iron Ingot"], [2, "ME Basic Processor"], "ME Advanced Processor", "Energy Cell", "ME Cable"],
"tools": "Crafting Table"
}, {
"output": "Quantum Link Chamber",
"input": [[4, "Quartz Glass"], [4, "Fluix Pearl"]],
"tools": "Crafting Table"
}, { }, {
"output": "Certus Quartz Block", "output": "Certus Quartz Block",
"input": [[4, "Certus Quartz"]], "input": [[4, "Certus Quartz"]],
"tools": "Crafting Table" "tools": "Crafting Table"
}, {
"output": [[4, "Quartz Glass"]],
"input": [[5, "Certus Quartz Dust"], [4, "Glass"]],
"tools": "Crafting Table"
}, {
"output": "Vibrant Quartz Glass",
"input": ["Quartz Glass", [2, "Glowstone Dust"]],
"tools": "Crafting Table"
}, {
"output": "ME 1k Storage",
"input": [[2, "Glass"], [3, "Redstone"], "Storage Cell", [3, "Iron Ingot"]],
"tools": "Crafting Table"
}, {
"output": "ME 4k Storage",
"input": [[2, "Glass"], [3, "Redstone"], "Storage Segment", [3, "Iron Ingot"]],
"tools": "Crafting Table"
}, {
"output": "ME 16k Storage",
"input": [[2, "Glass"], [3, "Redstone"], "Storage Block", [3, "Iron Ingot"]],
"tools": "Crafting Table"
}, {
"output": "ME 64k Storage",
"input": [[2, "Glass"], [3, "Redstone"], "Storage Cluster", [3, "Iron Ingot"]],
"tools": "Crafting Table"
}, { }, {
"output": "Conversion Matrix", "output": "Conversion Matrix",
"input": [[4, "Iron Ingot"], "Nether Quartz", [2, "Fluix Dust"], "ME Basic Processor", "Certus Quartz"], "input": [[4, "Iron Ingot"], [2, "Fluix Dust"], "Certus Quartz", "ME Basic Processor", "Nether Quartz"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Storage Cell", "output": "Ender Pearl Dust",
"input": [[4, "Redstone"], [4, "Certus Quartz"], "ME Basic Processor"], "input": "Ender Pearl",
"tools": "Pulverizer"
}, {
"output": "Energy Cell",
"input": [[4, "Fluix Crystal"], [4, "Iron Ingot"], "Glass"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Storage Segment", "output": "Entropy Accelerator",
"input": [[4, "Redstone"], [3, "Storage Cell"], "Glass", [1, "ME Basic Processor"]], "input": ["Energy Cell", "Ice", "Iron Ingot", "ME Conversion Matrix"],
"tools": "Crafting Table"
}, {
"output": "Storage Block",
"input": [[4, "Glowstone"], [3, "Storage Segment"], "Glass", [1, "ME Advanced Processor"]],
"tools": "Crafting Table"
}, {
"output": "Storage Cluster",
"input": [[4, "Glowstone"], [3, "Storage Block"], "Glass", [1, "ME Advanced Processor"]],
"tools": "Crafting Table"
}, {
"output": "Wireless Receiver",
"input": ["Fluix Pearl", [3, "Iron Ingot"], "Stick"],
"tools": "Crafting Table"
}, {
"output": "Wireless Booster",
"input": [[2, "Iron Ingot"], "Redstone", "Certus Quartz"],
"tools": "Crafting Table"
}, {
"output": "Wooden Crank",
"input": [[5, "Stick"]],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Flour", "output": "Flour",
"input": "Wheat", "input": "Wheat",
"tools": "Pulverizer" "tools": "Pulverizer"
}, {
"output": [[2, "Fluix Dust"]],
"input": ["Redstone", "Certus Quartz Dust", "Nether Quartz Dust"],
"tools": "Crafting Table"
}, {
"output": "ME Blank Pattern",
"input": [[2, "Glass"], [3, "Glowstone"], "Certus Quartz", [3, "Iron Ingot"]],
"tools": "Crafting Table"
}, {
"output": "Nether Quartz Dust",
"input": "Nether Quartz",
"tools": "Pulverizer"
}, { }, {
"output": "Fluix Crystal", "output": "Fluix Crystal",
"input": ["Certus Quartz", "Nether Quartz", "Redstone"], "input": ["Certus Quartz", "Nether Quartz", "Redstone"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, {
"output": [[2, "Fluix Dust"]],
"input": ["Certus Quartz Dust", "Nether Quartz Dust", "Redstone"],
"tools": "Crafting Table"
}, { }, {
"output": "Fluix Pearl", "output": "Fluix Pearl",
"input": [[4, "Fluix Dust"], [4, "Fluix Crystal"], "Ender Pearl"], "input": [[4, "Fluix Crystal"], [4, "Fluix Dust"], "Ender Pearl"],
"tools": "Crafting Table"
}, {
"output": "Grind Stone",
"input": [[3, "Certus Quartz Dust"], [3, "Stone"], [2, "Cobblestone"], "Wooden Gear"],
"tools": "Crafting Table"
}, {
"output": "ME 16k Storage",
"input": [[3, "Iron Ingot"], [3, "Redstone"], [2, "Glass"], "Storage Block"],
"tools": "Crafting Table"
}, {
"output": "ME 1k Storage",
"input": [[3, "Iron Ingot"], [3, "Redstone"], [2, "Glass"], "Storage Cell"],
"tools": "Crafting Table"
}, {
"output": "ME 4k Storage",
"input": [[3, "Iron Ingot"], [3, "Redstone"], [2, "Glass"], "Storage Segment"],
"tools": "Crafting Table"
}, {
"output": "ME 64k Storage",
"input": [[3, "Iron Ingot"], [3, "Redstone"], [2, "Glass"], "Storage Cluster"],
"tools": "Crafting Table"
}, {
"output": "ME Access Terminal",
"input": [[4, "Iron Ingot"], [3, "Glass"], "Conversion Matrix", "ME Cable"],
"tools": "Crafting Table"
}, {
"output": "ME Advanced Processor",
"input": "Advanced Processor Assembly",
"tools": "Furnace"
}, {
"output": "ME Advanced Processor",
"input": ["Fluix Dust", "Redstone Diamond Chipset", "Silicon"],
"tools": ["Assembly Table", "Laser"]
}, {
"output": "ME Assembler Containment Wall",
"input": [[4, "Gold Ingot"], [4, "Iron Ingot"], "Certus Quartz"],
"tools": "Crafting Table"
}, {
"output": "ME Basic Export Bus",
"input": [[2, "Iron Ingot"], "ME Cable", "ME Interface", "Piston"],
"tools": "Crafting Table"
}, {
"output": "ME Basic Import Bus",
"input": [[2, "Iron Ingot"], "ME Cable", "ME Interface", "Sticky Piston"],
"tools": "Crafting Table"
}, {
"output": "ME Basic Processor",
"input": "Basic Processor Assembly",
"tools": "Furnace"
}, {
"output": "ME Basic Processor",
"input": ["Fluix Dust", "Redstone Golden Chipset", "Silicon"],
"tools": ["Assembly Table", "Laser"]
}, {
"output": "ME Blank Pattern",
"input": [[3, "Glowstone"], [3, "Iron Ingot"], [2, "Glass"], "Certus Quartz"],
"tools": "Crafting Table"
}, {
"output": [[3, "ME Cable"]],
"input": [[6, "Glass"], [3, "Fluix Dust"]],
"tools": "Crafting Table"
}, {
"output": [[8, "ME Cable - Black"]],
"input": [[8, "ME Cable"], "Ink Sac"],
"tools": "Crafting Table"
}, {
"output": [[8, "ME Cable - Blue"]],
"input": [[8, "ME Cable"], "Lapis Lazuli"],
"tools": "Crafting Table"
}, {
"output": [[8, "ME Cable - Brown"]],
"input": [[8, "ME Cable"], "Cocoa Beans"],
"tools": "Crafting Table"
}, {
"output": [[8, "ME Cable - Green"]],
"input": [[8, "ME Cable"], "Cactus Green"],
"tools": "Crafting Table"
}, {
"output": [[8, "ME Cable - Green"]],
"input": [[8, "ME Cable"], "Cactus Green"],
"tools": "Crafting Table"
}, {
"output": [[8, "ME Cable - Red"]],
"input": [[8, "ME Cable"], "Rose Red"],
"tools": "Crafting Table"
}, {
"output": [[8, "ME Cable - White"]],
"input": [[8, "ME Cable"], "Bone Meal"],
"tools": "Crafting Table"
}, {
"output": [[8, "ME Cable - Yellow"]],
"input": [[8, "ME Cable"], "Dandelion Yellow"],
"tools": "Crafting Table"
}, {
"output": "ME Chest",
"input": [[5, "Iron Ingot"], [2, "Glass"], "Chest", "Conversion Matrix"],
"tools": "Crafting Table"
}, {
"output": "ME Condenser",
"input": [[4, "Glass"], [4, "Iron Ingot"], "Fluix Dust"],
"tools": "Crafting Table"
}, {
"output": "ME Controller",
"input": [[4, "Fluix Crystal"], [4, "Iron Ingot"], "ME Advanced Processor"],
"tools": "Crafting Table"
}, {
"output": "ME Covered Cable",
"input": ["ME Cable", "Wool"],
"tools": "Crafting Table"
}, {
"output": "ME Crafting CPU",
"input": [[4, "Iron Ingot"], [2, "Certus Quartz"], [2, "Glowstone Dust"], "ME Advanced Processor"],
"tools": "Crafting Table"
}, {
"output": "ME Crafting Monitor",
"input": [[4, "Iron Ingot"], [3, "Glass"], "ME Basic Processor", "ME Cable"],
"tools": "Crafting Table"
}, {
"output": "ME Crafting Terminal",
"input": [[4, "Iron Ingot"], [2, "Glass"], "Crafting Table", "ME Access Terminal", "Storage Cell"],
"tools": "Crafting Table"
}, {
"output": "ME Dark Cable",
"input": [[2, "ME Cable"], [2, "Redstone"], "Lever"],
"tools": "Crafting Table"
}, {
"output": "ME Drive",
"input": [[4, "Iron Ingot"], [2, "Glass"], [2, "ME Basic Processor"], "Chest"],
"tools": "Crafting Table"
}, {
"output": "ME Fuzzy Export Bus",
"input": ["ME Advanced Processor", "ME Basic Export Bus"],
"tools": "Crafting Table"
}, {
"output": "ME Fuzzy Import Bus",
"input": ["ME Advanced Processor", "ME Basic Import Bus"],
"tools": "Crafting Table"
}, {
"output": "ME Fuzzy Storage Bus",
"input": [[4, "Wool"], "ME Storage Bus"],
"tools": "Crafting Table"
}, {
"output": "ME Heat Vent",
"input": [[4, "Iron Bars"], [4, "Iron Ingot"], "ME Cable"],
"tools": "Crafting Table"
}, {
"output": "ME IO Port",
"input": [[3, "Glass"], [2, "Iron Ingot"], [2, "ME Drive"], "ME Basic Processor", "ME Cable"],
"tools": "Crafting Table"
}, {
"output": "ME Interface",
"input": [[4, "Iron Ingot"], [3, "Glass"], "Conversion Matrix", "ME Cable"],
"tools": "Craftin Table"
}, {
"output": "ME Level Emitter",
"input": [[2, "Iron Ingot"], "ME Basic Processor", "ME Cable", "Redstone Torch"],
"tools": "Crafting Table"
}, {
"output": "ME Partition Editor",
"input": [[5, "Iron Ingot"], [2, "Glass"], "Conversion Matrix", "Crafting Table"],
"tools": "Crafting Table"
}, {
"output": "ME Pattern Encoder",
"input": [[7, "Iron Ingot"], "Conversion Matrix", "Crafting Table"],
"tools": "Crafting Table"
}, {
"output": "ME Pattern Provider",
"input": [[4, "Iron Ingot"], [2, "Conversion Matrix"], "Crafting Table", "ME Advanced Processor", "Storage Cell"],
"tools": "Crafting Table"
}, {
"output": "ME Power Relay",
"input": [[4, "Iron Ingot"], [4, "ME Cable"], "Energy Cell"],
"tools": "Crafting Table"
}, {
"output": "ME Precision Export Bus",
"input": ["ME Basic Export Bus", "ME Basic Processor"],
"tools": "Crafting Table"
}, {
"output": "ME Precision Import Bus",
"input": ["ME Basic Import Bus", "ME Basic Processor"],
"tools": "Crafting Table"
}, {
"output": "ME Storage Bus",
"input": [[3, "Iron Ingot"], "ME Cable", "ME Interface"],
"tools": "Crafting Table"
}, {
"output": "ME Storage Monitor",
"input": [[4, "Iron Ingot"], [3, "Glass"], "ME Cable", "ME Level Emitter"],
"tools": "Crafting Table"
}, {
"output": "ME Transition Plane",
"input": [[4, "Iron Ingot"], [3, "Fluix Dust"], "Conversion Matrix", "ME Cable"],
"tools": "Crafting Table"
}, {
"output": "ME Wireless Access Point",
"input": [[4, "Iron Ingot"], [3, "Glass"], "ME Cable", "Wireless Receiver"],
"tools": "Crafting Table"
}, {
"output": "ME Wireless Access Terminal",
"input": ["Energy Cell", "ME Access Terminal", "Wireless Receiver"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Matter Ball", "output": "Matter Ball",
"input": [[256, "Cobblestone"]], "input": [[256, "Cobblestone"]],
"tools": "ME Condenser" "tools": "ME Condenser"
}, { }, {
"output": "Singularity", "output": "Matter Cannon",
"input": [[25600, "Cobblestone"]], "input": [[3, "Iron Ingot"], "Conversion Matrix", "Energy Cell", "Storage Segment"],
"tools": "ME Condenser" "tools": "Crafting Table"
}, { }, {
"output": "Ender Pearl Dust", "output": "Nether Quartz Dust",
"input": "Ender Pearl", "input": "Nether Quartz",
"tools": "Pulverizer" "tools": "Pulverizer"
}, {
"output": "Quantum Field Ring",
"input": [[4, "Iron Ingot"], [2, "ME Basic Processor"], "Energy Cell", "ME Advanced Processor", "ME Cable"],
"tools": "Crafting Table"
}, {
"output": "Quantum Link Chamber",
"input": [[4, "Fluix Pearl"], [4, "Quartz Glass"]],
"tools": "Crafting Table"
}, {
"output": "Quartz Cutting Knife",
"input": [[2, "Certus Quartz"], [2, "Stick"], "Iron Ingot"],
"tools": "Crafting Table"
}, {
"output": [[4, "Quartz Glass"]],
"input": [[5, "Certus Quartz Dust"], [4, "Glass"]],
"tools": "Crafting Table"
}, { }, {
"output": "Quartz Wrench", "output": "Quartz Wrench",
"input": [[5, "Certus Quartz"]], "input": [[5, "Certus Quartz"]],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "ME Wireless Access Terminal", "output": "Silicon",
"input": ["Wireless Receiver", "ME Access Terminal", "Energy Cell"], "input": "Certus Quartz Dust",
"tools": "Furnace"
}, {
"output": "Singularity",
"input": [[25600, "Cobblestone"]],
"tools": "ME Condenser"
}, {
"output": "Storage Block",
"input": [[4, "Glowstone"], [3, "Storage Segment"], "Glass", "ME Advanced Processor"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Matter Cannon", "output": "Storage Cell",
"input": [[3, "Iron Ingot"], "Conversion Matrix", "Storage Segment", "Energy Cell"], "input": [[4, "Certus Quartz"], [4, "Redstone"], "ME Basic Processor"],
"tools": "Crafting Table"
}, {
"output": "Storage Cluster",
"input": [[4, "Glowstone"], [3, "Storage Block"], "Glass", "ME Advanced Processor"],
"tools": "Crafting Table"
}, {
"output": "Storage Segment",
"input": [[4, "Redstone"], [3, "Storage Cell"], "Glass", "ME Basic Processor"],
"tools": "Crafting Table"
}, {
"output": "Tiny TNT",
"input": [[2, "Certus Quartz Dust"], [2, "Gunpowder"]]
}, {
"output": "Vibrant Quartz Glass",
"input": [[2, "Glowstone Dust"], "Quartz Glass"],
"tools": "Crafting Table"
}, {
"output": "Vibration Catalyst",
"input": ["Energy Cell", "Iron Ingot", "Lava Bucket", "ME Conversion Matrix"],
"tools": "Crafting Table"
}, {
"output": "Wireless Booster",
"input": [[2, "Iron Ingot"], "Certus Quartz", "Redstone"],
"tools": "Crafting Table"
}, {
"output": "Wireless Receiver",
"input": [[3, "Iron Ingot"], "Fluix Pearl", "Stick"],
"tools": "Crafting Table"
}, {
"output": "Wooden Crank",
"input": [[5, "Stick"]],
"tools": "Crafting Table" "tools": "Crafting Table"
} }
] ]
+33 -34
View File
@@ -6,7 +6,7 @@
"recipes": [ "recipes": [
{ {
"output": "Advanced Crafting Table", "output": "Advanced Crafting Table",
"input": [[6, "Obsidian"], "Crafting Table", "Chest", "Redstone Chipset"], "input": [[6, "Obsidian"], "Chest", "Crafting Table", "Redstone Chipset"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Assembly Table", "output": "Assembly Table",
@@ -22,18 +22,18 @@
"tools": ["Assembly Table", "Laser"] "tools": ["Assembly Table", "Laser"]
}, { }, {
"output": [[8, "Blue Pipe Wire"]], "output": [[8, "Blue Pipe Wire"]],
"input": ["Iron Ingot", "Redstone", "Lapis Lazuli"], "input": ["Iron Ingot", "Lapis Lazuli", "Redstone"],
"tools": ["Assembly Table", "Laser"] "tools": ["Assembly Table", "Laser"]
}, { }, {
"output": "Chute", "output": "Chute",
"input": [[5, "Iron Ingot"], "Cobblestone Gear", "Chest"], "input": [[5, "Iron Ingot"], "Chest", "Cobblestone Gear"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Cobblestone Conductive Pipe", "output": "Cobblestone Conductive Pipe",
"input": ["Cobblestone Pipe", "Redstone"] "input": ["Cobblestone Pipe", "Redstone"]
}, { }, {
"output": "Cobblestone Gear", "output": "Cobblestone Gear",
"input": ["Wooden Gear", [4, "Cobblestone"]], "input": [[4, "Cobblestone"], "Wooden Gear"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": [[8, "Cobblestone Pipe"]], "output": [[8, "Cobblestone Pipe"]],
@@ -48,27 +48,27 @@
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Diamond AND Gate", "output": "Diamond AND Gate",
"input": ["Diamond Chipset", "Red Pipe Wire", "Blue Pipe Wire", "Yellow Pipe Wire", "Green Pipe Wire"], "input": ["Blue Pipe Wire", "Diamond Chipset", "Green Pipe Wire", "Red Pipe Wire", "Yellow Pipe Wire"],
"tools": ["Assembly Table", "Laser"] "tools": ["Assembly Table", "Laser"]
}, { }, {
"output": "Diamond Chipset", "output": "Diamond Chipset",
"input": ["Redstone", "Diamond"], "input": ["Diamond", "Redstone"],
"tools": ["Assembly Table", "Laser"] "tools": ["Assembly Table", "Laser"]
}, {
"output": [[8, "Diamond Pipe"]],
"input": [[2, "Diamond"], "Glass"],
"tools": "Crafting Table"
}, { }, {
"output": "Diamond Conductive Pipe", "output": "Diamond Conductive Pipe",
"input": ["Diamond Pipe", "Redstone"] "input": ["Diamond Pipe", "Redstone"]
}, { }, {
"output": "Diamond Gear", "output": "Diamond Gear",
"input": ["Gold Gear", [4, "Diamond"]], "input": [[4, "Diamond"], "Gold Gear"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Diamond OR Gate", "output": "Diamond OR Gate",
"input": ["Diamond Chipset", "Red Pipe Wire", "Blue Pipe Wire", "Yellow Pipe Wire", "Green Pipe Wire"], "input": ["Blue Pipe Wire", "Diamond Chipset", "Green Pipe Wire", "Red Pipe Wire", "Yellow Pipe Wire"],
"tools": ["Assembly Table", "Laser"] "tools": ["Assembly Table", "Laser"]
}, {
"output": [[8, "Diamond Pipe"]],
"input": [[2, "Diamond"], "Glass"],
"tools": "Crafting Table"
}, { }, {
"output": [[8, "Emerald Pipe"]], "output": [[8, "Emerald Pipe"]],
"input": [[2, "Emerald"], "Glass"], "input": [[2, "Emerald"], "Glass"],
@@ -82,26 +82,26 @@
"tools": ["Assembly Table", "Laser"] "tools": ["Assembly Table", "Laser"]
}, { }, {
"output": "Filler", "output": "Filler",
"input": [[2, "Dandelion Yellow"], [2, "Ink Sac"], "Landmark", "Chest", "Crafting Table", [2, "Gold Gear"]], "input": [[2, "Dandelion Yellow"], [2, "Gold Gear"], [2, "Ink Sac"], "Chest", "Crafting Table", "Landmark"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Gold AND Gate", "output": "Gold AND Gate",
"input": ["Gold Chipset", "Red Pipe Wire", "Blue Pipe Wire"], "input": ["Blue Pipe Wire", "Gold Chipset", "Red Pipe Wire"],
"tools": ["Assembly Table", "Laser"] "tools": ["Assembly Table", "Laser"]
}, { }, {
"output": "Gold Chipset", "output": "Gold Chipset",
"input": ["Redstone", "Gold Ingot"], "input": ["Gold Ingot", "Redstone"],
"tools": ["Assembly Table", "Laser"] "tools": ["Assembly Table", "Laser"]
}, { }, {
"output": "Gold Conductive Pipe", "output": "Gold Conductive Pipe",
"input": ["Gold Pipe", "Redstone"] "input": ["Gold Pipe", "Redstone"]
}, { }, {
"output": "Gold Gear", "output": "Gold Gear",
"input": ["Iron Gear", [4, "Gold Ingot"]], "input": [[4, "Gold Ingot"], "Iron Gear"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Gold OR Gate", "output": "Gold OR Gate",
"input": ["Gold Chipset", "Red Pipe Wire", "Blue Pipe Wire"], "input": ["Blue Pipe Wire", "Gold Chipset", "Red Pipe Wire"],
"tools": ["Assembly Table", "Laser"] "tools": ["Assembly Table", "Laser"]
}, { }, {
"output": [[8, "Gold Pipe"]], "output": [[8, "Gold Pipe"]],
@@ -112,7 +112,7 @@
"input": ["Gold Pipe", "Pipe Waterproof"] "input": ["Gold Pipe", "Pipe Waterproof"]
}, { }, {
"output": [[8, "Green Pipe Wire"]], "output": [[8, "Green Pipe Wire"]],
"input": ["Iron Ingot", "Redstone", "Cactus Green"], "input": ["Cactus Green", "Iron Ingot", "Redstone"],
"tools": ["Assembly Table", "Laser"] "tools": ["Assembly Table", "Laser"]
}, { }, {
"output": "Iron AND Gate", "output": "Iron AND Gate",
@@ -120,11 +120,11 @@
"tools": ["Assembly Table", "Laser"] "tools": ["Assembly Table", "Laser"]
}, { }, {
"output": "Iron Chipset", "output": "Iron Chipset",
"input": ["Redstone", "Iron Ingot"], "input": ["Iron Ingot", "Redstone"],
"tools": ["Assembly Table", "Laser"] "tools": ["Assembly Table", "Laser"]
}, { }, {
"output": "Iron Gear", "output": "Iron Gear",
"input": ["Cobblestone Gear", [4, "Iron Ingot"]], "input": [[4, "Iron Ingot"], "Cobblestone Gear"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Iron OR Gate", "output": "Iron OR Gate",
@@ -139,7 +139,7 @@
"input": ["Iron Pipe", "Pipe Waterproof"] "input": ["Iron Pipe", "Pipe Waterproof"]
}, { }, {
"output": "Landmark", "output": "Landmark",
"input": ["Redstone Torch", "Lapis Lazuli"], "input": ["Lapis Lazuli", "Redstone Torch"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Laser", "output": "Laser",
@@ -161,7 +161,7 @@
"input": ["Mining Well", "Tank"] "input": ["Mining Well", "Tank"]
}, { }, {
"output": "Quarry", "output": "Quarry",
"input": [[3, "Iron Gear"], [2, "Gold Gear"], [2, "Diamond Gear"], "Diamond Pickaxe", "Redstone"], "input": [[3, "Iron Gear"], [2, "Diamond Gear"], [2, "Gold Gear"], "Diamond Pickaxe", "Redstone"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": [[8, "Red Pipe Wire"]], "output": [[8, "Red Pipe Wire"]],
@@ -185,25 +185,24 @@
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Sandstone Waterproof Pipe", "output": "Sandstone Waterproof Pipe",
"input": ["Sandstone Pipe", "Pipe Waterproof"] "input": ["Pipe Waterproof", "Sandstone Pipe"]
}, { }, {
"output": "Stirling Engine", "output": "Stirling Engine",
"input": [[3, "Cobblestone"], [2, "Cobblestone Gear"], "Glass", "Piston"], "input": [[3, "Cobblestone"], [2, "Cobblestone Gear"], "Glass", "Piston"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Stone Conductive Pipe", "output": "Stone Conductive Pipe",
"input": ["Stone Pipe", "Redstone"], "input": ["Redstone", "Stone Pipe"]
"tools": []
}, { }, {
"output": [[8, "Stone Pipe"]], "output": [[8, "Stone Pipe"]],
"input": [[2, "Stone"], "Glass"], "input": [[2, "Stone"], "Glass"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Stone Waterproof Pipe", "output": "Stone Waterproof Pipe",
"input": ["Stone Pipe", "Pipe Waterproof"] "input": ["Pipe Waterproof", "Stone Pipe"]
}, { }, {
"output": [[8, "Stripe Pipe"]], "output": [[8, "Stripe Pipe"]],
"input": ["Ink Sac", "Glass", "Dandelion Yellow"], "input": ["Dandelion Yellow", "Glass", "Ink Sac"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Structure Pipe", "output": "Structure Pipe",
@@ -212,9 +211,13 @@
"output": "Tank", "output": "Tank",
"input": [[8, "Glass"]], "input": [[8, "Glass"]],
"tools": "Crafting Table" "tools": "Crafting Table"
}, {
"output": [[8, "Void Pipe"]],
"input": ["Glass", "Ink Sac", "Redstone"],
"tools": "Crafting Table"
}, { }, {
"output": "Wooden Conductive Pipe", "output": "Wooden Conductive Pipe",
"input": ["Wooden Pipe", "Redstone"] "input": ["Redstone", "Wooden Pipe"]
}, { }, {
"output": "Wooden Gear", "output": "Wooden Gear",
"input": [[4, "Stick"]], "input": [[4, "Stick"]],
@@ -225,18 +228,14 @@
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Wooden Waterproof Pipe", "output": "Wooden Waterproof Pipe",
"input": ["Wooden Pipe", "Pipe Waterproof"] "input": ["Pipe Waterproof", "Wooden Pipe"]
}, { }, {
"output": "Wrench (buildcraft)", "output": "Wrench (buildcraft)",
"input": [[3, "Iron Ingot"], "Cobblestone Gear"], "input": [[3, "Iron Ingot"], "Cobblestone Gear"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, {
"output": [[8, "Void Pipe"]],
"input": ["Ink Sac", "Glass", "Redstone"],
"tools": "Crafting Table"
}, { }, {
"output": [[8, "Yellow Pipe Wire"]], "output": [[8, "Yellow Pipe Wire"]],
"input": ["Iron Ingot", "Redstone", "Dandelion Yellow"], "input": ["Dandelion Yellow", "Iron Ingot", "Redstone"],
"tools": ["Assembly Table", "Laser"] "tools": ["Assembly Table", "Laser"]
} }
] ]
+41 -41
View File
@@ -5,12 +5,44 @@
"description": "Crafting recipes from GraviSuite, by flotschi301", "description": "Crafting recipes from GraviSuite, by flotschi301",
"recipes": [ "recipes": [
{ {
"output": "GraviChestPlate", "output": "Advanced Chainsaw",
"input": ["Quantum Bodyarmor", "HV Transformer", "Ultimate Lappack", [2, "Gravitation Engine"], [4, "Superconductor"]], "input": [[3, "Overclocker Upgrade"], [2, "Advanced Circuit"], "Chainsaw", "Diamond"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Ultimate Lappack", "output": "Advanced Diamond Drill",
"input": [[6, "Lapotron Crystal"], "Iridium Plate", "LapPack", "Superconductor"], "input": [[3, "Overclocker Upgrade"], [2, "Advanced Circuit"], "Diamond Drill"],
"tools": "Crafting Table"
}, {
"output": "Advanced Electric Jetpack",
"input": [[2, "Carbon Plate"], [2, "Engine Booster"], [2, "Glass Fiber Cable"], "Advanced Circuit", "Advanced Lappack", "Electric Jetpack"],
"tools": "Crafting Table"
}, {
"output": "Advanced Lappack",
"input": ["Advanced Circuit", "LapPack", "Lapotron Crystal"],
"tools": "Crafting Table"
}, {
"output": "Cooling Core",
"input": [[4, "60K Cooling Cell"], [2, "Advanced Heat Exchanger"], [2, "Heat-Capacity Reactor Plating"], "Iridium Plate"],
"tools": "Crafting Table"
}, {
"output": "Engine Booster",
"input": [[3, "Advanced Alloy"], [2, "Advanced Circuit"], [2, "Glowstone"], "Advanced Heat Vent", "Overclocker Upgrade"],
"tools": "Crafting Table"
}, {
"output": "GraviChestPlate",
"input": [[4, "Superconductor"], [2, "Gravitation Engine"], "HV Transformer", "Quantum Bodyarmor", "Ultimate Lappack"],
"tools": "Crafting Table"
}, {
"output": "GraviTool",
"input": [[2, "Advanced Alloy"], [2, "Carbon Plate"], "Advanced Circuit", "Electric Hoe", "Electric Treetap", "Electric Wrench", "Energy Crystal"],
"tools": "Crafting Table"
}, {
"output": "Gravitation Engine",
"input": [[4, "Tesla Coil"], [2, "Cooling Core"], [2, "Superconductor"], "HV Transformer"],
"tools": "Crafting Table"
}, {
"output": "Magnetron",
"input": [[4, "Copper Ingot"], [4, "Refined Iron"], "Superconductor"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": [[3, "Superconductor"]], "output": [[3, "Superconductor"]],
@@ -21,48 +53,16 @@
"input": [[4, "Advanced Alloy"], [3, "Carbon Plate"], [2, "Iridium Plate"]], "input": [[4, "Advanced Alloy"], [3, "Carbon Plate"], [2, "Iridium Plate"]],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Gravitation Engine", "output": "Ultimate Lappack",
"input": [[4, "Tesla Coil"], [2, "Superconductor"], [2, "Cooling Core"], "HV Transformer"], "input": [[6, "Lapotron Crystal"], "Iridium Plate", "LapPack", "Superconductor"],
"tools": "Crafting Table"
}, {
"output": "Cooling Core",
"input": [[4, "60K Cooling Cell"], [2, "Advanced Heat Exchanger"], [2, "Heat-Capacity Reactor Plating"], "Iridium Plate"],
"tools": "Crafting Table"
}, {
"output": "Advanced Chainsaw",
"input": ["Diamond", [3, "Overclocker Upgrade"], "Chainsaw", [2, "Advanced Circuit"]],
"tools": "Crafting Table"
}, {
"output": "Advanced Diamond Drill",
"input": ["Diamond Drill", [3, "Overclocker Upgrade"], [2, "Advanced Circuit"]],
"tools": "Crafting Table"
}, {
"output": "Advanced Electric Jetpack",
"input": [[2, "Carbon Plate"], [2, "Engine Booster"], [2, "Glass Fiber Cable"], "Electric Jetpack", "Advanced Lappack", "Advanced Circuit"],
"tools": "Crafting Table"
}, {
"output": "Advanced Lappack",
"input": ["LapPack", "Advanced Circuit", "Lapotron Crystal"],
"tools": "Crafting Table"
}, {
"output": "GraviTool",
"input": [[2, "Carbon Plate"], [2, "Advanced Alloy"], "Advanced Circuit", "Electric Wrench", "Electric Treetap", "Electric Hoe", "Energy Crystal"],
"tools": "Crafting Table"
}, {
"output": "Magnetron",
"input": [[4, "Refined Iron"], [4, "Copper Ingot"], "Superconductor"],
"tools": "Crafting Table"
}, {
"output": "Varja Core",
"input": ["Magnetron", "Tesla Coil", "HV Transformer", [2, "Iridium Plate"], [2, "Superconductor"]],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Vajra", "output": "Vajra",
"input": [[2, "Refined Iron"], "Energy Crystal", "Varja Core", "Carbon Plate", [2, "Advanced Alloy"], "Lapotron Crystal", "Iron Ingot"], "input": [[2, "Advanced Alloy"], [2, "Refined Iron"], "Carbon Plate", "Energy Crystal", "Iron Ingot", "Lapotron Crystal", "Varja Core"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Engine Booster", "output": "Varja Core",
"input": [[2, "Glowstone"], [2, "Advanced Circuit"], [3, "Advanced Alloy"], "Overclocker Upgrade", "Advanced Heat Vent"], "input": [[2, "Iridium Plate"], [2, "Superconductor"], "HV Transformer", "Magnetron", "Tesla Coil"],
"tools": "Crafting Table" "tools": "Crafting Table"
} }
] ]
File diff suppressed because it is too large Load Diff
+859 -64
View File
File diff suppressed because it is too large Load Diff
+68 -68
View File
@@ -9,117 +9,117 @@
"input": "Gravel", "input": "Gravel",
"tools": "Furnace" "tools": "Furnace"
}, { }, {
"output": "Healer", "output": "Chisel",
"input": [[2, "Essence of Life"], "Essence of Earth", "Essence of Fire", "Essence of Water", "Essence of Air", [3, "Red Dye"]], "input": ["Iron Ingot", "Stick"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Crying Obsidian", "output": "Crying Obsidian",
"input": ["Obsidian", "Water Bucket"], "input": ["Obsidian", "Water Bucket"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Lava Cobblestone", "output": "Crystal Ball",
"input": ["Cobblestone", "Lava Bucket"], "input": [[4, "Crystal Gem"]],
"tools": "Crafting Table"
}, {
"output": "Lava Obsidian",
"input": ["Obsidian", "Lava Bucket"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Crystal Block", "output": "Crystal Block",
"input": [[9, "Crystal Gem"]], "input": [[9, "Crystal Gem"]],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Einsteinium Bomb", "output": "Crystal Gem",
"input": [[8, "Iron Ingot"], "Einsteinium Ingot"], "input": "Crystal Block",
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Neptunium Bomb", "output": "Crystal Gem",
"input": [[8, "Iron Ingot"], "Neptunium Ingot"], "input": [[7, "Crystal Nugget"]],
"tools": "Crafting Table"
}, {
"output": "Uranium Bomb",
"input": [[8, "Iron Ingot"], "Uranium Ingot"],
"tools": "Crafting Table"
}, {
"output": "Ultimate Nuker",
"input": [[3, "Iron Ingot"], "Einsteinium Ingot", "Neptunium", "Uranium Ingot", "Explosive Charge"],
"tools": "Crafting Table"
}, {
"output": "Einsteinium Ingot",
"input": "Einsteinium Ore",
"tools": "Furnace"
}, {
"output": "Neptunium Ingot",
"input": "Neptunium Ore",
"tools": "Furnace"
}, {
"output": "Uranium Ingot",
"input": "Uranium Ore",
"tools": "Furnace"
}, {
"output": "Crystal Piece",
"input": [[7, "Crystal Dust"]],
"tools": "Crafting Table"
}, {
"output": "Crystal Piece",
"input": "Crystal Nugget",
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Crystal Nugget", "output": "Crystal Nugget",
"input": [[5, "Crystal Piece"]], "input": [[5, "Crystal Piece"]],
"tools": "Crafting Table" "tools": "Crafting Table"
}, {
"output": "Crystal Piece",
"input": "Crystal Nugget",
"tools": "Crafting Table"
}, { }, {
"output": "Crystal Piece", "output": "Crystal Piece",
"input": "Crystal Gem", "input": "Crystal Gem",
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Crystal Gem", "output": "Crystal Piece",
"input": [[7, "Crystal Nugget"]], "input": [[7, "Crystal Dust"]],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Crystal Gem", "output": "Einsteinium Bomb",
"input": "Crystal Block", "input": [[8, "Iron Ingot"], "Einsteinium Ingot"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Stone Brick", "output": "Einsteinium Ingot",
"input": "Stone", "input": "Einsteinium Ore",
"tools": "Crafting Table"
}, {
"output": "Crystal Ball",
"input": [[4, "Crystal Gem"]],
"tools": "Crafting Table"
}, {
"output": "Hard Crystal Ball",
"input": "Crystal Ball",
"tools": "Furnace" "tools": "Furnace"
}, { }, {
"output": "Essence of Life", "output": "Essence of Air",
"input": ["Flower", "Hard Crystal Ball"], "input": "Hard Crystal Ball",
"tools": "Crafting Table"
}, {
"output": "Essence of Fire",
"input": ["Lava Bucket", "Hard Crystal Ball"],
"tools": "Crafting Table"
}, {
"output": "Essence of Water",
"input": ["Water Bucket", "Hard Crystal Ball"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Essence of Earth", "output": "Essence of Earth",
"input": ["Dirt", "Hard Crystal Ball"], "input": ["Dirt", "Hard Crystal Ball"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Essence of Air", "output": "Essence of Fire",
"input": "Hard Crystal Ball", "input": ["Hard Crystal Ball", "Lava Bucket"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, {
"output": "Essence of Life",
"input": ["Flower", "Hard Crystal Ball"],
"tools": "Crafting Table"
}, {
"output": "Essence of Water",
"input": ["Hard Crystal Ball", "Water Bucket"],
"tools": "Crafting Table"
}, {
"output": "Hard Crystal Ball",
"input": "Crystal Ball",
"tools": "Furnace"
}, {
"output": "Healer",
"input": [[3, "Red Dye"], [2, "Essence of Life"], "Essence of Air", "Essence of Earth", "Essence of Fire", "Essence of Water"],
"tools": "Crafting Table"
}, {
"output": "Lava Cobblestone",
"input": ["Cobblestone", "Lava Bucket"],
"tools": "Crafting Table"
}, {
"output": "Lava Obsidian",
"input": ["Lava Bucket", "Obsidian"],
"tools": "Crafting Table"
}, {
"output": "Neptunium Bomb",
"input": [[8, "Iron Ingot"], "Neptunium Ingot"],
"tools": "Crafting Table"
}, {
"output": "Neptunium Ingot",
"input": "Neptunium Ore",
"tools": "Furnace"
}, { }, {
"output": "Popcorn", "output": "Popcorn",
"input": "Corn Seeds", "input": "Corn Seeds",
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Chisel", "output": "Stone Brick",
"input": ["Iron Ingot", "Stick"], "input": "Stone",
"tools": "Crafting Table" "tools": "Crafting Table"
}, {
"output": "Ultimate Nuker",
"input": [[3, "Iron Ingot"], "Einsteinium Ingot", "Explosive Charge", "Neptunium", "Uranium Ingot"],
"tools": "Crafting Table"
}, {
"output": "Uranium Bomb",
"input": [[8, "Iron Ingot"], "Uranium Ingot"],
"tools": "Crafting Table"
}, {
"output": "Uranium Ingot",
"input": "Uranium Ore",
"tools": "Furnace"
} }
] ]
} }
+23 -23
View File
@@ -6,11 +6,11 @@
"recipes": [ "recipes": [
{ {
"output": "Aqueous Accumulator", "output": "Aqueous Accumulator",
"input": ["Bucket", [2, "Glass"], "Machine Frame", "Pneumatic Servo", [2, "Tin Ingot"]], "input": [[2, "Glass"], [2, "Tin Ingot"], "Bucket", "Machine Frame", "Pneumatic Servo"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Copper Gear", "output": "Copper Gear",
"input": ["Cobblestone Gear", [4, "Copper Ingot"]], "input": [[4, "Copper Ingot"], "Cobblestone Gear"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Crescent Hammer", "output": "Crescent Hammer",
@@ -18,7 +18,7 @@
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Cyclic Assembler", "output": "Cyclic Assembler",
"input": ["Chest", [2, "Copper Ingot"], "Machine Frame", "Redstone Reception Coil", [2, "Tin Gear"]], "input": [[2, "Copper Ingot"], [2, "Tin Gear"], "Chest", "Machine Frame", "Redstone Reception Coil"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Electrum Blend", "output": "Electrum Blend",
@@ -29,7 +29,7 @@
"tools": "Furnace" "tools": "Furnace"
}, { }, {
"output": "Energetic Infuser", "output": "Energetic Infuser",
"input": [[2, "Copper Ingot"], "Machine Frame", "Redstone Reception Coil", [2, "Redstone Transmission Coil"], "Shiny Ingot"], "input": [[2, "Copper Ingot"], [2, "Redstone Transmission Coil"], "Machine Frame", "Redstone Reception Coil", "Shiny Ingot"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": [[250, "Energized Glowstone"]], "output": [[250, "Energized Glowstone"]],
@@ -37,11 +37,11 @@
"tools": "Magma Crucible" "tools": "Magma Crucible"
}, { }, {
"output": "Energy Cell Frame (Empty)", "output": "Energy Cell Frame (Empty)",
"input": ["Diamond", [4, "Electrum Ingot"], [4, "Hardened Glass"]], "input": [[4, "Electrum Ingot"], [4, "Hardened Glass"], "Diamond"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Energy Cell Frame (Full)", "output": "Energy Cell Frame (Full)",
"input": ["Energy Cell Frame (Empty)", [1000, "Molten Redstone"]], "input": [[1000, "Molten Redstone"], "Energy Cell Frame (Empty)"],
"tools": "Liquid Transposer" "tools": "Liquid Transposer"
}, { }, {
"output": [[4, "Energy Conduit (Empty)"]], "output": [[4, "Energy Conduit (Empty)"]],
@@ -49,11 +49,11 @@
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Energy Tesseract", "output": "Energy Tesseract",
"input": ["Electrum Ingot", [2, "Lead Ingot"], "Redstone Conductance Coil", [2, "Tin Ingot"], "Unattuned Tesseract"], "input": [[2, "Lead Ingot"], [2, "Tin Ingot"], "Electrum Ingot", "Redstone Conductance Coil", "Unattuned Tesseract"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Glacial Precipitator", "output": "Glacial Precipitator",
"input": [[2, "Copper Ingot"], "Machine Frame", "Piston", "Redstone Reception Coil", [2, "Snow (Block)"]], "input": [[2, "Copper Ingot"], [2, "Snow (Block)"], "Machine Frame", "Piston", "Redstone Reception Coil"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Glowstone Illuminator", "output": "Glowstone Illuminator",
@@ -61,11 +61,11 @@
"tools": "Liquid Transposer" "tools": "Liquid Transposer"
}, { }, {
"output": "Hardened Glass", "output": "Hardened Glass",
"input": ["Lead Ingot", [2, "Pulverized Obsidian"]], "input": [[2, "Pulverized Obsidian"], "Lead Ingot"],
"tools": "Induction Smelter" "tools": "Induction Smelter"
}, { }, {
"output": "Igneous Extruder", "output": "Igneous Extruder",
"input": [[2, "Glass"], "Machine Frame", "Piston", "Pneumatic Servo", [2, "Tin Ingot"]], "input": [[2, "Glass"], [2, "Tin Ingot"], "Machine Frame", "Piston", "Pneumatic Servo"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Illuminator Frame", "output": "Illuminator Frame",
@@ -73,7 +73,7 @@
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Induction Smelter", "output": "Induction Smelter",
"input": ["Bucket", [2, "Copper Ingot"], [2, "Invar Ingot"], "Machine Frame", "Redstone Reception Coil"], "input": [[2, "Copper Ingot"], [2, "Invar Ingot"], "Bucket", "Machine Frame", "Redstone Reception Coil"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": [[3, "Invar Blend"]], "output": [[3, "Invar Blend"]],
@@ -88,7 +88,7 @@
"tools": "Furnace" "tools": "Furnace"
}, { }, {
"output": "Item Tesseract", "output": "Item Tesseract",
"input": ["Pneumatic Servo", [2, "Silver Ingot"], [3, "Tin Ingot"], "Unattuned Tesseract"], "input": [[3, "Tin Ingot"], [2, "Silver Ingot"], "Pneumatic Servo", "Unattuned Tesseract"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Lead Ingot", "output": "Lead Ingot",
@@ -96,11 +96,11 @@
"tools": "Furnace" "tools": "Furnace"
}, { }, {
"output": "Liquid Tesseract", "output": "Liquid Tesseract",
"input": ["Copper Ingot", "Pneumatic Servo", [2, "Silver Ingot"], [2, "Tin Ingot"], "Unattuned Tesseract"], "input": [[2, "Silver Ingot"], [2, "Tin Ingot"], "Copper Ingot", "Pneumatic Servo", "Unattuned Tesseract"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Liquid Transposer", "output": "Liquid Transposer",
"input": ["Bucket", [2, "Copper Ingot"], [2, "Glass"], "Machine Frame", "Redstone Reception Coil"], "input": [[2, "Copper Ingot"], [2, "Glass"], "Bucket", "Machine Frame", "Redstone Reception Coil"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": [[4, "Liquiduct"]], "output": [[4, "Liquiduct"]],
@@ -108,15 +108,15 @@
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Machine Frame", "output": "Machine Frame",
"input": [[4, "Iron Ingot"], [4, "Glass"], "Gold Ingot"], "input": [[4, "Glass"], [4, "Iron Ingot"], "Gold Ingot"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Magma Crucible", "output": "Magma Crucible",
"input": ["Bucket", [2, "Copper Ingot"], "Machine Frame", [2, "Nether Brick (block)"], "Redstone Reception Coil"], "input": [[2, "Copper Ingot"], [2, "Nether Brick (block)"], "Bucket", "Machine Frame", "Redstone Reception Coil"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Magmatic Engine", "output": "Magmatic Engine",
"input": [[2, "Invar Gear"], [3, "Invar Ingot"], "Piston", "Redstone Transmission Coil"], "input": [[3, "Invar Ingot"], [2, "Invar Gear"], "Piston", "Redstone Transmission Coil"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": [[250, "Molten Ender"]], "output": [[250, "Molten Ender"]],
@@ -160,11 +160,11 @@
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Redstone Energy Cell", "output": "Redstone Energy Cell",
"input": [[3, "Electrum Ingot"], "Energy Cell Frame (Full)", [2, "Lead Ingot"], "Redstone Conductance Coil"], "input": [[3, "Electrum Ingot"], [2, "Lead Ingot"], "Energy Cell Frame (Full)", "Redstone Conductance Coil"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Redstone Energy Conduit", "output": "Redstone Energy Conduit",
"input": ["Energy Conduit (Empty)", [50, "Molten Redstone"]], "input": [[50, "Molten Redstone"], "Energy Conduit (Empty)"],
"tools": "Liquid Transposer" "tools": "Liquid Transposer"
}, { }, {
"output": "Redstone Reception Coil", "output": "Redstone Reception Coil",
@@ -176,11 +176,11 @@
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Sawmill", "output": "Sawmill",
"input": [[2, "Copper Ingot"], "Iron Axe", "Machine Frame", "Redstone Reception Coil", [2, "Oak Plank"]], "input": [[2, "Copper Ingot"], [2, "Oak Plank"], "Iron Axe", "Machine Frame", "Redstone Reception Coil"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Schematic", "output": "Schematic",
"input": ["Lapis Lazuli", [3, "Paper"]] "input": [[3, "Paper"], "Lapis Lazuli"]
}, { }, {
"output": "Shiny Dust", "output": "Shiny Dust",
"input": [[10, "Ferrous Ore"]], "input": [[10, "Ferrous Ore"]],
@@ -191,11 +191,11 @@
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Steam Engine", "output": "Steam Engine",
"input": [[2, "Copper Gear"], [3, "Copper Ingot"], "Piston", "Redstone Transmission Coil"], "input": [[3, "Copper Ingot"], [2, "Copper Gear"], "Piston", "Redstone Transmission Coil"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Tesseract Frame", "output": "Tesseract Frame",
"input": ["Diamond", [4, "Hardened Glass"], [4, "Tin Ingot"]], "input": [[4, "Hardened Glass"], [4, "Tin Ingot"], "Diamond"],
"tools": "Crafting Table" "tools": "Crafting Table"
}, { }, {
"output": "Tin Gear", "output": "Tin Gear",
+7 -4
View File
@@ -1,8 +1,8 @@
### ###
# Crafting Guide - constants.coffee Crafting Guide - constants.coffee
#
# Copyright (c) 2014 by Redwood Labs Copyright (c) 2014 by Redwood Labs
# All rights reserved. All rights reserved.
### ###
exports.DefaultBookUrls = DefaultBookUrls = [ exports.DefaultBookUrls = DefaultBookUrls = [
@@ -31,6 +31,9 @@ Event.load.failed = 'load:failed' # controller, error message
Event.load.finished = 'load:finished' # controller Event.load.finished = 'load:finished' # controller
Event.remove = 'remove' # collection, item... Event.remove = 'remove' # collection, item...
exports.Key = Key = {}
Key.Return = 13
exports.Opacity = Opacity = {} exports.Opacity = Opacity = {}
Opacity.hidden = 1e-6 Opacity.hidden = 1e-6
Opacity.shown = 1 Opacity.shown = 1
@@ -8,6 +8,7 @@
BaseController = require './base_controller' BaseController = require './base_controller'
{Event} = require '../constants' {Event} = require '../constants'
InventoryParser = require '../models/inventory_parser' InventoryParser = require '../models/inventory_parser'
{Key} = require '../constants'
url = require 'url' url = require 'url'
{UrlParam} = require '../constants' {UrlParam} = require '../constants'
@@ -52,6 +53,10 @@ module.exports = class CraftingTableController extends BaseController
return unless @rendered return unless @rendered
@$nameField.autocomplete 'search' @$nameField.autocomplete 'search'
onNameFieldKeyPress: (event)->
if event.which is Key.Return
@$nameField.autocomplete('close')
onQuantityFieldChanged: -> onQuantityFieldChanged: ->
return unless @rendered return unless @rendered
@model.quantity = parseInt @$quantityField.find(":selected").val() @model.quantity = parseInt @$quantityField.find(":selected").val()
@@ -102,6 +107,7 @@ module.exports = class CraftingTableController extends BaseController
'input textarea[name="have"]': 'onHaveFieldChanged' 'input textarea[name="have"]': 'onHaveFieldChanged'
'focus input[name="name"]': 'onNameFieldFocused' 'focus input[name="name"]': 'onNameFieldFocused'
'input input[name="name"]': 'onNameFieldChanged' 'input input[name="name"]': 'onNameFieldChanged'
'keypress input[name="name"]': 'onNameFieldKeyPress'
'input select[name="quantity"]': 'onQuantityFieldChanged' 'input select[name="quantity"]': 'onQuantityFieldChanged'
'change input[name="including_tools"]': 'onIncludingToolsFieldChanged' 'change input[name="including_tools"]': 'onIncludingToolsFieldChanged'
+4 -4
View File
@@ -1,8 +1,8 @@
### ###
# crafting_guide - base_model.coffee crafting_guide - base_model.coffee
#
# Copyright (c) 2014 by Redwood Labs Copyright (c) 2014 by Redwood Labs
# All rights reserved. All rights reserved.
### ###
######################################################################################################################## ########################################################################################################################
+16 -7
View File
@@ -19,12 +19,12 @@ module.exports = class CraftingPlan
# Public Methods ############################################################################### # Public Methods ###############################################################################
clear: -> clear: ->
@make = new Inventory @make = new Inventory
@need = new Inventory @need = new Inventory
@result = new Inventory @result = new Inventory
@steps = [] @steps = []
@_expected = new Inventory @_expected = new Inventory
@_pending = null @_pending = null
return this return this
@@ -49,15 +49,21 @@ module.exports = class CraftingPlan
_processPending: -> _processPending: ->
targetItem = @_pending.pop() targetItem = @_pending.pop()
return unless targetItem? return unless targetItem?
logger.debug "Processing targetItem: #{targetItem}"
return if @catalog.isRawMaterial targetItem.name
recipes = @catalog.gatherRecipes targetItem.name recipes = @catalog.gatherRecipes targetItem.name
return if not recipes.length > 0 return if not recipes.length > 0
recipe = recipes[0] recipe = recipes[0]
logger.debug "Using recipe: #{recipe}"
if @includingTools if @includingTools
for tool in recipe.tools for tool in recipe.tools
totalExpected = @result.quantityOf(tool.name) + @_expected.quantityOf(tool.name) totalExpected = @result.quantityOf(tool.name) + @_expected.quantityOf(tool.name)
if totalExpected < tool.quantity if totalExpected < tool.quantity
logger.debug "Need to build tool: #{tool}"
@_pending.add tool.name, tool.quantity @_pending.add tool.name, tool.quantity
@_expected.add tool.name, tool.quantity @_expected.add tool.name, tool.quantity
@@ -74,6 +80,7 @@ module.exports = class CraftingPlan
quantityAvailable = @result.quantityOf item.name quantityAvailable = @result.quantityOf item.name
quantityUsed = Math.min quantityAvailable, item.quantity quantityUsed = Math.min quantityAvailable, item.quantity
quantityNeeded = item.quantity - quantityUsed quantityNeeded = item.quantity - quantityUsed
logger.debug "processing input item: #{item}, a:#{quantityAvailable}, u:#{quantityUsed}, n:#{quantityNeeded}"
@result.remove item.name, quantityUsed @result.remove item.name, quantityUsed
@_pending.add item.name, quantityNeeded @_pending.add item.name, quantityNeeded
@@ -83,10 +90,12 @@ module.exports = class CraftingPlan
quantityMissing = @need.quantityOf item.name quantityMissing = @need.quantityOf item.name
quantityUsed = Math.min quantityMissing, item.quantity quantityUsed = Math.min quantityMissing, item.quantity
quantityLeft = item.quantity - quantityUsed quantityLeft = item.quantity - quantityUsed
logger.debug "processing output item: #{item}, m:#{quantityMissing}, u:#{quantityUsed}, l:#{quantityLeft}"
@make.add item.name, item.quantity
@need.remove item.name, quantityUsed @need.remove item.name, quantityUsed
@result.add item.name, quantityLeft @result.add item.name, quantityLeft
@make.add item.name, item.quantity
_totalQuantityOf: (name)-> _totalQuantityOf: (name)->
return @result.quantityOf(name) - @need.quantityOf(name) return @result.quantityOf(name) - @need.quantityOf(name)
+5 -5
View File
@@ -1,8 +1,8 @@
### ###
# Crafting Guide - item.coffee Crafting Guide - item.coffee
#
# Copyright (c) 2014 by Redwood Labs Copyright (c) 2014 by Redwood Labs
# All rights reserved. All rights reserved.
### ###
BaseModel = require './base_model' BaseModel = require './base_model'
@@ -45,7 +45,7 @@ module.exports = class Item extends BaseModel
extra -= @stackSize extra -= @stackSize
count += 1 count += 1
return count:count extra:extra return count:count, extra:extra
# Object Overrides ############################################################################# # Object Overrides #############################################################################
+9 -9
View File
@@ -1,8 +1,8 @@
### ###
# Crafting Guide - recipe.coffee Crafting Guide - recipe.coffee
#
# Copyright (c) 2014 by Redwood Labs Copyright (c) 2014 by Redwood Labs
# All rights reserved. All rights reserved.
### ###
BaseModel = require './base_model' BaseModel = require './base_model'
@@ -13,11 +13,11 @@ module.exports = class Recipe extends BaseModel
constructor: (attributes={}, options={})-> constructor: (attributes={}, options={})->
if not attributes.output? then throw new Error "attributes.output is required" if not attributes.output? then throw new Error "attributes.output is required"
if not attributes.input? then throw new Error "attributes.input is required" attributes.input ?= []
attributes.tools ?= [] attributes.tools ?= []
super attributes, options super attributes, options
Object.defineProperty this, 'name', get:-> @output[0].name Object.defineProperty @prototype, 'name', get:-> @output[0].name
# Public Methods ############################################################################### # Public Methods ###############################################################################
@@ -45,7 +45,7 @@ module.exports = class Recipe extends BaseModel
for inputItem in @input for inputItem in @input
if needsDelimiter then result.push ', ' if needsDelimiter then result.push ', '
result.push inputItem.toString() result.push inputItem.toString()
needsDelimiter = false needsDelimiter = true
result.push ']' result.push ']'
result.push ", output:[" result.push ", output:["
@@ -53,7 +53,7 @@ module.exports = class Recipe extends BaseModel
for outputItem in @output for outputItem in @output
if needsDelimiter then result.push ', ' if needsDelimiter then result.push ', '
result.push outputItem.toString() result.push outputItem.toString()
needsDelimiter = false needsDelimiter = true
result.push ']' result.push ']'
if @tools.length > 0 if @tools.length > 0
@@ -62,7 +62,7 @@ module.exports = class Recipe extends BaseModel
for tool in @tools for tool in @tools
if needsDelimiter then result.push ', ' if needsDelimiter then result.push ', '
result.push tool.toString() result.push tool.toString()
needsDelimiter = false needsDelimiter = true
result.push ']' result.push ']'
result.push '}' result.push '}'
+11 -7
View File
@@ -1,8 +1,8 @@
### ###
# Crafting Guide - recipe_book.coffee Crafting Guide - recipe_book.coffee
#
# Copyright (c) 2014 by Redwood Labs Copyright (c) 2014 by Redwood Labs
# All rights reserved. All rights reserved.
### ###
BaseModel = require './base_model' BaseModel = require './base_model'
@@ -16,9 +16,10 @@ module.exports = class RecipeBook extends BaseModel
if _.isEmpty(attributes.modName) then throw new Error 'modName cannot be empty' if _.isEmpty(attributes.modName) then throw new Error 'modName cannot be empty'
if _.isEmpty(attributes.modVersion) then throw new Error 'modVersion cannot be empty' if _.isEmpty(attributes.modVersion) then throw new Error 'modVersion cannot be empty'
attributes.description ?= '' attributes.description ?= ''
attributes.recipes ?= [] attributes.rawMaterials ?= []
attributes.enabled ?= attributes.modName in RequiredMods attributes.recipes ?= []
attributes.enabled ?= attributes.modName in RequiredMods
super attributes, options super attributes, options
# Public Methods ############################################################################### # Public Methods ###############################################################################
@@ -37,6 +38,9 @@ module.exports = class RecipeBook extends BaseModel
return result return result
isRawMaterial: (name)->
return name in @rawMaterials
hasRecipe: (name)-> hasRecipe: (name)->
for recipe in @recipes for recipe in @recipes
return true if recipe.name is name return true if recipe.name is name
+121 -11
View File
@@ -1,8 +1,8 @@
### ###
# Crafting Guide - recipe_book_parser.coffee Crafting Guide - recipe_book_parser.coffee
#
# Copyright (c) 2014 by Redwood Labs Copyright (c) 2014 by Redwood Labs
# All rights reserved. All rights reserved.
### ###
Item = require './item' Item = require './item'
@@ -13,6 +13,8 @@ RecipeBook = require './recipe_book'
module.exports = class RecipeBookParser module.exports = class RecipeBookParser
@CURRENT_VERSION = '1'
constructor: -> constructor: ->
@_parsers = @_parsers =
'1': new V1 '1': new V1
@@ -22,11 +24,18 @@ module.exports = class RecipeBookParser
if not data.version? then throw new Error 'version is required' if not data.version? then throw new Error 'version is required'
parser = @_parsers["#{data.version}"] parser = @_parsers["#{data.version}"]
if not parser? if not parser? then throw new Error "cannot parse version #{data.version} recipe books"
throw new Error "cannot parse version #{data.version} recipe books"
return parser.parse data return parser.parse data
unparse: (recipeBook, version=RecipeBookParser.CURRENT_VERSION)->
if not recipeBook? then throw new Error 'recipe book is required'
parser = @_parsers["#{version}"]
if not parser? then throw new Error "version #{version} is not supported"
return parser.unparse recipeBook
######################################################################################################################## ########################################################################################################################
module.exports.V1 = class V1 module.exports.V1 = class V1
@@ -37,6 +46,9 @@ module.exports.V1 = class V1
parse: (data)-> parse: (data)->
return @_parseRecipeBook data return @_parseRecipeBook data
unparse: (recipeBook)->
return @_unparseRecipeBook recipeBook
# Private Methods ############################################################################## # Private Methods ##############################################################################
_parseRecipeBook: (data)-> _parseRecipeBook: (data)->
@@ -49,24 +61,28 @@ module.exports.V1 = class V1
book = new RecipeBook version:data.version, modName:data.mod_name, modVersion:data.mod_version book = new RecipeBook version:data.version, modName:data.mod_name, modVersion:data.mod_version
book.description = data.description or '' book.description = data.description or ''
book.rawMaterials = data.raw_materials or []
for index in [0...data.recipes.length] for index in [0...data.recipes.length]
@_errorLocation = "recipe #{index + 1}" @_errorLocation = "recipe #{index + 1}"
recipeData = data.recipes[index] recipeData = data.recipes[index]
book.recipes.push @_parseRecipe recipeData recipe = @_parseRecipe recipeData
recipe._originalIndex = index
book.recipes.push recipe
return book return book
_parseRecipe: (data, options={})-> _parseRecipe: (data, options={})->
if not data? then throw new Error "recipe data is missing for #{@_errorLocation}" if not data? then throw new Error "recipe data is missing for #{@_errorLocation}"
if not data.output? then throw new Error "#{@_errorLocation} is missing output" if not data.output? then throw new Error "#{@_errorLocation} is missing output"
if not data.input? then throw new Error "#{@_errorLocation} is missing input"
output = @_parseItemList data.output, field:'output', canBeEmpty:false output = @_parseItemList data.output, field:'output', canBeEmpty:false
@_errorLocation = "recipe for output[0].name" @_errorLocation = "recipe for #{output[0].name}"
data.input ?= []
data.tools ?= [] data.tools ?= []
input = @_parseItemList data.input, field:'input', canBeEmpty:false input = @_parseItemList data.input, field:'input', canBeEmpty:true
tools = @_parseItemList data.tools, field:'tools', canBeEmpty:true tools = @_parseItemList data.tools, field:'tools', canBeEmpty:true
return new Recipe input:input, output:output, tools:tools return new Recipe input:input, output:output, tools:tools
@@ -96,3 +112,97 @@ module.exports.V1 = class V1
if not _.isNumber(data[0]) then throw new Error "#{errorBase} must start with a number" if not _.isNumber(data[0]) then throw new Error "#{errorBase} must start with a number"
return new Item quantity:data[0], name:data[1] return new Item quantity:data[0], name:data[1]
_unparseRecipeBook: (recipeBook)->
result = []
result.push '{\n'
result.push ' "version": 1,\n'
result.push ' "mod_name": "' + recipeBook.modName + '",\n'
result.push ' "mod_version": "' + recipeBook.modVersion + '",\n'
if recipeBook.description.length > 0
result.push ' "description": "' + recipeBook.description + '",\n'
if recipeBook.rawMaterials.length > 0
result.push ' "raw_materials": [\n'
firstItem = true
materials = recipeBook.rawMaterials.slice()
materials.sort()
for material in materials
if not firstItem then result.push ',\n'
result.push ' "' + material + '"'
firstItem = false
result.push '\n ],\n'
result.push ' "recipes": [\n'
recipes = recipeBook.recipes.slice()
recipes.sort (a, b)->
if a.name isnt b.name
return if a.name < b.name then -1 else +1
if a._originalIndex isnt b._originalIndex
return if a._originalIndex < b._originalIndex then -1 else +1
return 0
firstItem = true
for recipe in recipes
result.push if firstItem then ' {\n' else ' }, {\n'
@_unparseRecipe recipe, result
firstItem = false
result.push ' }\n'
result.push ' ]\n'
result.push '}'
return result.join ''
_unparseRecipe: (recipe, result=[])->
result.push ' "output": '
@_unparseItemList recipe.output, result, sort:false
if recipe.input.length > 0
result.push ',\n'
result.push ' "input": '
@_unparseItemList recipe.input, result
if recipe.tools.length > 0
result.push ',\n'
result.push ' "tools": '
@_unparseItemList recipe.tools, result
result.push '\n'
return result
_unparseItemList: (itemList, result, options={})->
options.sort ?= true
if itemList.length is 0
result.push '[]'
else if itemList.length is 1
item = itemList[0]
if item.quantity is 1
result.push '"' + item.name + '"'
else
result.push '[[' + item.quantity + ', "' + item.name + '"]]'
else
result.push '['
items = itemList.slice()
if options.sort
items.sort (a, b)->
if a.quantity isnt b.quantity
return if a.quantity > b.quantity then -1 else +1
if a.name isnt b.name
return if a.name < b.name then -1 else +1
return 0
firstItem = true
for item in items
result.push ', ' if not firstItem
if item.quantity is 1
result.push '"' + item.name + '"'
else
result.push '[' + item.quantity + ', "' + item.name + '"]'
firstItem = false
result.push ']'
return result
+24 -5
View File
@@ -28,10 +28,12 @@ module.exports = class RecipeCatalog extends BaseModel
if book.hasRecipe name if book.hasRecipe name
book.enabled = true book.enabled = true
gatherNames: -> gatherNames: (options={})->
options.includeDisabled ?= false
nameData = {} nameData = {}
for book in @books for book in @books
continue unless book.enabled continue unless book.enabled or options.includeDisabled
book.gatherNames nameData book.gatherNames nameData
result = [] result = []
@@ -40,16 +42,33 @@ module.exports = class RecipeCatalog extends BaseModel
result.push nameData[name] result.push nameData[name]
return result return result
gatherRecipes: (name)-> gatherRecipes: (name, options={})->
options.includeDisabled ?= false
result = [] result = []
for book in @books for book in @books
continue unless book.enabled or options.includeDisabled
book.gatherRecipes name, result book.gatherRecipes name, result
return result return result
hasRecipe: (name)-> hasRecipe: (name, options={})->
options.includeDisabled ?= false
for book in @books for book in @books
return true if book.hasRecipe(name) continue unless book.enabled or options.includeDisabled
return true if book.hasRecipe name
return false
isRawMaterial: (name, options={})->
options.includeDisabled ?= false
for book in @books
continue unless book.enabled or options.includeDisabled
return true if book.isRawMaterial name
return false return false
loadBook: (url)-> loadBook: (url)->