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 1147c3c1e..3540ff702 100644 --- a/src/scripts/models/parser_versions/mod_version_parser_v1.coffee +++ b/src/scripts/models/parser_versions/mod_version_parser_v1.coffee @@ -10,7 +10,7 @@ Item = require '../item' ItemSlug = require '../item_slug' ModVersion = require '../mod_version' Recipe = require '../recipe' -Stack = require '../stack' +Stack = require '../simple_stack' StringBuilder = require '../string_builder' ######################################################################################################################## diff --git a/src/scripts/models/simple_stack.coffee b/src/scripts/models/simple_stack.coffee new file mode 100644 index 000000000..bf495a6b3 --- /dev/null +++ b/src/scripts/models/simple_stack.coffee @@ -0,0 +1,22 @@ +### +Crafting Guide - simple_stack.coffee + +Copyright (c) 2014-2015 by Redwood Labs +All rights reserved. +### + +######################################################################################################################## + +module.exports = class Stack + + constructor: (attributes={}, options={})-> + if not attributes.itemSlug? then throw new Error 'attributes.itemSlug is required' + attributes.quantity ?= 1 + + @itemSlug = attributes.itemSlug + @quantity = attributes.quantity + + # Object Overrides ############################################################################# + + toString: -> + return "#{@quantity} #{@itemSlug}"