From 06942871dde1388284a4fe222040720de3923b03 Mon Sep 17 00:00:00 2001 From: Tycho Date: Tue, 5 Aug 2014 21:48:23 +0100 Subject: Refactored Redstone simulator not to depend on TNTEntity or DropSpenserENtity Directly --- src/BlockEntities/DropSpenserEntity.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/BlockEntities/DropSpenserEntity.h') diff --git a/src/BlockEntities/DropSpenserEntity.h b/src/BlockEntities/DropSpenserEntity.h index 9f58d0b07..dabe9a27b 100644 --- a/src/BlockEntities/DropSpenserEntity.h +++ b/src/BlockEntities/DropSpenserEntity.h @@ -11,7 +11,7 @@ #pragma once #include "BlockEntityWithItems.h" - +#include "RedstonePoweredEntity.h" @@ -30,7 +30,8 @@ class cServer; // tolua_begin class cDropSpenserEntity : - public cBlockEntityWithItems + public cBlockEntityWithItems, + public cRedstonePoweredEntity { typedef cBlockEntityWithItems super; @@ -65,7 +66,7 @@ public: void Activate(void); /// Sets the internal redstone power flag to "on" or "off", depending on the parameter. Calls Activate() if appropriate - void SetRedstonePower(bool a_IsPowered); + virtual void SetRedstonePower(bool a_IsPowered) override; // tolua_end -- cgit v1.2.3 From a0ba7426c6bc2059d5db6d248ef8e582e40ce4b3 Mon Sep 17 00:00:00 2001 From: Tycho Date: Wed, 6 Aug 2014 13:17:05 +0100 Subject: Fixed multiple inhertance being output by tolua --- src/BlockEntities/DropSpenserEntity.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/BlockEntities/DropSpenserEntity.h') diff --git a/src/BlockEntities/DropSpenserEntity.h b/src/BlockEntities/DropSpenserEntity.h index dabe9a27b..be56447aa 100644 --- a/src/BlockEntities/DropSpenserEntity.h +++ b/src/BlockEntities/DropSpenserEntity.h @@ -30,8 +30,10 @@ class cServer; // tolua_begin class cDropSpenserEntity : - public cBlockEntityWithItems, - public cRedstonePoweredEntity + public cBlockEntityWithItems + // tolua_end + , public cRedstonePoweredEntity + // tolua_begin { typedef cBlockEntityWithItems super; @@ -65,10 +67,10 @@ public: /// Sets the dropspenser to dropspense an item in the next tick void Activate(void); + // tolua_end + /// Sets the internal redstone power flag to "on" or "off", depending on the parameter. Calls Activate() if appropriate virtual void SetRedstonePower(bool a_IsPowered) override; - - // tolua_end protected: bool m_ShouldDropSpense; ///< If true, the dropspenser will dropspense an item in the next tick -- cgit v1.2.3