fixed redstone repeater placement

git-svn-id: http://mc-server.googlecode.com/svn/trunk@673 0a769ca7-a7f5-676a-18bf-c427514a06d6
master
lapayo94@gmail.com 2012-07-16 18:19:25 +00:00
parent ba70a15191
commit d3b7a39f92
4 changed files with 38 additions and 4 deletions

View File

@ -531,9 +531,9 @@
<ClInclude Include="..\source\blocks\BlockLeaves.h" />
<ClInclude Include="..\source\blocks\BlockMelon.h" />
<ClInclude Include="..\source\blocks\BlockMushroom.h" />
<ClInclude Include="..\source\blocks\BlockOre.h" />
<ClInclude Include="..\source\blocks\BlockPiston.h" />
<ClInclude Include="..\source\blocks\BlockRedstone.h" />
<ClInclude Include="..\source\blocks\BlockRedstoneOre.h" />
<ClInclude Include="..\source\blocks\BlockRedstoneRepeater.h" />
<ClInclude Include="..\source\blocks\BlockRedstoneTorch.h" />
<ClInclude Include="..\source\blocks\BlockSapling.h" />
@ -652,6 +652,7 @@
<ClInclude Include="..\source\items\ItemLighter.h" />
<ClInclude Include="..\source\items\ItemPickaxe.h" />
<ClInclude Include="..\source\items\ItemRedstoneDust.h" />
<ClInclude Include="..\source\items\ItemRedstoneRepeater.h" />
<ClInclude Include="..\source\items\ItemSapling.h" />
<ClInclude Include="..\source\items\ItemSeeds.h" />
<ClInclude Include="..\source\items\ItemShears.h" />

View File

@ -1649,9 +1649,6 @@
<ClInclude Include="..\source\items\ItemSword.h">
<Filter>Items</Filter>
</ClInclude>
<ClInclude Include="..\source\blocks\BlockRedstoneOre.h">
<Filter>Blocks</Filter>
</ClInclude>
<ClInclude Include="..\source\blocks\BlockStone.h">
<Filter>Blocks</Filter>
</ClInclude>
@ -1664,6 +1661,12 @@
<ClInclude Include="..\source\blocks\BlockIce.h">
<Filter>Blocks</Filter>
</ClInclude>
<ClInclude Include="..\source\blocks\BlockOre.h">
<Filter>Blocks</Filter>
</ClInclude>
<ClInclude Include="..\source\items\ItemRedstoneRepeater.h">
<Filter>Items</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\source\AllToLua.pkg">

View File

@ -15,6 +15,7 @@
#include "ItemBucket.h"
#include "ItemLighter.h"
#include "ItemRedstoneDust.h"
#include "ItemRedstoneRepeater.h"
#include "ItemSeeds.h"
#include "ItemDye.h"
#include "ItemSugarcane.h"
@ -69,6 +70,8 @@ cItemHandler *cItemHandler::CreateItemHandler(int a_ItemID)
return new cItemSaplingHandler(a_ItemID);
case E_ITEM_REDSTONE_DUST:
return new cItemRedstoneDustHandler(a_ItemID);
case E_ITEM_REDSTONE_REPEATER:
return new cItemRedstoneRepeaterHandler(a_ItemID);
case E_ITEM_BUCKET:
case E_ITEM_WATER_BUCKET:
case E_ITEM_LAVA_BUCKET:

View File

@ -0,0 +1,27 @@
#pragma once
#include "Item.h"
class cItemRedstoneRepeaterHandler : public cItemHandler
{
public:
cItemRedstoneRepeaterHandler(int a_ItemID)
: cItemHandler(a_ItemID)
{
}
virtual bool IsPlaceable()
{
return true;
}
virtual BLOCKTYPE GetBlockType()
{
return ::E_BLOCK_REDSTONE_REPEATER_OFF;
}
virtual char GetBlockMeta(char a_ItemMeta)
{
return 0;
}
};