591 {
592 int count = 0;
593 int smallest = 9999;
594 int smallest_index = 0;
596
597
598
599
600
601
603
604 for (int i = 0; i < num_of_ingredients; i++)
605 {
607 if (!cobject)
608 {
609 return 0;
610 }
611 if (cobject.GetNumberOfRecipes() < smallest)
612 {
613 smallest = cobject.GetNumberOfRecipes();
614 smallest_index = i;
615 co_least_recipes = cobject;
616 }
617 }
618
619
620 array<int> recipes = co_least_recipes.GetRecipes();
621 for (
int x = 0;
x < recipes.Count();
x++)
622 {
623 int id = recipes.Get(
x);
624 for (int z = 0; z < num_of_ingredients; z++)
625 {
626 if ( z!= smallest_index)
627 {
629 if ( cobject2.IsContainRecipe(id) )
630 {
632 count++;
633 }
634 }
635 }
636 }
637 return count;
638 }
eBleedingSourceType GetType()
void PluginRecipesManager()
ref array< int > m_RecipesMatched