From 85164fab8e5298ce1c0582b2aebb7e6a283d4a0c Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Mon, 1 Oct 2012 21:08:15 +0000 Subject: Slight refactoring of BlockHandlers - dropping unneeded virtual functions ( http://forum.mc-server.org/showthread.php?tid=434&pid=4734#pid4734 ) git-svn-id: http://mc-server.googlecode.com/svn/trunk@917 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Blocks/BlockRedstoneTorch.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'source/Blocks/BlockRedstoneTorch.h') diff --git a/source/Blocks/BlockRedstoneTorch.h b/source/Blocks/BlockRedstoneTorch.h index eeb2afc5c..857c61761 100644 --- a/source/Blocks/BlockRedstoneTorch.h +++ b/source/Blocks/BlockRedstoneTorch.h @@ -1,5 +1,6 @@ #pragma once + #include "BlockRedstone.h" #include "BlockTorch.h" #include "../Torch.h" @@ -8,7 +9,8 @@ -class cBlockRedstoneTorchHandler : public cBlockTorchHandler +class cBlockRedstoneTorchHandler : + public cBlockTorchHandler { public: cBlockRedstoneTorchHandler(BLOCKTYPE a_BlockID) @@ -16,13 +18,20 @@ public: { } - virtual int GetDropID(void) override + + virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override { - return E_ITEM_REDSTONE_TORCH_ON; + // Always drop the ON torch, meta 0 + a_Pickups.push_back(cItem(E_ITEM_REDSTONE_TORCH_ON, 1, 0)); } - virtual AString GetStepSound(void) override + + virtual const char * GetStepSound(void) override { return "step.wood"; } -}; +} ; + + + + -- cgit v1.2.3