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