summaryrefslogtreecommitdiffstats
path: root/source/Minecart.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/Minecart.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/Minecart.h b/source/Minecart.h
index a074e2f97..17c766fb8 100644
--- a/source/Minecart.h
+++ b/source/Minecart.h
@@ -10,6 +10,7 @@
#pragma once
#include "Entity.h"
+#include "Item.h"
@@ -74,8 +75,21 @@ class cMinecartWithChest :
public:
CLASS_PROTODEF(cMinecartWithChest);
+ /// Number of item slots in the chest
+ static const int NumSlots = 9 * 3;
+
cMinecartWithChest(double a_X, double a_Y, double a_Z);
+ const cItem & GetItem(int a_Idx) const { return m_Items[a_Idx]; }
+ cItem & GetItem(int a_Idx) { return m_Items[a_Idx]; }
+
+ void SetItem(int a_Idx, const cItem & a_Item);
+
+protected:
+
+ /// The chest contents:
+ cItem m_Items[NumSlots];
+
// cEntity overrides:
virtual void OnRightClicked(cPlayer & a_Player) override;
} ;