diff --git a/src/css/classes.scss b/src/css/classes.scss index 4ea6421b6..f4f907e55 100644 --- a/src/css/classes.scss +++ b/src/css/classes.scss @@ -21,3 +21,24 @@ All rights reserved. .error { background: $color-error; } .error-new { background: $color-error-new; } + +.section { + margin-top: 3em; + + h2 { + font-family: $font-family-header; + font-size: $font-size-large; + margin-bottom: 0.5em; + } + + .panel { + background: white; + padding: 1em; + + & > div { + position: relative; width: 33%; + display: inline-block; + padding: 0.5em; + } + } +} \ No newline at end of file diff --git a/src/data/buildcraft/6.2.6/mod-version.cg b/src/data/buildcraft/6.2.6/mod-version.cg index b8d894ab2..8d9151627 100644 --- a/src/data/buildcraft/6.2.6/mod-version.cg +++ b/src/data/buildcraft/6.2.6/mod-version.cg @@ -1,537 +1,557 @@ schema: 1 -item: Advanced Crafting Table - recipe: - input: Chest, Crafting Table, Obsidian, Redstone Chipset - pattern: 212 202 232 - tools: Crafting Table - -item: Architect Table - recipe: - input: Blueprint, Crafting Table, Dandelion Yellow, Diamond Gear, Ink Sac, Land Mark - pattern: 454 212 303 - tools: Crafting Table - -item: Assembly Table - recipe: - input: Diamond, Diamond Gear, Obsidian, Redstone - pattern: 232 202 212 - tools: Crafting Table - -item: Auto Workbench - recipe: - input: Crafting Table, Wood Gear - pattern: .1. 101 .1. - tools: Crafting Table - -item: Basic Gate - recipe: - input: Red Pipe Wire, Redstone Chipset - pattern: ... .1. .0. - tools: Assembly Table, Laser - -item: Blue Pipe Wire - recipe: - input: Iron Ingot, Lapis Lazuli, Redstone - pattern: .2. .1. .0. - quantity: 8 - tools: Assembly Table, Laser - -item: Blueprint - recipe: - input: Lapis Lazuli, Paper - pattern: 111 101 111 - tools: Crafting Table - -item: Blueprint Library - recipe: - input: Blueprint, Bookshelf - pattern: 000 010 000 - tools: Crafting Table - -item: Builder - recipe: - input: Chest, Crafting Table, Dandelion Yellow, Diamond Gear, Ink Sac, Land Mark - pattern: 454 212 303 - tools: Crafting Table - -item: Charging Table - recipe: - input: Gold Gear, Obsidian, Redstone, Redstone Chipset - pattern: 121 131 101 - tools: Crafting Table - -item: Chute - recipe: - input: Chest, Stone Gear, Iron Ingot - pattern: 202 212 .2. - tools: Crafting Table - -item: Cobblestone Fluid Pipe - recipe: - input: Cobblestone Transport Pipe, Pipe Sealant - pattern: ... .0. .1. - -item: Stone Gear - recipe: - input: Cobblestone, Wood Gear - pattern: .0. 010 .0. - tools: Crafting Table - -item: Cobblestone Kinesis Pipe - recipe: - input: Cobblestone Transport Pipe, Redstone - pattern: ... .0. .1. - -item: Cobblestone Transport Pipe - recipe: - input: Cobblestone, Glass - pattern: ... 010 ... - quantity: 8 - tools: Crafting Table - -item: Combustion Engine - recipe: - input: Glass, Iron Gear, Iron Ingot, Piston - pattern: 222 .0. 131 - tools: Crafting Table - -item: Daizuli Transport Pipe - recipe: - input: Diamond, Glass, Lapis Lazuli Block - pattern: ... 021 ... - quantity: 8 - tools: Crafting Table - -item: Diamond AND Gate - recipe: - input: Blue Pipe Wire, Diamond Chipset, Green Pipe Wire, Red Pipe Wire, Yellow Pipe Wire - pattern: 1.. 34. 02. - tools: Assembly Table, Laser - -item: Diamond Chipset - recipe: - input: Diamond, Redstone - pattern: ... .0. .1. - tools: Assembly Table, Laser - -item: Diamond Fluid Pipe - recipe: - input: Diamond Transport Pipe, Pipe Sealant - pattern: ... .0. .1. - -item: Diamond Gear - recipe: - input: Diamond, Gold Gear - pattern: .0. 010 .0. - tools: Crafting Table - -item: Diamond Kinesis Pipe - recipe: - input: Diamond Transport Pipe, Redstone - pattern: ... .0. .1. - -item: Diamond OR Gate - recipe: - input: Blue Pipe Wire, Diamond Chipset, Green Pipe Wire, Red Pipe Wire, Yellow Pipe Wire - pattern: 1.. 34. 02. - tools: Assembly Table, Laser - -item: Diamond Transport Pipe - recipe: - input: Diamond, Glass - pattern: ... 010 ... - tools: Crafting Table - -item: Docking Station - recipe: - input: Golden Chipset, Iron Ingot - pattern: ... .1. 101 - tools: Crafting Table - -item: Emerald Chipset - recipe: - input: Emerald, Redstone - pattern: ... .0. .1. - tools: Assembly Table, Laser - -item: Emerald Fluid Pipe - recipe: - input: Emerald Transport Pipe, Pipe Sealant - pattern: ... .0. .1. - -item: Emerald Kinesis Pipe - recipe: - input: Emerald Transport Pipe, Redstone - pattern: ... .1. .0. - -item: Emerald Transport Pipe - recipe: - input: Emerald, Glass - pattern: ... 010 ... - quantity: 8 - tools: Crafting Table - -item: Emzuli Transport Pipe - recipe: - input: Emerald, Glass, Lapis Lazuli Block - pattern: ... 021 ... - quantity: 8 - tools: Crafting Table - -item: Facade (stone) - recipe: - input: Cobblestone Structure Pipe, Stone - pattern: ... .1. 000 - tools: Assembly Table, Laser - -item: Filler - recipe: - input: Chest, Crafting Table, Dandelion Yellow, Gold Gear, Ink Sac, Land Mark - pattern: 454 212 303 - tools: Crafting Table - -item: Filtered Buffer - recipe: - input: Chest, Diamond Transport Pipe, Oak Wood Planks, Piston - pattern: 212 202 232 - tools: Crafting Table - -item: Flood Gate - recipe: - input: Iron Bars, Iron Gear, Iron Ingot, Tank - pattern: 212 030 202 - tools: Crafting Table - -item: Gate Copier - recipe: - input: Redstone Chipset, Wrench - pattern: ... .0. .1. - -item: Gold AND Gate - recipe: - input: Blue Pipe Wire, Golden Chipset, Red Pipe Wire - pattern: 1.. 20. ... - tools: Assembly Table, Laser - -item: Golden Chipset - recipe: - input: Gold Ingot, Redstone - pattern: ... .0. .1. - tools: Assembly Table, Laser - -item: Gold Gear - recipe: - input: Gold Ingot, Iron Gear - pattern: .0. 010 .0. - tools: Crafting Table - -item: Gold OR Gate - recipe: - input: Blue Pipe Wire, Golden Chipset, Red Pipe Wire - pattern: 1.. 20. ... - tools: Assembly Table, Laser - -item: Golden Fluid Pipe - recipe: - input: Golden Transport Pipe, Pipe Sealant - pattern: ... .0. .1. - -item: Golden Kinesis Pipe - recipe: - input: Golden Transport Pipe, Redstone - pattern: ... .0. .1. - -item: Golden Transport Pipe - recipe: - input: Glass, Gold Ingot - pattern: ... 101 ... - quantity: 8 - tools: Crafting Table - -item: Green Pipe Wire - recipe: - input: Cactus Green, Iron Ingot, Redstone - pattern: .0. .2. .1. - quantity: 8 - tools: Assembly Table, Laser - -item: Integration Table - recipe: - input: Diamond Gear, Obsidian, Redstone, Redstone Chipset - pattern: 121 131 101 - tools: Crafting Table - -item: Iron AND Gate - recipe: - input: Iron Chipset, Red Pipe Wire - pattern: 0.. 1.. ... - tools: Assembly Table, Laser - -item: Iron Chipset - recipe: - input: Iron Ingot, Redstone - pattern: ... .0. .1. - tools: Assembly Table, Laser - -item: Iron Fluid Pipe - recipe: - input: Iron Transport Pipe, Pipe Sealant - pattern: ... .0. .1. - -item: Iron Gear - recipe: - input: Stone Gear, Iron Ingot - pattern: .1. 101 .1. - tools: Crafting Table - -item: Iron Kinesis Pipe - recipe: - input: Iron Transport Pipe, Redstone - pattern: ... .0. .1. - -item: Iron OR Gate - recipe: - input: Iron Chipset, Red Pipe Wire - pattern: 0.. 1.. ... - tools: Assembly Table, Laser - -item: Iron Transport Pipe - recipe: - input: Glass, Iron Ingot - pattern: ... 101 ... - quantity: 8 - tools: Crafting Table - -item: Land Mark - recipe: - input: Lapis Lazuli, Redstone Torch - pattern: ... .0. .1. - tools: Crafting Table - -item: Laser - recipe: - input: Diamond, Obsidian, Redstone - pattern: 122 002 122 - tools: Crafting Table - -item: Lazuli Transport Pipe - recipe: - input: Glass, Lapis Lazuli Block - pattern: ... 101 ... - quantity: 8 - tools: Crafting Table - -item: Mining Well - recipe: - input: Iron Gear, Iron Ingot, Iron Pickaxe, Redstone - pattern: 131 101 121 - tools: Crafting Table - -item: Obsidian Transport Pipe - recipe: - input: Glass, Obsidian - pattern: ... 101 ... - quantity: 8 - tools: Crafting Table - -item: Path Mark - recipe: - input: Cactus Green, Redstone Torch - pattern: ... .0. .1. - -item: Pipe Plug - recipe: - input: Cobblestone Structure Pipe - pattern: ... .0. ... - tools: Assembly Table, Laser - -item: Pipe Sealant - recipe: - input: Cactus Green - pattern: ... .0. ... - -item: Pulsating Chipset - recipe: - input: Ender Pearl, Redstone - pattern: ... .0. .1. - tools: Assembly Table, Laser - -item: Pump - recipe: - input: Mining Well, Tank - pattern: ... .1. .0. - -item: Quarry - recipe: - input: Diamond Gear, Diamond Pickaxe, Gold Gear, Iron Gear, Redstone - pattern: 343 232 010 - tools: Crafting Table - -item: Quartz Chipset - recipe: - input: Nether Quartz, Redstone - pattern: ... .0. .1. - tools: Assembly Table, Laser - -item: Quartz Kinesis Pipe - recipe: - input: Quartz Transport Pipe, Redstone - pattern: ... .0. .1. - -item: Quartz Transport Pipe - recipe: - input: Block of Quartz, Glass - pattern: ... 010 ... - quantity: 8 - tools: Crafting Table - -item: Red Pipe Wire - recipe: - input: Iron Ingot, Redstone, Rose Red - pattern: .2. .1. .0. - quantity: 8 - tools: Assembly Table, Laser - -item: Redstone Chipset - recipe: - input: Redstone - pattern: ... .0. ... - tools: Assembly Table, Laser - -item: Redstone Comp Chipset - recipe: - input: Redstone, Redstone Comparator - pattern: ... .1. .0. - tools: Assembly Table, Laser - -item: Redstone Engine - recipe: - input: Glass, Oak Wood Planks, Piston, Wood Gear - pattern: 111 .0. 323 - tools: Crafting Table - -item: Refinery - recipe: - input: Diamond Gear, Redstone Torch, Tank - pattern: ... 121 202 - tools: Crafting Table - -item: Requester - recipe: - input: Chest, Iron Gear, Iron Ingot, Piston, Redstone - pattern: 232 101 242 - tools: Crafting Table - -item: Sandstone Fluid Pipe - recipe: - input: Pipe Sealant, Sandstone Transport Pipe - pattern: ... .1. .0. - -item: Sandstone Transport Pipe - recipe: - input: Glass, Sandstone - pattern: ... 101 ... - quantity: 8 - tools: Crafting Table - -item: Stirling Engine - recipe: - input: Cobblestone, Stone Gear, Glass, Piston - pattern: 000 .2. 131 - tools: Crafting Table - -item: Stone Fluid Pipe - recipe: - input: Pipe Sealant, Stone Transport Pipe - pattern: ... .1. .0. - -item: Stone Kinesis Pipe - recipe: - input: Redstone, Stone Transport Pipe - pattern: ... .1. .0. - -item: Stone Transport Pipe - recipe: - input: Glass, Stone - pattern: ... 101 ... - quantity: 8 - tools: Crafting Table - -item: Stripes Transport Pipe - recipe: - input: Glass, Gold Gear - pattern: ... 101 ... - quantity: 8 - tools: Crafting Table - -item: Cobblestone Structure Pipe - recipe: - input: Cobblestone Transport Pipe, Gravel - pattern: ... .1. .0. - -item: Tank - recipe: - input: Glass - pattern: 000 0.0 000 - tools: Crafting Table - -item: Template - recipe: - input: Ink Sac, Paper - pattern: 111 101 111 - tools: Crafting Table - -item: Void Fluid Pipe - recipe: - input: Pipe Sealant, Void Transport Pipe - pattern: ... .1. .0. - -item: Void Transport Pipe - recipe: - input: Glass, Ink Sac, Redstone - pattern: ... 102 ... - quantity: 8 - tools: Crafting Table - -item: Wooden Fluid Pipe - recipe: - input: Pipe Sealant, Wooden Transport Pipe - pattern: ... .1. .0. - -item: Wood Gear - recipe: - input: Stick - pattern: .0. 0.0 .0. - tools: Crafting Table - -item: Wooden Kinesis Pipe - recipe: - input: Redstone, Wooden Transport Pipe - pattern: ... .1. .0. - -item: Wooden Transport Pipe - recipe: - input: Glass, Oak Wood Planks - pattern: ... 101 ... - quantity: 8 - tools: Crafting Table - -item: Wrench - recipe: - input: Stone Gear, Iron Ingot - pattern: 1.1 .0. .1. - tools: Crafting Table - -item: Yellow Pipe Wire - recipe: - input: Dandelion Yellow, Iron Ingot, Redstone - pattern: .0. .2. .1. - quantity: 8 - tools: Assembly Table, Laser - -item: Zone Planner - recipe: - input: Diamond Gear, Empty Map, Gold Gear, Iron Ingot, Redstone - pattern: 343 212 303 - tools: Crafting Table +group: Builders + + item: Architect Table + recipe: + input: Blueprint, Crafting Table, Dandelion Yellow, Diamond Gear, Ink Sac, Land Mark + pattern: 454 212 303 + tools: Crafting Table + + item: Blueprint + recipe: + input: Lapis Lazuli, Paper + pattern: 111 101 111 + tools: Crafting Table + + item: Blueprint Library + recipe: + input: Blueprint, Bookshelf + pattern: 000 010 000 + tools: Crafting Table + + item: Builder + recipe: + input: Chest, Crafting Table, Dandelion Yellow, Diamond Gear, Ink Sac, Land Mark + pattern: 454 212 303 + tools: Crafting Table + + item: Filler + recipe: + input: Chest, Crafting Table, Dandelion Yellow, Gold Gear, Ink Sac, Land Mark + pattern: 454 212 303 + tools: Crafting Table + + item: Land Mark + recipe: + input: Lapis Lazuli, Redstone Torch + pattern: ... .0. .1. + tools: Crafting Table + + item: Path Mark + recipe: + input: Cactus Green, Redstone Torch + pattern: ... .0. .1. + + item: Template + recipe: + input: Ink Sac, Paper + pattern: 111 101 111 + tools: Crafting Table + + item: Zone Planner + recipe: + input: Diamond Gear, Empty Map, Gold Gear, Iron Ingot, Redstone + pattern: 343 212 303 + tools: Crafting Table + +group: Energy + + item: Combustion Engine + recipe: + input: Glass, Iron Gear, Iron Ingot, Piston + pattern: 222 .0. 131 + tools: Crafting Table + + item: Redstone Engine + recipe: + input: Glass, Oak Wood Planks, Piston, Wood Gear + pattern: 111 .0. 323 + tools: Crafting Table + + item: Stirling Engine + recipe: + input: Cobblestone, Glass, Piston, Stone Gear + pattern: 000 .1. 323 + tools: Crafting Table + +group: Machines + + item: Auto Workbench + recipe: + input: Crafting Table, Wood Gear + pattern: .1. 101 .1. + tools: Crafting Table + + item: Chute + recipe: + input: Chest, Iron Ingot, Stone Gear + pattern: 101 121 .1. + tools: Crafting Table + + item: Filtered Buffer + recipe: + input: Chest, Diamond Transport Pipe, Oak Wood Planks, Piston + pattern: 212 202 232 + tools: Crafting Table + + item: Flood Gate + recipe: + input: Iron Bars, Iron Gear, Iron Ingot, Tank + pattern: 212 030 202 + tools: Crafting Table + + item: Mining Well + recipe: + input: Iron Gear, Iron Ingot, Iron Pickaxe, Redstone + pattern: 131 101 121 + tools: Crafting Table + + item: Pump + recipe: + input: Mining Well, Tank + pattern: ... .1. .0. + + item: Quarry + recipe: + input: Diamond Gear, Diamond Pickaxe, Gold Gear, Iron Gear, Redstone + pattern: 343 232 010 + tools: Crafting Table + + item: Refinery + recipe: + input: Diamond Gear, Redstone Torch, Tank + pattern: ... 121 202 + tools: Crafting Table + + item: Requester + recipe: + input: Chest, Iron Gear, Iron Ingot, Piston, Redstone + pattern: 232 101 242 + tools: Crafting Table + + item: Tank + recipe: + input: Glass + pattern: 000 0.0 000 + tools: Crafting Table + +group: Pipes + + item: Cobblestone Structure Pipe + recipe: + input: Cobblestone Transport Pipe, Gravel + pattern: ... .1. .0. + + item: Pipe Plug + recipe: + input: Cobblestone Structure Pipe + pattern: ... .0. ... + tools: Assembly Table, Laser + + item: Pipe Sealant + recipe: + input: Cactus Green + pattern: ... .0. ... + +group: Pipes - Fluid + + item: Cobblestone Fluid Pipe + recipe: + input: Cobblestone Transport Pipe, Pipe Sealant + pattern: ... .0. .1. + + item: Diamond Fluid Pipe + recipe: + input: Diamond Transport Pipe, Pipe Sealant + pattern: ... .0. .1. + + item: Emerald Fluid Pipe + recipe: + input: Emerald Transport Pipe, Pipe Sealant + pattern: ... .0. .1. + + item: Golden Fluid Pipe + recipe: + input: Golden Transport Pipe, Pipe Sealant + pattern: ... .0. .1. + + item: Iron Fluid Pipe + recipe: + input: Iron Transport Pipe, Pipe Sealant + pattern: ... .0. .1. + + item: Sandstone Fluid Pipe + recipe: + input: Pipe Sealant, Sandstone Transport Pipe + pattern: ... .1. .0. + + item: Stone Fluid Pipe + recipe: + input: Pipe Sealant, Stone Transport Pipe + pattern: ... .1. .0. + + item: Void Fluid Pipe + recipe: + input: Pipe Sealant, Void Transport Pipe + pattern: ... .1. .0. + + item: Wooden Fluid Pipe + recipe: + input: Pipe Sealant, Wooden Transport Pipe + pattern: ... .1. .0. + +group: Pipes - Kinesis + + item: Cobblestone Kinesis Pipe + recipe: + input: Cobblestone Transport Pipe, Redstone + pattern: ... .0. .1. + + item: Diamond Kinesis Pipe + recipe: + input: Diamond Transport Pipe, Redstone + pattern: ... .0. .1. + + item: Emerald Kinesis Pipe + recipe: + input: Emerald Transport Pipe, Redstone + pattern: ... .1. .0. + + item: Golden Kinesis Pipe + recipe: + input: Golden Transport Pipe, Redstone + pattern: ... .0. .1. + + item: Iron Kinesis Pipe + recipe: + input: Iron Transport Pipe, Redstone + pattern: ... .0. .1. + + item: Quartz Kinesis Pipe + recipe: + input: Quartz Transport Pipe, Redstone + pattern: ... .0. .1. + + item: Stone Kinesis Pipe + recipe: + input: Redstone, Stone Transport Pipe + pattern: ... .1. .0. + + item: Wooden Kinesis Pipe + recipe: + input: Redstone, Wooden Transport Pipe + pattern: ... .1. .0. + +group: Pipes - Transport + + item: Cobblestone Transport Pipe + recipe: + input: Cobblestone, Glass + pattern: ... 010 ... + quantity: 8 + tools: Crafting Table + + item: Daizuli Transport Pipe + recipe: + input: Diamond, Glass, Lapis Lazuli Block + pattern: ... 021 ... + quantity: 8 + tools: Crafting Table + + item: Diamond Transport Pipe + recipe: + input: Diamond, Glass + pattern: ... 010 ... + tools: Crafting Table + + item: Emerald Transport Pipe + recipe: + input: Emerald, Glass + pattern: ... 010 ... + quantity: 8 + tools: Crafting Table + + item: Emzuli Transport Pipe + recipe: + input: Emerald, Glass, Lapis Lazuli Block + pattern: ... 021 ... + quantity: 8 + tools: Crafting Table + + item: Golden Transport Pipe + recipe: + input: Glass, Gold Ingot + pattern: ... 101 ... + quantity: 8 + tools: Crafting Table + + item: Iron Transport Pipe + recipe: + input: Glass, Iron Ingot + pattern: ... 101 ... + quantity: 8 + tools: Crafting Table + + item: Lazuli Transport Pipe + recipe: + input: Glass, Lapis Lazuli Block + pattern: ... 101 ... + quantity: 8 + tools: Crafting Table + + item: Obsidian Transport Pipe + recipe: + input: Glass, Obsidian + pattern: ... 101 ... + quantity: 8 + tools: Crafting Table + + item: Quartz Transport Pipe + recipe: + input: Block of Quartz, Glass + pattern: ... 010 ... + quantity: 8 + tools: Crafting Table + + item: Sandstone Transport Pipe + recipe: + input: Glass, Sandstone + pattern: ... 101 ... + quantity: 8 + tools: Crafting Table + + item: Stone Transport Pipe + recipe: + input: Glass, Stone + pattern: ... 101 ... + quantity: 8 + tools: Crafting Table + + item: Stripes Transport Pipe + recipe: + input: Glass, Gold Gear + pattern: ... 101 ... + quantity: 8 + tools: Crafting Table + + item: Void Transport Pipe + recipe: + input: Glass, Ink Sac, Redstone + pattern: ... 102 ... + quantity: 8 + tools: Crafting Table + + item: Wooden Transport Pipe + recipe: + input: Glass, Oak Wood Planks + pattern: ... 101 ... + quantity: 8 + tools: Crafting Table + +group: Robots + + item: Charging Table + recipe: + input: Gold Gear, Obsidian, Redstone, Redstone Chipset + pattern: 121 131 101 + tools: Crafting Table + + item: Docking Station + recipe: + input: Golden Chipset, Iron Ingot + pattern: ... .1. 101 + tools: Crafting Table + +group: Silicon + + item: Advanced Crafting Table + recipe: + input: Chest, Crafting Table, Obsidian, Redstone Chipset + pattern: 212 202 232 + tools: Crafting Table + + item: Assembly Table + recipe: + input: Diamond, Diamond Gear, Obsidian, Redstone + pattern: 232 202 212 + tools: Crafting Table + + item: Basic Gate + recipe: + input: Red Pipe Wire, Redstone Chipset + pattern: ... .1. .0. + tools: Assembly Table, Laser + + item: Blue Pipe Wire + recipe: + input: Iron Ingot, Lapis Lazuli, Redstone + pattern: .2. .1. .0. + quantity: 8 + tools: Assembly Table, Laser + + item: Diamond AND Gate + recipe: + input: Blue Pipe Wire, Diamond Chipset, Green Pipe Wire, Red Pipe Wire, Yellow Pipe Wire + pattern: 1.. 34. 02. + tools: Assembly Table, Laser + + item: Diamond Chipset + recipe: + input: Diamond, Redstone + pattern: ... .0. .1. + tools: Assembly Table, Laser + + item: Diamond OR Gate + recipe: + input: Blue Pipe Wire, Diamond Chipset, Green Pipe Wire, Red Pipe Wire, Yellow Pipe Wire + pattern: 1.. 34. 02. + tools: Assembly Table, Laser + + item: Emerald Chipset + recipe: + input: Emerald, Redstone + pattern: ... .0. .1. + tools: Assembly Table, Laser + + item: Facade (stone) + recipe: + input: Cobblestone Structure Pipe, Stone + pattern: ... .1. 000 + tools: Assembly Table, Laser + + item: Gate Copier + recipe: + input: Redstone Chipset, Wrench + pattern: ... .0. .1. + + item: Gold AND Gate + recipe: + input: Blue Pipe Wire, Golden Chipset, Red Pipe Wire + pattern: 1.. 20. ... + tools: Assembly Table, Laser + + item: Gold OR Gate + recipe: + input: Blue Pipe Wire, Golden Chipset, Red Pipe Wire + pattern: 1.. 20. ... + tools: Assembly Table, Laser + + item: Golden Chipset + recipe: + input: Gold Ingot, Redstone + pattern: ... .0. .1. + tools: Assembly Table, Laser + + item: Green Pipe Wire + recipe: + input: Cactus Green, Iron Ingot, Redstone + pattern: .0. .2. .1. + quantity: 8 + tools: Assembly Table, Laser + + item: Integration Table + recipe: + input: Diamond Gear, Obsidian, Redstone, Redstone Chipset + pattern: 121 131 101 + tools: Crafting Table + + item: Iron AND Gate + recipe: + input: Iron Chipset, Red Pipe Wire + pattern: 0.. 1.. ... + tools: Assembly Table, Laser + + item: Iron Chipset + recipe: + input: Iron Ingot, Redstone + pattern: ... .0. .1. + tools: Assembly Table, Laser + + item: Iron OR Gate + recipe: + input: Iron Chipset, Red Pipe Wire + pattern: 0.. 1.. ... + tools: Assembly Table, Laser + + item: Laser + recipe: + input: Diamond, Obsidian, Redstone + pattern: 122 002 122 + tools: Crafting Table + + item: Pulsating Chipset + recipe: + input: Ender Pearl, Redstone + pattern: ... .0. .1. + tools: Assembly Table, Laser + + item: Quartz Chipset + recipe: + input: Nether Quartz, Redstone + pattern: ... .0. .1. + tools: Assembly Table, Laser + + item: Red Pipe Wire + recipe: + input: Iron Ingot, Redstone, Rose Red + pattern: .2. .1. .0. + quantity: 8 + tools: Assembly Table, Laser + + item: Redstone Chipset + recipe: + input: Redstone + pattern: ... .0. ... + tools: Assembly Table, Laser + + item: Redstone Comp Chipset + recipe: + input: Redstone, Redstone Comparator + pattern: ... .1. .0. + tools: Assembly Table, Laser + + item: Yellow Pipe Wire + recipe: + input: Dandelion Yellow, Iron Ingot, Redstone + pattern: .0. .2. .1. + quantity: 8 + tools: Assembly Table, Laser + +group: Tools and Materials + + item: Diamond Gear + recipe: + input: Diamond, Gold Gear + pattern: .0. 010 .0. + tools: Crafting Table + + item: Gold Gear + recipe: + input: Gold Ingot, Iron Gear + pattern: .0. 010 .0. + tools: Crafting Table + + item: Iron Gear + recipe: + input: Iron Ingot, Stone Gear + pattern: .0. 010 .0. + tools: Crafting Table + + item: Stone Gear + recipe: + input: Cobblestone, Wood Gear + pattern: .0. 010 .0. + tools: Crafting Table + + item: Wood Gear + recipe: + input: Stick + pattern: .0. 0.0 .0. + tools: Crafting Table + + item: Wrench + recipe: + input: Iron Ingot, Stone Gear + pattern: 0.0 .1. .0. + tools: Crafting Table diff --git a/src/scripts/controllers/item_group_controller.coffee b/src/scripts/controllers/item_group_controller.coffee new file mode 100644 index 000000000..7d1af2ed4 --- /dev/null +++ b/src/scripts/controllers/item_group_controller.coffee @@ -0,0 +1,70 @@ +### +Crafting Guide - item_group_controller.coffee + +Copyright (c) 2015 by Redwood Labs +All rights reserved. +### + +BaseController = require './base_controller' +{Duration} = require '../constants' +{Event} = require '../constants' +Item = require '../models/item' +ItemController = require './item_controller' + +######################################################################################################################## + +module.exports = class ItemGroupController extends BaseController + + constructor: (options={})-> + if not options.model? then throw new Error 'options.model is required' + if not options.modPack? then throw new Error 'options.modPack is required' + if not options.modVersion? then throw new Error 'options.modVersion is required' + options.templateName = 'item_group' + super options + + @modVersion = options.modVersion + @_modPack = options.modPack + @_itemControllers = [] + + @modVersion.on Event.change, => @refresh() + + # BaseController Overrides ##################################################################### + + onDidRender: -> + @$title = @$('h2') + @$items = @$('.panel') + super + + refresh: -> + @$title.html if @model is Item.Group.Other then 'Items' else @model + @_refreshItems() + super + + # Private Methods ############################################################################## + + _createItemController: (item)-> + controller = new ItemController model:item, modPack:@_modPack + controller.$el.hide() + controller.render() + + @_itemControllers.push controller + @$items.append controller.$el + controller.$el.slideDown duration:Duration.fast + + _refreshItems: -> + controllerIndex = 0 + delay = 0 + + @modVersion.eachItemInGroup @model, (item)=> + controller = @_itemControllers[controllerIndex] + if not controller? + _.delay (=> @_createItemController item), delay + delay += @_delayStep + else + controller.model = item + controller.refresh() + controllerIndex += 1 + + while @_itemControllers.length > controllerIndex + controller = @_itemControllers.pop() + controller.$el.slideUp duration:Duration.fast, complete:-> @remove() diff --git a/src/scripts/controllers/mod_page_controller.coffee b/src/scripts/controllers/mod_page_controller.coffee index 78069fda7..fa43abfc9 100644 --- a/src/scripts/controllers/mod_page_controller.coffee +++ b/src/scripts/controllers/mod_page_controller.coffee @@ -5,12 +5,12 @@ Copyright (c) 2015 by Redwood Labs All rights reserved. ### -BaseController = require './base_controller' -{Duration} = require '../constants' -Mod = require '../models/mod' -ModPack = require '../models/mod_pack' -ItemController = require './item_controller' -{Url} = require '../constants' +BaseController = require './base_controller' +{Duration} = require '../constants' +Mod = require '../models/mod' +ModPack = require '../models/mod_pack' +ItemGroupController = require './item_group_controller' +{Url} = require '../constants' ######################################################################################################################## @@ -24,7 +24,7 @@ module.exports = class ModPageController extends BaseController @_delayStep = options.delayStep @_effectiveModVersion = null - @_itemControllers = [] + @_groupControllers = [] @_modPack = options.modPack Object.defineProperties this, @@ -48,7 +48,7 @@ module.exports = class ModPageController extends BaseController @$documentationLink = @$('.documentation') @$downloadLink = @$('.download') @$homePageLink = @$('.homePage') - @$items = @$('.items .panel') + @$groupContainer = @$('.itemGroups') @$titleImage = @$('.titleImage img') @$versionSelector = @$('select.version') @@ -64,7 +64,7 @@ module.exports = class ModPageController extends BaseController @_refreshLink @$documentationLink, @model.documentationUrl @_refreshLink @$downloadLink, @model.downloadUrl - @_refreshItems() + @_refreshItemGroups() @_refreshVersions() super @@ -75,15 +75,6 @@ module.exports = class ModPageController extends BaseController # Private Methods ############################################################################## - _createItemController: (item)-> - controller = new ItemController model:item, modPack:@_modPack - controller.$el.hide() - controller.render() - - @_itemControllers.push controller - @$items.append controller.$el - controller.$el.fadeIn duration:Duration.fast - _getEffectiveModVersion: -> return @_effectiveModVersion if @_effectiveModVersion? return null unless @model? @@ -94,6 +85,26 @@ module.exports = class ModPageController extends BaseController return modVersion + _refreshItemGroups: -> + groupIndex = 0 + modVersion = @effectiveModVersion + modVersion.eachGroup (group)=> + controller = @_groupControllers[groupIndex] + if not controller? + controller = new ItemGroupController model:group, modVersion:modVersion, modPack:@_modPack + controller.render() + @$groupContainer.append controller.$el + @_groupControllers[groupIndex] = controller + else + controller.modVersion = modVersion + controller.model = group + controller.refresh() + groupIndex++ + + while @_groupControllers.length > groupIndex + 1 + controller = @_groupControllers.pop() + controller.$el.slideUp duration:Duration.fast, -> @remove() + _refreshLink: ($link, url)-> if url? $link.fadeIn duration:Duration.fast @@ -101,28 +112,6 @@ module.exports = class ModPageController extends BaseController else $link.fadeOut duration:Duration.fast - _refreshItems: -> - controllerIndex = 0 - delay = 0 - - effectiveModVersion = @effectiveModVersion - if effectiveModVersion? - @$items.show duration:Duration.fast - effectiveModVersion.eachItem (item)=> - controller = @_itemControllers[controllerIndex] - if not controller? - _.delay (=> @_createItemController item), delay - delay += @_delayStep - else - controller.model = item - controllerIndex += 1 - else - @$items.hide duration:Duration.fast - - while @_itemControllers.length > controllerIndex - controller = @_itemControllers.pop() - controller.$el.slideUp duration:Duration.fast, complete:-> @remove() - _refreshVersions: -> @$versionSelector.empty() return unless @model? diff --git a/src/scripts/main.coffee b/src/scripts/main.coffee index b750be542..7ebbbebbb 100644 --- a/src/scripts/main.coffee +++ b/src/scripts/main.coffee @@ -24,7 +24,7 @@ global.logger = new Logger switch window.location.hostname when 'localhost' global.env = 'development' - logger.level = Logger.INFO + logger.level = Logger.DEBUG when 'new.crafting-guide.com' global.env = 'staging' logger.level = Logger.VERBOSE diff --git a/src/scripts/models/item.coffee b/src/scripts/models/item.coffee index 81fbea692..5e33a9dbe 100644 --- a/src/scripts/models/item.coffee +++ b/src/scripts/models/item.coffee @@ -14,9 +14,12 @@ Recipe = require './recipe' module.exports = class Item extends BaseModel + @Group = Other:'Other' + constructor: (attributes={}, options={})-> if not attributes.name? then throw new Error 'attributes.name is required' + attributes.group ?= Item.Group.Other attributes.isGatherable ?= false attributes.slug ?= _.slugify attributes.name options.logEvents ?= false diff --git a/src/scripts/models/mod_version.coffee b/src/scripts/models/mod_version.coffee index 99628f555..83cec7895 100644 --- a/src/scripts/models/mod_version.coffee +++ b/src/scripts/models/mod_version.coffee @@ -21,16 +21,20 @@ module.exports = class ModVersion extends BaseModel if not attributes.version? then throw new Error 'attributes.version is required' super attributes, options - @_items = {} - @_names = {} - @_slugs = [] + @_groups = {} + @_items = {} + @_names = {} + @_slugs = [] # Public Methods ############################################################################### addItem: (item)-> if @_items[item.slug]? then throw new Error "duplicate item for #{item.name}" - @_items[item.slug] = item + @_items[item.slug] = item + @_groups[item.group] ?= {} + @_groups[item.group][item.slug] = item + item.modVersion = this @registerSlug item.slug, item.name return this @@ -44,6 +48,10 @@ module.exports = class ModVersion extends BaseModel return 0 + eachGroup: (callback)-> + for groupName in _.keys(@_groups).sort() + callback groupName + eachItem: (callback)-> for slug in @_slugs item = @_items[slug] @@ -51,6 +59,13 @@ module.exports = class ModVersion extends BaseModel callback @_items[slug], slug return this + eachItemInGroup: (group, callback)-> + group = @_groups[group] + return unless group? + + for slug in _.keys(group).sort() + callback group[slug] + eachName: (callback)-> for slug in @_slugs callback @_names[slug], slug diff --git a/src/scripts/models/parser_versions/mod_version_parser_v1.coffee b/src/scripts/models/parser_versions/mod_version_parser_v1.coffee index 48257ed61..f9cd8f076 100644 --- a/src/scripts/models/parser_versions/mod_version_parser_v1.coffee +++ b/src/scripts/models/parser_versions/mod_version_parser_v1.coffee @@ -53,10 +53,14 @@ module.exports = class ModVersionParserV1 extends CommandParserVersionBase @_itemData.gatherable = (gatherable is 'yes') + _command_group: (group)-> + if group.length is 0 then throw new Error 'a group name cannot be empty' + @_rawData.group = group + _command_item: (name='')-> if not name.length > 0 then throw new Error 'the item name cannot be empty' - @_itemData = name:name, line:@_lineNumber + @_itemData = name:name, line:@_lineNumber, group:@_rawData.group @_rawData.items ?= [] @_rawData.items.push @_itemData @@ -118,7 +122,7 @@ module.exports = class ModVersionParserV1 extends CommandParserVersionBase itemData.gatherable ?= false itemData.recipes ?= [] - item = new Item name:itemData.name, isGatherable:itemData.gatherable + item = new Item name:itemData.name, isGatherable:itemData.gatherable, group:itemData.group modVersion.addItem item for recipeData in itemData.recipes @@ -186,9 +190,23 @@ module.exports = class ModVersionParserV1 extends CommandParserVersionBase builder .line 'schema: ', 1 .line() - .onlyIf itemList.length > 0, => - builder.loop itemList, delimiter:'\n', onEach:(b, i)=> @_unparseItem(b, i) - .outdent() + + modVersion.eachGroup (group)=> + @_unparseGroup builder, modVersion, group + + _unparseGroup: (builder, modVersion, group)-> + if group isnt Item.Group.Other + builder + .line 'group: ', group + .line() + .indent() + + modVersion.eachItemInGroup group, (item)=> + @_unparseItem builder, item + builder.line() + + if group isnt Item.Group.Other + builder.outdent() _unparseItem: (builder, item)-> recipes = [] diff --git a/src/templates/item_group.jade b/src/templates/item_group.jade new file mode 100644 index 000000000..8c54c35c7 --- /dev/null +++ b/src/templates/item_group.jade @@ -0,0 +1,10 @@ +//- +//- Crafting Guide - item_group.jade +//- +//- Copyright (c) 2015 by Redwood Labs +//- All rights reserved. +//- + +.view__item_group.section + h2 + .panel diff --git a/src/templates/mod_page.jade b/src/templates/mod_page.jade index 0ea465e33..c169259ea 100644 --- a/src/templates/mod_page.jade +++ b/src/templates/mod_page.jade @@ -18,6 +18,4 @@ .byline: p .description: p - .section.items - h2 Items - .panel + .itemGroups diff --git a/test/mod_version.test.coffee b/test/mod_version.test.coffee index 380565ffd..2b0ece99b 100644 --- a/test/mod_version.test.coffee +++ b/test/mod_version.test.coffee @@ -16,7 +16,13 @@ modVersion = null describe 'mod_version.coffee', -> - beforeEach -> modVersion = new ModVersion modSlug:'test', version:'0.0' + beforeEach -> + modVersion = new ModVersion modSlug:'test', version:'0.0' + modVersion.addItem new Item name:'underscore', group:'punctuation' + modVersion.addItem new Item name:'bravo', group:'letter' + modVersion.addItem new Item name:'alpha', group:'letter' + modVersion.addItem new Item name:'one', group:'number' + modVersion.addItem new Item name:'two', group:'number' describe 'constructor', -> @@ -40,6 +46,30 @@ describe 'mod_version.coffee', -> modVersion.addItem new Item name:'Wool' modVersion._items.wool.modVersion.should.equal modVersion + describe 'eachGroup', -> + + it 'returns all the groups in order', -> + groupNames = [] + modVersion.eachGroup (groupName)-> groupNames.push groupName + groupNames.should.eql ['letter', 'number', 'punctuation'] + + describe 'eachItemInGroup', -> + + it 'returns immediately for unknown group', -> + slugs = [] + modVersion.eachItemInGroup 'foobar', (item)-> slugs.push item.slug + slugs.should.eql [] + + it 'calls callback for exactly the items in a group in order', -> + slugs = [] + modVersion.eachItemInGroup 'letter', (item)-> slugs.push item.slug + slugs.should.eql ['alpha', 'bravo'] + + slugs = [] + modVersion.eachItemInGroup 'number', (item)-> slugs.push item.slug + slugs.should.eql ['one', 'two'] + + describe 'findItemByName', -> it 'locates items by slugified name', ->