1
0

Fixed crafting recipe matching.

Fixes #2096.
This commit is contained in:
Mattes D 2015-05-31 21:21:57 +02:00
parent 98df75d5ab
commit 25e83bc1d9

View File

@ -771,9 +771,12 @@ cCraftingRecipes::cRecipe * cCraftingRecipes::MatchRecipe(const cItem * a_Crafti
continue; continue;
} }
Recipe->m_Ingredients.push_back(*itrS); Recipe->m_Ingredients.push_back(*itrS);
Recipe->m_Ingredients.back().x += a_OffsetX;
Recipe->m_Ingredients.back().y += a_OffsetY;
} }
Recipe->m_Ingredients.insert(Recipe->m_Ingredients.end(), MatchedSlots.begin(), MatchedSlots.end()); Recipe->m_Ingredients.insert(Recipe->m_Ingredients.end(), MatchedSlots.begin(), MatchedSlots.end());
// Handle the fireworks-related effects:
// We use Recipe instead of a_Recipe because we want the wildcard ingredients' slot numbers as well, which was just added previously // We use Recipe instead of a_Recipe because we want the wildcard ingredients' slot numbers as well, which was just added previously
HandleFireworks(a_CraftingGrid, Recipe.get(), a_GridStride, a_OffsetX, a_OffsetY); HandleFireworks(a_CraftingGrid, Recipe.get(), a_GridStride, a_OffsetX, a_OffsetY);