Complete refactoring to move Recipes into Items
* Changed "version" to "dataVersion" in data format * Changed the "modName" and "modVersion" fields on the ModVersion class to remove the "mod" prefix and changed the data format to match * Change the Stack class to use the itemSlug instead of the item itself * Update the ModVersion and ModPack classes to include methods for recording a correspondence between slugs and names. Update code which displays items from stacks to use these methods to determine display names. * Add a reference from Recipe back to the item it creates
This commit is contained in:
@@ -100,12 +100,15 @@ module.exports = class CraftingTableController extends BaseController
|
||||
@$resultList.empty()
|
||||
|
||||
if @model.plan?
|
||||
@model.plan.need.each (item)=>
|
||||
@$needList.append "<li><span class='quantity'>#{item.quantity}</span> #{item.name}</li>"
|
||||
@model.plan.make.each (item)=>
|
||||
@$makeList.append "<li><span class='quantity'>#{item.quantity}</span> #{item.name}</li>"
|
||||
@model.plan.result.each (item)=>
|
||||
@$resultList.append "<li><span class='quantity'>#{item.quantity}</span> #{item.name}</li>"
|
||||
@model.plan.need.each (stack)=>
|
||||
name = @model.modPack.findName stack.itemSlug
|
||||
@$needList.append "<li><span class='quantity'>#{stack.quantity}</span> #{name}</li>"
|
||||
@model.plan.make.each (stack)=>
|
||||
name = @model.modPack.findName stack.itemSlug
|
||||
@$makeList.append "<li><span class='quantity'>#{stack.quantity}</span> #{name}</li>"
|
||||
@model.plan.result.each (stack)=>
|
||||
name = @model.modPack.findName stack.itemSlug
|
||||
@$resultList.append "<li><span class='quantity'>#{stack.quantity}</span> #{name}</li>"
|
||||
|
||||
super
|
||||
|
||||
|
||||
Reference in New Issue
Block a user