summaryrefslogtreecommitdiffstats
path: root/src/Items
diff options
context:
space:
mode:
Diffstat (limited to 'src/Items')
-rw-r--r--src/Items/ItemArmor.h12
-rw-r--r--src/Items/ItemHandler.cpp2
-rw-r--r--src/Items/ItemHandler.h2
-rw-r--r--src/Items/ItemPickaxe.h12
-rw-r--r--src/Items/ItemShovel.h12
-rw-r--r--src/Items/ItemSword.h12
6 files changed, 26 insertions, 26 deletions
diff --git a/src/Items/ItemArmor.h b/src/Items/ItemArmor.h
index f53100bb1..2436df5bd 100644
--- a/src/Items/ItemArmor.h
+++ b/src/Items/ItemArmor.h
@@ -60,7 +60,7 @@ public:
return true;
}
- virtual bool CanRepairWithItem(const cItem & a_Item) override
+ virtual bool CanRepairWithRawMaterial(short a_ItemType) override
{
switch (m_ItemType)
{
@@ -69,35 +69,35 @@ public:
case E_ITEM_CHAIN_HELMET:
case E_ITEM_CHAIN_LEGGINGS:
{
- return (a_Item.m_ItemType == E_ITEM_IRON);
+ return (a_ItemType == E_ITEM_IRON);
}
case E_ITEM_DIAMOND_BOOTS:
case E_ITEM_DIAMOND_CHESTPLATE:
case E_ITEM_DIAMOND_HELMET:
case E_ITEM_DIAMOND_LEGGINGS:
{
- return (a_Item.m_ItemType == E_ITEM_DIAMOND);
+ return (a_ItemType == E_ITEM_DIAMOND);
}
case E_ITEM_IRON_BOOTS:
case E_ITEM_IRON_CHESTPLATE:
case E_ITEM_IRON_HELMET:
case E_ITEM_IRON_LEGGINGS:
{
- return (a_Item.m_ItemType == E_ITEM_IRON);
+ return (a_ItemType == E_ITEM_IRON);
}
case E_ITEM_GOLD_BOOTS:
case E_ITEM_GOLD_CHESTPLATE:
case E_ITEM_GOLD_HELMET:
case E_ITEM_GOLD_LEGGINGS:
{
- return (a_Item.m_ItemType == E_ITEM_GOLD);
+ return (a_ItemType == E_ITEM_GOLD);
}
case E_ITEM_LEATHER_BOOTS:
case E_ITEM_LEATHER_CAP:
case E_ITEM_LEATHER_PANTS:
case E_ITEM_LEATHER_TUNIC:
{
- return (a_Item.m_ItemType == E_ITEM_LEATHER);
+ return (a_ItemType == E_ITEM_LEATHER);
}
}
return false;
diff --git a/src/Items/ItemHandler.cpp b/src/Items/ItemHandler.cpp
index 105def2ce..5cc5b66a0 100644
--- a/src/Items/ItemHandler.cpp
+++ b/src/Items/ItemHandler.cpp
@@ -512,7 +512,7 @@ bool cItemHandler::IsPlaceable(void)
-bool cItemHandler::CanRepairWithItem(const cItem & a_Item)
+bool cItemHandler::CanRepairWithRawMaterial(short a_ItemType)
{
return false;
}
diff --git a/src/Items/ItemHandler.h b/src/Items/ItemHandler.h
index 420eefcf1..ca090eb29 100644
--- a/src/Items/ItemHandler.h
+++ b/src/Items/ItemHandler.h
@@ -86,7 +86,7 @@ public:
virtual bool IsPlaceable(void);
/** Can the anvil repair this item, when a_Item is the second input? */
- virtual bool CanRepairWithItem(const cItem & a_Item);
+ virtual bool CanRepairWithRawMaterial(short a_ItemType);
/** Get the repair cost from the item, or 0 if the item hasn't repair cost. */
virtual int GetRepairCost(void);
diff --git a/src/Items/ItemPickaxe.h b/src/Items/ItemPickaxe.h
index 46e68ec70..ff2c2069b 100644
--- a/src/Items/ItemPickaxe.h
+++ b/src/Items/ItemPickaxe.h
@@ -86,15 +86,15 @@ public:
return false;
}
- virtual bool CanRepairWithItem(const cItem & a_Item) override
+ virtual bool CanRepairWithRawMaterial(short a_ItemType) override
{
switch (m_ItemType)
{
- case E_ITEM_WOODEN_PICKAXE: return (a_Item.m_ItemType == E_BLOCK_PLANKS);
- case E_ITEM_STONE_PICKAXE: return (a_Item.m_ItemType == E_BLOCK_COBBLESTONE);
- case E_ITEM_IRON_PICKAXE: return (a_Item.m_ItemType == E_ITEM_IRON);
- case E_ITEM_GOLD_PICKAXE: return (a_Item.m_ItemType == E_ITEM_GOLD);
- case E_ITEM_DIAMOND_PICKAXE: return (a_Item.m_ItemType == E_ITEM_DIAMOND);
+ case E_ITEM_WOODEN_PICKAXE: return (a_ItemType == E_BLOCK_PLANKS);
+ case E_ITEM_STONE_PICKAXE: return (a_ItemType == E_BLOCK_COBBLESTONE);
+ case E_ITEM_IRON_PICKAXE: return (a_ItemType == E_ITEM_IRON);
+ case E_ITEM_GOLD_PICKAXE: return (a_ItemType == E_ITEM_GOLD);
+ case E_ITEM_DIAMOND_PICKAXE: return (a_ItemType == E_ITEM_DIAMOND);
}
return false;
}
diff --git a/src/Items/ItemShovel.h b/src/Items/ItemShovel.h
index 7659ccc54..333ba46e8 100644
--- a/src/Items/ItemShovel.h
+++ b/src/Items/ItemShovel.h
@@ -42,15 +42,15 @@ public:
return (a_BlockType == E_BLOCK_SNOW);
}
- virtual bool CanRepairWithItem(const cItem & a_Item) override
+ virtual bool CanRepairWithRawMaterial(short a_ItemType) override
{
switch (m_ItemType)
{
- case E_ITEM_WOODEN_SHOVEL: return (a_Item.m_ItemType == E_BLOCK_PLANKS);
- case E_ITEM_STONE_SHOVEL: return (a_Item.m_ItemType == E_BLOCK_COBBLESTONE);
- case E_ITEM_IRON_SHOVEL: return (a_Item.m_ItemType == E_ITEM_IRON);
- case E_ITEM_GOLD_SHOVEL: return (a_Item.m_ItemType == E_ITEM_GOLD);
- case E_ITEM_DIAMOND_SHOVEL: return (a_Item.m_ItemType == E_ITEM_DIAMOND);
+ case E_ITEM_WOODEN_SHOVEL: return (a_ItemType == E_BLOCK_PLANKS);
+ case E_ITEM_STONE_SHOVEL: return (a_ItemType == E_BLOCK_COBBLESTONE);
+ case E_ITEM_IRON_SHOVEL: return (a_ItemType == E_ITEM_IRON);
+ case E_ITEM_GOLD_SHOVEL: return (a_ItemType == E_ITEM_GOLD);
+ case E_ITEM_DIAMOND_SHOVEL: return (a_ItemType == E_ITEM_DIAMOND);
}
return false;
}
diff --git a/src/Items/ItemSword.h b/src/Items/ItemSword.h
index 34656ff99..44feb2d83 100644
--- a/src/Items/ItemSword.h
+++ b/src/Items/ItemSword.h
@@ -24,15 +24,15 @@ public:
return (a_BlockType == E_BLOCK_COBWEB);
}
- virtual bool CanRepairWithItem(const cItem & a_Item) override
+ virtual bool CanRepairWithRawMaterial(short a_ItemType) override
{
switch (m_ItemType)
{
- case E_ITEM_WOODEN_SWORD: return (a_Item.m_ItemType == E_BLOCK_PLANKS);
- case E_ITEM_STONE_SWORD: return (a_Item.m_ItemType == E_BLOCK_COBBLESTONE);
- case E_ITEM_IRON_SWORD: return (a_Item.m_ItemType == E_ITEM_IRON);
- case E_ITEM_GOLD_SWORD: return (a_Item.m_ItemType == E_ITEM_GOLD);
- case E_ITEM_DIAMOND_SWORD: return (a_Item.m_ItemType == E_ITEM_DIAMOND);
+ case E_ITEM_WOODEN_SWORD: return (a_ItemType == E_BLOCK_PLANKS);
+ case E_ITEM_STONE_SWORD: return (a_ItemType == E_BLOCK_COBBLESTONE);
+ case E_ITEM_IRON_SWORD: return (a_ItemType == E_ITEM_IRON);
+ case E_ITEM_GOLD_SWORD: return (a_ItemType == E_ITEM_GOLD);
+ case E_ITEM_DIAMOND_SWORD: return (a_ItemType == E_ITEM_DIAMOND);
}
return false;
}