From 9e44b0aae164f2456a452714f869cc9670732d8e Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 6 Jul 2014 23:50:22 +0100 Subject: Implemented trapped chests & others + Added trapped chests * Fixed a bunch of bugs in the redstone simulator concerning wires and repeaters * Other potential bugfixes --- src/BlockEntities/ChestEntity.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/BlockEntities/ChestEntity.h') diff --git a/src/BlockEntities/ChestEntity.h b/src/BlockEntities/ChestEntity.h index ce16f84d7..42cf7657c 100644 --- a/src/BlockEntities/ChestEntity.h +++ b/src/BlockEntities/ChestEntity.h @@ -35,7 +35,7 @@ public: // tolua_end /// Constructor used for normal operation - cChestEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World); + cChestEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World, BLOCKTYPE a_Type); virtual ~cChestEntity(); @@ -50,6 +50,17 @@ public: /// Opens a new chest window for this chest. Scans for neighbors to open a double chest window, if appropriate. void OpenNewWindow(void); + + /** Gets the number of players who currently have this chest open */ + int GetNumberOfPlayers(void) const { return m_ActivePlayers; } + + /** Gets the number of players who currently have this chest open */ + void SetNumberOfPlayers(int a_Amount) { m_ActivePlayers = a_Amount; } + +private: + + /** Holds the number of players who currently have this chest open */ + int m_ActivePlayers; } ; // tolua_export -- cgit v1.2.3 From c4f1284d9cca12f77184b7a0b9521e87f6533974 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sat, 12 Jul 2014 23:30:34 +0200 Subject: cChestEntity: Renamed a member to avoid confusion. --- src/BlockEntities/ChestEntity.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/BlockEntities/ChestEntity.h') diff --git a/src/BlockEntities/ChestEntity.h b/src/BlockEntities/ChestEntity.h index 42cf7657c..310618504 100644 --- a/src/BlockEntities/ChestEntity.h +++ b/src/BlockEntities/ChestEntity.h @@ -34,7 +34,7 @@ public: // tolua_end - /// Constructor used for normal operation + /** Constructor used for normal operation */ cChestEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World, BLOCKTYPE a_Type); virtual ~cChestEntity(); @@ -48,19 +48,20 @@ public: virtual void SendTo(cClientHandle & a_Client) override; virtual void UsedBy(cPlayer * a_Player) override; - /// Opens a new chest window for this chest. Scans for neighbors to open a double chest window, if appropriate. + /** Opens a new chest window for this chest. + Scans for neighbors to open a double chest window, if appropriate. */ void OpenNewWindow(void); /** Gets the number of players who currently have this chest open */ - int GetNumberOfPlayers(void) const { return m_ActivePlayers; } + int GetNumberOfPlayers(void) const { return m_NumActivePlayers; } - /** Gets the number of players who currently have this chest open */ - void SetNumberOfPlayers(int a_Amount) { m_ActivePlayers = a_Amount; } + /** Sets the number of players who currently have this chest open */ + void SetNumberOfPlayers(int a_NumActivePlayers) { m_NumActivePlayers = a_NumActivePlayers; } private: - /** Holds the number of players who currently have this chest open */ - int m_ActivePlayers; + /** Number of players who currently have this chest open */ + int m_NumActivePlayers; } ; // tolua_export -- cgit v1.2.3