75 void SetResult (
ENUM_ITEM_ID a_ItemType,
char a_ItemCount,
short a_ItemHealth);
83 m_Ingredients.SetItem(x, y, a_ItemType, a_ItemCount, a_ItemHealth);
88 m_Ingredients.SetItem(x, y, a_Item);
111 static const int MAX_GRID_WIDTH = 3;
112 static const int MAX_GRID_HEIGHT = 3;
144 void LoadRecipes(
void);
145 void ClearRecipes(
void);
148 void AddRecipeLine(
int a_LineNum,
const AString & a_RecipeLine);
151 bool ParseItem(
const AString & a_String,
cItem & a_Item);
154 bool ParseIngredient(
const AString & a_String,
cRecipe * a_Recipe);
157 void NormalizeIngredients(
cRecipe * a_Recipe);
160 cRecipe * FindRecipe(
const cItem * a_CraftingGrid,
int a_GridWidth,
int a_GridHeight);
163 cRecipe * FindRecipeCropped(
const cItem * a_CraftingGrid,
int a_GridWidth,
int a_GridHeight,
int a_GridStride);
166 cRecipe * MatchRecipe(
const cItem * a_CraftingGrid,
int a_GridWidth,
int a_GridHeight,
int a_GridStride,
const cRecipe * a_Recipe,
int a_OffsetX,
int a_OffsetY);
cRecipeSlots m_Ingredients
std::vector< cRecipeSlot > cRecipeSlots
void ConsumeGrid(const cCraftingGrid &a_Grid)
Removes items in a_Grid from m_Items[] (used by cCraftingRecipe::ConsumeIngredients()) ...
const cItem & GetResult(void) const
void SetIngredient(int x, int y, ENUM_ITEM_ID a_ItemType, char a_ItemCount, short a_ItemHealth)
cItem & GetIngredient(int x, int y) const
std::vector< cRecipe * > cRecipes
cItem * GetItems(void) const
void SetIngredient(int x, int y, const cItem &a_Item)
int GetIngredientsHeight(void) const
void SetResult(const cItem &a_Item)
void SetItem(int x, int y, ENUM_ITEM_ID a_ItemType, char a_ItemCount, short a_ItemHealth)
void CopyToItems(cItem *a_Items) const
Copies internal contents into the item array specified.
int GetHeight(void) const
cItem & GetItem(int x, int y) const
cCraftingGrid(const cCraftingGrid &a_Original)
int GetIngredientsWidth(void) const
void Dump(void)
Dumps the entire crafting grid using LOGD()
cCraftingGrid m_Ingredients