Fix various minor bugs
* Fix "update" recipes in IC2 classic to use the new "update" command * Remove the crafting plan model from the item detail page as it isn't being used there right now and can be slow for complex items * Update the `Recipe.compareFor` method to be able to work without an item slug as a reference
This commit is contained in:
@@ -38,16 +38,17 @@ module.exports = class Recipe extends BaseModel
|
||||
# Class Methods ################################################################################
|
||||
|
||||
@compareFor: (a, b, itemSlug)->
|
||||
aValue = a.itemSlug.matches itemSlug
|
||||
bValue = b.itemSlug.matches itemSlug
|
||||
if aValue isnt bValue
|
||||
return -1 if aValue
|
||||
return +1 if bValue
|
||||
if itemSlug?
|
||||
aValue = a.itemSlug.matches itemSlug
|
||||
bValue = b.itemSlug.matches itemSlug
|
||||
if aValue isnt bValue
|
||||
return -1 if aValue
|
||||
return +1 if bValue
|
||||
|
||||
aValue = a.getQuantityProducedOf itemSlug
|
||||
bValue = b.getQuantityProducedOf itemSlug
|
||||
if aValue isnt bValue
|
||||
return if aValue > bValue then -1 else +1
|
||||
aValue = a.getQuantityProducedOf itemSlug
|
||||
bValue = b.getQuantityProducedOf itemSlug
|
||||
if aValue isnt bValue
|
||||
return if aValue > bValue then -1 else +1
|
||||
|
||||
aValue = a.getInputCount()
|
||||
bValue = b.getInputCount()
|
||||
|
||||
Reference in New Issue
Block a user