2013-07-29 07:13:03 -04:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "BlockHandler.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-30 10:50:15 -04:00
|
|
|
|
|
|
|
|
2013-07-29 07:13:03 -04:00
|
|
|
class cBlockDirtHandler :
|
|
|
|
public cBlockHandler
|
|
|
|
{
|
2019-10-11 05:02:53 -04:00
|
|
|
using super = cBlockHandler;
|
|
|
|
|
2013-07-29 07:13:03 -04:00
|
|
|
public:
|
2019-10-11 05:02:53 -04:00
|
|
|
|
|
|
|
cBlockDirtHandler(BLOCKTYPE a_BlockType):
|
|
|
|
super(a_BlockType)
|
2013-07-29 07:13:03 -04:00
|
|
|
{
|
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2019-10-16 04:06:34 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) override
|
2013-07-29 07:13:03 -04:00
|
|
|
{
|
2014-09-30 14:31:27 -04:00
|
|
|
if (a_BlockMeta == E_META_DIRT_COARSE)
|
|
|
|
{
|
|
|
|
// Drop the coarse block (dirt, meta 1)
|
2019-10-16 04:06:34 -04:00
|
|
|
return cItem(E_BLOCK_DIRT, 1, E_META_DIRT_COARSE);
|
2014-09-30 14:31:27 -04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2019-10-16 04:06:34 -04:00
|
|
|
return cItem(E_BLOCK_DIRT, 1, E_META_DIRT_NORMAL);
|
2014-09-30 14:31:27 -04:00
|
|
|
}
|
2013-07-29 07:13:03 -04:00
|
|
|
}
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2019-10-16 04:06:34 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-30 10:50:15 -04:00
|
|
|
virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override
|
|
|
|
{
|
|
|
|
UNUSED(a_Meta);
|
2020-03-16 20:23:50 -04:00
|
|
|
return 10;
|
2015-06-30 10:50:15 -04:00
|
|
|
}
|
2013-07-29 07:13:03 -04:00
|
|
|
} ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|