summaryrefslogtreecommitdiffstats
path: root/source/items/ItemDoor.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/items/ItemDoor.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/source/items/ItemDoor.h b/source/items/ItemDoor.h
new file mode 100644
index 000000000..5b656ce17
--- /dev/null
+++ b/source/items/ItemDoor.h
@@ -0,0 +1,25 @@
+#pragma once
+
+#include "Item.h"
+#include "../cWorld.h"
+
+class cItemDoorHandler : public cItemHandler
+{
+public:
+ cItemDoorHandler(int a_ItemID)
+ : cItemHandler(a_ItemID)
+ {
+
+ }
+
+ virtual bool IsPlaceable()
+ {
+ return true;
+ }
+
+ virtual BLOCKTYPE GetBlockType()
+ {
+ return (m_ItemID == E_ITEM_WOODEN_DOOR) ? E_BLOCK_WOODEN_DOOR : E_BLOCK_IRON_DOOR;
+ }
+
+}; \ No newline at end of file