diff options
-rw-r--r-- | src/Bindings/ManualBindings.h | 10 | ||||
-rw-r--r-- | src/CraftingRecipes.cpp | 3 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/Bindings/ManualBindings.h b/src/Bindings/ManualBindings.h index 83b960058..f8c9b96de 100644 --- a/src/Bindings/ManualBindings.h +++ b/src/Bindings/ManualBindings.h @@ -253,8 +253,9 @@ public: // Check params: cLuaState L(tolua_S); if ( - !L.CheckParamNumber(2, 5) || - !L.CheckParamFunction(6) + !L.CheckParamNumber(2, 4) || + !L.CheckParamFunction(5) || + !L.CheckParamEnd(6) ) { return 0; @@ -316,8 +317,9 @@ public: // Check params: cLuaState L(tolua_S); if ( - !L.CheckParamNumber(2, 4) || - !L.CheckParamFunction(5) + !L.CheckParamNumber(2, 3) || + !L.CheckParamFunction(4) || + !L.CheckParamEnd(5) ) { return 0; diff --git a/src/CraftingRecipes.cpp b/src/CraftingRecipes.cpp index 755b152b0..a95ac5f84 100644 --- a/src/CraftingRecipes.cpp +++ b/src/CraftingRecipes.cpp @@ -771,9 +771,12 @@ cCraftingRecipes::cRecipe * cCraftingRecipes::MatchRecipe(const cItem * a_Crafti continue; } 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()); + // 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 HandleFireworks(a_CraftingGrid, Recipe.get(), a_GridStride, a_OffsetX, a_OffsetY); |