Merge pull request #10695 from VOREStation/upstream-merge-8141

[MIRROR] Improves select_recipe.
This commit is contained in:
Novacat
2021-06-18 23:38:07 -04:00
committed by Chompstation Bot
parent 8aa043f4f4
commit a35d6f402d
3 changed files with 44 additions and 15 deletions

View File

@@ -57,12 +57,6 @@
if (!.)
. = B[STAT_ENTRY_COUNT] - A[STAT_ENTRY_COUNT]
// Compares complexity of recipes for use in cooking, etc. This is for telling which recipe to make, not for showing things to the player.
/proc/cmp_recipe_complexity_dsc(datum/recipe/A, datum/recipe/B)
var/a_score = LAZYLEN(A.items) + LAZYLEN(A.reagents) + LAZYLEN(A.fruit)
var/b_score = LAZYLEN(B.items) + LAZYLEN(B.reagents) + LAZYLEN(B.fruit)
return b_score - a_score
/proc/cmp_typepaths_asc(A, B)
return sorttext("[B]","[A]")