summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--VC2010/MCServer.vcxproj1
-rw-r--r--VC2010/MCServer.vcxproj.filters3
-rw-r--r--source/items/Item.cpp4
-rw-r--r--source/items/ItemSign.h25
4 files changed, 33 insertions, 0 deletions
diff --git a/VC2010/MCServer.vcxproj b/VC2010/MCServer.vcxproj
index 58e1a83d4..101b29501 100644
--- a/VC2010/MCServer.vcxproj
+++ b/VC2010/MCServer.vcxproj
@@ -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" />
diff --git a/VC2010/MCServer.vcxproj.filters b/VC2010/MCServer.vcxproj.filters
index fff2cf419..cde3385fa 100644
--- a/VC2010/MCServer.vcxproj.filters
+++ b/VC2010/MCServer.vcxproj.filters
@@ -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">
diff --git a/source/items/Item.cpp b/source/items/Item.cpp
index b645a8a93..17f4ead71 100644
--- a/source/items/Item.cpp
+++ b/source/items/Item.cpp
@@ -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);
}
}
diff --git a/source/items/ItemSign.h b/source/items/ItemSign.h
new file mode 100644
index 000000000..06116f0e8
--- /dev/null
+++ b/source/items/ItemSign.h
@@ -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;
+ }
+
+}; \ No newline at end of file