Rename RecipeCatalog to ModPack
This commit is contained in:
@@ -6,4 +6,4 @@ All rights reserved.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@import 'crafting_table';
|
@import 'crafting_table';
|
||||||
@import 'recipe_catalog';
|
@import 'mod_pack';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Copyright (c) 2014 by Redwood Labs
|
|||||||
All rights reserved.
|
All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.view__recipe_catalog {
|
.view__mod_pack {
|
||||||
button {
|
button {
|
||||||
@include center-vertical;
|
@include center-vertical;
|
||||||
position: absolute; right: 1em;
|
position: absolute; right: 1em;
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
BaseController = require './base_controller'
|
BaseController = require './base_controller'
|
||||||
CraftingTableController = require './crafting_table_controller'
|
CraftingTableController = require './crafting_table_controller'
|
||||||
ItemPage = require '../models/item_page'
|
ItemPage = require '../models/item_page'
|
||||||
RecipeCatalogController = require './recipe_catalog_controller'
|
ModPackController = require './mod_pack_controller'
|
||||||
|
|
||||||
########################################################################################################################
|
########################################################################################################################
|
||||||
|
|
||||||
@@ -29,6 +29,6 @@ module.exports = class ItemPageController extends BaseController
|
|||||||
# BaseController Overrides #####################################################################
|
# BaseController Overrides #####################################################################
|
||||||
|
|
||||||
onDidRender: ->
|
onDidRender: ->
|
||||||
@catalogController = @addChild RecipeCatalogController, '.view__recipe_catalog', model:@model.catalog
|
@catalogController = @addChild ModPackController, '.view__mod_pack', model:@model.catalog
|
||||||
@tableController = @addChild CraftingTableController, '.view__crafting_table', model:@model.table
|
@tableController = @addChild CraftingTableController, '.view__crafting_table', model:@model.table
|
||||||
super
|
super
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
###
|
###
|
||||||
# Crafting Guide - recipe_catalog_controller.coffee
|
# Crafting Guide - mod_pack_controller.coffee
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014 by Redwood Labs
|
# Copyright (c) 2014 by Redwood Labs
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
@@ -11,13 +11,13 @@ ModVersionController = require './mod_version_controller'
|
|||||||
|
|
||||||
########################################################################################################################
|
########################################################################################################################
|
||||||
|
|
||||||
module.exports = class RecipeCatalogController extends BaseController
|
module.exports = class ModPackController extends BaseController
|
||||||
|
|
||||||
constructor: (options={})->
|
constructor: (options={})->
|
||||||
if not options.model? then throw new Error "options.model is required"
|
if not options.model? then throw new Error "options.model is required"
|
||||||
@_bookControllers = []
|
@_bookControllers = []
|
||||||
|
|
||||||
options.templateName = 'recipe_catalog'
|
options.templateName = 'mod_pack'
|
||||||
super options
|
super options
|
||||||
|
|
||||||
# BaseController Overrides #####################################################################
|
# BaseController Overrides #####################################################################
|
||||||
@@ -7,13 +7,13 @@
|
|||||||
|
|
||||||
BaseModel = require './base_model'
|
BaseModel = require './base_model'
|
||||||
CraftingTable = require './crafting_table'
|
CraftingTable = require './crafting_table'
|
||||||
RecipeCatalog = require './recipe_catalog'
|
ModPack = require './mod_pack'
|
||||||
|
|
||||||
########################################################################################################################
|
########################################################################################################################
|
||||||
|
|
||||||
module.exports = class ItemPage extends BaseModel
|
module.exports = class ItemPage extends BaseModel
|
||||||
|
|
||||||
constructor: (attributes={}, options={})->
|
constructor: (attributes={}, options={})->
|
||||||
attributes.catalog ?= new RecipeCatalog
|
attributes.catalog ?= new ModPack
|
||||||
attributes.table ?= new CraftingTable catalog:attributes.catalog
|
attributes.table ?= new CraftingTable catalog:attributes.catalog
|
||||||
super attributes, options
|
super attributes, options
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
###
|
###
|
||||||
# Crafting Guide - recipe_catalog.coffee
|
# Crafting Guide - mod_pack.coffee
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014 by Redwood Labs
|
# Copyright (c) 2014 by Redwood Labs
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
@@ -12,7 +12,7 @@ ModVersionParser = require './mod_version_parser'
|
|||||||
|
|
||||||
########################################################################################################################
|
########################################################################################################################
|
||||||
|
|
||||||
module.exports = class RecipeCatalog extends BaseModel
|
module.exports = class ModPack extends BaseModel
|
||||||
|
|
||||||
constructor: (attributes={}, options={})->
|
constructor: (attributes={}, options={})->
|
||||||
attributes.books ?= []
|
attributes.books ?= []
|
||||||
@@ -119,7 +119,7 @@ module.exports = class RecipeCatalog extends BaseModel
|
|||||||
# Object Overrides #############################################################################
|
# Object Overrides #############################################################################
|
||||||
|
|
||||||
toString: ->
|
toString: ->
|
||||||
return "RecipeCatalog (#{@cid}) {books:#{@books.length} items}"
|
return "ModPack (#{@cid}) {books:#{@books.length} items}"
|
||||||
|
|
||||||
_sortBooks:->
|
_sortBooks:->
|
||||||
@books.sort (a, b)->
|
@books.sort (a, b)->
|
||||||
@@ -7,4 +7,4 @@
|
|||||||
|
|
||||||
.view__landing_page
|
.view__landing_page
|
||||||
.view__crafting_table
|
.view__crafting_table
|
||||||
.view__recipe_catalog
|
.view__mod_pack
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
//-
|
//-
|
||||||
//- Crafting Guide - recipe_catalog.jade
|
//- Crafting Guide - mod_pack.jade
|
||||||
//-
|
//-
|
||||||
//- Copyright (c) 2014 by Redwood Labs
|
//- Copyright (c) 2014 by Redwood Labs
|
||||||
//- All rights reserved.
|
//- All rights reserved.
|
||||||
//-
|
//-
|
||||||
|
|
||||||
.view__recipe_catalog
|
.view__mod_pack
|
||||||
h2
|
h2
|
||||||
img(src="/images/bookshelf.png")
|
img(src="/images/bookshelf.png")
|
||||||
p Recipe Catalog
|
p Recipe Catalog
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
###
|
###
|
||||||
|
|
||||||
RecipeCatalog = require '../src/scripts/models/recipe_catalog'
|
ModPack = require '../src/scripts/models/mod_pack'
|
||||||
CraftingPlan = require '../src/scripts/models/crafting_plan'
|
CraftingPlan = require '../src/scripts/models/crafting_plan'
|
||||||
|
|
||||||
########################################################################################################################
|
########################################################################################################################
|
||||||
@@ -17,7 +17,7 @@ catalog = plan = null
|
|||||||
describe 'CraftingPlan', ->
|
describe 'CraftingPlan', ->
|
||||||
|
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
catalog = new RecipeCatalog
|
catalog = new ModPack
|
||||||
catalog.loadBookData {
|
catalog.loadBookData {
|
||||||
version: 1
|
version: 1
|
||||||
mod_name: 'Minecraft'
|
mod_name: 'Minecraft'
|
||||||
|
|||||||
Reference in New Issue
Block a user