diff options
Diffstat (limited to 'src/Items/ItemShovel.h')
-rw-r--r-- | src/Items/ItemShovel.h | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/src/Items/ItemShovel.h b/src/Items/ItemShovel.h index 49ecf3348..0715f8d99 100644 --- a/src/Items/ItemShovel.h +++ b/src/Items/ItemShovel.h @@ -36,21 +36,7 @@ public: - virtual bool OnDiggingBlock(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_Dir) override - { - BLOCKTYPE Block = a_World->GetBlock(a_BlockX, a_BlockY, a_BlockZ); - if (Block == E_BLOCK_SNOW) - { - cChunkInterface ChunkInterface(a_World->GetChunkMap()); - cBlockInServerPluginInterface PluginInterface(*a_World); - BlockHandler(Block)->DropBlock(ChunkInterface, *a_World, PluginInterface, a_Player, a_BlockX, a_BlockY, a_BlockZ); - a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_AIR, 0); - a_Player->UseEquippedItem(cItemHandler::dlaBreakBlock); - return true; - } - return false; - } virtual bool CanHarvestBlock(BLOCKTYPE a_BlockType) override { @@ -61,6 +47,10 @@ public: return super::CanHarvestBlock(a_BlockType); } + + + + virtual bool CanRepairWithRawMaterial(short a_ItemType) override { switch (m_ItemType) @@ -74,6 +64,10 @@ public: return false; } + + + + virtual float GetBlockBreakingStrength(BLOCKTYPE a_Block) override { switch (a_Block) @@ -101,9 +95,7 @@ public: } break; } - default: return super::GetBlockBreakingStrength(a_Block); } - ASSERT(!"Something is wrong here... Maybe they are shovels out of a new material?"); - return 1.0f; + return super::GetBlockBreakingStrength(a_Block); } }; |