1
0

Added first implementation of cClearMetaOnDrop

This commit is contained in:
Tycho 2014-07-14 20:26:36 +01:00
parent a4d9ccded4
commit 1929d16724
2 changed files with 21 additions and 2 deletions

View File

@ -3,17 +3,18 @@
#include "BlockHandler.h"
#include "../World.h"
#include "ClearMetaOnDrop.h"
class cBlockLadderHandler :
public cMetaRotator<cBlockHandler, 0x07, 0x02, 0x05, 0x03, 0x04>
public cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x07, 0x02, 0x05, 0x03, 0x04> >
{
public:
cBlockLadderHandler(BLOCKTYPE a_BlockType)
: cMetaRotator<cBlockHandler, 0x07, 0x02, 0x05, 0x03, 0x04>(a_BlockType)
: cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x07, 0x02, 0x05, 0x03, 0x04> >(a_BlockType)
{
}

View File

@ -0,0 +1,18 @@
#pragma once
template<class Base>
class cClearMetaOnDrop : public Base
{
public:
cClearMetaOnDrop(BLOCKTYPE a_BlockType) :
Base(a_BlockType)
{}
virtual ~cClearMetaOnDrop() {}
virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
{
a_Pickups.push_back(cItem(this->m_BlockType, 1, 0));
}
};