Fixed Bug #237
Sign placement git-svn-id: http://mc-server.googlecode.com/svn/trunk@781 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
eba0437d68
commit
a39adadd0f
@ -656,6 +656,7 @@
|
||||
<ClInclude Include="..\source\items\ItemSeeds.h" />
|
||||
<ClInclude Include="..\source\items\ItemShears.h" />
|
||||
<ClInclude Include="..\source\items\ItemShovel.h" />
|
||||
<ClInclude Include="..\source\items\ItemSign.h" />
|
||||
<ClInclude Include="..\source\items\ItemSlab.h" />
|
||||
<ClInclude Include="..\source\items\ItemSugarcane.h" />
|
||||
<ClInclude Include="..\source\items\ItemSword.h" />
|
||||
|
@ -1648,6 +1648,9 @@
|
||||
<Filter>Generating</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\source\ByteBuffer.h" />
|
||||
<ClInclude Include="..\source\items\ItemSign.h">
|
||||
<Filter>Items</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\source\AllToLua.pkg">
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "ItemSword.h"
|
||||
#include "ItemDoor.h"
|
||||
#include "ItemFood.h"
|
||||
#include "ItemSign.h"
|
||||
|
||||
#include "../blocks/Block.h"
|
||||
|
||||
@ -162,6 +163,9 @@ cItemHandler *cItemHandler::CreateItemHandler(int a_ItemID)
|
||||
{
|
||||
return new cItemFoodHandler(a_ItemID);
|
||||
}
|
||||
|
||||
case E_ITEM_SIGN:
|
||||
return new cItemSignHandler(a_ItemID);
|
||||
}
|
||||
}
|
||||
|
||||
|
25
source/items/ItemSign.h
Normal file
25
source/items/ItemSign.h
Normal file
@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include "Item.h"
|
||||
#include "../cWorld.h"
|
||||
|
||||
class cItemSignHandler : public cItemHandler
|
||||
{
|
||||
public:
|
||||
cItemSignHandler(int a_ItemID)
|
||||
: cItemHandler(a_ItemID)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
virtual bool IsPlaceable() override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual BLOCKTYPE GetBlockType() override
|
||||
{
|
||||
return E_BLOCK_SIGN_POST;
|
||||
}
|
||||
|
||||
};
|
Loading…
Reference in New Issue
Block a user