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/RedstonePoweredEntity.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/BlockEntities/RedstonePoweredEntity.h (limited to 'src/BlockEntities/RedstonePoweredEntity.h') diff --git a/src/BlockEntities/RedstonePoweredEntity.h b/src/BlockEntities/RedstonePoweredEntity.h new file mode 100644 index 000000000..aebba771f --- /dev/null +++ b/src/BlockEntities/RedstonePoweredEntity.h @@ -0,0 +1,9 @@ + + +// Interface class representing a blockEntity that responds to redstone +class cRedstonePoweredEntity +{ +public: +/// Sets the internal redstone power flag to "on" or "off", depending on the parameter. Calls Activate() if appropriate + virtual void SetRedstonePower(bool a_IsPowered) = 0; +}; -- cgit v1.2.3 From 9272bd627c732771b81e6dcf6b8465404917a9d6 Mon Sep 17 00:00:00 2001 From: Tycho Date: Tue, 5 Aug 2014 22:54:36 +0100 Subject: Removed dependecy of redstone simulator on NoteBlock --- src/BlockEntities/RedstonePoweredEntity.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/BlockEntities/RedstonePoweredEntity.h') diff --git a/src/BlockEntities/RedstonePoweredEntity.h b/src/BlockEntities/RedstonePoweredEntity.h index aebba771f..7d6904442 100644 --- a/src/BlockEntities/RedstonePoweredEntity.h +++ b/src/BlockEntities/RedstonePoweredEntity.h @@ -1,9 +1,13 @@ +#pragma once // Interface class representing a blockEntity that responds to redstone class cRedstonePoweredEntity { public: + + virtual ~cRedstonePoweredEntity() {}; + /// Sets the internal redstone power flag to "on" or "off", depending on the parameter. Calls Activate() if appropriate virtual void SetRedstonePower(bool a_IsPowered) = 0; }; -- cgit v1.2.3 From 6acddd0cad25078ae2c67e7a0eb353e9d4d100e2 Mon Sep 17 00:00:00 2001 From: Tycho Date: Wed, 6 Aug 2014 13:19:22 +0100 Subject: Fixed style issues --- src/BlockEntities/RedstonePoweredEntity.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/BlockEntities/RedstonePoweredEntity.h') diff --git a/src/BlockEntities/RedstonePoweredEntity.h b/src/BlockEntities/RedstonePoweredEntity.h index 7d6904442..f11df4fc4 100644 --- a/src/BlockEntities/RedstonePoweredEntity.h +++ b/src/BlockEntities/RedstonePoweredEntity.h @@ -8,6 +8,6 @@ public: virtual ~cRedstonePoweredEntity() {}; -/// Sets the internal redstone power flag to "on" or "off", depending on the parameter. Calls Activate() if appropriate + /// Sets the internal redstone power flag to "on" or "off", depending on the parameter. Calls Activate() if appropriate virtual void SetRedstonePower(bool a_IsPowered) = 0; }; -- cgit v1.2.3