diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-12 23:30:32 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-12 23:30:32 +0200 |
commit | 223967b80d783df1be2df5f74ddf198f373fbc57 (patch) | |
tree | 6bf155fc8cfbdf635b6ef40d4e7ab200029de6d9 /source/CraftingRecipes.h | |
parent | Updated the crafting recipes architecture to better support crafting hooks. Removed the old recipe file and implementation altogether. (diff) | |
download | cuberite-223967b80d783df1be2df5f74ddf198f373fbc57.tar cuberite-223967b80d783df1be2df5f74ddf198f373fbc57.tar.gz cuberite-223967b80d783df1be2df5f74ddf198f373fbc57.tar.bz2 cuberite-223967b80d783df1be2df5f74ddf198f373fbc57.tar.lz cuberite-223967b80d783df1be2df5f74ddf198f373fbc57.tar.xz cuberite-223967b80d783df1be2df5f74ddf198f373fbc57.tar.zst cuberite-223967b80d783df1be2df5f74ddf198f373fbc57.zip |
Diffstat (limited to '')
-rw-r--r-- | source/CraftingRecipes.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/source/CraftingRecipes.h b/source/CraftingRecipes.h index 3d55a3476..8e4422b1c 100644 --- a/source/CraftingRecipes.h +++ b/source/CraftingRecipes.h @@ -14,6 +14,13 @@ +// fwd: cPlayer.h
+class cPlayer;
+
+
+
+
+
class cCraftingGrid // tolua_export
{ // tolua_export
public:
@@ -26,7 +33,7 @@ public: int GetWidth (void) const {return m_Width; }
int GetHeight(void) const {return m_Height; }
cItem & GetItem (int x, int y) const;
- void SetItem (int x, int y, ENUM_ITEM_ID a_ItemType, short a_ItemHealth, int a_ItemCount);
+ void SetItem (int x, int y, ENUM_ITEM_ID a_ItemType, int a_ItemCount, short a_ItemHealth);
void SetItem (int x, int y, const cItem & a_Item);
void Clear (void);
@@ -65,15 +72,15 @@ public: int GetIngredientsHeight(void) const {return m_Ingredients.GetHeight(); }
cItem & GetIngredient (int x, int y) const {return m_Ingredients.GetItem(x, y); }
const cItem & GetResult (void) const {return m_Result; }
- void SetResult (ENUM_ITEM_ID a_ItemType, short a_ItemHealth, int a_ItemCount);
+ void SetResult (ENUM_ITEM_ID a_ItemType, int a_ItemCount, short a_ItemHealth);
void SetResult (const cItem & a_Item)
{
m_Result = a_Item;
}
- void SetIngredient (int x, int y, ENUM_ITEM_ID a_ItemType, short a_ItemHealth, int a_ItemCount)
+ void SetIngredient (int x, int y, ENUM_ITEM_ID a_ItemType, int a_ItemCount, short a_ItemHealth)
{
- m_Ingredients.SetItem(x, y, a_ItemType, a_ItemHealth, a_ItemCount);
+ m_Ingredients.SetItem(x, y, a_ItemType, a_ItemCount, a_ItemHealth);
}
void SetIngredient (int x, int y, const cItem & a_Item)
@@ -108,7 +115,7 @@ public: ~cCraftingRecipes();
/// Returns the recipe for current crafting grid. Doesn't modify the grid. Clears a_Recipe if no recipe found.
- void GetRecipe(const cCraftingGrid & a_CraftingGrid, cCraftingRecipe & a_Recipe);
+ void GetRecipe(const cPlayer * a_Player, const cCraftingGrid & a_CraftingGrid, cCraftingRecipe & a_Recipe);
protected:
|